You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Clone the repository
git clone https://github.com/YOUR_USERNAME/task-manager-pro-server.git
cd task-manager-pro-server
# Install dependencies
npm install
# Set up environment variables
cp .env.example .env
# Edit .env with your configuration# Start the server
npm start
Environment Variables
# ServerPORT=5000# DatabaseDB_HOST=localhostDB_USER=postgresDB_PASS=your_passwordDB_NAME=task_manager_proDB_DIALECT=postgres# JWTJWT_SECRET=your_super_secret_key_hereJWT_EXPIRES_IN=15mJWT_REFRESH_EXPIRES_IN=7d# Kafka (optional)KAFKA_BROKERS=localhost:9092KAFKA_CLIENT_ID=task-manager-pro#CLIENTCLIENT_URL=your localhost or deployed url
📡 API Reference
Authentication
Method
Endpoint
Description
POST
/api/auth/register
Register new user
POST
/api/auth/login
User login
POST
/api/auth/refresh
Refresh access token
POST
/api/auth/logout
Logout user
GET
/api/auth/profile
Get current user
PUT
/api/auth/profile
Update profile
Tasks
Method
Endpoint
Description
GET
/api/tasks
Get all tasks
GET
/api/tasks/:id
Get task by ID
POST
/api/tasks
Create task
PUT
/api/tasks/:id
Update task
DELETE
/api/tasks/:id
Delete task
PUT
/api/tasks/:id/status
Update status
PUT
/api/tasks/:id/assign
Assign task
Projects
Method
Endpoint
Description
GET
/api/projects
Get all projects
POST
/api/projects
Create project
PUT
/api/projects/:id
Update project
DELETE
/api/projects/:id
Delete project
Teams
Method
Endpoint
Description
GET
/api/teams
Get all teams
POST
/api/teams
Create team
POST
/api/teams/:id/members
Add member
DELETE
/api/teams/:id/members/:userId
Remove member
Analytics
Method
Endpoint
Description
GET
/api/analytics/overview
Dashboard stats
GET
/api/analytics/productivity
Productivity metrics
GET
/api/analytics/trends
Task trends
🔐 Authentication
The API uses JWT tokens for authentication:
Access Token - Short-lived (15 min), used for API requests
Refresh Token - Long-lived (7 days), used to get new access tokens