Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 TaskFlow Enterprise — Multi-Tenant Task Platform

Live Application Spring Boot 3.2 React 18 + Vite PostgreSQL


🌐 Live Production Application

👉 https://task-management-system-ten-coral.vercel.app/


📋 Table of Contents


🎯 Platform Architecture

 ┌───────────────────────────────────────┐          ┌───────────────────────────────────────┐
 │     Frontend (React 18 + Vite)        │          │     Backend (Spring Boot 3.2)         │
 │   Hosted on Vercel (Global CDN)       │ ───────> │     Hosted on Render (Docker)         │
 │  https://task-management-system-...   │   JWT    │                                       │
 │ - Royal Blue Enterprise UI            │  Bearer  │ - REST API Controllers & Security     │
 │ - Axios 15s Retries & Timeout Logic   │  Tokens  │ - Tenant Workspace Filter Scoping     │
 │ - Multi-Tenant Onboarding Flow        │          │ - Cloud PostgreSQL (UUID Storage)     │
 └───────────────────────────────────────┘          └───────────────────────────────────────┘

✨ Core Enterprise Features

  • 🏢 Multi-Tenant Workspace Isolation:
    • Create Workspace: Onboards a new company, generates a unique 8-character invite code, and assigns ROLE_ADMIN.
    • Join Workspace: Validates an 8-character invite code to join an existing company workspace as ROLE_EMPLOYEE.
    • Data Partitioning: Every database record (Task, Department, User) is strictly scoped by workspace_id.
  • 🔐 Stateless JWT Security: Signed HS256 tokens carrying user roles and workspace metadata.
  • 🛡️ Role-Based Access Control (RBAC):
    • ROLE_ADMIN: Workspace governance, User directory management, Admin role promotions, Department management, Invite code regeneration.
    • ROLE_MANAGER: Scope-restricted to assigned department, Task creation & assignment, Deliverable Approval/Rejection with custom feedback.
    • ROLE_EMPLOYEE: Scope-restricted to assigned tasks, Kanban board updates (TODO → IN_PROGRESS → PENDING_APPROVAL).
  • ⚡ Resilient Frontend Architecture: Custom Axios interceptor with 15s timeout handling backend cold-starts, exponential backoff retries, and Skeleton loader components.
  • 📊 Workspace Analytics: Real-time progress monitoring, weekly completed tasks, overdue task alerts, and department progress bars.
  • 🗄️ Persistent Cloud Database: Full migration from H2 in-memory to PostgreSQL with 128-bit UUID primary keys across all tables.

🔑 Pre-Seeded Demo Accounts

To test the system immediately, use the default seeded workspace:

  • Workspace Invite Code: ACME2026
  • Default Password: password123
Role Email Name Department Permissions
ADMIN admin@enterprise.com Alice Admin Workspace Level Full System Governance, Directory, Analytics
MANAGER manager.tech@enterprise.com Marcus Vance Engineering Create & Assign Tasks, Approve/Reject Eng Deliverables
MANAGER manager.hr@enterprise.com Helena Rostova Human Resources Create & Assign Tasks, Approve/Reject HR Deliverables
EMPLOYEE emp1@enterprise.com David Dev Engineering View & progress assigned tasks
EMPLOYEE emp2@enterprise.com Emma Coder Engineering View & progress assigned tasks

🛠️ Tech Stack

Backend Stack

  • Framework: Java 21 & Spring Boot 3.2.4
  • Security: Spring Security 6, JJWT 0.12.5, BCrypt password hashing
  • Database: PostgreSQL (org.postgresql.Driver) with local H2 fallback
  • Persistence: Spring Data JPA & Hibernate
  • Deployment: Multi-stage Dockerfile (eclipse-temurin:21-jdk / jre)

