Note: This repository is used for internal technical candidate assessments and is not intended for production use.
A real-time task analytics dashboard built with Vue.js 3, Node.js, MongoDB, and Redis. This application demonstrates full-stack development skills with WebSocket integration and caching strategies.
- β RESTful API with Express.js for task CRUD operations
- β MongoDB Integration with Mongoose for data persistence
- β Redis Caching for individual task lookups (GET /tasks/:id)
- β Socket.IO for real-time analytics and notifications
- β Analytics Engine calculating metrics in real-time
- β Task Management with status and priority tracking
- β Error Handling with comprehensive middleware
- β Code Coverage with Node.js test runner and comprehensive reporting
- β Vue.js 3 SPA with Composition API
- β Vuetify 3 for modern UI components
- β Pinia for state management
- β Real-time Updates via Socket.IO client
- β Analytics Dashboard with live charts
- β Task Management with filtering and pagination
- β Responsive Design for desktop and mobile
- β Dark Mode support
- β Code Coverage with Vitest and detailed reporting
- π Live Analytics Updates - Task metrics update in real-time
- π Smart Notifications - Alerts when completion rate drops below 50%
- β‘ Instant Task Updates - Changes sync across all connected clients
- π Connection Status - Visual indicator of WebSocket connection
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β Vue.js 3 SPA ββββββ Express API ββββββ MongoDB β
β (Frontend) β β (Backend) β β (Database) β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β β
β β βββββββββββββββββββ
β ββββββββββββββββ Redis β
β β (Caching) β
β βββββββββββββββββββ
β
β βββββββββββββββββββ
ββββββββββββββββ Socket.IO β
β (Real-time) β
βββββββββββββββββββ
- Node.js v24+ (specified in package.json engines)
- Docker & Docker Compose for MongoDB and Redis
- Git for version control
git clone <repository-url>
cd wsd-fullstack-js-tech-testdocker-compose up -dThis starts:
- MongoDB on port 27018 (no authentication)
- Redis on port 6380 (no authentication)
cd backend
cp .env.example .env # Important: Copy environment variables
npm install
npm run seed # Generate sample task data (optional)
npm run devNote: Make sure to copy .env.example to .env - the application reads configuration from the .env file.
Backend runs on http://localhost:3001
cd frontend
cp .env.example .env
npm install
npm run devFrontend runs on http://localhost:5173
- Start databases:
docker-compose up -d - Start backend:
cd backend && npm run dev - Start frontend:
cd frontend && npm run dev - Generate sample data:
cd backend && npm run seed(optional) - Access dashboard:
http://localhost:5173
Generate realistic sample tasks to populate the dashboard:
cd backend
npm run seed # Generate 50 sample tasks (default)
npm run seed:small # Generate 25 sample tasks
npm run seed:large # Generate 100 sample tasksThe seeding script creates:
- Diverse task categories: Development, design, planning, maintenance
- Realistic distributions: 40% completed, 30% in-progress, 30% pending
- Priority weighting: 20% high, 50% medium, 30% low
- Time tracking: Estimated and actual completion times
- Historical data: Tasks spanning the last 3 months
cd backend
npm test # Run tests
npm run test:coverage # Run with coveragecd frontend
npm test # Run tests
npm run test:coverage # Run with coverageBoth test suites include comprehensive coverage reporting.
http://localhost:3001/api
No authentication required for this technical assessment.
| Method | Endpoint | Description |
|---|---|---|
| GET | /tasks |
List tasks with pagination and filtering |
| GET | /tasks/:id |
Get single task (cached with Redis) |
| POST | /tasks |
Create new task |
| PUT | /tasks/:id |
Update task |
| DELETE | /tasks/:id |
Delete task |
| Method | Endpoint | Description |
|---|---|---|
| GET | /analytics |
Get task analytics and metrics |
| Method | Endpoint | Description |
|---|---|---|
| GET | /health |
API health check |
curl "http://localhost:3001/api/tasks?page=1&limit=5&status=completed"curl -X POST http://localhost:3001/api/tasks \
-H "Content-Type: application/json" \
-d '{
"title": "Implement new feature",
"description": "Add user profile functionality",
"priority": "high",
"estimatedTime": 120
}'curl -X PUT http://localhost:3001/api/tasks/123456 \
-H "Content-Type: application/json" \
-d '{"status": "completed"}'page: Page number (default: 1)limit: Items per page (default: 10)status: Filter by status (pending, in-progress, completed)priority: Filter by priority (low, medium, high)sortBy: Sort field (createdAt, updatedAt, title, priority, status)sortOrder: Sort direction (asc, desc)
{
"_id": "string",
"title": "string (required, max 200 chars)",
"description": "string (max 1000 chars)",
"status": "pending|in-progress|completed",
"priority": "low|medium|high",
"createdAt": "ISO 8601 date",
"updatedAt": "ISO 8601 date",
"completedAt": "ISO 8601 date or null",
"estimatedTime": "number (hours)",
"actualTime": "number (hours)"
}join-analytics: Join analytics room for updatesrequest-analytics: Request current analytics data
analytics-update: Real-time analytics datatask-update: Task CRUD notificationsnotification: System notificationsconnect/disconnect: Connection status
The dashboard tracks:
- Total Tasks: Count of all tasks
- Completion Rate: Percentage of completed tasks
- Tasks Created Today: New tasks in the last 24 hours
- Tasks Completed Today: Completed tasks in the last 24 hours
- Average Completion Time: Mean time from creation to completion
- Status Distribution: Tasks grouped by status
- Priority Distribution: Tasks grouped by priority
- Recent Activity: Last 10 task updates
- Dashboard: Overview with metrics and charts
- Tasks: Full task management with CRUD operations
- Analytics: Detailed analytics and reporting
- MetricCard: Display key performance indicators
- TaskList: Paginated task listing with filters
- TaskFormDialog: Create/edit task modal
- TaskStatusChart: Pie chart for status distribution
- TaskPriorityChart: Bar chart for priority distribution
- RecentActivity: Live activity feed
- NotificationDrawer: Real-time notifications
PORT=3001
NODE_ENV=development
MONGODB_URI=mongodb://localhost:27018/task_analytics
REDIS_HOST=localhost
REDIS_PORT=6380
SOCKET_IO_CORS_ORIGIN=http://localhost:5173
CORS_ORIGIN=http://localhost:5173VITE_API_URL=http://localhost:3001- Backend: Google JavaScript Style Guide with ES modules
- Frontend: Vue.js style guide with Prettier integration
- Rules: Enforce semicolons, single quotes, proper indentation
- Consistent code formatting
- Aligned with ESLint rules
- Automatic formatting on save
# Backend
cd backend
npm run start
# Frontend
cd frontend
npm run build
npm run previewThe docker-compose.yml includes MongoDB and Redis services. For full containerization, add Dockerfile for the application services.
- Vue.js 3: Modern reactive framework with Composition API
- Vuetify 3: Material Design components for rapid UI development
- Pinia: Official Vue.js state management with TypeScript support
- Node.js v24: Latest LTS with ES modules and test runner
- MongoDB: Document database perfect for task data structure
- Redis: High-performance caching for individual task lookups
- Socket.IO: Reliable real-time communication
- Separation of Concerns: Clear separation between frontend, backend, and database
- RESTful API Design: Standard HTTP methods and status codes
- Real-time First: WebSocket integration for live updates
- Caching Strategy: Strategic Redis caching for performance
- Error Handling: Comprehensive error middleware and user feedback
- Redis Caching: Individual task lookups cached for 5 minutes
- MongoDB Indexing: Optimized queries for status, priority, and dates
- Pagination: Efficient handling of large task lists
- Real-time Throttling: Analytics updates limited to prevent spam
- Component Lazy Loading: Vue.js route-based code splitting
- Connection Refused: Check if Docker services are running
- Module Not Found: Ensure all dependencies are installed
- Port Already in Use: Check if ports 3001, 5173, 27018, 6380 are available
- MongoDB Authentication Failed: Clean restart Docker volumes (see below)
- Real-time Not Working: Verify CORS settings and Socket.IO connection
If you get "Authentication failed" errors, clean restart the Docker containers:
# Stop and remove containers with volumes
docker-compose down -v
# Remove any existing volumes (this will delete all data)
docker volume prune -f
# Start fresh
docker-compose up -d
# Wait for services to be ready
sleep 10
# Verify MongoDB is accessible
mongosh "mongodb://localhost:27018/task_analytics" --eval "db.runCommand('ping')"# Check Docker services
docker-compose ps
# Check API health
curl http://localhost:3001/api/health
# Test database connections
mongosh "mongodb://localhost:27018/task_analytics"
redis-cli -h localhost -p 6380 ping
# View logs
docker-compose logs mongodb
docker-compose logs redisThis project demonstrates:
- Modern JavaScript (ES2024)
- Vue.js 3 Composition API
- Node.js backend development
- MongoDB document modeling
- Redis caching strategies
- Real-time WebSocket communication
- RESTful API design
- Test-driven development
- Code quality tools (ESLint, Prettier)
- Follow the established code style (ESLint + Prettier)
- Maintain test coverage above 60%
- Document new features and API changes
- Test both frontend and backend changes
MIT License - see LICENSE file for details.
Built with β€οΈ for the technical assessment. This project showcases full-stack JavaScript development with modern tools and best practices.