A comprehensive issue tracking and project management system built with Node.js, React, MongoDB, and Redis. Features advanced scalability, reliability, and monitoring capabilities.
- Issue Management: Create, assign, track, and resolve issues
- Project Management: Sprint planning, milestone tracking, Kanban boards
- Team Collaboration: Real-time chat, notifications, team management
- Role-Based Access Control: Admin, Team Leader, Employee roles with granular permissions
- Caching Layer: Redis-based caching for improved performance
- Comprehensive Logging: Structured logging with Winston
- Application Performance Monitoring (APM): Real-time metrics and alerts
- Enhanced Authentication: JWT with refresh tokens and RBAC
- Database Optimization: Indexing strategies and query optimization
- Graceful Shutdown: Proper resource cleanup and connection management
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ Frontend โ โ Backend API โ โ Database โ
โ (React) โโโโโบโ (Node.js) โโโโโบโ (MongoDB) โ
โ โ โ โ โ โ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโ
โ Cache Layer โ
โ (Redis) โ
โโโโโโโโโโโโโโโโโโโ
- Node.js 18+ and npm
- MongoDB 5.0+
- Redis 6.0+
- Docker and Docker Compose (optional)
-
Clone the repository
git clone <repository-url> cd trackurissue
-
Configure environment variables
cp .env.example .env # Edit .env with your configuration -
Start all services
docker-compose up -d
-
Access the application
- Frontend: http://localhost:3000
- Backend API: http://localhost:3001
- Monitoring Dashboard: http://localhost:3001/api/monitoring/health
-
Install dependencies
# Backend cd backend npm install # Frontend cd ../frontend npm install
-
Start MongoDB and Redis
# MongoDB mongod --dbpath /path/to/data # Redis redis-server
-
Configure environment
cp .env.example .env # Edit .env with your configuration -
Start the services
# Backend (in backend directory) npm start # Frontend (in frontend directory) npm start
Key configuration options in .env:
# Database
MONGODB_URI=mongodb://localhost:27017/trackurissue
REDIS_URL=redis://localhost:6379
# Security
JWT_SECRET=your-jwt-secret
REFRESH_TOKEN_SECRET=your-refresh-secret
# Performance
LOG_LEVEL=info
CACHE_TTL_DEFAULT=3600
RATE_LIMIT_MAX_REQUESTS=100Logs are categorized and stored in separate files:
app-combined.log- General application logsapp-error.log- Error logssecurity.log- Security eventsperformance.log- Performance metricsaudit.log- User actions and data changesdatabase.log- Database operations
Access the monitoring dashboard at /api/monitoring/metrics (admin only):
- System Metrics: CPU, memory, uptime
- Request Metrics: Response times, success rates, error rates
- Database Performance: Query times, slow queries, connection pool
- Cache Performance: Hit rates, miss rates
- Real-time Alerts: Configurable thresholds and notifications
- Endpoint:
/api/monitoring/health - Checks: Database connectivity, Redis availability, system resources
- Response: JSON with detailed health status
{
"requests": {
"total": 1000,
"successRate": 0.95,
"avgResponseTime": 150,
"p95ResponseTime": 300,
"p99ResponseTime": 500
},
"database": {
"queries": 500,
"slowQueries": 5,
"errorRate": 0.01
},
"cache": {
"hitRate": 0.85,
"hits": 850,
"misses": 150
},
"system": {
"memory": { "usage": 0.65 },
"cpu": { "loadAverage": [1.2, 1.1, 1.0] },
"uptime": 86400
}
}- JWT Tokens: Access tokens (1h) + Refresh tokens (7d)
- Role-Based Access Control: Granular permissions system
- Session Management: Secure session handling with Redis
- Rate Limiting: Configurable per-user/IP limits
- Failed Login Attempts: Automatic detection and alerting
- Unauthorized Access: Logging and monitoring
- Suspicious Activity: Pattern detection and alerts
- Audit Trail: Complete user action logging
| Role | Permissions |
|---|---|
| Admin | Full system access, user management, monitoring |
| Team Leader | Team management, project oversight, team metrics |
| Employee | Assigned issues, team collaboration, personal dashboard |
- User Data: 1 hour TTL
- Team Information: 1 hour TTL
- Issue Lists: 5 minutes TTL
- Dashboard Stats: 5 minutes TTL
- Session Data: 24 hours TTL
- Indexes: Compound indexes on frequently queried fields
- Aggregation: Optimized pipelines for complex queries
- Connection Pooling: Configurable pool size and timeouts
- Pagination: Limit large result sets
- Field Selection: Return only required fields
- Compression: Gzip compression for responses
- Rate Limiting: Prevent API abuse
- Load Balancing: Multiple API server instances
- Database Scaling: MongoDB replica sets and sharding
- Cache Distribution: Redis clustering
- CDN Integration: Static asset delivery
- Memory Optimization: Efficient data structures and caching
- CPU Optimization: Async operations and worker threads
- I/O Optimization: Connection pooling and batching
Default alert thresholds:
- Response time: > 1000ms
- Error rate: > 5%
- Memory usage: > 85%
- CPU usage: > 80%
- Database connection pool: > 90%
POST /api/auth/refresh- Refresh access tokenPOST /api/auth/logout- Logout userGET /api/auth/validate- Validate tokenPOST /api/auth/change-password- Change password
GET /api/monitoring/health- System health checkGET /api/monitoring/metrics- Performance metricsGET /api/monitoring/alerts- Active alertsPOST /api/monitoring/alerts/:id/resolve- Resolve alert
GET /api/sprints- List sprintsPOST /api/sprints- Create sprintPUT /api/sprints/:id- Update sprintDELETE /api/sprints/:id- Delete sprintGET /api/milestones- List milestonesPOST /api/milestones- Create milestone
# Backend tests
cd backend
npm test
# Frontend tests
cd frontend
npm test
# Integration tests
npm run test:integration
# Coverage report
npm run test:coverage-
Build the application
docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d
-
Configure reverse proxy (Nginx example)
server { listen 80; server_name your-domain.com; location / { proxy_pass http://localhost:3000; } location /api { proxy_pass http://localhost:3001; } }
-
Set up SSL/TLS
certbot --nginx -d your-domain.com
- Development: Full logging, debug mode, hot reload
- Staging: Production-like with debug capabilities
- Production: Optimized performance, minimal logging, security hardened
-
Redis Connection Failed
# Check Redis status redis-cli ping # Restart Redis sudo systemctl restart redis
-
MongoDB Connection Issues
# Check MongoDB status mongosh --eval "db.adminCommand('ping')" # Check logs tail -f /var/log/mongodb/mongod.log
-
High Memory Usage
- Check cache hit rates
- Review query performance
- Monitor for memory leaks
# View recent errors
tail -f backend/logs/app-error.log
# Search for specific patterns
grep "ERROR" backend/logs/app-combined.log
# Monitor performance
tail -f backend/logs/performance.log- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions:
- Create an issue in the repository
- Check the troubleshooting section
- Review the monitoring dashboard for system health
- Microservices architecture
- Kubernetes deployment
- Advanced analytics dashboard
- Mobile application
- Third-party integrations (Slack, JIRA, etc.)
- Machine learning for issue prediction
- Advanced reporting and insights