How wkimball1/elitehousing works
Home Renovation Systems is a renovation-company website with a public-facing catalog and contact experience, plus a hidden employee dashboard. Visitors browse product categories or send inquiries; employees manage customer records, jobs/invoices, inventory, and related operational views. Supabase provides application data and authentication, while Stripe supports invoice and billing operations. The tree and excerpts support the main route and several service calls; other dashboard pages and integrations are represented at subsystem level where their implementation was not sampled.
Main entry points: layout.tsx Dashboard shell · client.ts Browser client · [id]/page.tsx Customer jobs and invoices · customers/page.tsx Customer records
Components 28
Public website
- Home page
app/page.tsx - Product categories
app/client - Contact form
app/client/contact/page.tsx
Employee dashboard
- Admin sign-in
app/admin/page.tsx - Sign-out route
app/api/auth/signout/route.ts - Dashboard shell
app/admin/dashboard/layout.tsx - Customer records
app/admin/dashboard/customers/page.tsx - Customer jobs and invoices
app/admin/dashboard/customer/[id]/page.tsx - Job management
app/admin/dashboard/jobs/page.tsx - Inventory management
app/admin/dashboard/inventory/page.tsx - Employee records
app/admin/dashboard/employees/page.tsx - Sales reporting
app/admin/dashboard/sales/page.tsx - Orders view
app/admin/dashboard/orders/page.tsx
Data and integrations
- Email sender
utils/send-email.ts - Browser client
utils/supabase/client.ts - Server client
utils/supabase/server.ts - Supabase data
- Data actions
components/supabaseServer.ts - Database operations
utils/supabase/admin.ts - Stripe billing
utils/stripe/server.ts - Stripe webhook
app/api/webhooks/stripe/route.ts - Email endpoint
app/api/email/route.ts
Shared application layer
- Auth controls
components/AuthButton.tsx - Navigation
components/NavBar.tsx - Statement PDF
components/CustomerDocument.tsx - Database types
types_db.ts
Other components
- Visitor
- Employee
Connections 35
- Visitor → Home page: browses
- Home page → Navigation: renders
app/page.tsx - Visitor → Product categories: browses
- Visitor → Contact form: submits inquiry
app/client/contact/page.tsx - Contact form → Email sender: sends message
app/client/contact/page.tsx - Employee → Admin sign-in: signs in
- Admin sign-in → Auth controls: renders
app/admin/page.tsx - Auth controls → Browser client: checks session
components/AuthButton.tsx - Auth controls → Sign-out route: posts sign-out
components/AuthButton.tsx - Employee → Dashboard shell: uses
- Dashboard shell → Customer records: opens section
- Dashboard shell → Job management: opens section
- Dashboard shell → Inventory management: opens section
- Dashboard shell → Employee records: opens section
- Dashboard shell → Sales reporting: opens section
- Dashboard shell → Orders view: opens section
- Customer records → Browser client: queries data
app/admin/dashboard/customers/page.tsx - Employee records → Server client: queries data
app/admin/dashboard/employees/page.tsx - Job management → Browser client: queries data
app/admin/dashboard/jobs/page.tsx - Inventory management → Browser client: queries products
app/admin/dashboard/inventory/page.tsx - Inventory management → Data actions: creates products
app/admin/dashboard/inventory/page.tsx - Customer jobs and invoices → Browser client: loads customer data
app/admin/dashboard/customer/[id]/page.tsx - Customer jobs and invoices → Stripe billing: creates invoices
app/admin/dashboard/customer/[id]/page.tsx - Customer jobs and invoices → Data actions: saves job
app/admin/dashboard/customer/[id]/page.tsx - Customer jobs and invoices → Statement PDF: generates statement
app/admin/dashboard/customer/[id]/page.tsx - Data actions → Database operations: delegates writes
components/supabaseServer.ts - Database operations → Supabase data: reads and writes
utils/supabase/admin.ts - Browser client → Supabase data: accesses
- Server client → Supabase data: accesses
- Stripe webhook → Database operations: updates records
app/api/webhooks/stripe/route.ts - Stripe billing → Server client: uses session client
utils/stripe/server.ts - Email endpoint → Email sender: uses sender
- Customer records → Stripe billing: loads billing data
app/admin/dashboard/customers/page.tsx - Customer records → Database types: uses schema types
app/admin/dashboard/customers/page.tsx - Inventory management → Database types: uses schema types
app/admin/dashboard/inventory/page.tsx