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 ApplicationSpring Boot 3.2React 18 + VitePostgreSQL


🌐 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 (TODOIN_PROGRESSPENDING_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
RoleEmailNameDepartmentPermissions
ADMINadmin@enterprise.comAlice AdminWorkspace LevelFull System Governance, Directory, Analytics
MANAGERmanager.tech@enterprise.comMarcus VanceEngineeringCreate & Assign Tasks, Approve/Reject Eng Deliverables
MANAGERmanager.hr@enterprise.comHelena RostovaHuman ResourcesCreate & Assign Tasks, Approve/Reject HR Deliverables
EMPLOYEEemp1@enterprise.comDavid DevEngineeringView & progress assigned tasks
EMPLOYEEemp2@enterprise.comEmma CoderEngineeringView & 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:
    VariableValue
    JDBC_DATABASE_URLjdbc:postgresql://ep-sample-12345.us-east-2.aws.neon.tech:5432/neondb?sslmode=require
    JDBC_DATABASE_USERNAMEalex
    JDBC_DATABASE_PASSWORDsecret_pass
    APP_JWT_SECRETYourSuperSecretKeyForJWTTokenGenerationEnsureAtLeast256BitsLong!
    SPRING_PROFILES_ACTIVEprod
  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 NewProject.
  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:
    VariableValue
    VITE_API_BASE_URLhttps://your-render-backend.onrender.com
  7. Click Deploy.

📡 REST API Documentation

EndpointMethodAuthDescription
/api/v1/auth/loginPOSTPublicAuthenticate user & receive JWT token
/api/v1/auth/registerPOSTPublicRegister user (CREATE new workspace or JOIN existing)
/api/v1/auth/meGETBearerFetch current user session details
/api/v1/workspaces/my-workspaceGETBearerFetch workspace info and active invite code
/api/v1/workspaces/regenerate-invite-codePOSTADMINGenerate a new 8-character invite code
/api/v1/usersGETADMIN/MANAGERGet workspace user directory
/api/v1/users/{id}/rolePUTADMINPromote or demote user role
/api/v1/departmentsGET / POSTADMINCreate and manage workspace departments
/api/v1/tasks/allGETADMINList all workspace tasks
/api/v1/tasks/departmentGETMANAGER/ADMINList department tasks
/api/v1/tasks/my-tasksGETEMPLOYEEList assigned tasks
/api/v1/tasksPOSTMANAGER/ADMINCreate and assign task to employee
/api/v1/tasks/{id}/statusPUTEMPLOYEE/MANAGERTransition task status (TODOIN_PROGRESSPENDING_APPROVAL)
/api/v1/tasks/{id}/approvalPUTMANAGER/ADMINApprove (DONE) or Reject (IN_PROGRESS + feedback)
/api/v1/analytics/summaryGETADMIN/MANAGERGet workspace analytics metrics

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

Releases

Packages

Contributors

Languages