A Fullstack Task Management Application built with React, Express.js, Supabase PostgreSQL, and JWT Authentication.
TaskFlow follows RESTful API principles and provides secure authentication, authorization, and complete CRUD operations for task management. The project demonstrates frontend-backend integration using modern web development technologies.
- User Registration with name, email, and password
- User Login with JWT token generation
- JWT-based Authentication on protected endpoints
- Protected Routes on the frontend (React Router)
- User-Based Resource Authorization (users can only access their own tasks)
- Create Task with title and optional description
- View All Tasks (sorted by newest first)
- View Task Details by ID
- Update Task (title, description, completed status)
- Delete Task
- Mark / Unmark Task as Completed
- Interactive Swagger UI at
/docs - OpenAPI 3.0 specification at
/docs.json - Try-it-out functionality with JWT authentication
- Minimalist UI with blue, white, and black color palette
- Glassmorphism login & register cards
- Responsive layout for desktop and mobile
- Smooth micro-animations and hover effects
- Custom-styled checkboxes and task cards
- Google Fonts (Inter) typography
| Technology | Purpose |
|---|---|
| React 19 | UI library |
| Vite 8 | Build tool & dev server |
| React Router DOM | Client-side routing |
| Axios | HTTP client |
| Vanilla CSS | Styling & animations |
| Technology | Purpose |
|---|---|
| Node.js | Runtime environment |
| Express.js 5 | Web framework |
| JSON Web Token (JWT) | Authentication |
| bcryptjs | Password hashing |
| Joi | Request validation |
| swagger-jsdoc | OpenAPI spec generation |
| swagger-ui-express | API documentation UI |
| Technology | Purpose |
|---|---|
| Supabase PostgreSQL | Cloud-hosted database |
TaskFlow/
โ
โโโ backend/
โ โโโ src/
โ โ โโโ config/
โ โ โ โโโ supabase.js # Supabase client configuration
โ โ โ โโโ swagger.js # Swagger/OpenAPI specification
โ โ โโโ controllers/
โ โ โ โโโ auth.controller.js # Register, login, me handlers
โ โ โ โโโ task.controller.js # CRUD task handlers
โ โ โโโ middlewares/
โ โ โ โโโ auth.middleware.js # JWT verification middleware
โ โ โ โโโ validate.middleware.js # Joi validation middleware
โ โ โโโ routes/
โ โ โ โโโ auth.routes.js # Auth endpoint routes
โ โ โ โโโ task.route.js # Task endpoint routes
โ โ โโโ services/
โ โ โ โโโ auth.service.js # User database operations
โ โ โ โโโ task.service.js # Task database operations
โ โ โโโ utils/ # Utility functions (hash, token)
โ โ โโโ validations/
โ โ โ โโโ auth.validation.js # Register & login schemas
โ โ โ โโโ task.validation.js # Create & update task schemas
โ โ โโโ app.js # Express app setup & middleware
โ โ
โ โโโ .env.example
โ โโโ package.json
โ โโโ server.js # Server entry point
โ
โโโ frontend/
โโโ src/
โ โโโ api/ # Axios instance configuration
โ โโโ context/
โ โ โโโ AuthContext.jsx # JWT token state management
โ โโโ pages/
โ โ โโโ Login.jsx # Login page with form
โ โ โโโ Register.jsx # Register page with form
โ โ โโโ Dashboard.jsx # Task management dashboard
โ โโโ routes/
โ โ โโโ AppRoutes.jsx # Route definitions
โ โ โโโ ProtectedRoute.jsx # Auth guard component
โ โโโ services/
โ โ โโโ auth.service.js # Auth API calls
โ โ โโโ task.service.js # Task API calls
โ โโโ styles/
โ โ โโโ global.css # Design system & all styles
โ โโโ main.jsx # App entry point
โ
โโโ index.html
โโโ package.json
โโโโโโโโโโโโโโโโโโโโโโโ
โ React Frontend โ
โ (Vite Dev Server) โ
โโโโโโโโโโฌโโโโโโโโโโโโโ
โ HTTP Requests
โผ
โโโโโโโโโโโโโโโโโโโโโโโ
โ Axios HTTP Client โ
โ (Bearer Token) โ
โโโโโโโโโโฌโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโ
โ Express REST API โ
โ (Port 5000) โ
โโโโโโโโโโโโโโโโโโโโโโโค
โ JWT Auth Middleware โ
โ Joi Validation โ
โโโโโโโโโโโโโโโโโโโโโโโค
โ Swagger UI (/docs) โ
โโโโโโโโโโฌโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโ
โ Supabase PostgreSQL โ
โ (Cloud Database) โ
โโโโโโโโโโโโโโโโโโโโโโโ
| Method | Endpoint | Auth | Description |
|---|---|---|---|
| POST | /api/auth/register |
โ | Register a new user |
| POST | /api/auth/login |
โ | Login and receive JWT token |
| GET | /api/auth/me |
โ | Get current authenticated user |
| Method | Endpoint | Auth | Description |
|---|---|---|---|
| GET | /api/tasks |
โ | Get all user's tasks |
| GET | /api/tasks/:id |
โ | Get a single task |
| POST | /api/tasks |
โ | Create a new task |
| PATCH | /api/tasks/:id |
โ | Update a task |
| DELETE | /api/tasks/:id |
โ | Delete a task |
| Method | Endpoint | Description |
|---|---|---|
| GET | /docs |
Swagger UI interactive docs |
| GET | /docs.json |
Raw OpenAPI 3.0 JSON spec |
git clone <repository-url>
cd TaskFlowNavigate to the backend directory:
cd backendInstall dependencies:
npm installCreate a .env file based on .env.example:
PORT=5000
SUPABASE_URL=your_supabase_url
SUPABASE_KEY=your_supabase_key
JWT_SECRET=your_jwt_secretStart the backend server:
npm run devThe backend server will be available at:
http://localhost:5000
Swagger API Documentation:
http://localhost:5000/docs
Open a new terminal and navigate to the frontend directory:
cd frontendInstall dependencies:
npm installStart the frontend development server:
npm run devThe frontend application will be available at:
http://localhost:5173
| Column | Type | Description |
|---|---|---|
| id | uuid (PK) | Auto-generated UUID |
| name | text | User's display name |
| text | User's email address | |
| password | text | Bcrypt hashed |
| created_at | timestamptz | Auto-generated |
| Column | Type | Description |
|---|---|---|
| id | uuid (PK) | Auto-generated UUID |
| title | text | Task title (required) |
| description | text | Task description |
| completed | boolean | Completion status |
| user_id | uuid (FK) | References users.id |
| created_at | timestamptz | Auto-generated |
users (1) โโโโโโ (*) tasks
Each task belongs to a single user. Users can only access, modify, and delete their own tasks.
Interactive API documentation is available through Swagger UI:
http://localhost:5000/docs
Swagger provides:
- Complete endpoint documentation with descriptions
- Request body schemas with examples
- Response schemas for all status codes (200, 201, 400, 401, 403, 404, 500)
- JWT Bearer authentication testing via the Authorize button
- Interactive "Try it out" functionality for all endpoints
The raw OpenAPI 3.0 JSON specification is also available at:
http://localhost:5000/docs.json
This project demonstrates the implementation of:
- RESTful API Design with proper HTTP methods and status codes
- JWT Authentication and token-based authorization
- Authorization Middleware for resource-level access control
- CRUD Operations with Supabase PostgreSQL
- React State Management with Context API
- Protected Routes on both frontend and backend
- FrontendโBackend Integration via Axios HTTP client
- Request Validation using Joi schemas
- API Documentation with Swagger / OpenAPI 3.0
- Modern CSS Design with glassmorphism and micro-animations
- Search & filter tasks
- Pagination for task lists
- User profile management
- Dark mode toggle
- Task categories / labels
- Due dates and reminders
- Automated testing (Jest / Vitest)
- Docker deployment
Krisna Guntur Pamungkas | 241080200051
TaskFlow was developed as a Fullstack RESTful API project for learning modern web application development using React, Express.js, JWT Authentication, and Supabase PostgreSQL.



