Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

184 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Task Pipeline

A full-stack task management system for talent onboarding workflows. Built with the MERN stack.

πŸ“’ For Candidates: This repo is used for assessment. See CONTRIBUTING.md for submission instructions.


Maintainers & Core Team

Pranav Garg

  • Role: Project Maintainer / Admin
  • GitHub: @Pranav140

Vansh Rastogi

This project is actively maintained. Please refer to the CODEOWNERS section for code review policies.


Tech Stack

Layer Technology
Frontend React 18 + Vite 5
Styling Tailwind CSS v4 + custom CSS
Backend Node.js + Express 4
Database MongoDB + Mongoose
Auth JWT (jsonwebtoken + bcryptjs)
File Uploads Multer

Project Structure

modelsuite-qualification/
β”œβ”€β”€ client/                  # React (Vite) frontend
β”‚   └── src/
β”‚       β”œβ”€β”€ api/             # Axios API helper modules
β”‚       β”œβ”€β”€ components/
β”‚       β”‚   β”œβ”€β”€ admin/       # Admin-specific UI components
β”‚       β”‚   └── talent/      # Talent-specific UI components
β”‚       β”œβ”€β”€ context/         # AuthContext (JWT auth state)
β”‚       └── pages/
β”‚           β”œβ”€β”€ admin/       # Admin dashboard pages
β”‚           └── talent/      # Talent dashboard pages
└── server/                  # Express backend
    β”œβ”€β”€ config/              # MongoDB connection
    β”œβ”€β”€ controllers/         # Route handler logic
    β”œβ”€β”€ middleware/          # JWT auth + file upload middleware
    β”œβ”€β”€ models/              # Mongoose schemas
    β”œβ”€β”€ routes/              # Express route definitions
    β”œβ”€β”€ scripts/             # Database seed script
    └── uploads/             # Local file storage for submissions

Prerequisites

  • Node.js v18 or higher β€” nodejs.org
  • MongoDB running locally on port 27017, or a MongoDB Atlas connection string
  • npm (comes with Node.js)
  • Git

Setup

1. Fork and Clone the repository

First, fork this repository to your own GitHub account by clicking the "Fork" button at the top right of the repository page. Then clone your fork:

git clone https://github.com/<your-username>/modelsuite-qualification.git
cd modelsuite-qualification

2. Configure the backend

cd server
cp .env.example .env

Open server/.env and fill in your values:

MONGO_URI=mongodb://localhost:27017/task-pipeline
JWT_SECRET=your-random-secret-string-here
PORT=5000

Use a long random string for JWT_SECRET. You can generate one with:

node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"

3. Install backend dependencies

# You should be in the /server directory
npm install

4. Seed the database

This creates 1 Admin user, 2 Talent users, and 5 sample tasks.

npm run seed

Seed credentials:

Role Email Password
Admin admin@test.com password123
Talent talent1@test.com password123
Talent talent2@test.com password123

5. Install frontend dependencies

cd ../client
npm install

Running the Application

You need two terminals open simultaneously.

Terminal 1 β€” Start the backend server

cd server
npm run dev

The API will be available at http://localhost:5000

Terminal 2 β€” Start the frontend

cd client
npm run dev

The app will open at http://localhost:5173


User Roles & Flows

Admin

  • Log in at /login
  • Dashboard (/admin/dashboard) β€” view task stats and manage all tasks
  • Tasks (/admin/tasks) β€” same as dashboard (create, edit, delete tasks, assign to talents)
  • Submissions (/admin/submissions) β€” review talent submissions, approve or reject

Talent

  • Log in at /login or register at /register
  • Dashboard (/talent/dashboard) β€” browse available (Open) tasks and claim one
  • Claimed tasks appear in My Tasks section with a Submit button
  • Submit a task by uploading a file and adding notes

API Reference

Auth

Method Route Description
POST /api/auth/register Register a new user
POST /api/auth/login Login and receive a JWT token

Admin β€” Tasks

Method Route Description
GET /api/tasks List all tasks (with populated assignedTo)
POST /api/tasks Create a new task
PUT /api/tasks/:id Update a task
DELETE /api/tasks/:id Delete a task

Admin β€” Users

Method Route Description
GET /api/users/talents List all Talent-role users

Talent β€” Tasks

Method Route Description
GET /api/talent/tasks/available Get all Open tasks
GET /api/talent/tasks/mine Get tasks assigned to the logged-in talent
PUT /api/talent/tasks/:id/claim Claim an open task

Submissions

Method Route Access Description
POST /api/submissions/:taskId Auth Submit a task with optional file
GET /api/submissions/:taskId Auth Get submission for a specific task
GET /api/submissions/admin/all Admin Get all submissions
PUT /api/submissions/:id/review Admin Set reviewStatus to Approved or Rejected

Available Scripts

Server (/server)

Command Description
npm run dev Start server with nodemon (auto-reloads on change)
npm start Start server with node (no auto-reload)
npm run seed Seed the database with sample data

Client (/client)

Command Description
npm run dev Start Vite development server
npm run build Build for production
npm run preview Preview the production build locally

Troubleshooting

"MongooseError: connect ECONNREFUSED" β†’ MongoDB is not running. Start it with mongod or use a MongoDB Atlas URI in MONGO_URI.

"JsonWebTokenError: invalid signature" β†’ JWT_SECRET in your .env doesn't match the one used to sign existing tokens. Re-run npm run seed or clear localStorage in your browser.

Port already in use β†’ Change PORT in server/.env. The Vite dev server port can be changed in client/vite.config.js.

Upload files not saving β†’ The server/uploads/ directory must be writable. It is tracked in git via .gitkeep β€” ensure it exists.


<<<<<<< HEAD

Contribution Guidelines

This repository is used for candidate assessment as part of our hiring process.

To submit your work:

  1. Read the complete guide: CONTRIBUTING.md
  2. Fork this repository to your GitHub account
  3. Create a task branch (never work on master)
  4. Complete your assigned task following our code standards
  5. Test locally using npm run lint and npm run build
  6. Submit a PR following the required format

** Important:**

  • All PRs are automatically tested via CI/CD
  • PRs that fail any check will be automatically closed
  • PR title must follow format: [TASK-ID]-description
  • PR description must be complete with testing steps and screenshots (for UI changes)

See CONTRIBUTING.md for detailed instructions and requirements.

🀝 Contribution and Qualification

Welcome! If you are participating in a qualification assessment or contributing to this repository, you must follow our structured process for branching, local checks, and Pull Requests.

Please read the full guidelines in CONTRIBUTING.md before starting your work. This file covers:

  • Exact Branch Naming & PR Title rules
  • Pre-flight local checks (linting/building)
  • PR Template requirements
  • Our automated CI/CD Pipeline (which automatically closes failing PRs)
  • Final submission requirements (PR link & Voice recorded video)

CODEOWNERS

All pull requests must be reviewed and approved by the core maintainers:

  • @Pranav140 (Pranav Garg)
  • @vanshrastogi111 (Vansh Rastogi)

About

Official qualification repository for ModelSuite applicants. Used to evaluate technical skills, code quality, and workflow standards before onboarding.

Resources

Contributing

Stars

12 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages