How vishnuat18/xerox works
Smart Print Hub is a Next.js application for Xerox-shop operations. The visible workflow covers shop-owner registration and setup, authenticated shop management, and a customer-facing shop page reached by a shop slug or QR code. The landing page also describes document upload, print configuration, local Windows printing, and privacy features, but those product capabilities are not evidenced as implemented by the sampled runtime. The graph preserves them as documented capabilities; dashed edges mark those unverified integrations.
Main entry points: db.ts Prisma client · auth.ts Auth & sessions · page.tsx Owner dashboard · ui Shared UI
Components 21
Web Experience
- Home page
src/app/page.tsx - Login & registration
src/app/register/page.tsx - Owner dashboard
src/app/dashboard/page.tsx - Dashboard navigation
src/components/dashboard/dashboard-nav.tsx - QR dashboard
src/app/dashboard/qr/page.tsx - Shop settings
src/app/dashboard/settings/page.tsx - Shop landing
src/app/s/[slug]/page.tsx - Shared UI
src/components/ui
API Workflows
- Owner registration
src/app/api/v1/auth/register-owner/route.ts - Shop profile API
src/app/api/v1/shops/profile/route.ts - Shop QR API
src/app/api/v1/shops/qr/route.ts - Session endpoints
src/app/api/v1/auth/me/route.ts
Identity & Responses
- Auth & sessions
src/lib/auth.ts - API responses
src/lib/api-response.ts - QR generation
src/lib/qr.ts
Persistence
- Prisma client
src/lib/db.ts - Shop data
prisma/schema.prisma
Other components
- Shop owner
- Print customer
- Windows print agent
- Printer hardware
Connections 30
- Shop owner → Login & registration: opens
- Shop owner → Owner dashboard: manages shop
- Print customer → Shop landing: visits shop
- Home page → Auth & sessions: resolves session
src/app/page.tsx - Home page → Prisma client: reads shop stats
src/app/page.tsx - Home page → Shared UI: renders
src/app/page.tsx - Owner dashboard → Auth & sessions: uses session
src/app/dashboard/page.tsx - Owner dashboard → Prisma client: reads shop data
src/app/dashboard/page.tsx - Owner dashboard → Shared UI: renders
src/app/dashboard/page.tsx - Owner dashboard → Dashboard navigation: uses navigation
- QR dashboard → Shared UI: renders
src/app/dashboard/qr/page.tsx - Shop settings → Shared UI: renders
src/app/dashboard/settings/page.tsx - Shop landing → Prisma client: reads shop
src/app/s/[slug]/page.tsx - Shop landing → Shared UI: renders
src/app/s/[slug]/page.tsx - Owner registration → Prisma client: creates shop account
src/app/api/v1/auth/register-owner/route.ts - Owner registration → Auth & sessions: creates session
src/app/api/v1/auth/register-owner/route.ts - Owner registration → API responses: formats result
src/app/api/v1/auth/register-owner/route.ts - Shop profile API → Auth & sessions: requires session
src/app/api/v1/shops/profile/route.ts - Shop profile API → Prisma client: reads and updates
src/app/api/v1/shops/profile/route.ts - Shop profile API → API responses: formats result
src/app/api/v1/shops/profile/route.ts - Shop QR API → Auth & sessions: requires session
src/app/api/v1/shops/qr/route.ts - Shop QR API → Prisma client: reads shop
src/app/api/v1/shops/qr/route.ts - Shop QR API → QR generation: generates QR
src/app/api/v1/shops/qr/route.ts - Shop QR API → API responses: formats result
src/app/api/v1/shops/qr/route.ts - Session endpoints → Auth & sessions: resolves session
src/app/api/v1/auth/me/route.ts - Session endpoints → API responses: formats result
src/app/api/v1/auth/me/route.ts - Auth & sessions → Prisma client: loads user
src/lib/auth.ts - Prisma client → Shop data: queries
- Print customer → Windows print agent: uploads and configures
- Windows print agent → Printer hardware: dispatches jobs