Frontend Stack

  • Framework: React 18 + Vite
  • Language: TypeScript
  • Styling: Tailwind CSS v4 (Royal Blue Theme: #2563EB) + Lucide Icons
  • HTTP Client: Axios with 15s timeout, exponential backoff retries, and 401 token refresh interceptors

💻 Local Development Guide

1. Prerequisites

  • Java 21 JDK installed (java -version)
  • Node.js 18+ and npm installed (node -v)

2. Run Backend Server

cd backend
./mvnw spring-boot:run

Backend API will be available at: http://localhost:8080

3. Run Frontend Server

cd frontend
npm install
npm run dev

Frontend Web Application will be available at: http://localhost:5173


🚀 Step-by-Step Production Deployment Guide

Follow these steps to deploy the application safely on free cloud platforms:

Step 1: Free Cloud PostgreSQL Setup (Neon.tech)

  1. Sign up for a free account at Neon.tech.
  2. Create a new project (e.g. taskflow-db).
  3. Copy your PostgreSQL connection string from the Neon dashboard.
    • Example: postgres://alex:secret_pass@ep-sample-12345.us-east-2.aws.neon.tech/neondb?sslmode=require

Step 2: Deploy Backend to Render

  1. Log in to your Render Dashboard.
  2. Click New + → Web Service.
  3. Connect your GitHub repository (Akshat0125/Task_Management_System).
  4. Set Root Directory to backend.
  5. Set Runtime to Docker (Render auto-detects backend/Dockerfile).
  6. Add the following Environment Variables:
    Variable Value
    JDBC_DATABASE_URL jdbc:postgresql://ep-sample-12345.us-east-2.aws.neon.tech:5432/neondb?sslmode=require
    JDBC_DATABASE_USERNAME alex
    JDBC_DATABASE_PASSWORD secret_pass
    APP_JWT_SECRET YourSuperSecretKeyForJWTTokenGenerationEnsureAtLeast256BitsLong!
    SPRING_PROFILES_ACTIVE prod
  7. Click Create Web Service.
  8. Render will build and deploy your containerized Spring Boot API (e.g., https://task-management-backend.onrender.com).

Step 3: Deploy Frontend to Vercel

  1. Log in to your Vercel Dashboard.
  2. Click Add New → Project.
  3. Import your GitHub repository (Akshat0125/Task_Management_System).
  4. Set Root Directory to frontend.
  5. Vercel auto-detects Vite configuration:
    • Framework Preset: Vite
    • Build Command: npm run build
    • Output Directory: dist
  6. Add Environment Variable:
    Variable Value
    VITE_API_BASE_URL https://your-render-backend.onrender.com
  7. Click Deploy.

📡 REST API Documentation

Endpoint Method Auth Description
/api/v1/auth/login POST Public Authenticate user & receive JWT token
/api/v1/auth/register POST Public Register user (CREATE new workspace or JOIN existing)
/api/v1/auth/me GET Bearer Fetch current user session details
/api/v1/workspaces/my-workspace GET Bearer Fetch workspace info and active invite code
/api/v1/workspaces/regenerate-invite-code POST ADMIN Generate a new 8-character invite code
/api/v1/users GET ADMIN/MANAGER Get workspace user directory
/api/v1/users/{id}/role PUT ADMIN Promote or demote user role
/api/v1/departments GET / POST ADMIN Create and manage workspace departments
/api/v1/tasks/all GET ADMIN List all workspace tasks
/api/v1/tasks/department GET MANAGER/ADMIN List department tasks
/api/v1/tasks/my-tasks GET EMPLOYEE List assigned tasks
/api/v1/tasks POST MANAGER/ADMIN Create and assign task to employee
/api/v1/tasks/{id}/status PUT EMPLOYEE/MANAGER Transition task status (TODO → IN_PROGRESS → PENDING_APPROVAL)
/api/v1/tasks/{id}/approval PUT MANAGER/ADMIN Approve (DONE) or Reject (IN_PROGRESS + feedback)
/api/v1/analytics/summary GET ADMIN/MANAGER Get workspace analytics metrics

Developed with ❤️ using Spring Boot, React, Vite, and PostgreSQL.

Releases

Packages

Contributors

Languages