How wagnetto/restaurant-dashboard works
Project type and purpose
• This is a single-page, full-stack-ready dashboard application for restaurant order management.
• The front end is built with React (Vite), TypeScript, Tailwind CSS, Shadcn-ui and uses TanStack Query for data fetching.
• It supports two backend modes:
• Mock mode via MSW (no external API needed)
• Real mode pointing to a NodeJS/Express API (with a backing database)
File structure
• Top-level artifacts:
• package.json, pnpm-lock.yaml, Vite/Tailwind/ESLint/Prettier configs
• public/: static assets + MSW service worker
• src/: application code
• “src/api/…”: one file per endpoint & a parallel mocks folder for MSW handlers
• “src/lib/axios.ts” + “src/lib/react-query.ts”: shared HTTP client & React Query setup
• “src/components/…”: presentational and compound components (UI primitives vs dashboards vs dialogs)
• “src/pages/…”: routed pages organized under “auth” and “app” layouts
• test/ & playwright.config.ts: E2E and integration tests
README for additional insights
• Key features: profile management, order status flows, metrics (daily/monthly revenue, canceled orders, popular products)
• Technical goals: simulating HTTP calls with MSW, complex state with React Query, form validation with Zod & React Hook Form
• Two run modes: dev:test (MSW) vs dev (real API)