Skip to content

subhashree0454/todo-app-springboot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ Premium Todo List Application | Spring Boot + JWT + Thymeleaf

Java Version Spring Boot Security PostgreSQL Swagger License

A production-ready, full-stack Spring Boot application designed with Clean Architecture. This project showcases a secure, high-performance hybrid system using Thymeleaf for the frontend and a stateless JWT-based REST API for data management.


πŸ“Έ Screenshots

View Application Gallery

πŸ” Multi-Auth System

Login Page Modern Login Interface

Register Page Seamless User Onboarding

πŸ“‹ Task Management

Dashboard Glassmorphism Dashboard with real-time search

Create Todo Simple & Intuitive Task Creation


πŸ—οΈ System Architecture

High-Level Architecture

graph TD
    Client[Browser / API Client] -->|HTTP Requests| Controller[Spring MVC / REST Controllers]
    Controller -->|Authentication / JWT Filter| Security[Spring Security]
    Security -->|Authorized Request| Service[Business Logic / Services]
    Service -->|Database Operations| Repository[Spring Data JPA]
    Repository -->|SQL| Database[(PostgreSQL)]
    
    subgraph "Backend Framework (Spring Boot)"
    Controller
    Security
    Service
    Repository
    end
Loading

Database Schema (ER Diagram)

erDiagram
    USER ||--o{ TODO : owns
    USER {
        long id PK
        string name
        string email UK
        string password "Hashed"
        timestamp created_at
    }
    TODO {
        long id PK
        string title
        string description
        timestamp created_at
        timestamp updated_at
        long user_id FK
    }
Loading

πŸ” Authentication Workflow

sequenceDiagram
    participant User
    participant Frontend
    participant AuthAPI as Auth Controller
    participant JWT as JwtService
    participant DB as User Repository

    User->>Frontend: Enter Credentials
    Frontend->>AuthAPI: POST /api/auth/login
    AuthAPI->>DB: Verify User
    DB-->>AuthAPI: User Found
    AuthAPI->>JWT: Generate Token
    JWT-->>AuthAPI: JWT Signed
    AuthAPI-->>Frontend: { success: true, token: "..." }
    Frontend->>Frontend: Store Token in LocalStorage
    Note over Frontend, AuthAPI: Subsequent Requests include Bearer Token in Header
Loading

🌟 Key Features

  • πŸ” Enterprise Security: Stateless JWT authentication with standard Bearer token support.
  • πŸ“š Interactive API Docs: Integrated Swagger/OpenAPI for real-time API testing.
  • πŸ—οΈ Decoupled Design: Pure separation of concerns using the Service-Repository pattern.
  • πŸ” Smart Searching: Advanced backend keyword filtering and pagination powered by Spring Data.
  • 🎨 Glassmorphism UI: modern design system with Bootstrap 5 and customized CSS.

πŸ› οΈ Technology Stack

Category Technology
Backend Java 17, Spring Boot 3.2, Spring Security
Authentication JSON Web Token (JWT), BCrypt
Database PostgreSQL, Hibernate, Spring Data JPA
Frontend Thymeleaf, JavaScript, Bootstrap 5
Documentation SpringDoc OpenAPI (Swagger UI)
Build Tool Maven 3.x

πŸš€ Getting Started

1. Prerequisites

  • PostgreSQL (Database name: todo_db)
  • Maven and JDK 17+

2. Configuration

Update src/main/resources/application.properties with your PostgreSQL username and password.

3. Execution

mvn clean install
mvn spring-boot:run

🐳 Containerization (Docker)

Run the entire stack (App + Database) with a single command:

docker-compose up --build

The application will be available at http://localhost:8080.


πŸ“– API Documentation (Swagger)

Once the application is running, you can access the interactive API documentation and test all endpoints:

πŸ“ Swagger UI: http://localhost:8080/swagger-ui/index.html
πŸ“ OpenAPI JSON: http://localhost:8080/v3/api-docs

Pro Tip: Use the "Authorize" button in Swagger and paste your JWT token (after logging in via /api/auth/login) to test protected Todo endpoints!


πŸ“ Project Overview

  • controller/: Entry points for REST and UI navigation.
  • service/: Core business logic and security checks.
  • repository/: Data persistence interfaces.
  • entity/: Database models.
  • security/: JWT handling and path security config.
  • config/: Application and OpenAPI beans.

πŸ“œ License

Licensed under the MIT License.

About

Production-ready Spring Boot Todo application with JWT authentication, Thymeleaf frontend, PostgreSQL, pagination, filtering, and secure REST APIs.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors