-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
378 lines (356 loc) · 16.5 KB
/
index.html
File metadata and controls
378 lines (356 loc) · 16.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>OmniPizza — QA Testing Platform</title>
<link rel="icon" type="image/x-icon" href="./frontend/public/favicon.ico" />
<meta
name="description"
content="A multi-platform, test-friendly food ordering sandbox designed for practicing UI + API automation (web + mobile) with deterministic chaos users and multi-market pricing."
/>
<link rel="stylesheet" href="./styles.css" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap"
rel="stylesheet"
/>
</head>
<body>
<div class="bg-container">
<div class="bg-glow"></div>
<div class="bg-grid"></div>
</div>
<nav class="navbar">
<div class="logo">
<img
src="./frontend-mobile/assets/icon.png"
alt="OmniPizza Logo"
width="32"
height="32"
style="border-radius: 8px"
/>
<span>OmniPizza</span>
</div>
<ul class="nav-links">
<li><a href="#about">About</a></li>
<li><a href="#architecture">Architecture</a></li>
<li><a href="#documentation">Documentation</a></li>
<li>
<a href="#get-started" class="btn-primary">Get started →</a>
</li>
</ul>
</nav>
<header class="hero" id="about">
<!-- Replaced app icon with a stylized symbol for OmniPizza -->
<div
class="hero-icon"
style="border: none; background: transparent; box-shadow: none"
>
<img
src="./frontend-mobile/assets/icon.png"
alt="OmniPizza Logo"
width="64"
height="64"
style="border-radius: 16px; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2)"
/>
</div>
<h1>OmniPizza — QA Testing Platform</h1>
<p>
A multi-platform, test-friendly food ordering sandbox designed for
practicing UI + API automation with deterministic chaos users and
multi-market pricing.
</p>
<div class="hero-action hero-links">
<a
href="https://omnipizza-frontend.onrender.com"
target="_blank"
class="btn-primary"
>Open Web App →</a
>
<a
href="https://omnipizza-backend.onrender.com/api/docs"
target="_blank"
class="btn-secondary"
>Open Swagger →</a
>
</div>
<div
class="tech-stack-logos"
style="
font-weight: 600;
font-size: 1.2rem;
color: var(--text-muted);
opacity: 0.8;
gap: 2rem;
"
>
<span>React</span>
<span>FastAPI</span>
<span>Vitest</span>
<span>Expo</span>
</div>
</header>
<main>
<section id="documentation">
<h2>Live Deployments (Render)</h2>
<div class="card-grid">
<div class="card">
<h4>Web Application</h4>
<p>Access the live frontend instance with multi-market pricing.</p>
<a
href="https://omnipizza-frontend.onrender.com"
target="_blank"
class="btn-primary"
style="display: inline-block"
>Open Web App →</a
>
</div>
<div class="card">
<h4>Backend API</h4>
<p>Access the live API with Swagger documentation.</p>
<a
href="https://omnipizza-backend.onrender.com/api/docs"
target="_blank"
class="btn-primary"
style="display: inline-block"
>Open API →</a
>
</div>
</div>
</section>
<section id="architecture">
<h2>Architecture</h2>
<div class="card-grid">
<div class="card">
<h4>Feature Slices</h4>
<p>
Web and mobile are organized around feature modules instead of only
technical folders.
</p>
<ul>
<li class="list-item"><code>auth</code></li>
<li class="list-item"><code>catalog</code></li>
<li class="list-item"><code>checkout</code></li>
<li class="list-item"><code>country</code></li>
<li class="list-item"><code>profile</code></li>
<li class="list-item"><code>orderSuccess</code></li>
</ul>
</div>
<div class="card">
<h4>Design Patterns</h4>
<p>
Both clients use the same practical separation of concerns to keep
changes local and automation-friendly.
</p>
<ul>
<li class="list-item">Repository layer for API access</li>
<li class="list-item">Use-case layer for orchestration and validation</li>
<li class="list-item">Thin UI pages and screens</li>
</ul>
</div>
<div class="card">
<h4>Testing Strategy</h4>
<p>
The repo keeps API validation and component validation inside the
project, while atomic flow orchestration is intended for external
runners.
</p>
<ul>
<li class="list-item">Vitest API tests in <code>tests/</code></li>
<li class="list-item">Cypress component tests in <code>frontend/cypress/component/</code></li>
<li class="list-item">External atomic runners: Playwright, Appium, Gatling</li>
</ul>
</div>
</div>
</section>
<section id="highlights">
<h2>Platform Highlights</h2>
<div class="feature-split">
<div class="feature-split-text">
<h3>Eliminate Flaky Tests</h3>
<p>Test with a variety of specialized users that deterministically reproduce specific edge cases and errors. Simplify your QA automation by reliably triggering edge cases such as network delays, empty data, or random checkout failures without complex backend mocks.</p>
<ul>
<li class="list-item"><strong>standard_user:</strong> Normal flow (pw: pizza123)</li>
<li class="list-item"><strong>locked_out_user:</strong> Login fails deterministically</li>
<li class="list-item"><strong>problem_user:</strong> $0 prices + broken images</li>
<li class="list-item"><strong>performance_glitch_user:</strong> API delay (~3s)</li>
<li class="list-item"><strong>error_user:</strong> Random checkout error (~50%)</li>
</ul>
</div>
<div class="feature-split-image">
<img src="screenshots/desktop/login_desktop.png" alt="Login Screen displaying specialized testing users" />
</div>
</div>
<div class="feature-split">
<div class="feature-split-text">
<h3>Multi-Market Simulation & Pricing</h3>
<p>Switch between regions directly from the login screen to validate localization, dynamic pricing, and market-specific flows dynamically.</p>
<ul>
<li class="list-item"><strong>Mexico (MXN):</strong> Tip optional, requires "colonia", Spanish (es)</li>
<li class="list-item"><strong>United States (USD):</strong> Tax applied, requires "zip_code", English (en)</li>
<li class="list-item"><strong>Switzerland (CHF):</strong> Multi-lingual toggle DE/FR</li>
<li class="list-item"><strong>Japan (JPY):</strong> No decimal pricing, requires "prefectura", Japanese (ja)</li>
</ul>
</div>
<div class="feature-split-image">
<img src="screenshots/desktop/catalog_desktop.png" alt="Catalog Market Context Display" />
</div>
</div>
<div class="feature-split">
<div class="feature-split-text">
<h3>Multi-platform & Rotatable</h3>
<p>OmniPizza was built to be fully responsive. It comes with a <strong>React PWA web app</strong> and an <strong>Expo React Native iOS app</strong>.</p>
<ul>
<li class="list-item"><strong>Stable Selectors:</strong> All interactive elements include <code>data-testid</code> attributes uniformly across platforms.</li>
<li class="list-item"><strong>UI-only Payment form:</strong> Credit Card data is completely decoupled from backend, purely for UI testing.</li>
<li class="list-item"><strong>Dynamic Forms:</strong> Checkout steps adapt based on selected market configuration.</li>
<li class="list-item"><strong>Rotation Ready:</strong> Mobile views respond gracefully to landscape/portrait orientation switches.</li>
</ul>
</div>
<div class="feature-split-image">
<div style="display: flex; gap: 1rem; align-items: center; justify-content: center;">
<img src="screenshots/responsive/pizzabuilder_responsive.png" style="width: 45%; object-fit: contain;" alt="Responsive Builder View" />
<img src="screenshots/ios/ordersuccess_ios.png" style="width: 45%; object-fit: contain;" alt="iOS Native View" />
</div>
</div>
</div>
</section>
<section id="api-docs">
<h2>API Documentation</h2>
<p>
The backend exposes full OpenAPI documentation via
<strong>Swagger UI</strong> and <strong>ReDoc</strong>.
</p>
<div class="card-grid">
<div class="card">
<h4>Swagger UI</h4>
<p>Interactive documentation to test endpoints.</p>
<a
href="https://omnipizza-backend.onrender.com/api/docs"
target="_blank"
>View Swagger API →</a
>
</div>
<div class="card">
<h4>ReDoc</h4>
<p>Clean, readable API reference.</p>
<a
href="https://omnipizza-backend.onrender.com/api/redoc"
target="_blank"
>View ReDoc API →</a
>
</div>
<div class="card">
<h4>OpenAPI JSON</h4>
<p>Raw specification for contract testing.</p>
<a
href="https://omnipizza-backend.onrender.com/api/openapi.json"
target="_blank"
>View Raw JSON →</a
>
</div>
</div>
<h3 style="margin-top: 3rem">Required Request Headers</h3>
<pre class="code-window" data-title="api/request-headers.http"><code><span class="tok-key">X-Country-Code</span>: <span class="tok-val">MX | US | CH | JP</span>
<span class="tok-key">X-Language</span>: <span class="tok-val">en | es | de | fr | ja</span>
<span class="tok-key">Authorization</span>: <span class="tok-val">Bearer <token></span> <span class="tok-comment">(after login)</span></code></pre>
<h3 style="margin-top: 3rem">Session Setup Routes</h3>
<pre class="code-window" data-title="backend/session-routes.http"><code><span class="tok-method">POST</span> <span class="tok-path">/api/store/market</span>
<span class="tok-method">POST</span> <span class="tok-path">/api/cart</span> <span class="tok-comment"># seed cart items</span>
<span class="tok-method">GET</span> <span class="tok-path">/api/cart</span> <span class="tok-comment"># enriched cart (+ X-Country-Code)</span>
<span class="tok-method">POST</span> <span class="tok-path">/api/session/reset</span>
<span class="tok-method">GET</span> <span class="tok-path">/api/session</span>
<span class="tok-key">Authorization</span>: <span class="tok-val">Bearer <token></span> <span class="tok-comment">(reuse app token)</span></code></pre>
</section>
<section id="get-started">
<h2>Run Locally</h2>
<h3>Backend Environment</h3>
<pre class="code-window" data-title="backend/local-setup.sh"><code><span class="tok-cmd">cd</span> <span class="tok-path">backend</span>
<span class="tok-cmd">python3</span> -m venv <span class="tok-path">venv</span>
<span class="tok-cmd">source</span> <span class="tok-path">venv/bin/activate</span>
<span class="tok-cmd">pip</span> install -r <span class="tok-path">requirements.txt</span>
<span class="tok-cmd">python3</span> <span class="tok-path">main.py</span></code></pre>
<h3>Web Application</h3>
<pre class="code-window" data-title="frontend/local-dev.sh"><code><span class="tok-cmd">cd</span> <span class="tok-path">frontend</span>
<span class="tok-cmd">pnpm</span> install
<span class="tok-env">VITE_API_URL</span>=<span class="tok-val">http://localhost:8000</span> <span class="tok-cmd">pnpm</span> dev</code></pre>
<h3>Mobile Application (Expo / RN)</h3>
<pre class="code-window" data-title="frontend-mobile/local-dev.sh"><code><span class="tok-cmd">cd</span> <span class="tok-path">frontend-mobile</span>
<span class="tok-cmd">pnpm</span> install
<span class="tok-cmd">pnpm</span> ios <span class="tok-comment"># or pnpm android</span></code></pre>
<h3>API Tests (Vitest)</h3>
<pre class="code-window" data-title="tests/run-vitest.sh"><code><span class="tok-cmd">cd</span> <span class="tok-path">tests</span>
<span class="tok-cmd">pnpm</span> install
<span class="tok-cmd">pnpm</span> test <span class="tok-comment"># Run all tests</span>
<span class="tok-cmd">pnpm</span> test:ui <span class="tok-comment"># Interactive UI runner</span></code></pre>
<h3>Web Component Tests (Cypress)</h3>
<pre class="code-window" data-title="frontend/run-cypress-ct.sh"><code><span class="tok-cmd">cd</span> <span class="tok-path">frontend</span>
<span class="tok-cmd">pnpm</span> install
<span class="tok-cmd">pnpm</span> test:ct
<span class="tok-cmd">pnpm</span> test:ct:open</code></pre>
</section>
<section id="automation">
<h2>Automation Notes</h2>
<ul>
<li class="list-item">
<code>/api/pizzas</code> requires <code>X-Country-Code</code> header
for market pricing.
</li>
<li class="list-item">
Use the test users to validate reliability and chaos behaviors.
</li>
<li class="list-item">
All interactive elements have <code>data-testid</code> attributes
for stable selectors.
</li>
<li class="list-item">
Checkout form fields are dynamic per market — ensure
automation handles conditional rendering.
</li>
<li class="list-item">
Atomic state setup belongs in external runners and uses the public
session routes, not a separate <code>/test</code> namespace.
</li>
<li class="list-item">
<strong>Cart hydration:</strong> Seed cart via
<code>POST /api/cart</code>, then navigate to <code>/checkout</code>
— both web and mobile auto-fetch
<code>GET /api/cart</code> on load and populate the cart store.
</li>
<li class="list-item">
The mobile release workflow is manual-dispatch based and creates a
GitHub Release after building Android and iOS simulator artifacts.
</li>
</ul>
</section>
<section id="documentation-links">
<h2>Project Documentation</h2>
<div class="card-grid">
<div class="card">
<h4>Repository Docs</h4>
<p>Primary operational docs live in the repository root and `docs/`.</p>
<ul>
<li class="list-item"><a href="./README.md">README.md</a></li>
<li class="list-item"><a href="./API_EXAMPLES.md">API_EXAMPLES.md</a></li>
<li class="list-item"><a href="./docs/app-built.md">docs/app-built.md</a></li>
</ul>
</div>
<div class="card">
<h4>Product and Design Notes</h4>
<p>The historical product/design references currently live under `ordersuccess_ios/`.</p>
<ul>
<li class="list-item"><a href="./ordersuccess_ios/Product_Requirement_Doc.md">Product Requirement Doc</a></li>
<li class="list-item"><a href="./ordersuccess_ios/Design_Doc.md">Design Doc</a></li>
<li class="list-item"><a href="./ordersuccess_ios/Tech_Stack_Doc.md">Tech Stack Doc</a></li>
</ul>
</div>
</div>
</section>
</main>
<footer>
<p>© 2026 OmniPizza QA Sandbox. Open Sourced under MIT License.</p>
</footer>
</body>
</html>