A full-stack task management system with project-based task creation, authentication, and comment support β built for Praella Assessment using Node.js, React, PostgreSQL, and Tailwind CSS.
- π₯οΈ Frontend: https://praella-task-management-system.vercel.app
- (May experience occasional load issues due to limitations of free-tier hosting)
- π Backend: https://praella-task-management-system-1.onrender.com
- π₯οΈ Frontend (Custom - Vercel): https://praella-task-managment-ui.score-book.com
- (Runs smoothly and loads faster as it's connected to our custom AWS infrastructure)
- π Backend (Custom - AWS EC2 + NGINX + PM2): https://praella-task-managment.score-book.com
- (Deployed on our own AWS EC2 instance with optimized performance and uptime)
- Node.js
v20.5.1
- Express
v5.1.0
- PostgreSQL via
[email protected]
- bcrypt
6.0.0
- jsonwebtoken
9.0.2
(for Authentication) - multer
2.0.1
& multer-s33.0.1
(for file uploads) - AWS SDK v2
2.1692.0
and AWS SDK v3@aws-sdk/[email protected]
,@aws-sdk/[email protected]
- dotenv
16.5.0
(for environment variables) - cors
2.8.5
, express-validator7.2.1
- nodemon
3.1.10
- jest
30.0.0
, supertest7.1.1
- node-pg-migrate
7.7.1
- React
v19.1.0
- TypeScript
- Tailwind CSS
v4.1.10
- Vite
v6.3.5
- React Router DOM
v7.6.2
- Lucide React
- Axios
git clone https://github.com/Danish-Belal/praella_task_management_system.git
cd praella-task-management-system/backend
npm install
Inside the /backend directory, create a file named .env and add the following content:
DATABASE_URL="your_postgresql_connection_string" (from neon db)
PORT=3000
JWT_SECRET=your_jwt_secret
AWS_ACCESS_KEY_ID=your_aws_access_key
AWS_SECRET_ACCESS_KEY=your_aws_secret_key
AWS_REGION=your_aws_region
S3_BUCKET=your_bucket_name
FRONTEND_URL=http://localhost:5173
NODE_ENV=DEVELOPMENT (for deploy, set production)
npx node-pg-migrate up
npm run dev
cd ../frontend
npm install
Inside the /frontend directory, create a file named .env and add the following content:
VITE_API_BASE_URL=http://localhost:3000/api
npm run dev
To load test data into your local PostgreSQL database, run:
psql -U your_db_user -d your_db_name -f backend/sample.sql
This will insert a test user, a demo project, one task, and one comment.
A complete Postman collection is provided to help you quickly test the API endpoints.
ποΈ Location: postman_collection.json
(in the root of this repository)
You can import it into Postman using:
- Open Postman
- Click on Import
- Select the file
postman_collection.json
from the project root - Use the test credentials or register a new user to authenticate requests
This collection includes:
- Auth APIs (Signup/Login)
- Project & Task CRUD
- Comments
Use the following credentials only on the deployed URLs:
- Email:
[email protected]
- Password:
Danish*111
-
π€ Authentication
- Signup with name/email/password
- Login and receive token
- Authenticated route protection
- Logout clears session
-
π Projects
- Create, update, delete projects
- Fetch project list on login
-
β Tasks
- Add tasks to specific project (Only project owner can)
- Edit, update, delete tasks
- Priority, deadline, and status support
-
π¬ Comments (Only project owner can)
- Add comments to tasks and can also attach file (Max-5MB)
- Delete comments
-
π Toasts
- Visual feedback on every action (success/fail)
I structured the backend using the MVC pattern and focused on keeping controller logic clean and testable. I ensured API security using JWT tokens, and used pg along with node-pg-migrate for handling database schemas and migrations. On the frontend, I followed modular component architecture using React + Vite, styled using Tailwind CSS for rapid development, and ensured responsiveness across devices.
- Clean and consistent REST API design
- Secure authentication with role-based token handling
- Frontend structure with reusable and modular components
- Neatly managed forms, validations, and UI feedback (toast)
- attaching files on aws s3 bucket and retriving it.
- Hosred on AWS ec2 instancw with custome domain.
- Implemented ci/ci pipeline to auto deploy on aws machine
- Multiple users can be assigned a single project to work together.
- Didnβt implement CI/CD pipelines or custom domain setup (In Progress) --> (Done now) Added an ci/cd pipeline to auto deploy whenever backend files changes.)
- Self-hosted deployment flow (with own infrastructure) was not completed (Done Now)
β Note: File upload to AWS S3 is already implemented and tested successfully.
- CORS configuration issues between frontend (Vercel) and backend (Render)
- Managing AWS credentials securely across environments
- File upload region mismatch and S3 bucket permission handling in dev vs prod
- Sort of time, to many thigs to imporve.
~14 to 16 hours, including development, testing, and deployment.
Want to host the backend on your own cloud infrastructure? Follow this guide to deploy the Express backend on an AWS EC2 instance with a custom domain, SSL, and persistent process management.
- A GitHub repo for your backend
- A domain name (e.g., from Namecheap)
- AWS account with EC2 permissions
- PEM key file for SSH login
- Launch a new EC2 instance (Ubuntu 22.04 LTS)
- Set inbound rules to allow ports: 22 (SSH), 80 (HTTP), 443 (HTTPS)
- Download and use the
.pem
key to connect:
ssh -i your-key.pem ubuntu@your-ec2-public-ip
sudo apt update && sudo apt upgrade -y
# Install Node.js & npm
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt install -y nodejs
# Install Git
sudo apt install git
# Install PM2 globally
npm install -g pm2
git clone https://github.com/Danish-Belal/praella_task_management_system.git
cd praella-task-management-system/backend
Create a .env file:
touch .env
nano .env
Add Secrets in .env
DATABASE_URL="your_postgresql_connection_string" (from neon db)
PORT=3000
JWT_SECRET=your_jwt_secret
AWS_ACCESS_KEY_ID=your_aws_access_key
AWS_SECRET_ACCESS_KEY=your_aws_secret_key
AWS_REGION=your_aws_region
S3_BUCKET=your_bucket_name
# FRONTEND_URL=http://localhost:5173 #uncomment this if you want to run from local.
# NODE_ENV=DEVELOPMENT (for deploy, set production)
FRONTEND_URL= your vercel frontend link, your custom domain frontend link. #if you want to run your frontend from a hosted link
NODE_ENV=Production
npm install
pm2 start server.js --name backend
pm2 startup
pm2 save
sudo apt install nginx
sudo nano /etc/nginx/nginx.conf
Paste this configuration:
events {}
http {
server {
listen 80;
server_name your-subdomain.yourdomain.com;
location / {
proxy_pass http://localhost:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
}
Test & reload:
sudo nginx -t
sudo systemctl reload nginx
sudo apt install certbot python3-certbot-nginx -y
sudo certbot --nginx -d your-subdomain.yourdomain.com
Follow prompts to complete SSL setup
Certbot auto-renews the certificate every 90 days
Go to your domain provider (e.g., Namecheap):
Add an A Record:
Host: your-subdomain
Value: your-ec2-public-ip
TTL: Automatic
curl -I https://your-subdomain.yourdomain.com
curl http://localhost:3000
pm2 restart backend
Youβve now successfully deployed your backend to AWS with the following setup:
- Custom Domain
- HTTPS (SSL) via Letβs Encrypt
- NGINX as a Reverse Proxy
- PM2 for Node.js Process Management
- β Hit your backend URL in the browser or via Postman
- π Example:
https://your-subdomain.yourdomain.com/api/auth/login
- π Test login with valid credentials to confirm everything works
Crafted with focus, clean code, and attention to detail by Danish Belal.
For any queries, feel free to reach out on [email protected].