How harshjii/biriyani_delivery_web- works
Project Type & Purpose
• This is a full-stack—primarily front-end—web application for ordering Biriyani, built in React/TypeScript with Vite. It includes a Capacitor config, so it’s also deployable as a hybrid mobile app.
• Its purpose: provide users with a smooth ordering experience via a modern UI and external backend services (order management, payments, etc.).
File Structure
• Top-level files:
• package.json, bun.lockb, tsconfig.* → Node/TypeScript build
• vite.config.ts, postcss.config.js, tailwind.config.ts → build tooling and styling
• capacitor.config.ts → mobile app bridge
• public/ → static assets (robots.txt, index.html)
• src/
• App.tsx, main.tsx, index.css → entrypoints
• components/ui/ → 70+ reusable UI primitives (buttons, dialogs, tables, etc.)
• hooks/ → custom hooks (useMobile, useToast)
• lib/utils.ts → shared utilities
• pages/ → routeable views (Index, SlotSelection, NotFound)
• No back-end code here, so assume reliance on external REST/GraphQL APIs.
Pull In README Insights
• Modern, fast ordering experience with a live URL.
• No self-hosted backend in this repo → external microservices handle orders, user profiles, payments.
• Hybrid mobile support via Capacitor.
Main Components & Boundaries
a. Front-end UI (React + TypeScript)
• Component Library (shadcn/ui, Tailwind CSS)
• Pages & Routing (Vite + React Router or similar)
• State & Hooks (React Context, custom hooks)
• Build Toolchain (Vite, PostCSS, Tailwind)
b. Hybrid Mobile Wrapper (Capacitor)
• Native Plugins (e.g., push notifications, camera)
c. CDN/Static Host
• Netlify, Vercel, or S3 + CloudFront for serving built static assets
d. External Services (third-party or in your infra)
• Authentication Service (Auth0 / custom API)
• Order Management API (create, view orders)
• Payment Gateway (Stripe / PayPal)
• Notification Service (Firebase / OneSignal)
• Analytics (Google Analytics / other)
e. Developer Tooling & CI/CD
• GitHub Actions / Netlify CI for build and deploy
Relationships & Data Flows
• User Device (Browser or Mobile) → HTTPS → CDN/Static Host → served index.html + JS bundle
• JS Bundle → renders React UI → user actions call:
• Auth API → user tokens
• Order API → fetch menu, place orders
• Payment API → payment processing
• Notification API → push notifications (mobile)
• Build Pipeline (Git push → CI/CD → Vite build → deploy to CDN/Store)
Architectural Patterns & Principles
• Component-based UI (atomic/shadcn pattern)
• Separation of concerns: UI vs. data layer (hooks + lib/utils)
• Hybrid deployment: one codebase for web and mobile (Capacitor)
• Static-first hosting with dynamic API calls
Final Checklist
• Components: UI Library, Pages, Hooks, Utils, Build Tools, Capacitor
• External APIs: Auth, Orders, Payments, Notifications, Analytics
• Infrastructure: CDN/Hosting, CI/CD pipeline
• Annotations: tech labels (React TS, Vite, Tailwind, Capacitor)