Skip to content

TaskFlow: A production-ready full-stack task management dashboard featuring Angular 17 frontend, Node.js Express backend, MySQL database, JWT authentication, role-based access, and dynamic task analytics with Chart.js and Tailwind CSS. Perfect for showcasing modern web development skills.

Notifications You must be signed in to change notification settings

Bhavu7/TaskFlow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 

Repository files navigation

πŸ“‹ TaskFlow - Full-Stack Task Management Dashboard

TaskFlow License Angular Node.js MySQL

A modern, production-ready full-stack task management application built with Angular 17, Node.js, Express, and MySQL. Features JWT authentication, real-time statistics, data visualization, and a beautiful responsive UI.

🌟 Live Demo


πŸ“Έ Screenshots

Dashboard View

Dashboard

Task Management

Tasks

Analytics

Analytics


✨ Features

πŸ” Authentication & Authorization

  • User registration with password hashing (bcrypt)
  • Secure JWT-based authentication
  • Role-based access control (Admin/User)
  • Protected routes and API endpoints
  • Automatic token refresh

πŸ“ Task Management

  • Create, Read, Update, Delete (CRUD) tasks
  • Task properties:
    • Title and Description
    • Priority levels (Low, Medium, High)
    • Status tracking (Pending, In Progress, Completed)
    • Due dates
    • User assignment (for admins)
  • Real-time task updates
  • Task filtering by priority and status
  • Search functionality

πŸ“Š Analytics & Visualization

  • Task statistics dashboard
  • Interactive charts using Chart.js:
    • Task distribution by status (Doughnut chart)
    • Task distribution by priority (Bar chart)
  • Key metrics:
    • Total tasks
    • Completed tasks
    • In-progress tasks
    • Overdue tasks

🎨 User Interface

  • Modern, minimalist design
  • Fully responsive (Mobile, Tablet, Desktop)
  • Tailwind CSS styling
  • Smooth animations and transitions
  • Color-coded priority badges
  • Intuitive navigation

πŸ” Advanced Features

  • Advanced filtering system
  • Search across tasks
  • Input validation (frontend & backend)
  • Error handling with user-friendly messages
  • Loading states and animations

πŸ› οΈ Tech Stack

Frontend

  • Framework: Angular 17 (Standalone Components)
  • Styling: Tailwind CSS
  • Charts: Chart.js
  • HTTP Client: Angular HttpClient
  • Routing: Angular Router
  • State Management: Services + RxJS

Backend

  • Runtime: Node.js
  • Framework: Express.js
  • Database: MySQL
  • Authentication: JWT (JSON Web Tokens)
  • Password Hashing: bcrypt
  • Validation: express-validator
  • CORS: cors middleware

Development Tools

  • TypeScript
  • Angular CLI
  • Nodemon
  • Git

πŸ“ Project Structure

