How beanszza/brenraphaels-smart-inventory-system works
IMS is a staff-facing inventory and operations management system. Staff sign in through the Portal, then work across resources, procurement, receiving, inventory, production and stock-transfer screens; domain actions provide the server-side operations, with database and external-service integrations behind them. The sampled files show the Portal guard, inventory action boundary, domain client wrappers, Prisma setup, file routes and selected POS/SCMS endpoints. Several major screen capabilities are represented by their exact directories because their implementations were not sampled; those paths do not imply unverified calls.
Main entry points: prisma.ts Application database · inventory Inventory actions · files.ts File service boundary · staff.ts Module access guard
Components 24
Access and shell
- IMS screens
app/(root) - Sign-in screens
components/auth/AuthScreen.tsx - Portal auth flow
app/api/portal - Module access guard
lib/portal/staff.ts - Operations dashboard
dashboard/page.tsx
Resources and procurement
- Resources and suppliers
app/actions/resources - Orders and procurement
app/actions/orders - Goods receiving
app/actions/receiving - Inbound processing
app/(root)/inbound-processing
Inventory operations
- Inventory screens
app/(root)/inventory - Inventory actions
app/actions/inventory - Inventory mutation layer
lib/inventory/mutate.ts - Stock transfers
app/actions/stock-transfer - POS and SCMS transfer API
app/api/pos/stock-requests/route.ts
Production and quality
- Production and quality
app/actions/production - Production screens
components/production - Recipes
app/(root)/recipes/page.tsx
Integrations and services
- Application database
lib/prisma.ts - File service boundary
lib/files.ts - File routes
lib/file-routes.ts - Files gateway
lib/gateway/files.ts
Other components
- Staff user
- POS / SCMS
- Portal service
Connections 24
- Staff user → IMS screens: uses
README.md - Staff user → Portal auth flow: signs in
README.md - Portal auth flow → Portal service: exchanges session
README.md - IMS screens → Module access guard: checks modules
README.md - Operations dashboard → Module access guard: requires access
README.md - Operations dashboard → Resources and suppliers: loads data
- Inventory screens → Module access guard: requires access
app/(root)/inventory/page.tsx - Inventory screens → Inventory actions: loads inventory
app/(root)/inventory/page.tsx - Inventory actions → Inventory mutation layer: mutates stock
app/actions/inventory/balances.ts - Inventory actions → Application database: reads and writes
app/actions/inventory/balances.ts - Inventory actions → File service boundary: manages write-off photos
app/actions/inventory/write-offs.ts - Orders and procurement → Application database: reads and writes
- Goods receiving → Application database: records receipts
- Inbound processing → Goods receiving: supports inbound flow
- POS and SCMS transfer API → POS / SCMS: serves requests
app/api/pos/stock-requests/route.ts - POS and SCMS transfer API → Application database: records requests
app/api/pos/stock-requests/route.ts - Stock transfers → Application database: reads and writes
- Production screens → Production and quality: invokes actions
- Production and quality → Application database: reads and writes
- Recipes → Resources and suppliers: uses recipe data
- File routes → Module access guard: checks route access
lib/file-routes.ts - File routes → File service boundary: uploads and resolves
lib/file-routes.ts - File service boundary → Files gateway: uses gateway
lib/files.ts - File service boundary → Portal service: obtains session context