How manandarji06/fst-assignment-2 works
Lumis is a full-stack e-commerce application. Customers browse and filter the catalog, authenticate, place stock-validated orders, and view order history; administrators can inspect users and audit activity. The map also preserves product APIs, email notifications, and Resend webhook logging. Relationships are limited to those visible in the sampled source, SOURCE INDEX references, or README; unsampled implementations are represented by their exact tree paths, without assuming their internal calls.
Main entry points: db.ts Prisma Client · auth.ts Auth Service · mailer.ts Email Sender · page.tsx Home Catalog Page
Components 22
Storefront
- Home Catalog Page
app/page.tsx - Product Catalog
components/ProductCatalog.tsx - Product API
app/api/products/route.ts
Identity and Orders
- Sign-in and Sign-up
app/auth - Auth Client
lib/auth-client.ts - Auth Service
lib/auth.ts - Auth API Route
app/api/auth/[...all]/route.ts - Route Protection
middleware.ts - Order Server Action
lib/actions/order-actions.ts - Order API
app/api/orders/route.ts - Customer Dashboard
app/dashboard/page.tsx
Administration
- Admin Console
app/admin/page.tsx - Audit Log API
app/api/audit-logs/route.ts
Email and Events
- Resend Webhook
app/api/webhooks/resend/route.ts - Email Sender
lib/mailer.ts - Order Confirmation Template
emails/OrderConfirmationEmail.tsx - Welcome Email Template
emails/WelcomeEmail.tsx
Other components
- Customer
- Prisma Client
lib/db.ts - Relational Database
prisma/schema.prisma - PostgreSQL
- Resend
Connections 26
- Customer → Home Catalog Page: browses
README.md - Home Catalog Page → Product Catalog: renders
app/page.tsx - Product Catalog → Order Server Action: places order
components/ProductCatalog.tsx - Order Server Action → Auth Service: checks session
lib/actions/order-actions.ts - Order Server Action → Prisma Client: updates order data
lib/actions/order-actions.ts - Home Catalog Page → Prisma Client: loads products
app/page.tsx - Sign-in and Sign-up → Auth Client: uses
app/auth/sign-in/page.tsx - Auth Client → Auth Service: authenticates
- Auth API Route → Auth Service: dispatches to
app/api/auth/[...all]/route.ts - Auth Service → Prisma Client: uses
lib/auth.ts - Route Protection → Auth Service: checks access
- Order API → Auth Service: checks session
app/api/orders/route.ts - Order API → Prisma Client: reads and writes
app/api/orders/route.ts - Product API → Auth Service: checks session
app/api/products/route.ts - Product API → Prisma Client: reads and writes
app/api/products/route.ts - Customer Dashboard → Auth Service: checks session
app/dashboard/page.tsx - Customer Dashboard → Prisma Client: loads order history
app/dashboard/page.tsx - Admin Console → Prisma Client: loads admin data
app/admin/page.tsx - Audit Log API → Auth Service: checks admin session
app/api/audit-logs/route.ts - Audit Log API → Prisma Client: reads audit logs
app/api/audit-logs/route.ts - Resend Webhook → Prisma Client: records email events
app/api/webhooks/resend/route.ts - Email Sender → Order Confirmation Template: renders
lib/mailer.ts - Email Sender → Welcome Email Template: renders
lib/mailer.ts - Email Sender → Resend: sends email
README.md - Prisma Client → Relational Database: accesses schema
- Relational Database → PostgreSQL: stores data
README.md