A modern, professional task management system built with React, Node.js/Express, and PostgreSQL. Users can create projects, manage teams, assign tasks, and track progress with an intuitive dashboard.
- Authentication & Authorization: Secure signup/login with session-based authentication
- Project Management: Create, edit, and delete projects with full team collaboration
- Task Management: Create tasks with title, description, due dates, and assignees
- Task Status Tracking: Tasks can be marked as To Do, In Progress, or Done
- Team Collaboration: Add team members to projects and manage roles
- Dashboard: Real-time overview of tasks, statistics, and progress tracking
- Role-Based Access: Admin (project owner) and Member (team participant) roles
- Modern UI: Beautiful, responsive design built with Tailwind CSS and React
- Runtime: Node.js with ES Modules
- Framework: Express.js
- Database: PostgreSQL
- Authentication: Express Sessions + bcryptjs
- Validation: Joi
- Security: Helmet, CORS
- Environment: dotenv
- Library: React 18 with TypeScript
- Routing: React Router v6
- Styling: Tailwind CSS
- HTTP Client: Axios
- Notifications: React Hot Toast
- Build: Create React App
-- users: User accounts with roles
- id (PRIMARY KEY)
- email (UNIQUE)
- password_hash
- first_name, last_name
- role (admin/member)
- created_at, updated_at
-- projects: Projects managed by teams
- id (PRIMARY KEY)
- name, description
- owner_id (FOREIGN KEY β users.id)
- created_at, updated_at
-- tasks: Tasks within projects
- id (PRIMARY KEY)
- project_id (FOREIGN KEY β projects.id)
- title, description
- status (todo/in_progress/done)
- assignee_id (FOREIGN KEY β users.id, nullable)
- due_date
- created_at, updated_at
-- team_members: Join table for project teams
- id (PRIMARY KEY)
- project_id (FOREIGN KEY β projects.id)
- user_id (FOREIGN KEY β users.id)
- role (admin/member)
- joined_at- Node.js (v16+)
- PostgreSQL (v12+)
- npm or yarn
# Create PostgreSQL database
createdb task_manager
# Run schema file
psql task_manager < backend/db/schema.sqlcd backend
# Install dependencies
npm install
# Create .env file
cp .env.example .env
# Edit .env with your database credentials
# DATABASE_URL=postgresql://user:password@localhost:5432/task_manager
# Start development server
npm run dev
# Server runs on http://localhost:5000cd frontend
# Install dependencies
npm install
# Start development server
npm start
# App opens at http://localhost:3000POST /api/auth/register- Create new accountPOST /api/auth/login- Login with credentialsPOST /api/auth/logout- Logout and destroy sessionGET /api/auth/me- Get current user (requires auth)
GET /api/projects- List all user's projects (requires auth)POST /api/projects- Create new project (requires auth)GET /api/projects/:id- Get project details with team members (requires auth)PUT /api/projects/:id- Update project (owner only)DELETE /api/projects/:id- Delete project (owner only)
POST /api/projects/:projectId/tasks- Create task (requires auth)GET /api/projects/:projectId/tasks- List tasks in project (requires auth)PUT /api/projects/task/:id- Update task status/details (requires auth)DELETE /api/projects/task/:id- Delete task (requires auth)
POST /api/projects/:projectId/members- Add team member (owner only)GET /api/projects/:projectId/members- List team members (requires auth)PUT /api/projects/:projectId/members/:userId- Update member role (owner only)DELETE /api/projects/:projectId/members/:userId- Remove team member (owner only)
GET /api/dashboard- Get dashboard stats and recent tasks (requires auth)
POST /api/auth/register
Content-Type: application/json
{
"email": "user@example.com",
"password": "securepassword123",
"first_name": "John",
"last_name": "Doe"
}
Response (201):
{
"message": "User registered successfully",
"user": {
"id": 1,
"email": "user@example.com",
"first_name": "John",
"last_name": "Doe",
"role": "member"
}
}POST /api/projects
Content-Type: application/json
Cookie: connect.sid=...
{
"name": "Website Redesign",
"description": "Redesign company website"
}
Response (201):
{
"message": "Project created",
"project": {
"id": 1,
"name": "Website Redesign",
"description": "Redesign company website",
"owner_id": 1,
"created_at": "2026-05-06T10:00:00Z",
"updated_at": "2026-05-06T10:00:00Z"
}
}POST /api/projects/1/tasks
Content-Type: application/json
Cookie: connect.sid=...
{
"title": "Design homepage mockup",
"description": "Create initial mockups for homepage",
"due_date": "2026-05-20",
"assignee_id": 2
}
Response (201):
{
"message": "Task created",
"task": {
"id": 1,
"project_id": 1,
"title": "Design homepage mockup",
"status": "todo",
"assignee_id": 2,
"due_date": "2026-05-20",
"created_at": "2026-05-06T10:05:00Z"
}
}# Register
curl -X POST http://localhost:5000/api/auth/register \
-H "Content-Type: application/json" \
-d '{"email":"test@example.com","password":"password123"}'
# Login
curl -X POST http://localhost:5000/api/auth/login \
-H "Content-Type: application/json" \
-d '{"email":"test@example.com","password":"password123"}' \
-c cookies.txt
# Get current user
curl -X GET http://localhost:5000/api/auth/me \
-b cookies.txt
# Get projects
curl -X GET http://localhost:5000/api/projects \
-b cookies.txt- Register β Create new account with email/password
- Login β Session cookie automatically set
- Create Project β Start a new team project
- Add Team Members β Invite users by email
- Create Tasks β Add tasks to project
- Assign Tasks β Assign to team members
- Update Status β Track progress (To Do β In Progress β Done)
- View Dashboard β Monitor all tasks and statistics
- GitHub account with repo pushed
- Railway.app account (free tier available)
# 1. Push code to GitHub
git add .
git commit -m "Initial commit"
git push origin main
# 2. Create Railway project at railway.app
# 3. Connect GitHub repository
# 4. Add PostgreSQL plugin
# 5. Set environment variables:
# - DATABASE_URL (auto-populated by PostgreSQL plugin)
# - SESSION_SECRET (generate secure key)
# - NODE_ENV=production
# - FRONTEND_URL=https://yourapp.up.railway.app
# 6. Deploy automatically# 1. Create .env.production with backend URL
REACT_APP_API_URL=https://api.taskmanager.up.railway.app/api
# 2. Build React app
npm run build
# 3. Deploy to Railway
# Add New Service β Static Site
# Deploy the /build folder- Visit frontend URL:
https://taskmanager.up.railway.app - Register a new account
- Create a project
- Add tasks
- Test all features end-to-end
PORT=5000
NODE_ENV=development|production
DATABASE_URL=postgresql://user:password@host:port/dbname
SESSION_SECRET=your-random-secret-key-here
FRONTEND_URL=http://localhost:3000 (dev) or https://app.up.railway.app (prod)
REACT_APP_API_URL=http://localhost:5000/api (dev) or https://api.app.up.railway.app/api (prod)
- β Passwords hashed with bcryptjs (salt rounds: 10)
- β Session-based auth with secure, HTTP-only cookies
- β SQL injection protection via parameterized queries (pg library)
- β CORS configured for specific frontend domain
- β Helmet middleware for security headers
- β Role-based access control (RBAC) for sensitive operations
- β Input validation with Joi schemas
- Real-time updates with WebSockets (Socket.io)
- Task priorities and labels
- Comments and activity logs on tasks
- Email notifications for task assignments
- Task filtering and advanced search
- Recurring tasks and templates
- Time tracking for tasks
- Mobile app (React Native)
- Dark mode toggle
- File attachments for tasks
- Calendar view for due dates
- Reporting and analytics dashboard
Assignment/
βββ backend/
β βββ config/
β β βββ database.js # PostgreSQL connection pool
β βββ middleware/
β β βββ auth.js # Auth & error handling
β β βββ validation.js # Input validation with Joi
β βββ routes/
β β βββ auth.js # Auth endpoints
β β βββ projects.js # Project CRUD
β β βββ tasks.js # Task CRUD
β β βββ team.js # Team management
β β βββ dashboard.js # Dashboard stats
β βββ db/
β β βββ schema.sql # Database schema
β βββ app.js # Express app setup
β βββ package.json
β βββ .env # Environment variables
β βββ .env.example
β
βββ frontend/
β βββ src/
β β βββ api/
β β β βββ client.ts # Axios instance
β β β βββ index.ts # API service functions
β β βββ pages/
β β β βββ LoginPage.tsx
β β β βββ RegisterPage.tsx
β β β βββ DashboardPage.tsx
β β β βββ ProjectsPage.tsx
β β β βββ ProjectDetailPage.tsx
β β βββ components/
β β β βββ Navbar.tsx
β β βββ App.tsx # Main app with routing
β β βββ index.tsx
β β βββ index.css # Tailwind styles
β β βββ App.css
β βββ public/
β βββ .env # Dev environment
β βββ .env.production # Prod environment
β βββ tailwind.config.js
β βββ postcss.config.js
β βββ package.json
β
βββ .gitignore
βββ README.md # This file
- Register: Sign up with email/password
- Create Project: Click "New Project" β Enter name and description
- Add Team Member: Go to project β Team tab β Add member by email
- Create Task: Click "New Task" β Fill details β Assign to team member
- Update Status: Click status dropdown on task β Select new status
- View Dashboard: Dashboard shows all tasks, counts, and overdue items
This is an assignment project. For modifications, ensure:
- Code follows the existing structure
- All endpoints have proper error handling
- Frontend components are reusable and well-styled
- Database queries use parameterized statements
- Environment variables are properly configured
For issues or questions:
- Check the API documentation above
- Review error messages in console
- Ensure PostgreSQL is running
- Verify environment variables are set
- Check backend server is running on port 5000
- Check frontend is accessing correct API URL
This project is created for educational purposes.
Last Updated: May 6, 2026
Version: 1.0.0
Status: Ready for Production Deployment