A growing logistics company needs an internal tool to monitor delivery events across multiple warehouses in real time. Operations managers want to see live updates as packages move through different stages, receive alerts when something goes wrong, and review historical data.
In this challenge, you'll build a simplified version of this system: a real-time notification hub where events are created via API, stored in a database, broadcast to connected clients via WebSocket, and displayed in a simple dashboard.
We are not evaluating specific tools or patterns. We simply want to understand how you think, how you code, and how you approach real-world problems. Be yourself.
A functional full stack application with:
- A WebSocket server that broadcasts notifications to subscribed clients
- A REST API to create and query notifications
- A database to persist notification history
- A UI that displays notifications in real time
- Docker Compose to run the entire system
Design the schema yourself. At minimum, you should be able to store:
- Notifications with: channel, title, message, priority, and timestamp
- Channels as a concept (either as a separate table or embedded — your call)
Include appropriate indexes for the queries your API supports.
- Runtime: Bun
- API Framework: Next.js (App Router)
- WebSocket Server: Bun native WebSocket (separate service)
- Database: SQLite (ORM, query builder, or raw SQL — your choice)
- Framework: Next.js
- Styling: TailwindCSS
- Additional UI libraries are welcome but not required
- Docker + Docker Compose
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/notifications |
Create a notification (channel, title, message, priority) |
| GET | /api/notifications |
List notifications with filters (channel, priority, date range, limit/offset) |
| GET | /api/channels |
List channels with notification count |
- Validate input. Return proper HTTP status codes.
- Use a consistent response structure.
- Clients connect and subscribe to one or more channels.
- When a notification is created via the API, broadcast it to all clients subscribed to that channel.
- Expose a
GET /healthendpoint.
A single page that:
- Connects to the WebSocket server
- Shows a connection status indicator (connected/disconnected)
- Displays notifications in real time as they arrive
- Allows filtering by channel
docker-compose.ymlthat starts the WebSocket server, the Next.js app, and any other service needed.- Must work with a single
docker compose up.
- Fork this repository, complete your work, and submit a pull request.
- Include a
README.mdwith:- Clear instructions to run the project locally
- A short explanation of your architecture and design decisions
- Any trade-offs or things you would improve with more time
You should spend no more than 3 hours on this task.
Don't worry if you can't finish everything. What matters most is how far you get and how you approach the problem.
What we mainly evaluate:
- Solution design and structure (architecture, modularity, separation of concerns).
- Clarity of reasoning and documentation (decisions, trade-offs, assumptions).
- Code quality (readability, consistency, error handling, good practices).
- WebSocket implementation (scalability, reconnection handling, channel management).
- Docker setup (networking, multi-service orchestration).
- Git workflow (incremental commits with clear messages).
- Prioritization and scope management: it's valid to leave items pending if you explain what and why.
Use of AI (optional but allowed):
- You may use AI tools (e.g., Claude, Copilot, ChatGPT, Cursor) to assist with your solution.
- We care most about how you structure the solution and explain your decisions.
- If you used AI, add a brief note in your PR/README: which tools you used, which parts were assisted, and what changes you made after review.
- Only include code you understand and can justify.