TaskFlow/ β”œβ”€β”€ taskflow-backend/ # Backend API β”‚ β”œβ”€β”€ config/ β”‚ β”‚ └── db.js # Database configuration β”‚ β”œβ”€β”€ middleware/ β”‚ β”‚ └── authMiddleware.js # JWT authentication β”‚ β”œβ”€β”€ controllers/ β”‚ β”‚ β”œβ”€β”€ authController.js # Auth logic β”‚ β”‚ └── taskController.js # Task CRUD logic β”‚ β”œβ”€β”€ routes/ β”‚ β”‚ β”œβ”€β”€ authRoutes.js # Auth endpoints β”‚ β”‚ └── taskRoutes.js # Task endpoints β”‚ β”œβ”€β”€ .env # Environment variables β”‚ β”œβ”€β”€ server.js # Express server β”‚ └── package.json β”‚ └── taskflow-frontend/ # Frontend App β”œβ”€β”€ src/ β”‚ β”œβ”€β”€ app/ β”‚ β”‚ β”œβ”€β”€ components/ # UI Components β”‚ β”‚ β”‚ β”œβ”€β”€ login/ β”‚ β”‚ β”‚ β”œβ”€β”€ register/ β”‚ β”‚ β”‚ β”œβ”€β”€ dashboard/ β”‚ β”‚ β”‚ β”œβ”€β”€ task-list/ β”‚ β”‚ β”‚ β”œβ”€β”€ task-form/ β”‚ β”‚ β”‚ └── task-stats/ β”‚ β”‚ β”œβ”€β”€ services/ # API Services β”‚ β”‚ β”‚ β”œβ”€β”€ auth.service.ts β”‚ β”‚ β”‚ β”œβ”€β”€ task.service.ts β”‚ β”‚ β”‚ └── storage.service.ts β”‚ β”‚ β”œβ”€β”€ guards/ # Route Guards β”‚ β”‚ β”‚ └── auth.guard.ts β”‚ β”‚ β”œβ”€β”€ interceptors/ # HTTP Interceptors β”‚ β”‚ β”‚ └── auth.interceptor.ts β”‚ β”‚ β”œβ”€β”€ models/ # TypeScript Interfaces β”‚ β”‚ β”‚ β”œβ”€β”€ user.model.ts β”‚ β”‚ β”‚ └── task.model.ts β”‚ β”‚ β”œβ”€β”€ app.routes.ts # Routing Config β”‚ β”‚ β”œβ”€β”€ app.config.ts # App Config β”‚ β”‚ └── app.component.ts # Root Component β”‚ β”œβ”€β”€ environments/ β”‚ β”‚ └── environment.ts β”‚ └── styles.css # Global Styles β”œβ”€β”€ tailwind.config.js └── package.json


πŸš€ Getting Started

Prerequisites

Installation

1. Clone the Repository

git clone https://github.com/yourusername/taskflow.git cd TaskFlow

2. Database Setup

Open MySQL and run:

-- Create Database CREATE DATABASE taskflow_db; USE taskflow_db;

-- Users Table CREATE TABLE users ( id INT AUTO_INCREMENT PRIMARY KEY, name VARCHAR(100) NOT NULL, email VARCHAR(100) UNIQUE NOT NULL, password VARCHAR(255) NOT NULL, role ENUM('user', 'admin') DEFAULT 'user', created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP );

-- Tasks Table CREATE TABLE tasks ( id INT AUTO_INCREMENT PRIMARY KEY, title VARCHAR(200) NOT NULL, description TEXT, priority ENUM('low', 'medium', 'high') DEFAULT 'medium', status ENUM('pending', 'in-progress', 'completed') DEFAULT 'pending', due_date DATE, user_id INT NOT NULL, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE, INDEX idx_user_id (user_id), INDEX idx_status (status), INDEX idx_priority (priority) );

Generate password hash and insert admin user:

Generate hash for password 'admin123'

node -e "const bcrypt = require('bcrypt'); bcrypt.hash('admin123', 10).then(hash => console.log(hash));"

Copy the output hash and run in MySQL:

INSERT INTO users (name, email, password, role) VALUES ('Admin User', 'admin@taskflow.com', 'YOUR_HASH_HERE', 'admin');

3. Backend Setup

cd taskflow-backend

Install dependencies

npm install

Create .env file

cat > .env << EOF DB_HOST=localhost DB_USER=root DB_PASSWORD=your_mysql_password DB_NAME=taskflow_db DB_PORT=3306 JWT_SECRET=taskflow-super-secret-jwt-key-min-32-characters-long JWT_EXPIRES_IN=7d PORT=5000 NODE_ENV=development EOF

Start backend server

npm run dev

Expected output: βœ… MySQL Database Connected Successfully πŸš€ TaskFlow API Server Started πŸ“ Server running on: http://localhost:5000

4. Frontend Setup

cd ../taskflow-frontend

Install dependencies

npm install

Start development server

ng serve

Expected output: βœ” Compiled successfully. ** Angular Live Development Server is listening on localhost:4200 **

5. Access the Application

Open your browser and navigate to:


πŸ“– API Documentation

Base URL

http://localhost:5000/api

Authentication Endpoints

Register User

POST /auth/register Content-Type: application/json

{ "name": "John Doe", "email": "john@example.com", "password": "password123" }

Login

POST /auth/login Content-Type: application/json

{ "email": "admin@taskflow.com", "password": "admin123" }

Response: { "message": "Login successful", "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "user": { "id": 1, "name": "Admin User", "email": "admin@taskflow.com", "role": "admin" } }

Get Current User

GET /auth/me Authorization: Bearer {token}

Task Endpoints

Get All Tasks

GET /tasks Authorization: Bearer {token} Query Parameters: ?priority=high&status=pending&search=test

Get Task Statistics

GET /tasks/stats Authorization: Bearer {token}

Get Single Task

GET /tasks/:id Authorization: Bearer {token}

Create Task

POST /tasks Authorization: Bearer {token} Content-Type: application/json

{ "title": "Complete project", "description": "Finish TaskFlow application", "priority": "high", "status": "in-progress", "due_date": "2025-11-15" }

Update Task

PUT /tasks/:id Authorization: Bearer {token} Content-Type: application/json

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

Delete Task

DELETE /tasks/:id Authorization: Bearer {token}


πŸ§ͺ Testing

Manual Testing Checklist

  • User registration
  • User login/logout
  • Create task
  • Edit task
  • Delete task
  • Filter tasks by priority
  • Filter tasks by status
  • Search tasks
  • View statistics
  • Charts rendering
  • Responsive design (mobile/tablet/desktop)

API Testing with cURL

Health Check

curl http://localhost:5000/api/health

Login

curl -X POST http://localhost:5000/api/auth/login
-H "Content-Type: application/json"
-d '{"email":"admin@taskflow.com","password":"admin123"}'

Get Tasks (replace TOKEN with actual token)

curl http://localhost:5000/api/tasks
-H "Authorization: Bearer TOKEN"


🎨 Customization

Change Color Theme

Edit tailwind.config.js:

module.exports = { theme: { extend: { colors: { primary: { 500: '#your-color', 600: '#your-darker-color', } } } } }

Add New Task Field

  1. Database: Add column to tasks table
  2. Backend: Update taskController.js and validation
  3. Frontend: Update task.model.ts and task-form.component.html

🚒 Deployment

Backend Deployment (Render)

  1. Push code to GitHub
  2. Create new Web Service on Render
  3. Connect repository
  4. Set environment variables
  5. Deploy

Frontend Deployment (Vercel)

Build production

ng build --configuration production

Deploy to Vercel

npm i -g vercel vercel

Set environment variables in Vercel dashboard


πŸ› Troubleshooting

Database Connection Failed

Check MySQL is running

sudo service mysql status

Verify credentials in .env file

CORS Error

// In server.js, update: app.use(cors({ origin: 'http://localhost:4200', credentials: true }));

Port Already in Use

Backend (kill process on port 5000)

lsof -ti:5000 | xargs kill -9

Frontend (use different port)

ng serve --port 4201


πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.


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

Your Name


πŸ™ Acknowledgments

  • Angular Team for the amazing framework
  • Express.js community
  • Tailwind CSS for beautiful styling
  • Chart.js for data visualization
  • MySQL documentation

πŸ“ˆ Future Enhancements

  • Dark mode toggle
  • Drag-and-drop task sorting
  • Email notifications
  • Export tasks to CSV/PDF
  • Real-time updates with Socket.io
  • Task categories and tags
  • Collaborative features
  • Mobile app (React Native)
  • Docker containerization
  • CI/CD pipeline

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“ž Support

If you have any questions or need help, please:


⭐ Star This Repository

If you find this project useful, please consider giving it a star on GitHub!


Built with ❀️ using Angular, Node.js, Express, and MySQL

About

TaskFlow: A production-ready full-stack task management dashboard featuring Angular 17 frontend, Node.js Express backend, MySQL database, JWT authentication, role-based access, and dynamic task analytics with Chart.js and Tailwind CSS. Perfect for showcasing modern web development skills.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published