How akilanpl/stocksense works
StockSense is a web-based inventory operations workspace. Staff manage catalog and warehouse structure, record receipts, deliveries, transfers, and adjustments, then validate operations that affect stock and the auditable movement history. The README documents dashboard health and authentication capabilities. The graph follows the sampled API-to-service calls; deeper wiring for unsampled features is shown only where documented, with no inferred call sequence between operation types.
Main entry points: api Browser API client · prisma.ts Prisma access · auth Auth routes · (app) Workspace pages
Components 19
Workspace UI
- Workspace pages
src/app/(app) - Auth pages
src/app/(auth) - Browser API client
src/lib/api
REST API
- Catalog routes
src/app/api/products/route.ts - Operation routes
src/app/api/operations/route.ts - Stock & moves routes
src/app/api/stock/route.ts - Dashboard route
src/app/api/dashboard/route.ts - Auth routes
src/app/api/auth
Inventory Services
- Product & site catalog
src/server/catalog - Operation lifecycle
src/server/operations/operations.ts - Stock ledger & queries
src/server/inventory - Inventory health
src/server/inventory/dashboard.ts
Identity Services
- Accounts & sessions
src/server/auth - Email verification
src/server/auth/verification.ts - Mail delivery
src/server/email/mailer.ts
Persistence & Email
- PostgreSQL
- Prisma access
src/server/db/prisma.ts
Other components
- Inventory staff
- SMTP service
Connections 23
- Inventory staff → Workspace pages: uses
- Inventory staff → Auth pages: signs in
- Workspace pages → Browser API client: requests data
- Auth pages → Browser API client: submits credentials
- Browser API client → Catalog routes: calls
- Browser API client → Operation routes: calls
- Browser API client → Stock & moves routes: calls
- Browser API client → Dashboard route: calls
- Browser API client → Auth routes: calls
- Catalog routes → Product & site catalog: invokes
- Operation routes → Operation lifecycle: invokes
- Stock & moves routes → Stock ledger & queries: queries
- Dashboard route → Inventory health: queries
- Auth routes → Accounts & sessions: invokes
- Auth routes → Email verification: starts verification
- Email verification → Mail delivery: sends email
- Mail delivery → SMTP service: delivers
- Product & site catalog → Prisma access: persists records
- Operation lifecycle → Prisma access: reads and writes
- Stock ledger & queries → Prisma access: reads ledger
- Inventory health → Prisma access: reads metrics
- Accounts & sessions → Prisma access: stores accounts
- Prisma access → PostgreSQL: queries