How gartgetget/5a-inventory-system works
Stockly is a role-based inventory and warehouse management platform for admins, suppliers, and clients. The main flow is a user entering a role-specific experience, using catalog and order capabilities, and managing the resulting invoices, payments, and fulfillment; operational records are persisted through Prisma and MongoDB. The README documents these product capabilities and optional integrations. Sampled routes confirm authentication, order persistence, and product management behavior; most other route-to-service links are not shown in the excerpts, so those connections are not asserted.
Main entry points: page.tsx Admin workspace · orders/route.ts Orders · ClientPortalPage.tsx Client portal · products/route.ts Product catalog
Components 26
Role Experiences
- Admin workspace
app/admin/page.tsx - Supplier portal
app/supplier/page.tsx - Client portal
components/Pages/ClientPortalPage.tsx
Inventory & Commerce
- Product catalog
app/api/products/route.ts - Categories
app/api/categories/route.ts - Supplier records
app/api/suppliers/route.ts - Warehouses
app/api/warehouses/route.ts - Orders
app/api/orders/route.ts - Invoices
app/api/invoices/route.ts
Fulfillment & Service
- Payments
app/api/payments/checkout/route.ts - Shipping
app/api/shipping/labels/route.ts - Support tickets
app/api/support-tickets/route.ts - Product reviews
app/api/product-reviews/route.ts
Insights & Governance
- Analytics & forecasting
app/business-insights/page.tsx - Activity history
prisma/audit-log.ts - AI insights
lib/ai/openrouter.ts
Application Services
- Session auth
utils/auth.ts - MongoDB via Prisma
prisma/client.ts - Email notifications
lib/email/notifications.ts
Other components
- Admin
- Supplier
- Client
- Stripe
- Shippo
- Brevo
- OpenRouter
Connections 33
- Admin → Admin workspace: manages operations
README.md - Supplier → Supplier portal: manages own data
README.md - Client → Client portal: browses and orders
README.md - Admin workspace → Product catalog: manages catalog
- Admin workspace → Categories: manages categories
- Admin workspace → Supplier records: manages suppliers
- Admin workspace → Warehouses: manages warehouses
- Client portal → Product catalog: browses catalog
README.md - Client portal → Orders: places orders
README.md - Client portal → Invoices: views invoices
README.md - Supplier portal → Product catalog: views own products
README.md - Supplier portal → Orders: views own orders
README.md - Admin workspace → Analytics & forecasting: views insights
README.md - Admin workspace → Activity history: reviews activity
README.md - Client portal → Support tickets: opens tickets
README.md - Client portal → Product reviews: submits reviews
README.md - Orders → Session auth: resolves session
app/api/orders/route.ts - Orders → MongoDB via Prisma: persists orders
app/api/orders/route.ts - Product catalog → Session auth: resolves session
app/api/products/route.ts - Product catalog → MongoDB via Prisma: stores products
app/api/products/route.ts - Invoices → MongoDB via Prisma: reads and writes
app/api/invoices/route.ts - Support tickets → MongoDB via Prisma: stores tickets
app/api/support-tickets/route.ts - Orders → Activity history: records activity
app/api/orders/route.ts - Product catalog → Activity history: records activity
app/api/products/route.ts - Orders → Invoices: bills orders
- Invoices → Payments: accepts payment
README.md - Payments → Stripe: uses checkout
README.md - Orders → Shipping: fulfills orders
README.md - Shipping → Shippo: uses shipping API
README.md - Invoices → Email notifications: sends invoices
README.md - Email notifications → Brevo: delivers email
README.md - Analytics & forecasting → AI insights: requests AI insights
- AI insights → OpenRouter: uses model service
README.md