https://github.com/DieGomezR/sr-fullstack-challenge/pull/new/feature/logistics-notification-hub#1
Open
DieGomezR wants to merge 7 commits intoRed-Valley:mainfrom
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR implements the challenge as a small real-time logistics notification system.
The solution includes:
What I built
API
POST /api/notificationsGET /api/notificationsGET /api/channelsThe API validates input, returns consistent responses, and forwards notification creation to the Bun hub.
Bun notification hub
The Bun service is responsible for:
/healthendpointFrontend
The UI is a single-page dashboard that:
I started with a simpler dashboard and then refactored it into smaller panels before doing the final visual pass.
Architecture / decisions
I kept the Next.js API and the Bun hub as separate responsibilities.
Next.js handles:
The Bun service handles:
I chose SQLite because it fits the scope of the challenge well and keeps the project easy to run locally.
I also kept the communication between Next.js and the Bun service simple through internal HTTP calls instead of introducing a queue or pub/sub layer for this time box.
Frontend notes
The dashboard was redesigned with shadcn/ui components and a HextaUI-inspired layout after the functional version was working.
I also split the dashboard into smaller components to improve readability and separation of concerns, since the initial implementation was growing too large.
Docker / Bun note
The challenge requires Bun, so the solution keeps Bun in the runtime path for both:
For the app scripts I used:
bun --bun next dev --webpackbun --bun next build --webpackbun --bun next startI switched the Next.js build path away from the Turbopack path because Bun was hitting unsupported
worker_threadsoptions in this environment.I also removed the dependency on Google Fonts at build time so Docker builds do not fail when external font fetches are blocked.
Validation
I validated the project locally with:
npm run lintnpm run typechecknext build --webpackTrade-offs
A few things I would improve with more time:
AI usage
I used Codex/ChatGPT in parts of the implementation, refactoring, and review process.