Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Task Management System

A full-stack application for managing personal tasks, built with a focus on security, performance, and scalability. The system implements a robust backend API using Spring Boot and a responsive frontend using React.

System Architecture

The following diagram illustrates the production-ready infrastructure, featuring a load balancer, multiple application instances, and a caching layer.

graph TB
    subgraph Client
        Browser[React App]
    end
    
    subgraph "Load Balancer"
        Nginx[Nginx :80]
    end
    
    subgraph "Application Cluster"
        BE1[Backend Instance 1]
        BE2[Backend Instance 2]
    end
    
    subgraph "Data Layer"
        Redis[(Redis Cache)]
        PG[(PostgreSQL)]
    end
    
    Browser --> Nginx
    Nginx --> BE1 & BE2
    BE1 & BE2 --> Redis
    BE1 & BE2 --> PG
Loading

Technical Features

Backend

  • Security: Stateless authentication using JSON Web Tokens (JWT). Password storage is secured using BCrypt hashing.
  • Authorization: Role-Based Access Control (RBAC) allows for granular permission management.
  • Concurrency: Asynchronous processing enabled for non-blocking execution of background tasks.
  • Reliability: Implementation of global exception handling and standardized API responses.
  • Validation: Strict input validation using Jakarta Bean Validation constraints.
  • Documentation: Automatic API documentation generated via Swagger and OpenAPI 3.

Database and Performance

  • Data Persistence: Support for both H2 (development) and PostgreSQL (production).
  • Schema Management: Database migrations managed through Flyway.
  • Connection Pooling: Optimized database connection management using HikariCP.
  • Caching: Distributed caching using Redis to reduce database latency and improve throughput.
  • Rate Limiting: Protection against API abuse implemented via IP-based rate limiting.

Frontend

  • Framework: Developed using React with Vite for a fast and optimized build environment.
  • State Management: Authentication state and user sessions managed through React Context API.
  • Responsiveness: A clean, modular interface designed for across different screen sizes.

Project Structure

  • backend/demo: Contains the Spring Boot 3.2 source code, including controllers, services, repositories, and configurations.
  • frontend: Contains the React 18 source code, services for API interaction, and UI components.
  • docker-compose.yml: Configuration for orchestrating the multi-container production environment.

Getting Started

Prerequisites

  • Java Development Kit (JDK) 17 or higher
  • Node.js 16 or higher
  • Maven 3.6 or higher
  • Docker and Docker Compose (required for production profile)

Development Setup

  1. Start the Backend:

    cd backend/demo
    mvn spring-boot:run

    The backend will start on port 9090 by default.

  2. Start the Frontend:

    cd frontend
    npm install
    npm run dev

    The frontend will be accessible at http://localhost:3000.

Production Setup

To deploy the full-stack infrastructure including PostgreSQL and Redis:

  1. Launch Infrastructure:
    cd backend/demo
    docker-compose up -d
  2. Run Application:
    mvn spring-boot:run -Dspring-boot.run.profiles=prod

API Documentation

When the application is running, you can explore the REST API endpoints and schemas via the Swagger UI at: http://localhost:9090/swagger-ui.html

Additional Information

For a detailed analysis of the scalability strategies and architectural decisions, please see the SCALABILITY.md file.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages