A collaborative task management application built with TypeScript, Node.js, and Express. This application helps teams track and manage tasks for small-scale projects, ensuring accountability and clear communication among team members.
My motivation for starting with this was that I wanted to create an application that can help people communicate tasks on a small scale project like course projects or personal projects. I have worked on projects and noticed a problem of finding it hard to hold people accountable when they are not doing the job assigned to them. This app would allow for the whole group to be aware about what is going on with the project and allow for clear communication.
- User registration and login with JWT authentication
- Task creation and management (CRUD)
- Due date tracking
- Status updates
- Team collaboration
- PostgreSQL database integration
- Input validation
- Error handling
- RESTful API endpoints
- TypeScript
- Node.js
- Express
- PostgreSQL
- TypeORM
- Class Validator
- JWT (jsonwebtoken)
- bcrypt
POST /api/auth/register
- Body:
{
"username": "string",
"email": "string",
"password": "string"
}
- Response:
{ message, token, user }
POST /api/auth/login
- Body:
{
"email": "string",
"password": "string"
}
- Response:
{ message, token, user }
All requests must include:
Authorization: Bearer <token>
GET /api/tasks
GET /api/tasks/id/:id
GET /api/tasks/name/:name
GET /api/tasks/duedate/:duedate
GET /api/tasks/Pending
POST /api/tasks/new
- Body:
{
"name": "string",
"description": "string",
"dueDate": "YYYY-MM-DD",
"status": "Pending|Completed|..."
}
PUT /api/tasks/update/:id
- Body: (same as create)
DELETE /api/tasks/delete/:id
- Install dependencies:
npm install
- Set up your
.env
file:DB_HOST=localhost DB_PORT=5432 DB_USERNAME=your_username DB_PASSWORD=your_password DB_NAME=your_database_name JWT_SECRET=your-super-secret-jwt-key
- Start the server:
npm run dev
- Test the API:
- Use Postman, cURL, or the provided test scripts (
test-api.sh
,test-with-token.sh
)
- Use Postman, cURL, or the provided test scripts (
- Register or login to receive a JWT token.
- Include the token in the
Authorization
header for all protected routes. - Example:
curl -X GET http://localhost:3000/api/tasks \ -H "Authorization: Bearer <your_token_here>"
MIT