How shrikant-dapke/shelfsense works
ShelfSense is a perishable-goods inventory application built from a Next.js client and an Express/Prisma REST API. Users sign in, manage products and warehouses, receive and dispatch batch-tracked goods, and inspect ledger-derived inventory; stock counts and CSV/XLSX imports provide controlled adjustment and onboarding flows. The README describes an immutable movement ledger and audit logging. The graph includes documented product capabilities, but unsampled service internals and client-to-API calls are not inferred from filenames; those connections are omitted or marked unverified.
Main entry points: app.ts REST application · auth.service.ts Session and roles · inventory.service.ts Ledger inventory · auth.middleware.ts Authentication middleware
Components 27
Web client
- Inventory workspace
client/src/app/(app)/inventory/page.tsx - Receiving UI
client/src/app/(app)/receipts/page.tsx - Dispatch UI
client/src/app/(app)/dispatch/page.tsx - Stock count UI
client/src/app/(app)/stock-counts/page.tsx - Import UI
client/src/app/(app)/imports/page.tsx - Catalog UI
client/src/app/(app)/products/page.tsx - Sign-in UI
client/src/app/login/page.tsx - API client
client/src/lib/api-client.ts
API runtime
- REST application
server/src/app.ts - Session and roles
server/src/modules/auth/auth.service.ts
Stock operations
- Ledger inventory
server/src/modules/inventory/inventory.service.ts - Goods receipts
server/src/modules/receipts/receipts.service.ts - Stock dispatches
server/src/modules/dispatches/dispatches.service.ts - Batches and aliases
server/src/modules/batches/batches.service.ts - Count lifecycle
server/src/modules/stockcounts/stockcounts.service.ts
Catalog and imports
- Product catalog
server/src/modules/products/products.controller.ts - Warehouses
server/src/modules/warehouses/warehouses.routes.ts - File import workflow
server/src/modules/imports/imports.service.ts
Shared internals
- PostgreSQL data
server/src/config/prisma.ts - Authentication middleware
server/src/middleware/auth.middleware.ts - Request validation
server/src/middleware/validate.middleware.ts - Response envelopes
server/src/utils/api-response.ts - Pagination helpers
server/src/utils/pagination.ts - JWT utilities
server/src/utils/jwt.ts - Audit logging
server/src/services/audit.service.ts - Error handling
server/src/middleware/error.middleware.ts
Other components
- Staff user
Connections 23
- Staff user → Sign-in UI: signs in
README.md - Staff user → Inventory workspace: uses
README.md - Inventory workspace → API client: requests via
- API client → REST application: proxies API
README.md - REST application → Session and roles: mounts routes
server/src/app.ts - REST application → Product catalog: mounts routes
server/src/app.ts - REST application → Warehouses: mounts routes
server/src/app.ts - REST application → Ledger inventory: mounts routes
server/src/app.ts - REST application → Goods receipts: mounts routes
server/src/app.ts - REST application → Stock dispatches: mounts routes
server/src/app.ts - REST application → Batches and aliases: mounts routes
server/src/app.ts - REST application → Count lifecycle: mounts routes
server/src/app.ts - REST application → File import workflow: mounts routes
server/src/app.ts - Session and roles → PostgreSQL data: reads users
server/src/modules/auth/auth.service.ts - Session and roles → JWT utilities: signs sessions
server/src/modules/auth/auth.service.ts - Session and roles → Audit logging: records login
server/src/modules/auth/auth.service.ts - Authentication middleware → JWT utilities: verifies token
server/src/middleware/auth.middleware.ts - Authentication middleware → PostgreSQL data: rechecks user
server/src/middleware/auth.middleware.ts - Request validation → Error handling: raises validation errors
server/src/middleware/validate.middleware.ts - File import workflow → Import UI: supports upload preview
README.md - Count lifecycle → Ledger inventory: posts adjustments
README.md - Goods receipts → Ledger inventory: writes receipt movements
README.md - Stock dispatches → Ledger inventory: writes dispatch movements
README.md