Skip to content

braiidev/task-manager-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Task Manager API

A lightweight REST API to manage tasks. Built with Node.js, Express and Supabase. Zero unnecessary dependencies.

Live demo: https://task-manager-api-braiidev.vercel.app


Stack

  • Node.js + Express
  • Supabase (PostgreSQL)
  • Deployed on Vercel

Run locally

Requirements: Node.js 18+

git clone https://github.com/braiidev/task-manager-api.git
cd task-manager-api
npm install

Create a .env file in the root:

SUPABASE_URL=your_supabase_project_url
SUPABASE_KEY=your_supabase_anon_key
npm run dev

Server runs on http://localhost:3000


Endpoints

Method Endpoint Description
GET /tasks List all tasks
GET /tasks?status=pending Filter by status
GET /tasks/:id Get task by ID
POST /tasks Create a task
PUT /tasks/:id Update a task
DELETE /tasks/:id Delete a task

Usage examples

Create a task

curl -X POST https://task-manager-api-braiidev.vercel.app/tasks \
  -H "Content-Type: application/json" \
  -d '{"title": "My first task", "description": "Optional description"}'

List all tasks

curl https://task-manager-api-braiidev.vercel.app/tasks

Filter by status

curl https://task-manager-api-braiidev.vercel.app/tasks?status=done

Update a task

curl -X PUT https://task-manager-api-braiidev.vercel.app/tasks/{id} \
  -H "Content-Type: application/json" \
  -d '{"status": "done"}'

Delete a task

curl -X DELETE https://task-manager-api-braiidev.vercel.app/tasks/{id}

Request & response format

POST /tasks — body

{
  "title": "string (required)",
  "description": "string (optional)"
}

PUT /tasks/:id — body (all fields optional)

{
  "title": "string",
  "description": "string",
  "status": "pending | done"
}

Task object

{
  "id": "uuid",
  "title": "My first task",
  "description": "Optional description",
  "status": "pending",
  "created_at": "2026-01-01T00:00:00.000Z"
}

Error handling

Status Meaning
400 Validation error (missing title, invalid status)
404 Task not found
500 Server error

License

MIT

About

Live example: REST API created with Express in Node.js, deployed on Vercel, with Supabase

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors