You have 30 minutes to identify and fix bugs in this Todo application. The app has several intentional bugs that test your debugging skills and understanding of React, Express, and JavaScript fundamentals.
- Identify Bugs: Find all the intentional bugs in both frontend and backend
- Fix Bugs: Correct the issues to make the app fully functional
- Add Feature: Implement the missing "Update Todo" endpoint in the backend
- Test: Ensure all functionality works correctly
- Frontend: React with hooks
- Backend: Express.js
- Database: In-memory mock (no external DB needed)
- Authentication: Simple JWT tokens
- Node.js (v16 or higher)
- npm or yarn
- Clone this repository
- Install dependencies:
npm run install-all
- Start both frontend and backend:
npm run dev
- Frontend will be available at: http://localhost:3000
- Backend API will be available at: http://localhost:3001
- Backend: Click "Run" on the server folder
- Frontend: Click "Run" on the client folder
- The frontend will automatically proxy to the backend
- Backend only:
npm run server - Frontend only:
npm run client
- Frontend: Port 3000
- Backend: Port 3001
- Proxy: Frontend automatically proxies API calls to backend
POST /api/auth/register- User registrationPOST /api/auth/login- User loginGET /api/auth/me- Get current user (protected)
GET /api/tasks- Get all tasks for current userPOST /api/tasks- Create new taskPUT /api/tasks/:id- Update taskDELETE /api/tasks/:id- Delete taskPATCH /api/tasks/:id/toggle- Toggle task completionGET /api/tasks/stats- Get task statistics
{
id: string,
username: string,
email: string,
password: string (hashed),
createdAt: Date
}{
id: string,
title: string,
description: string,
status: 'pending' | 'completed',
priority: 'low' | 'medium' | 'high',
dueDate: Date,
userId: string,
createdAt: Date,
updatedAt: Date
}-
User Authentication
- Registration and login forms
- JWT token management
- Protected routes
-
Task Management
- CRUD operations for tasks
- Task status toggling
- Priority and due date handling
-
User Interface
- Responsive design
- Task filtering and sorting
- Loading states and error handling
-
Data Persistence
- Mock database with in-memory storage
- Data persistence across server restarts (optional)
-
Real-time Updates
- WebSocket implementation
- Live task updates
-
Advanced Features
- Task categories/tags
- Bulk operations
- Export functionality
- Search and advanced filtering
-
Performance Optimizations
- Pagination
- Caching strategies
- Lazy loading
- Clean, readable code
- Proper error handling
- Consistent coding style
- Good separation of concerns
- All required features implemented
- Proper API design
- Data validation
- Error handling
- Intuitive interface
- Responsive design
- Loading states
- Error messages
- Efficient algorithms
- Proper state management
- Async operations
- Security considerations
- Complete all required features
- Ensure the application runs without errors
- Add comments for complex logic
- Include any additional features you'd like to showcase
- Be prepared to explain your design decisions
- Start with the backend API structure
- Use modern JavaScript features
- Implement proper error handling early
- Test your endpoints thoroughly
- Focus on clean, maintainable code
- Don't over-engineer - keep it simple but functional
- The backend runs on port 3001
- Frontend automatically proxies API calls to the backend
- Both can run simultaneously in separate tabs
- Check the console for any connection errors
Good luck! 🚀