Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A Spring Boot 3 backend for a SaaS-style e-learning platform with authentication, REST APIs, and PostgreSQL integration. Clean architecture, Spring Security, and production-ready.

ManibalaSinha/java-microservices-kafka-automation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

4 Commits

Repository files navigation

SaaS E-Learning Backend

A Spring Boot 3 + Maven powered backend service for a SaaS-style e-learning platform. This project demonstrates how to build a production-ready backend with authentication, user management, and secure APIs.

Designed to showcase clean architecture, modern Java practices, and readiness for scaling SaaS applications.


Tech Stack

  • Backend Framework: Spring Boot 3
  • Build Tool: Maven
  • Language: Java 17+
  • Database: PostgreSQL (configurable to H2 for testing)
  • ORM: Spring Data JPA
  • Authentication & Security: Spring Security with form login (extendable to JWT/OAuth2)
  • Testing: JUnit 5, Spring Boot Test
  • Dev Tools: Lombok, Spring Boot DevTools

Project Structure

backend/
│── src/
│ ├── main/java/com/sass/
│ │ ├── BackendApplication.java # Main entry point
│ │ ├── config/ # Spring Security & App Config
│ │ ├── controller/ # REST API controllers
│ │ ├── model/ # JPA Entities
│ │ ├── repository/ # Data Access Layer
│ │ └── service/ # Business Logic Layer
│ └── test/java/com/sass/
│ └── DemoApplicationTests.java # Unit/Integration tests
│
└── pom.xml # Maven dependencies

Application Flow

  1. Entry Point

    • BackendApplication.java starts the application with SpringApplication.run(...).
    • Automatically scans com.sass package and its subpackages.
  2. User Request

    • Example: User navigates to http://localhost:8080/login.
    • Spring Security intercepts the request and shows a login page.
  3. Authentication

    • If login fails → redirected to /login?error.
    • If login succeeds → redirected to home page or protected API.
  4. Controllers

    • REST controllers in controller/ handle user-facing endpoints like /api/courses, /api/users.
  5. Services

    • Business logic resides in service/ classes (e.g., course creation, enrollment rules).
  6. Data Persistence

    • Services call repository/ interfaces.
    • Spring Data JPA translates repository calls into SQL queries to PostgreSQL.
  7. Response

    • Data is returned as JSON, ready to be consumed by a React/Flutter frontend.

Setup & Run

1. Clone the Repository

git clone https://github.com/ManibalaSinha/saas-backend.git
cd saas-backend

2. Configure Database

Update application.properties in src/main/resources/:

spring.datasource.url=jdbc:postgresql://localhost:5432/saasdb
spring.datasource.username=postgres
spring.datasource.password=yourpassword
spring.jpa.hibernate.ddl-auto=update

(For quick start, you can switch to in-memory H2 by uncommenting H2 config.)

3. Run the Application

mvn spring-boot:run

Backend will start on: http://localhost:8080

4. Testing

mvn test

Endpoints

  • GET /login → Login Page (Spring Security)
  • GET /api/users → Fetch all users
  • POST /api/courses → Create new course
  • GET /api/courses/{id} → Fetch course details

Why This Project?

clean architecture in a real-world SaaS backend. Spring Security for authentication & authorization. Built with modern Spring Boot 3 and Java 17. Integrating with React frontend. Follows enterprise-grade practices


Author

** Manibala Sinha** 🔗 LinkedIn | GitHub


If you like this project, don’t forget to star the repo – it motivates me to build more!

About

A Spring Boot 3 backend for a SaaS-style e-learning platform with authentication, REST APIs, and PostgreSQL integration. Clean architecture, Spring Security, and production-ready.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

AltStyle によって変換されたページ (->オリジナル) /