Skip to content

Latest commit

 

History

History
115 lines (80 loc) · 3.15 KB

File metadata and controls

115 lines (80 loc) · 3.15 KB

Full-Stack Developer Hiring Test

Welcome! This test evaluates your ability to debug, optimize, and design production-quality code.

Project Structure

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

Getting Started

Backend Setup

cd backend
python -m venv venv
source venv/bin/activate  # Windows: venv\Scripts\activate
pip install -r requirements.txt
python main.py

The backend runs on http://localhost:8000

Frontend Setup

cd frontend
npm install
npm run dev

The frontend runs on http://localhost:3000


Tasks

Task 1: Backend Performance Issue (Required)

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:

  1. Start the backend
  2. Start the frontend
  3. Go to http://localhost:3000 and click "Send 4 Webhook Streams"
  4. Observe the processing time in the console

Task 2: Datetime Bug (Required)

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:

  1. First, send some webhook streams to create items
  2. Click "Recall Last 5 Days" button
  3. Notice that the results are incorrect

Task 3: Frontend Design Challenge (Required)

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

Task 4: Security Bug (Bonus)

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

Submission

  1. Create a new branch with your fixes
  2. Commit your changes with clear commit messages
  3. Document any assumptions or decisions in comments

Good luck! 🚀