Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

TaskFlow - Modern Task Management System

TaskFlow is a production-ready, modular RESTful backend API and a premium dark-themed Single Page Application (SPA) frontend. Built using Node.js, Express.js, and MongoDB, it follows the MVC (Model-View-Controller) architecture, implements secure JWT authentication/authorization, and provides centralized error handling.

🔗 Live Application

Access the deployed application on any mobile, tablet, or desktop web browser here: 👉 TaskFlow Live App


✨ Features

🎨 Premium UI & Styling

  • Modern Dark Theme: Radial background gradients with glassmorphic cards (backdrop-filter).
  • Micro-Animations: Smooth button scale transformations, shimmer loading states for tasks, and slide-in alerts.
  • Alert Toast System: Dynamic, non-intrusive notifications (success, warning, info, error) that automatically slide out.
  • Fully Responsive: Crafted with vanilla CSS grid and flexbox to fit mobile, tablet, and desktop viewports.

🔒 Security & Authentication

  • JWT-Based Authentication: Secure token generation and verification using JSON Web Tokens.
  • Session Persistence: Automatic login restoration via localStorage state checks.
  • Secure Cryptography: Password hashing using bcryptjs with salting pre-save hooks.
  • Role-Based Access Control: Route guards (protect & restrictTo) to manage standard user vs. admin permissions.

📋 Task Management (CRUD)

  • Full CRUD Operations: Users can create, read, update, and delete their own tasks.
  • Real-time Stats Board: Live metrics counters showing Total Tasks, Pending/In Progress, and Completed tasks.
  • Filters & Searching: Advanced query features to search task titles and filter by priority or status.
  • Admin Controls: Administrative privileges to view, edit, or delete tasks belonging to any user.

🛠️ Tech Stack

  • Backend: Node.js, Express.js
  • Database: MongoDB Atlas (Cloud Database), Mongoose ODM
  • Frontend: HTML5, Vanilla CSS3 (Custom Variables, Keyframe Animations), Modern JS (ES Modules)
  • Icons & Typography: Lucide Icons, Google Fonts (Inter)
  • Security: JSON Web Tokens (JWT), BcryptJS
  • Hosting: Render.com

📂 MVC Directory Structure

REST_FULL_backend_API/
├── public/                 # Static Frontend SPA Assets
│   ├── css/
│   │   └── style.css       # Custom Glassmorphic CSS Styling
│   ├── js/
│   │   └── app.js          # Client-side State & Fetch Controller
│   └── index.html          # Dashboard Markup & Structures
├── src/                    # Backend Source Code
│   ├── config/
│   │   └── db.js           # Mongoose MongoDB Connection Config
│   ├── controllers/
│   │   ├── authController.js
│   │   └── taskController.js
│   ├── middleware/
│   │   ├── authMiddleware.js # JWT guards & Role authorization checks
│   │   └── errorMiddleware.js# Centralized global error handler
│   ├── models/
│   │   ├── User.js         # Mongoose User Schema & Encryptions
│   │   └── Task.js         # Mongoose Task Schema (references User)
│   ├── routes/
│   │   ├── authRoutes.js
│   │   └── taskRoutes.js
│   ├── utils/
│   │   ├── appError.js     # Custom Operational Error constructor
│   │   └── catchAsync.js   # Wrapper to eliminate try-catch boilerplate
│   └── app.js              # Express core configurations & middleware
├── .env.example            # Environment variables template
├── server.js               # Main Server entrypoint & global error handlers
└── verify.js               # Programmatic end-to-end API test script

🔌 API Documentation

Authentication Endpoints

HTTP Method Route Description Auth Required
POST /api/v1/auth/register Register a new user No
POST /api/v1/auth/login Login user & retrieve JWT token No
GET /api/v1/auth/me Fetch authenticated user profile details Yes

Task Endpoints

HTTP Method Route Description Auth Required
POST /api/v1/tasks Create a new task (automatically owned by user) Yes
GET /api/v1/tasks Get all tasks (User's own tasks, or all tasks for Admin) Yes
GET /api/v1/tasks/:id Fetch specific task (with ownership authorization) Yes
PATCH /api/v1/tasks/:id Update task details (title, description, status, priority) Yes
DELETE /api/v1/tasks/:id Delete a specific task Yes

💻 Local Setup & Installation

Prerequisites

Make sure you have Node.js and MongoDB installed locally.

Steps

  1. Clone the Repository

    git clone https://github.com/Parasjain1234/RESTful-Backend-API.git
    cd RESTful-Backend-API
  2. Install Dependencies

    npm install
  3. Configure Environment Variables Create a .env file in the root directory based on the .env.example:

    PORT=5000
    NODE_ENV=development
    MONGODB_URI=mongodb://127.0.0.1:27017/taskmanager
    JWT_SECRET=your-32-character-long-secret-key-string
    JWT_EXPIRES_IN=90d
  4. Run the Server

    • Development Mode (with auto-reload):
      npm run dev
    • Production Mode:
      npm start
  5. Access the App Open your browser and navigate to:

    http://localhost:5000
    

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages