A complete issue tracking and project management application built with PostgreSQL, Express.js, React, and Node.js featuring drag-and-drop Kanban board, team collaboration, and activity tracking.
- ✅ User Authentication - JWT-based secure login/registration
- ✅ Project Management - Create projects, manage teams with roles
- ✅ Ticket Management - Create/assign tickets with filtering
- ✅ Kanban Board - Drag-and-drop task management with status updates
- ✅ Comments System - Collaborative discussions on tickets
- ✅ Activity Logs - Complete audit trail of all changes
- ✅ Role-Based Access - Owner, Admin, Manager, Developer, Viewer roles
- ✅ Responsive Design - Mobile-friendly Tailwind UI
- ✅ Production Security - JWT, password hashing, SQL injection prevention
| Area | Technology | Details |
|---|---|---|
| Backend | Express.js 4.18+ | Node.js REST API |
| Frontend | React 18 + Vite | Fast bundler, HMR |
| Database | PostgreSQL 12+ | UUID keys, CASCADE deletes |
| Auth | JWT + bcryptjs | Secure tokens + password hashing |
| Styling | Tailwind CSS v3 | Responsive design |
| Drag & Drop | @hello-pangea/dnd | Smooth interactions |
| HTTP | axios | Client requests |
| Notifications | react-hot-toast | Toast alerts |
bug-tracker/
├── server/
│ ├── config/db.js # PostgreSQL connection
│ ├── controllers/ # Business logic (5 controllers)
│ ├── routes/ # API routes (5 route files)
│ ├── middleware/ # Auth & error handling
│ ├── sql/schema.sql # Database schema
│ ├── utils/generateToken.js # JWT utilities
│ ├── index.js # Express app
│ ├── package.json
│ └── .env.example
│
├── client/
│ ├── src/
│ │ ├── api/ # API call functions (4 files)
│ │ ├── components/ # React components (10+ files)
│ │ ├── pages/ # Route pages (4 pages)
│ │ ├── hooks/ # Custom hooks (useAuth, useProjects, useTickets)
│ │ ├── context/ # Global state (AuthContext)
│ │ ├── App.jsx # Router setup
│ │ └── main.jsx
│ ├── vite.config.js # Proxy to localhost:5000
│ ├── tailwind.config.js
│ ├── package.json
│ └── .env.example
│
├── setup.sh # Quick setup script
├── README_DEPLOYMENT.md # Complete deployment guide
└── README.md # This file
# Go to project directory
cd bug-tracker
# Run setup script (Unix/Mac/Linux)
bash setup.sh
# Or on Windows:
# 1. cd server && npm install
# 2. cd ../client && npm install
# 3. Update .env files manually# Backend
cd server
npm install
# Create .env file with DATABASE_URL, JWT_SECRET, etc.
npm run dev
# Frontend (new terminal)
cd client
npm install
npm run devVisit: http://localhost:5173
DATABASE_URL=postgresql://postgres:password@localhost:5432/bug_tracker
JWT_SECRET=your-secret-key-here-change-in-production
PORT=5000
NODE_ENV=development
CORS_ORIGIN=http://localhost:5173VITE_API_URL=http://localhost:5000See .env.example files for templates.
Server (terminal 1):
cd server
npm run devClient (terminal 2):
cd client
npm run devVisit http://localhost:5173 in your browser.
POST /api/auth/register— Register new userPOST /api/auth/login— Login, returns JWTGET /api/auth/me— Get current user (protected)
GET /api/projects— List user's projectsPOST /api/projects— Create new projectGET /api/projects/:id— Get project detailsPUT /api/projects/:id— Update projectDELETE /api/projects/:id— Delete projectPOST /api/projects/:id/members— Add project member
GET /api/projects/:id/tickets— List tickets (with filters)POST /api/projects/:id/tickets— Create ticketGET /api/tickets/:id— Get ticket detailsPUT /api/tickets/:id— Update ticketPATCH /api/tickets/:id/status— Update ticket statusDELETE /api/tickets/:id— Delete ticket
GET /api/tickets/:id/comments— Get ticket commentsPOST /api/tickets/:id/comments— Add commentDELETE /api/comments/:id— Delete comment
- JWT-based authentication
- Password hashing with bcryptjs
- CORS protection
- Helmet security headers
- Parameterized SQL queries (no injection)
- Role-based access control
- Environment variable configuration
- ✅ Project scaffolding
- ✅ Database configuration
- ✅ Authentication system
- Project CRUD operations
- Ticket management
- Filtering & sorting
- Dashboard & project views
- Kanban board with drag-and-drop
- Ticket detail page
- Comments system
- Real-time updates
- Deployment (Render + Vercel)
See README_DEPLOYMENT.md for complete step-by-step deployment instructions.
- Backend: Render.com or Railway.app
- Frontend: Vercel or Netlify
- Database: Supabase or Render PostgreSQL
- Backend: Push to GitHub → Connect to Render/Railway → Set environment variables
- Database: Create PostgreSQL instance → Run schema → Get connection string
- Frontend: Build → Connect to Vercel/Netlify → Set API URL
- API Endpoint: Update
REACT_APP_API_URLin frontend to production backend
For detailed instructions: See Deployment Guide →
6 tables with full ACID compliance:
users- User accountsprojects- Projects with ownersproject_members- Team membership & rolestickets- Issues/taskscomments- Discussion threadsactivity_logs- Audit trail
All tables use UUID primary keys with CASCADE deletes.
✅ JWT tokens with expiration ✅ bcryptjs password hashing (10 rounds) ✅ Parameterized SQL (no injection) ✅ CORS configured by origin ✅ Helmet security headers ✅ Role-based access control ✅ Error handling (no data leaks) ✅ HTTPS recommended for production
Q: How do I reset the database?
dropdb bug_tracker
createdb bug_tracker
psql -d bug_tracker -f server/sql/schema.sqlQ: How do I add a new user role?
A: Update the role CHECK constraint in server/sql/schema.sql and add to role validation in controllers.
Q: Can I use SQLite instead? A: PostgreSQL-specific features are used (UUIDs, CASCADE). Modify schema for SQLite compatibility.
Q: How do I enable HTTPS? A: Use a reverse proxy (nginx) or cloud provider's SSL certificates (included on Render/Vercel).
"Cannot connect to database"
- Verify PostgeSQL is running:
psql --version - Check DATABASE_URL format
- Ensure database exists:
createdb bug_tracker
"Frontend blank page"
- Check browser console for errors
- Verify backend is running:
curl http://localhost:5000/api/health - Check CORS settings in
server/index.js
"Deploy fails"
- See README_DEPLOYMENT.md for deployment troubleshooting
- Check logs on Render/Railway/Vercel dashboard
- Full Deployment Guide - Step-by-step deployment
- Express.js Docs: https://expressjs.com
- React Docs: https://react.dev
- PostgreSQL Docs: https://www.postgresql.org/docs
- Tailwind CSS: https://tailwindcss.com
- JWT: https://jwt.io
- ✅ All core features implemented
- ✅ Security best practices applied
- ✅ Responsive UI complete
- ✅ Error handling comprehensive
- ✅ Database optimized
- ✅ Ready for deployment
MIT License - Open source for commercial and personal use
Built with ❤️ using PERN Stack
April 2026