Skip to content

Vipul99999/Distributed-Task-Management-System-TUDU-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

34 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🟒 TUDU

Distributed Task Management System

A cloud-deployed, service-separated task management platform built using modern full-stack technologies.

TUDU demonstrates modular backend architecture, secure authentication patterns, and production-style deployment across multiple cloud platforms.


Demo: Live Demo Link

πŸš€ Overview

TUDU is not just a CRUD to-do app.

It is a service-separated system designed with:

  • Secure JWT-based authentication
  • RESTful API architecture
  • Cloud deployment strategy
  • Backend security best practices
  • Modular and extensible design

The project simulates real-world SaaS architecture by separating authentication and business logic services.


πŸ— Architecture

System Flow

User β†’ Auth Service β†’ JWT β†’ Task Frontend β†’ Backend API β†’ PostgreSQL

Services

πŸ” Authentication Service (Next.js)
πŸ–₯ Task Frontend (Next.js)
βš™ Backend API (Node.js + Express)
πŸ—„ Database (Neon PostgreSQL)


☁️ Deployment

Service Platform
Authentication Service Vercel
Task Frontend Vercel
Backend API Render
Database Neon (Serverless PostgreSQL)

Each service is independently deployed with environment-based configuration.


πŸ” Authentication Flow

  • User registers or logs in
  • Password is securely hashed using bcrypt
  • JWT token is generated upon successful authentication
  • Protected routes validate JWT using middleware
  • Backend verifies token signature before granting access

Authentication is stateless and scalable.


✨ Features

πŸ‘€ User Authentication

  • User Registration
  • Secure Login
  • Password Hashing (bcrypt)
  • JWT-based Authorization
  • Protected API Routes

πŸ“‹ Task Management

  • Create tasks
  • Update tasks
  • Delete tasks
  • Drag-and-drop task reordering
  • Modular UI structure

⚑ Performance Optimizations

  • React Query for server-state caching
  • Optimized API requests
  • Clean component architecture

πŸ›‘ Security Practices

  • Helmet for secure HTTP headers
  • Express Rate Limiting
  • Controlled CORS configuration
  • Environment-based secrets management

πŸ›  Technology Stack

Frontend

  • Next.js
  • React
  • React Query
  • Tailwind CSS
  • dnd-kit

Backend

  • Node.js
  • Express
  • Prisma ORM
  • PostgreSQL
  • Zod Validation
  • JSON Web Tokens
  • Helmet
  • Express Rate Limit

Infrastructure

  • Vercel
  • Render
  • Neon PostgreSQL

πŸ“‘ API Documentation

πŸ” Authentication Endpoints

➀ Register User

POST /api/auth/register

Request Body:

{ "name": "username",
  "email": "user@example.com",
  "password": "password123"
}

Response:

{
  "message": "User registered successfully",
  "userId": "uuid"
}

➀ Login User

POST /api/auth/login

Request Body:

{
  "email": "user@example.com",
  "password": "password123"
}

Response:

{
  "token": "jwt_token_here"
}

πŸ“‹ Task Endpoints

All task endpoints require Authorization header.

Authorization Header:

Authorization: Bearer <jwt_token>

➀ Get All Tasks

GET /api/tasks

Response:

[
  {
    "id": "task_id",
    "title": "Complete project",
    "completed": false
  }
]

➀ Create Task

POST /api/tasks

Request Body:

{
  "title": "Complete project",
  "description": "Finish backend integration"
}

Response:

{
  "id": "task_id",
  "title": "Complete project",
  "completed": false
}

➀ Update Task

PUT /api/tasks/:id

Request Body:

{
  "title": "Updated title",
  "completed": true
}

➀ Delete Task

DELETE /api/tasks/:id

Response:

{
  "message": "Task deleted successfully"
}

πŸ“‚ Project Structure

userAuth/
 |-- prisma
/src
 β”œβ”€β”€ app/
 β”œβ”€β”€ action/
 β”œβ”€β”€ components/
 β”œβ”€β”€ lib/
 └── types/

task-frontend/src/
 β”œβ”€β”€ components/
 β”œβ”€β”€ hooks/
 β”œβ”€β”€ lib/
 └── app/
 └── types/
 └── validation/
 └── stores/

backend/
 β”œβ”€β”€ prisma/
 β”œβ”€β”€ src/
 β”‚   β”œβ”€β”€ routes/
 β”‚   β”œβ”€β”€ controllers/
 β”‚   β”œβ”€β”€ middleware/
 β”‚   β”œβ”€β”€ services/
 β”‚   └── config/
 β”‚   └── utils/
 β”‚   └── types/

βš™οΈ Environment Variables

Backend


NODE_ENV
PORT
DATABASE_URL
JWT_SECRET=<JWT_SECRET_KEY>
ALLOWED_MICROSERVICES
PUBLIC_KEY=<your_rsa_public_key>
NEXT_PUBLIC_AUTH_API_URL
NEXT_PUBLIC_APP_API_URL

Frontend

AUTH_SERVICE_URL=  <auth service url here>
PUBLIC_KEY = <public key here>
NEXT_PUBLIC_AUTH_SERVICE_URL= <auth service url here>
NEXT_PUBLIC_APP_API_URL= <app api url here>
NEXT_PUBLIC_APP_SERVICE_URL= <app service url here>

🧠 Design Decisions

Decision Reason
Service Separation Modularity and scalability
JWT Authentication Stateless and scalable auth
Prisma ORM Type-safe database interaction
React Query Efficient server-state management
Cloud Deployment Real-world distributed simulation

πŸš€ Future Improvements

  • Refresh token implementation
  • Real-time updates (WebSockets)
  • Notifications system
  • User preferences module
  • Docker containerization
  • Reverse proxy configuration
  • CI/CD pipeline integration

πŸ“š What This Project Demonstrates

  • Backend architecture understanding
  • Secure authentication implementation
  • REST API design
  • Cloud deployment experience
  • Environment configuration management
  • Security-focused backend practices

πŸ‘¨β€πŸ’» Author

Vipul Kumar Patel Computer Science Student Focused on Backend Systems, Distributed Architecture & Scalable Applications

About

A distributed task management platform (TUDU) featuring service-separated architecture. Built with Next.js, Node.js/Express, and PostgreSQL, it demonstrates modular backend design, secure JWT-based stateless authentication, and production-style cloud deployment. πŸš€πŸ—οΈ

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors