@@ -112,28 +112,24 @@ Most endpoints rely on request headers to simulate multi-market behavior:
112112
113113These headers are automatically sent by the ** Web** and ** Mobile** clients.
114114
115- ### Test Utility Endpoints ( ` /api/test/* ` )
115+ ### Session Setup Endpoints
116116
117- Atomic state setup endpoints exist for external automation runners (Playwright/Appium/Gatling), but are ** guarded ** and disabled by default .
117+ Atomic state setup endpoints exist for external automation runners (Playwright/Appium/Gatling).
118118
119- - ` POST /api/test/reset `
120- - ` POST /api/test/market `
121- - ` POST /api/test/cart `
122- - ` GET /api/test/state `
119+ - ` POST /api/store/market `
120+ - ` POST /api/cart `
121+ - ` POST /api/session/reset `
122+ - ` GET /api/session `
123123
124- Safety rules:
124+ Access rules:
125125
126- - Available only when ` ENVIRONMENT != production `
127- - Enabled only when ` ENABLE_TEST_API=true `
128126- Require both:
129127 - ` Authorization: Bearer <token> `
130128 - ` X-Test-Token: <TEST_API_TOKEN> `
131129
132- Example local backend env:
130+ Example backend env:
133131
134132``` bash
135- ENVIRONMENT=development
136- ENABLE_TEST_API=true
137133TEST_API_TOKEN=omnipizza-test-token
138134```
139135
@@ -204,22 +200,41 @@ After checkout, the **Order Success** screen is shown and the last order remains
204200
205201```
206202OmniPizza/
207- ├── backend/ # FastAPI backend (in-memory DB)
208- ├── frontend/ # React + Vite + Tailwind web app
209- ├── frontend-mobile/ # React Native / Expo mobile app
210- ├── tests/ # API integration tests (Vitest + TypeScript)
211- ├── specs/ # PRD, Design Specs, Tech Stack
212- └── docs/ # Project Documentation
203+ ├── backend/ # FastAPI backend + Swagger/OpenAPI
204+ ├── frontend/ # React + Vite web app
205+ ├── frontend-mobile/ # Expo / React Native app
206+ ├── tests/ # API integration tests (Vitest)
207+ ├── docs/ # Build/release notes
208+ ├── ordersuccess_ios/ # Product, design, and tech docs
209+ └── screenshots/ # Reference UI captures
213210```
214211
212+ ## Architecture
213+
214+ Both clients are being organized around feature slices instead of only technical folders.
215+
216+ - ` frontend/src/features/* `
217+ - ` frontend-mobile/src/features/* `
218+
219+ Current slices include ` auth ` , ` catalog ` , ` checkout ` , ` country ` , ` profile ` , and ` orderSuccess ` .
220+
221+ The pattern used in both web and mobile is:
222+
223+ - repository layer for API access
224+ - use-case layer for orchestration / payload building / validation
225+ - UI pages and screens consuming those feature modules
226+
227+ Compatibility wrappers still exist in a few older hook paths so migration can remain incremental.
228+
215229## Project Documentation
216230
217- Detailed specifications for the project can be found in ` specs/ ` :
231+ Current supporting docs live here :
218232
219- - ** [ Product Requirements (PRD)] ( specs/Product_Requirement_Doc.md ) :** User personas, functional requirements, and chaos behaviors.
220- - ** [ Design Document] ( specs/Design_Doc.md ) :** System architecture, data flow, and "Chaos Middleware" design.
221- - ** [ UI Design System] ( specs/UI_Design_Doc.md ) :** "Dark Premium" aesthetic, color palette, typography, and component specs.
222- - ** [ Tech Stack] ( specs/Tech_Stack_Doc.md ) :** Technology choices and justification (FastAPI, React, Zustand, etc.).
233+ - [ docs/app-built.md] ( /Users/gilbertosanchez/Documents/Repos/OmniPizza/docs/app-built.md ) — mobile release/build pipeline
234+ - ` ordersuccess_ios/Product_Requirement_Doc.md ` — product requirements
235+ - ` ordersuccess_ios/Design_Doc.md ` — architecture and UX notes
236+ - ` ordersuccess_ios/UI_Design_Doc.md ` — visual system
237+ - ` ordersuccess_ios/Tech_Stack_Doc.md ` — stack decisions
223238
224239---
225240
@@ -229,10 +244,10 @@ Detailed specifications for the project can be found in `specs/`:
229244
230245``` bash
231246cd backend
232- python -m venv venv
247+ python3 -m venv venv
233248source venv/bin/activate # Windows: venv\Scripts\activate
234249pip install -r requirements.txt
235- python main.py
250+ python3 main.py
236251```
237252
238253- Swagger: http://localhost:8000/api/docs
@@ -241,20 +256,20 @@ python main.py
241256
242257``` bash
243258cd frontend
244- npm install
245- npm run dev
259+ pnpm install
260+ pnpm dev
246261```
247262
248263> The web client reads ` VITE_API_URL ` when provided, otherwise defaults to ` http://localhost:8000 ` .
249264> On macOS/Linux you can run:
250- > ` VITE_API_URL=http://localhost:8000 npm run dev `
265+ > ` VITE_API_URL=http://localhost:8000 pnpm dev `
251266
252267### Mobile
253268
254269``` bash
255270cd frontend-mobile
256- npm install
257- npm run ios # or npm run android
271+ pnpm install
272+ pnpm ios # or pnpm android
258273```
259274
260275> ** Configuration:**
@@ -270,7 +285,9 @@ npm run ios # or npm run android
270285
271286---
272287
273- ## API Tests (Vitest)
288+ ## Testing
289+
290+ ### API Tests (Vitest)
274291
275292The ` tests/ ` directory contains automated API integration tests written in ** TypeScript** with ** Vitest** .
276293
@@ -288,6 +305,26 @@ Requires the backend running on `http://localhost:8000` (or set `API_BASE_URL`).
288305
289306> Legacy Python contract tests (Schemathesis) are also available — see ` tests/README.md ` .
290307
308+ ### Web Component Tests (Cypress)
309+
310+ The web app includes Cypress Component Testing for shared UI components.
311+
312+ ``` bash
313+ cd frontend
314+ pnpm install
315+ pnpm test:ct
316+ pnpm test:ct:open
317+ ```
318+
319+ Current component specs live in ` frontend/cypress/component/ ` .
320+
321+ ### CI Workflows
322+
323+ - [ frontend-component-tests.yml] ( /Users/gilbertosanchez/Documents/Repos/OmniPizza/.github/workflows/frontend-component-tests.yml )
324+ Runs Cypress component tests on pull requests touching ` frontend/** ` . It is currently non-blocking (` continue-on-error: true ` ).
325+ - [ mobile-release.yml] ( /Users/gilbertosanchez/Documents/Repos/OmniPizza/.github/workflows/mobile-release.yml )
326+ Builds Android and iOS simulator artifacts through manual dispatch.
327+
291328---
292329
293330## Automation notes
0 commit comments