Welcome! This test evaluates your ability to debug, optimize, and design production-quality code.
hiring-test/
├── backend/ # FastAPI Python backend
│ ├── main.py # Entry point
│ ├── routers/ # API route handlers
│ ├── models/ # Data models
│ └── storage/ # In-memory data storage
├── frontend/ # Next.js React frontend
│ ├── pages/ # Next.js pages
│ ├── components/ # React components
│ └── lib/ # Utilities
└── README.md # This file
cd backend
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
python main.pyThe backend runs on http://localhost:8000
cd frontend
npm install
npm run devThe frontend runs on http://localhost:3000
Problem: The /api/tasks/process endpoint is extremely slow when handling multiple concurrent requests. When 4 webhook streams hit the server simultaneously, it takes ~20 seconds to complete instead of ~5 seconds.
Your Goal:
- Identify why the endpoint is slow
- Fix it so all 4 tasks process concurrently
- The total time should be close to the longest single task (~5 seconds), not the sum of all tasks
Test It:
- Start the backend
- Start the frontend
- Go to
http://localhost:3000and click "Send 4 Webhook Streams" - Observe the processing time in the console
Problem: The "Recall Items" feature on the frontend tries to fetch items from the last 5 days, but it's returning incorrect results. Some items that should appear are missing, and the date filtering seems broken.
Your Goal:
- Find the bug in the backend's datetime handling
- Fix it so the recall feature works correctly across timezones
Test It:
- First, send some webhook streams to create items
- Click "Recall Last 5 Days" button
- Notice that the results are incorrect
Problem: The graph visualization (/graph page) shows connected nodes but looks very basic and unappealing.
Your Goal:
- Improve the visual design of the graph
- Make it look polished and professional
- The code uses ReactFlow - check the comments for styling guidance
Evaluation Criteria:
- Visual appeal and modern design
- Appropriate use of colors, spacing, typography
- User experience considerations
Problem: There's a multi-tenancy security issue where users might see other users' messages when searching. This is a critical privacy bug.
Hint: Look at how tenant_id is used (or not used) in the search/query functions.
Your Goal:
- Identify the security vulnerability
- Fix it so users can only see their own data
- Create a new branch with your fixes
- Commit your changes with clear commit messages
- Document any assumptions or decisions in comments
Good luck! 🚀