Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 29 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ with a minimal client, **StockSync Counter**, that exists to make the
engine's correctness demonstrable on screen, not to be a sellable
point-of-sale product.

- **Live demo:** https://main.d18ash44o1uc8d.amplifyapp.com?shop_id=demo-shop&counter_id=counter_a
(open a second window with `counter_id=counter_b` to see the two-counter conflict scenario)
- **Live demo:** https://main.d18ash44o1uc8d.amplifyapp.com
(sign up to create a shop, or sign in to an existing one — shop identity now comes from your
Cognito account, not a URL query param; open a second window signed into the same shop to see
the two-counter conflict scenario)
- **Demo video:** _TODO — add the recorded demo video link here._

## The problem, in one paragraph
Expand Down Expand Up @@ -151,11 +153,31 @@ in and out of scope, and §14/`docs/general/11-PHASED-SCOPE.md` for the
platform-layer roadmap (multi-tenant CRUD, checkout, analytics,
notifications, expanded AI features) beyond this core.

## Beyond the core sync engine — also shipped

The sync engine above is the hackathon-judged core. On top of it, this build
also ships a complete product layer:

- **Real Cognito authentication**, with owner/manager/counter_staff roles.
Self-signup creates a shop and makes the signer its owner; owners invite
managers and counter staff. Every API route sits behind a JWT authorizer,
and `shop_id` always comes from the verified token, never the client.
- **An owner-facing analytics dashboard** — daily sales/revenue rollups and
a trust-score headline metric that reframes the conflict rate as a
business signal, not just an internal correctness number.
- **Low-stock and conflict-review email notifications** via Amazon SES,
triggered off the same DynamoDB Streams the sync engine already writes to,
sent to the shop's owner automatically.
- **Dark mode, toast notifications, and loading skeletons** across the
whole client, for a UI that doesn't feel like a hackathon demo.
- Products/categories/suppliers CRUD and a checkout flow that reuses the
exact same write-intake pipeline as a manual sale — see `19b` in
[`docs/general/11-PHASED-SCOPE.md`](docs/general/11-PHASED-SCOPE.md).

## Where this goes next

The sync engine is the core; everything below is real, well-reasoned
future scope we chose to name rather than half-build under demo-day time
pressure:
Everything below is real, well-reasoned future scope we chose to name
rather than half-build under demo-day time pressure:

- **A verifiable credit history for shops that don't have one.** Most
small Indian retailers run on cash and memory, with no formal record a
Expand All @@ -175,14 +197,8 @@ pressure:
must stay atomic and conflict-safe even if both locations are offline
at once — a genuinely hard extension of the same CRDT core, for a
multi-location franchise.
- **Cognito-based multi-tenant auth**, real roles (owner/manager/counter
staff) in place of the hardcoded demo counter identities.
- **An owner-facing analytics dashboard** (daily sales/revenue rollup,
plus a trust-score headline metric reframing the conflict rate as a
business signal, not just an internal correctness number).
- **Low-stock and conflict notifications** via email/SMS, or natively via
WhatsApp (AWS End User Messaging Social) once Meta's template approval
is in place.
- **Notifications beyond email** — SMS, or natively via WhatsApp (AWS End
User Messaging Social) once Meta's template approval is in place.
- **A natural-language shop-query assistant** and **Bedrock-driven
reorder alerts**, both grounded in real DynamoDB data, never a guess.
- **Voice-based transaction entry** for counter staff mid-rush.
Expand Down
21 changes: 10 additions & 11 deletions docs/PROJECT-STATUS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Last updated: 2026-09-19. This is a living snapshot, not a one-time report — u

## TL;DR

Tier 1 (the entire originally-judged scope) plus differentiator features (13a, 13b, 15b), the Tier 2 platform layer (19b — products/categories/suppliers CRUD + checkout), and real Cognito authentication with owner/manager/counter_staff roles are built, tested, and **deployed live on real AWS** (account `509399625129`, `us-east-1`) — backend confirmed end-to-end with real transactions, frontend confirmed loading real data in a real browser, and the API confirmed rejecting unauthenticated requests (`401`). The project is now expanding beyond the original hackathon scope toward a complete product: an owner analytics dashboard and notifications are in progress.
Tier 1 (the entire originally-judged scope) plus differentiator features (13a, 13b, 15b), the Tier 2 platform layer (19b — products/categories/suppliers CRUD + checkout), real Cognito authentication with owner/manager/counter_staff roles, an owner-facing analytics dashboard, SES email notifications, and full visual polish (dark mode, toasts, loading skeletons) are all built, tested, and **deployed live on real AWS** (account `509399625129`, `us-east-1`) — backend confirmed end-to-end with real transactions, frontend confirmed loading real data in a real browser, and the API confirmed rejecting unauthenticated requests (`401`). The project has now fully expanded beyond the original hackathon scope into a complete product; what remains is demo prep (see "Next steps" below), not further build-out.

### Live deployment reference

Expand Down Expand Up @@ -53,14 +53,14 @@ A plaintext AWS credentials CSV was found sitting **untracked** in `docs/general

Root `.env.example` documents every AWS credential the project needs, lists exactly which AWS services the stack requires, and lists every CDK-output resource name the local scripts need. `seed-demo-data.ts`/`reset-demo.ts`/`simulate-conflict.ts` auto-load `.env.local` via `dotenv` (silently no-ops if absent, so local-only dev is unaffected).

## In progress — building toward a complete product
## Complete-product build-out — done

Per explicit direction to expand well beyond the original hackathon-judged scope:
Per explicit direction to expand well beyond the original hackathon-judged scope, all four items are now done and deployed live:

1. ~~Real authentication (Cognito)~~ — **done, deployed live** (see above).
2. **Owner-facing analytics dashboard** — sales/revenue rollups, low-stock alerts, and the conflict rate reframed as a trust-score business signal.
3. **Notifications** — low-stock and conflict alerts via email (SES).
4. **Visual/design polish** — dark mode, toast notifications, loading skeletons.
1. ~~Real authentication (Cognito)~~ — **done** (PR #16's prerequisite work, deployed earlier).
2. ~~Owner-facing analytics dashboard~~ — **done** (PR #16, merged and deployed) — sales/revenue rollups, low-stock alerts, and the conflict rate reframed as a trust-score business signal.
3. ~~Notifications~~ — **done** (PR #17, merged and deployed) — low-stock and conflict-review alerts via SES, triggered off `inventory_records`' DynamoDB Stream. **Outstanding action item:** the sender identity `kisore2004@gmail.com` is still `PENDING` SES sandbox verification — click the verification link AWS emailed before relying on live alert delivery in the demo.
4. ~~Visual/design polish~~ — **done** (PR #18, merged and deployed) — dark mode, toast notifications, loading skeletons, across the whole client.

## Known gaps

Expand All @@ -72,13 +72,12 @@ Per explicit direction to expand well beyond the original hackathon-judged scope
| Demo video not recorded | Needs a human following `docs/general/10-DEMO-PLAN.md`'s script | You |
| Web bundle is ~620KB+ post-barcode-library | Not investigated — `@zxing/browser` is a sizeable dependency for one feature | Worth a code-split pass |
| 15a (chaos demo) not rehearsed | Needs a live Lambda to throttle via the AWS Console | Rehearse once the other phases land — see the demo plan's placeholder beat |
| `docs/general/10-DEMO-PLAN.md` still describes the old `?shop_id=&counter_id=` shareable-link flow as the entry point | Written before Cognito auth landed; the real flow now starts with sign-up/sign-in (`AuthPanel`), then a counter-only picker | Update the demo plan's script to start from sign-in before recording |
| `scripts/seed-demo-data.ts`/`reset-demo.ts` write directly to DynamoDB, bypassing Cognito | They predate auth and aren't part of the request path auth protects | Fine as-is for engine-level testing; a real demo needs a real signed-up account whose `shop_id` matches the seeded data, or seed data scoped to that account's actual `shop_id` |

## Next steps, in order

1. Finish the remaining in-progress build-out above (dashboard, notifications, polish).
1. Click the SES verification link for `kisore2004@gmail.com` (blocks live alert email demos).
2. Recheck Bedrock access on both accounts.
3. Update `10-DEMO-PLAN.md`'s script to start from real sign-in, then rehearse the full core scenario against the real deployed stack, 5+ times, including the new CRUD/checkout/auth flows.
3. Rehearse the full core scenario against the real deployed stack per `10-DEMO-PLAN.md` (now updated to start from real sign-in), 5+ times, including the new CRUD/checkout/auth flows.
4. Confirm the CloudWatch dashboard shows real, non-zero data.
5. Record the demo, fill in the remaining README/blog-post TODOs, submit.
5. Record the demo, fill in the remaining README demo-video TODO, submit.
8 changes: 5 additions & 3 deletions docs/general/10-DEMO-PLAN.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ themselves, is convinced.

## 1. The Setup

- Two browser windows side by side, clearly labeled "Counter A" and
"Counter B," each running StockSync Counter, both showing the same
seeded item (e.g. "Parle-G 100g, Stock: 50").
- Sign in to the same shop's account in two browser windows side by side —
the shared identity now comes from Cognito, not a URL query param — then
pick "Counter A" in one and "Counter B" in the other from the post-login
counter picker. Both should land on the same seeded item (e.g. "Parle-G
100g, Stock: 50").
- A third panel/tab ready to switch to: the audit log for that item.
- Each window's in-UI network toggle visible and ready to click — not a
DevTools trick, a real control built into the product.
Expand Down
Loading