You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,7 @@ These are intentional extras beyond the assessment requirements:
41
41
42
42
-**Live demo** at custom domains (Cloudflare Pages + Railway).
43
43
-**CI → gated deploy pipeline** - production deploy only fires after CI succeeds on `main` via a `workflow_run` trigger.
44
-
-**A4 print-to-PDF** without a PDF library - pure CSS `@media print` swap. See [`frontend/src/features/invoices/detail/InvoicePrintDocument.tsx`](./frontend/src/features/invoices/detail/InvoicePrintDocument.tsx).
44
+
-**A4 print-to-PDF** without a PDF library - pure CSS `@media print` swap. See [`frontend/src/features/invoices/detail/components/InvoicePrintDocument.tsx`](./frontend/src/features/invoices/detail/components/InvoicePrintDocument.tsx).
45
45
-**Runtime Zod validation** at the frontend API boundary - every response is parsed; schema drift fails loudly. See [`frontend/src/api/invoices.schema.ts`](./frontend/src/api/invoices.schema.ts).
46
46
-**Summary dashboard endpoint** - `GET /invoices/summary` returns aggregated totals/counts respecting the same filters as `GET /invoices`. Powers the invoice list tiles.
47
47
-**`Decimal.js` precision arithmetic** - money math never touches IEEE-754 floats. See [`backend/src/invoices/domain/invoice-calculation.ts`](./backend/src/invoices/domain/invoice-calculation.ts).
@@ -146,6 +146,7 @@ Docker Compose reads the root `.env` for container wiring and `backend/.env` for
Copy file name to clipboardExpand all lines: backend/README.md
-14Lines changed: 0 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -145,19 +145,6 @@ Database constraints protect invariants at the storage boundary even if a future
145
145
146
146
---
147
147
148
-
## Reviewer Quick Start
149
-
150
-
See the [root README](../README.md) for full setup instructions (Docker or local). This section highlights backend-specific endpoints and credentials.
151
-
152
-
### Default Credentials
153
-
154
-
Seeded automatically by `npm run seed`:
155
-
156
-
```
157
-
Email: reviewer@simpleinvoice.local
158
-
Password: Password123!
159
-
```
160
-
161
148
### Backend Endpoints
162
149
163
150
| Resource | URL |
@@ -445,5 +432,4 @@ erDiagram
445
432
-**Overdue is derived, not persisted.** The database stores only `Draft`, `Pending`, and `Paid`. `Overdue` is computed at read time when `status != Paid AND dueDate < today`. No background job is needed.
446
433
-**No refresh tokens.** The access token is the only credential. Token refresh is out of scope for this assessment.
447
434
-**No role-based authorization.** All authenticated users have the same permissions. RBAC is out of scope.
448
-
-**No email delivery or payment integration.** Invoice creation and status transitions are data-only operations.
449
435
-**Customer is embedded on the invoice.** Customer data (name, email, mobile, address) is stored as columns on `invoices` rather than a separate `customers` table. Invoices are self-contained records; there is no shared customer identity across invoices.
Copy file name to clipboardExpand all lines: frontend/README.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,11 +8,11 @@ React 19 + TypeScript + Vite frontend for the SimpleInvoice assessment applicati
8
8
9
9
**What to look for:**
10
10
11
-
-**Protected Routes & Authentication** - Login redirects to invoice list on success; all invoice routes require valid JWT; logout clears session. See `auth-context.tsx`, `ProtectedRoute.tsx`.
12
-
-**Invoice List** - Paginated, searchable, filterable by status (Draft/Pending/Paid/Overdue), sortable by date/amount. List state lives in URL query params. See `InvoiceListPage.tsx`, `use-invoice-list-query.ts`.
13
-
-**Invoice Detail** - Full invoice information, line items, totals, payment status. Includes a **print-to-PDF** feature that produces an A4 document without external dependencies. See `InvoiceDetailPage.tsx`, `InvoicePrintDocument.tsx`.
14
-
-**Create Invoice** - Multi-field form with real-time validation and a live preview panel. Backend validates totals; frontend shows preview. One line item per assessment spec. See `CreateInvoiceForm.tsx`, `createInvoiceSchema.ts`.
15
-
-**Runtime Response Validation** - Zod schemas validate all API responses at unsafe boundaries (login, invoice list/detail, create). Parsing errors are caught and logged. See `invoices.schema.ts`, `auth.schema.ts`, `parse-api-response.ts`.
11
+
-**Protected Routes & Authentication** - Login redirects to invoice list on success; all invoice routes require valid JWT; logout clears session. See [`src/features/auth/auth-context.tsx`](./src/features/auth/auth-context.tsx), [`src/features/auth/components/ProtectedRoute.tsx`](./src/features/auth/components/ProtectedRoute.tsx).
12
+
-**Invoice List** - Paginated, searchable, filterable by status (Draft/Pending/Paid/Overdue), sortable by date/amount. List state lives in URL query params. See [`src/features/invoices/list/InvoiceListPage.tsx`](./src/features/invoices/list/InvoiceListPage.tsx), [`src/features/invoices/list/invoice-list-query.schema.ts`](./src/features/invoices/list/invoice-list-query.schema.ts).
13
+
-**Invoice Detail** - Full invoice information, line items, totals, payment status. Includes a **print-to-PDF** feature that produces an A4 document without external dependencies. See [`src/features/invoices/detail/InvoiceDetailPage.tsx`](./src/features/invoices/detail/InvoiceDetailPage.tsx), [`src/features/invoices/detail/components/InvoicePrintDocument.tsx`](./src/features/invoices/detail/components/InvoicePrintDocument.tsx).
14
+
-**Create Invoice** - Multi-field form with real-time validation and a live preview panel. Backend validates totals; frontend shows preview. One line item per assessment spec. See [`src/features/invoices/create/CreateInvoiceForm.tsx`](./src/features/invoices/create/CreateInvoiceForm.tsx), [`src/features/invoices/schema/create-invoice.schema.ts`](./src/features/invoices/schema/create-invoice.schema.ts).
15
+
-**Runtime Response Validation** - Zod schemas validate all API responses at unsafe boundaries (login, invoice list/detail, create). Parsing errors are caught and logged. See [`src/api/invoices.schema.ts`](./src/api/invoices.schema.ts), [`src/api/auth.schema.ts`](./src/api/auth.schema.ts), [`src/api/parse-api-response.ts`](./src/api/parse-api-response.ts).
16
16
-**Comprehensive Tests** - tests cover form validation, hooks, utilities, component behavior, and runtime schema validation. MSW mocks backend; factories generate test data. Run `npm run test` for the full suite. See `frontend/src/**/*.test.ts`, `test/mocks/`.
17
17
-**Feature-First Architecture** - Code organized by feature (`auth`, `invoices`) with feature-local domain logic, not by layer. Shared utilities live in `shared/`. See folder structure below.
0 commit comments