Skip to content

Latest commit

 

History

History
154 lines (115 loc) · 6.25 KB

File metadata and controls

154 lines (115 loc) · 6.25 KB

Task Management Workspace

A full-stack task management workspace with:

  • A secured REST API (backend-clean-api) using Node.js, Express, and MongoDB.
  • A React dashboard (task-dashboard) for live product demos.
  • Automated CI checks with GitHub Actions.

Current Status

Backend (backend-clean-api)

  • Clean layered architecture: Route -> Controller -> Service -> Repository -> Model
  • Auth implemented: register/login with JWT
  • Ownership isolation: users can only access their own tasks
  • Task metadata supported: dueDate, priority, tags
  • Task list features:
    • Pagination (page, limit)
    • Search (q)
    • Filters (status, priority, dueDateFrom, dueDateTo)
    • Sorting (sortBy, sortOrder)
  • Swagger docs available
  • Integration tests in place (auth + task ownership + query/filter validation)

Frontend (task-dashboard)

  • React + Vite + TypeScript demo dashboard
  • Register/login flow
  • Task list with filters, sorting, search, and pagination
  • Create, update status, and delete tasks

CI

  • GitHub Actions workflow at .github/workflows/ci.yml
  • Runs tests for backend-clean-api on push/PR to main and develop

Repository Structure

Task-Management-API/
├── .github/
│   └── workflows/
│       └── ci.yml
├── backend-clean-api/
│   ├── src/
│   │   ├── config/
│   │   ├── middlewares/
│   │   ├── models/
│   │   ├── modules/
│   │   │   ├── auth/
│   │   │   ├── tasks/
│   │   │   └── users/
│   │   ├── app.js
│   │   └── server.js
│   ├── tests/
│   └── package.json
├── task-dashboard/
│   ├── src/
│   ├── public/
│   └── package.json
└── README.md

API Endpoints

Authentication

POST /api/auth/register
POST /api/auth/login

Tasks (JWT required)

GET    /api/tasks
GET    /api/tasks/:id
POST   /api/tasks
PUT    /api/tasks/:id
DELETE /api/tasks/:id

Common Task Query Parameters

page, limit, q, status, priority, dueDateFrom, dueDateTo, sortBy, sortOrder

Swagger

http://localhost:5000/api-docs
http://localhost:5000/api-docs.json

Local Development

1) Start backend

cd backend-clean-api
npm install
npm run dev

Backend runs at http://localhost:5000.

2) Start dashboard

cd task-dashboard
npm install
npm run dev

Dashboard runs at http://localhost:5173.

Environment Variables (Backend)

Create backend-clean-api/.env:

PORT=5000
MONGO_URI=mongodb://localhost:27017/taskdb
JWT_SECRET=your_strong_secret
JWT_EXPIRES_IN=7d

JWT_SECRET is required (no fallback is used).

Tests

Run backend tests:

cd backend-clean-api
npm test

Demo Flow (Recommended)

  1. Register user A and create tasks.
  2. Use filters/search/sort in the dashboard.
  3. Login as user B and confirm user A tasks are not visible.
  4. Show Swagger or CI run for technical validation.

Next Improvements

  • Role-based authorization
  • Activity/audit logging
  • Staging deployment pipeline (CD)
  • Dashboard editing forms and richer analytics

MIT License