Time Limit: 6-12 Hours Preferred Stack: Node.js (TypeScript optional), PostgreSQL (or MySQL), REST APIs Bonus: Python, Redis, Docker, AWS knowledge
Build a small backend service that allows users to manage Projects, Tasks, and Comments.
This system should support:
- User creation
- Project creation
- Task management within projects
- Comments on tasks
- Assigning users to tasks
- Listing tasks with filters
- A clean REST API structure
- SQL relationships & joins
- Pagination & validation
| Field | Type |
|---|---|
| id | UUID |
| name | string |
| string (unique) | |
| created_at | timestamp |
| Field | Type |
|---|---|
| id | UUID |
| name | string |
| description | text |
| owner_id | UUID (FK → users.id) |
| created_at | timestamp |
| Field | Type |
|---|---|
| id | UUID |
| project_id | UUID (FK → projects.id) |
| title | string |
| description | text |
| status | enum("todo", "in_progress", "done") |
| assigned_to | UUID (FK → users.id, nullable) |
| created_at | timestamp |
| Field | Type |
|---|---|
| id | UUID |
| task_id | UUID (FK → tasks.id) |
| user_id | UUID (FK → users.id) |
| message | text |
| created_at | timestamp |
POST /users
{
"name": "John Doe",
"email": "john@example.com"
}Requirements:
- Validate email format
- Unique email constraint
POST /projects
Body:
{
"name": "Project Apollo",
"description": "Internal product build",
"owner_id": "UUID"
}Requirements:
- Validate user exists
- Return the created project
POST /tasks
Body:
{
"project_id": "UUID",
"title": "Setup CI/CD",
"description": "Configure pipeline",
"assigned_to": "UUID"
}Requirements:
- Validate project exists
- Optionally validate assigned user exists
- Set default status =
"todo"
POST /tasks/:id/comments
Body:
{
"user_id": "UUID",
"message": "CI/CD pipeline deployed successfully."
}Requirements:
- Validate task + user exist
GET /tasks?project_id=UUID&status=todo&assigned_to=UUID&page=1&limit=10
Requirements:
-
Filter by:
project_idstatusassigned_to
-
Pagination
-
Return each task with:
- Project info
- Assigned user info
- Latest comment (optional but preferred)
This tests JOIN queries, pagination, and performance.
Create a Python script that:
-
Reads a JSON file
tasks.json -
Summarizes:
- total tasks
- count by status
- count by assigned user
-
Writes
summary.jsoncontaining:
{
"summary": { ... },
"tasks": [ ...original array... ]
}This tests basic scripting & data-handling.
Candidates can earn extra points by implementing:
Basic login + token validation.
Cache task list results for 30 seconds.
Simulate task reminders or due-date notifications.
docker-compose.yml with API + PostgreSQL.
Basic unit/integration tests using Jest / Mocha.
The candidate should submit:
Containing:
- Node.js code
- SQL migrations or schema
- Python script (optional)
- Postman collection (optional)
Explaining:
- How to run the project
- DB setup
- Available APIs
- Bonus features (if implemented)