The Ocipe frontend is a React 19 + TypeScript application built with Vite. It communicates with the Django backend via Axios and manages all server state — recipe lists, fridge contents, grocery lists — with TanStack Query’s caching and background-refetch model.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/viet2811/ocipe/llms.txt
Use this file to discover all available pages before exploring further.
Requirements
- Node.js 18 or later
- npm (bundled with Node.js)
Local development
Configure the API base URL
The Axios instance in To point at a locally running Django server, edit Remember to revert this change before committing, or restore the production URL before deploying.
src/api/axios.ts hardcodes the production backend URL:src/api/axios.ts and change the baseURL value directly:Start the development server
Key technologies
| Package | Purpose |
|---|---|
| React 19 + TypeScript | UI framework and type safety |
| Vite 6 | Fast dev server and optimised production bundler |
| TanStack Query v5 | Async data fetching, caching, and background synchronisation |
| TanStack Table v8 | Headless recipe table with sorting and filtering |
| dnd-kit | Drag-and-drop for ingredient and step reordering |
| Tailwind CSS v4 | Utility-first styling |
| shadcn/ui (Radix UI) | Accessible component primitives (dialogs, dropdowns, etc.) |
| React Router v7 | Client-side routing |
| React Hook Form + Zod | Form state management and schema validation |
| Axios 1.9 | HTTP client for all API requests |
| Sonner | Toast notifications |
| Google Gemini AI | AI-powered recipe autofill (via the Django backend) |
Production build
Compile and type-check the project for production:frontend/dist/. To preview the production build locally before deploying:
Deploying to Vercel
Vercel is the recommended host for the Ocipe frontend because it natively handles Vite projects and single-page application routing.- Push your repository to GitHub and sign in to Vercel.
- Click Add New → Project and import your repository. Set the Root Directory to
frontend. - Vercel automatically detects the Vite framework — no build-command changes are needed.
- If you are self-hosting the backend at a different URL, update the
baseURLinsrc/api/axios.tsbefore building. - Click Deploy. Vercel builds the project and publishes it to a
.vercel.appdomain.
The
vercel.json file in the frontend directory configures URL rewrites so that React Router handles all client-side navigation correctly on Vercel — deep links and page refreshes are routed to index.html rather than returning 404 errors.vercel.json