How srinayan-96/split_shelf works
split_shelf is a shared-household restock tracker. A user signs in, creates or joins a household, then views and updates its shared inventory; purchases feed household history, while restock predictions support reminders. The map includes the client, API/domain services, persistence, and scheduled reminders. Several server routes and domain modules are represented from the SOURCE INDEX rather than inspected excerpts, so uncertain connections are omitted; dashed edges indicate the client/server HTTP boundary, which the excerpts do not show directly.
Main entry points: app.js HTTP application · models MongoDB models · App.jsx Web app routes · household.routes.js Household routes
Components 24
Household app
- Web app routes
client/src/App.jsx - Sign-in and registration
client/src/pages/Login.jsx - Inventory and item actions
client/src/pages/Home.jsx - Purchase history
client/src/pages/History.jsx - API client
client/src/api/client.js - Inventory state
client/src/hooks/useItems.js
API and domain
- HTTP application
server/src/app.js - Household routes
server/src/routes/household.routes.js - Item routes
server/src/routes/item.routes.js - Auth routes
server/src/routes/auth.routes.js - History routes
server/src/routes/history.routes.js - Notification routes
server/src/routes/notification.routes.js - Reminder route
server/src/routes/job.routes.js - Household controller
server/src/controllers/household.controller.js - Item controller
server/src/controllers/item.controller.js - Household service
server/src/services/household.service.js - Inventory service
server/src/services/item.service.js - History service
server/src/services/history.service.js - Notification service
server/src/services/notification.service.js
Domain data
- MongoDB models
server/src/models
Restock reminders
- Reminder scheduler
server/src/jobs/restockReminder.job.js - Restock prediction
server/src/services/prediction.service.js - Reminder delivery
server/src/services/notifier.service.js
Other components
- Household user
Connections 29
- Household user → Web app routes: uses
client/src/App.jsx - Web app routes → Sign-in and registration: routes to
client/src/App.jsx - Web app routes → Inventory and item actions: routes to
client/src/App.jsx - Web app routes → Purchase history: routes to
client/src/App.jsx - Inventory and item actions → Inventory state: uses
client/src/pages/Home.jsx - Inventory state → API client: requests through
client/src/hooks/useItems.js - Sign-in and registration → API client: requests through
- Purchase history → API client: requests through
client/src/pages/History.jsx - API client → HTTP application: calls API
- HTTP application → Household routes: mounts
server/src/app.js - HTTP application → Auth routes: mounts
server/src/app.js - HTTP application → Notification routes: mounts
server/src/app.js - HTTP application → Reminder route: mounts
server/src/app.js - Household routes → Item routes: mounts
server/src/routes/household.routes.js - Household routes → History routes: mounts
server/src/routes/household.routes.js - Household routes → Household controller: dispatches
server/src/routes/household.routes.js - Item routes → Item controller: dispatches
server/src/routes/item.routes.js - Household controller → Household service: delegates to
server/src/controllers/household.controller.js - Item controller → Inventory service: delegates to
server/src/controllers/item.controller.js - History routes → History service: dispatches to
- Notification routes → Notification service: dispatches to
- Household service → MongoDB models: reads and writes
server/src/services/household.service.js - Inventory service → MongoDB models: reads and writes
server/src/services/item.service.js - History service → MongoDB models: reads history
- Notification service → MongoDB models: accesses
- Reminder route → Reminder scheduler: runs with lock
server/src/routes/job.routes.js - Reminder scheduler → Restock prediction: predicts restock
server/src/jobs/restockReminder.job.js - Reminder scheduler → Reminder delivery: sends reminders
server/src/jobs/restockReminder.job.js - Reminder scheduler → MongoDB models: reads inventory
server/src/jobs/restockReminder.job.js