Require NodeJS 20+
pnpm install
pnpm db:push
pnpm dev:api
API available at http://localhost:4000/api/v1
GET /api/v1/projects
QUERY
{
page: Number?
pageSize: Number?
}
RESPONSE
{
data: {
id String
createdAt DateTime
updatedAt DateTime
name String
description String?
}[]
total: Number
page: Number
pageSize: Number
}
POST /api/v1/projects
BODY
{
name String
description String?
}
RESPONSE
{
data: {
id String
createdAt DateTime
updatedAt DateTime
name String
description String?
}
}
GET /api/v1/projects/:id
RESPONSE
{
data: {
id String
createdAt DateTime
updatedAt DateTime
name String
description String?
}
}
PUT /api/v1/projects/:id
BODY
{
"name": String,
"description": String?,
}
RESPONSE
{
data: {
id String
createdAt DateTime
updatedAt DateTime
name String
description String?
}
}
DELETE /api/v1/projects/:id
RESPONSE
{
data: {
id String
createdAt DateTime
updatedAt DateTime
name String
description String?
}
}
Create a UI for the following tasks
- Display the list of all projects
- Create a project with name and description
- Update a project name and description
Bonus tasks
- Delete a project
- Display a project