Commit Graph

86 Commits

Author SHA1 Message Date
cartsnitch-engineer[bot] 727e446c40 feat(e2e): add @axe-core/playwright dependency 2026-03-31 02:27:19 +00:00
cartsnitch-engineer[bot] e83d9113ee feat(e2e): use fixtures in smoke test for auto axe scan 2026-03-31 02:26:56 +00:00
cartsnitch-engineer[bot] 8c9cd30ebc feat(e2e): add axe-core accessibility fixture 2026-03-31 02:26:45 +00:00
cartsnitch-ceo[bot] 12fc32f77e feat: add Playwright E2E testing framework
feat: add Playwright E2E testing framework
2026-03-30 22:57:20 +00:00
cartsnitch-ceo[bot] 9ed6633f24 Merge branch 'main' into feat/playwright-setup 2026-03-30 22:44:55 +00:00
cartsnitch-ceo[bot] ce51aadf8b feat: add MSW for integration test mocking (#65)
Adds MSW (Mock Service Worker) for integration test mocking. Creates mock API handlers for purchases, products, coupons, and alerts. Adds MSW server lifecycle to test setup and a useApi hook test demonstrating MSW usage.
2026-03-30 22:31:40 +00:00
Barcode Betty 2f768468ca fix: update stale package-lock.json to resolve npm ci failure
package.json references packages (better-auth@1.5.6, etc.) not present
in the lock file, causing npm ci to fail on CI. Regenerate the lock file
so CI can install dependencies correctly.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-30 22:26:13 +00:00
Barcode Betty cf26dd3049 feat: add MSW for integration test mocking
Install Mock Service Worker (MSW) and configure it for vitest.
Write one integration test for usePurchases hook using MSW.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-30 22:26:13 +00:00
cartsnitch-ceo[bot] 487d7090c7 Merge branch 'main' into feat/playwright-setup 2026-03-30 22:21:49 +00:00
cartsnitch-engineer[bot] d7cfc00a8d docs: add UAT runbook v1
Merges docs/uat-runbook into main. UAT Runbook v1 authored by Savannah Savings (CTO). QA and CTO approved.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-30 20:20:07 +00:00
Barcode Betty 849171b5bb fix(ci): exclude e2e tests from vitest
CTO feedback: vitest was picking up e2e/smoke.spec.ts files.
Add exclude: ["e2e/**", "node_modules/**"] to vitest.config.ts.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-30 19:49:23 +00:00
cartsnitch-engineer[bot] d5f518a636 feat: add utility functions with unit tests (#63)
feat: add utility functions with unit tests
2026-03-30 19:47:33 +00:00
Barcode Betty 87470ee98a fix(e2e): regenerate package-lock.json with playwright deps
The feat/playwright-setup branch added @playwright/test to package.json
but the lockfile was not regenerated, causing npm ci to fail.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-30 19:17:00 +00:00
Barcode Betty ea1bf5a728 feat: add utility functions with unit tests
Add formatCurrency, formatDate, and storeSlugs utilities in src/utils/
with 21 vitest unit tests covering standard and edge cases.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-30 18:53:40 +00:00
Stockboy Steve e546e2077b feat: add Playwright E2E testing framework
Add @playwright/test, playwright.config.ts, e2e/ smoke test,
and e2e CI job (Chromium-only) that gates build-and-push.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-30 18:47:55 +00:00
cartsnitch-engineer[bot] 714b7f9ab4 fix: use same-origin default for auth URL instead of localhost
fix: use same-origin default for auth URL instead of localhost
2026-03-30 16:07:28 +00:00
Barcode Betty 9ac231bce7 fix: use same-origin default for auth URL instead of localhost
Avoids ERR_CONNECTION_REFUSED in deployed environments where
VITE_AUTH_URL is not set at build time. Empty-string fallback
routes auth requests to same origin, which the HTTPRoute forwards
to the auth service.

cc @cpfarhood

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-30 15:50:51 +00:00
cartsnitch-ceo[bot] 05dd69b7f6 fix: align frontend auth with API token response contract
fix: align frontend auth with API token response contract
2026-03-30 15:20:56 +00:00
Barcode Betty 7adbe45b9c Merge branch 'origin/main' into fix/auth-contract-mismatch
# Conflicts:
#	src/pages/Login.tsx
#	src/pages/Register.tsx
2026-03-30 13:12:32 +00:00
Barcode Betty 39ac71e210 fix: align frontend auth with API token response contract
- Register sends display_name instead of name
- Register/Login handle TokenResponse (access_token, not token)
- Fetch /auth/me after register/login to populate user object

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-30 11:00:52 +00:00
cpfarhood-k8s[bot] 189d03736d test 2026-03-30 00:50:51 +00:00
cartsnitch-ceo[bot] 5ca732a26f fix: align auth client basePath with server config
fix: align auth client basePath with server config
2026-03-29 21:48:27 +00:00
Stockboy Steve 28292f746e fix: mock authClient.useSession in App.test.tsx
Pre-existing test failure from Phase 1 better-auth migration.
Dashboard calls authClient.useSession() which makes an unresolved
async call in test environment. Mock it to return null session
(isPending: false) so the unauthenticated UI renders correctly.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-29 19:55:11 +00:00
Stockboy Steve 821635c0c8 fix: remove unused data destructuring in Login/Register
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-29 19:50:11 +00:00
Stockboy Steve 288ebf347d fix: sync package-lock.json with package.json (add better-auth deps)
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-29 19:45:47 +00:00
Stockboy Steve 20cad6cef9 Merge origin/main into feature/better-auth - resolve ci.yml conflict
Keep both build-and-push-auth (Phase 1 auth migration) and
deploy-dev (main CI addition) jobs as they are independent.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-29 19:38:53 +00:00
Barcode Betty 8b923cd318 fix: align auth client basePath with server config
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-29 18:53:35 +00:00
cartsnitch-ceo[bot] 35fccc759a Add shrinkflation consumer FAQ for April 1 series launch
Merging approved PR #39. All gates passed: QA (Checkout Charlie), UAT (Rollback Rhonda), CTO (Savannah Savings). cc @cpfarhood
2026-03-28 14:54:32 +00:00
cartsnitch-engineer[bot] 6444387805 Merge pull request #42 from cartsnitch/content/launch-marketing-pages
Add launch marketing content pages for April 24 beta
2026-03-28 10:32:15 +00:00
cartsnitch-engineer ce84185af6 Remove unverified 'thousands of products' claim from shrinkflation FAQ
Follows PR #42 precedent: replace unverified quantity claim with factual 'tracked products' language. Requested by CTO on PR #39.
2026-03-28 10:06:13 +00:00
Barcode Betty 961d29361b fix: address CEO review feedback on PR #42
- stores.md: replace "secure loyalty program integration" with honest
  description of automated scraper pulling from store loyalty portals
- privacy.md: replace all "loyalty program" / "read-only connection"
  language with accurate description of automated scraper architecture
- how-it-works.md: describe scraper architecture honestly; clarify
  USDA FoodData Central is historical baseline reference only, not
  part of live tracking; remove "(yet)" from receipt statement

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-28 09:26:34 +00:00
Coupon Carl cfda1b544d feat: migrate authentication to Better-Auth (Phase 1)
Replace hand-rolled JWT auth with Better-Auth session-based authentication.

- Scaffold auth/ Node.js service with Better-Auth, bcrypt password compat,
  Postgres adapter mapped to existing users table
- Add Alembic migration (002) creating sessions, accounts, verifications
  tables and migrating password hashes to accounts table
- Update FastAPI auth dependency to validate sessions via shared DB
  (supports both cookie and Bearer token)
- Remove registration/login/refresh endpoints from API gateway (now
  handled by Better-Auth service)
- Update frontend to use better-auth/react client with httpOnly cookies
  (no tokens in localStorage or memory)
- Rewrite auth store, Login, Register, Dashboard, Settings, ProtectedRoute
  to use session-based auth
- Update all tests to create sessions directly in DB instead of JWT tokens

Resolves CAR-27
See plan: CAR-26#document-plan

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-28 04:46:10 +00:00
cartsnitch-engineer[bot] e7d8d3306c fix: remove unverified 'thousands of products' claim from blog post
Removes quantity qualifier per QA review comment on PR #42.
Pre-beta coverage is not yet verified.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-28 03:48:22 +00:00
Barcode Betty 6850739bf0 fix: remove unverified "thousands of products" claim from press-kit.md
Removes quantity qualifier from two instances since pre-beta coverage
is not verified. per QA and CEO review comments on PR #42.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-28 03:40:41 +00:00
cartsnitch-engineer[bot] 10fefc7ac1 Add CartSnitch vs Flipp SEO comparison article
SEO comparison article targeting CartSnitch vs Flipp queries. Math verified, no fabricated citations, feature statuses accurate. CTO + CEO approved.
2026-03-28 03:30:26 +00:00
Barcode Betty 52e89ec236 Fix content issues flagged by CEO and QA (PR #42 review)
Critical fixes:
- stores.md: Correct supported retailers to Meijer, Kroger, Target.
  Remove Safeway (never scoped). Replace named Coming Soon list with
  generic demand-based evaluation language.
- privacy.md: Replace all OAuth/API claims with accurate language
  describing read-only headless browser access to loyalty portals.
- about.md: Remove "price gouging on our roadmap" claim.
  Clarify USDA FoodData Central is reference data only, not a source
  of price data.
- blog/price-gouging-vs-shrinkflation.md: Remove roadmap claim.
  Remove implication that price gouging detection is coming.
- methodology.md: Fix cereal example math — 16.2% → 16.1%.
  Use raw values per the stated formula. Clarify USDA FoodData
  Central role for package sizing baselines only.
- how-it-works.md: Correct retailers. Remove "(yet)" from receipt
  claim. Clarify USDA FoodData Central is reference data.

Important fixes:
- press-kit.md: Correct supported stores. Remove USDA FoodData Central
  from dollar-cost attribution — reattribute to CartSnitch analysis of
  manufacturer packaging data.
- app-store-listing.md: Remove "thousands of products" claims
  (pre-launch beta, quantity unverified).
- social/launch-day-posts.md: Remove "thousands of products" claim.
  Correct retailer list.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-28 03:28:42 +00:00
cartsnitch-ceo[bot] f4210e5a1a Merge PR #38: Add unit price explainer article
Add unit price explainer article for SEO
2026-03-28 03:27:45 +00:00
Chris Farhood 3ff42694f2 Merge pull request #48 from cartsnitch/feature/repo-consolidation
feat: consolidate api, common, receiptwitness into monorepo
2026-03-27 22:54:34 -04:00
Coupon Carl 3a31f82c8d docs: update README and CLAUDE.md to reflect monorepo structure
Document the consolidated layout with api/, common/, receiptwitness/
subdirectories alongside the root frontend.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-28 02:25:07 +00:00
Coupon Carl 9fdfd7a806 Merge commit '253fd8464f4ef066200b47aa8f5c2162cb853898' as 'receiptwitness' 2026-03-28 02:24:22 +00:00
Coupon Carl 253fd8464f Squashed 'receiptwitness/' content from commit e8d374a
git-subtree-dir: receiptwitness
git-subtree-split: e8d374a89ed8978f429598e02d31b1c5963efe22
2026-03-28 02:24:22 +00:00
Coupon Carl e6d074e370 Merge commit '04fd86cf8dc11288daaded0edd9a0176b075e176' as 'common' 2026-03-28 02:24:14 +00:00
Coupon Carl 04fd86cf8d Squashed 'common/' content from commit 28b2939
git-subtree-dir: common
git-subtree-split: 28b2939037b5932ca5d5a6c734b292c012ac675f
2026-03-28 02:24:14 +00:00
cartsnitch-ceo[bot] 53985b52e1 Merge pull request #33 from cartsnitch/content/shrinkflation-top-10
Add shrinkflation top-10 ranking article
2026-03-24 22:05:21 +00:00
Frontend Frankie 450e7e5b81 fix: remove fabricated USDA FoodData Central citation
USDA FoodData Central is a nutrient composition database, not a price
analysis tool. Cannot be cited as a source for household shrinkflation
cost estimates.

Replaced with "CartSnitch analysis of manufacturer packaging data" and
clarified "publicly available manufacturer packaging data" throughout.

Added trailing newline to end of file.

Fixes CTO review feedback on PR #39.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-24 16:22:27 +00:00
Frontend Frankie e3775fbd50 Add launch marketing content pages for April 24 beta
Publishes 9 pre-approved content pages for the CartSnitch beta launch:
- about.md — mission, team, product overview
- methodology.md — how we calculate shrinkflation
- how-it-works.md — product explainer for /how-it-works
- stores.md — supported stores (Kroger, Safeway) + coming soon
- privacy.md — data privacy and what we access/store/never do
- press-kit.md — media kit for journalists and partners
- app-store-listing.md — iOS App Store and Google Play copy
- blog/price-gouging-vs-shrinkflation.md — SEO explainer
- social/launch-day-posts.md — Twitter/X and Reddit launch posts

Closes CAR-234, CAR-235, CAR-236, CAR-237, CAR-238, CAR-239, CAR-240, CAR-242, CAR-243

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-24 16:19:22 +00:00
cartsnitch-ceo[bot] 2a74f769c8 Merge pull request #40 from cartsnitch/fix/frontend-dockerfile-user-101
fix: add explicit USER 101 to prod stage Dockerfile
2026-03-24 16:12:43 +00:00
Frontend Frankie ec1a030e24 fix: add explicit USER 101 to prod stage Dockerfile
Kubernetes runAsNonRoot validation requires the USER directive to be
explicitly set in the image metadata. nginx-unprivileged runs as UID 101
internally, but without the explicit USER directive Kubernetes cannot
verify this from the image config and fails with CreateContainerConfigError.

Fixes CAR-231.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-22 16:06:00 +00:00
cartsnitch-engineer[bot] cb5a6b93ff Fix unit price percentage: 16.2% → 16.1% (and trailing '16%' → '16.1%')
(P/15.5) / (P/18) - 1 = 18/15.5 - 1 = 16.1%, not 16.2%. 
Addresses CTO review request on PR #38.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-22 07:57:12 +00:00
cartsnitch-engineer[bot] ce62829401 Add shrinkflation consumer FAQ article for April 1 series launch
Resolves CAR-220. Adds anchor FAQ piece for the 5-part shrinkflation series,
targeting keywords: 'what is shrinkflation', 'shrinkflation examples',
'why did my product get smaller', 'is shrinkflation legal'.

- Fixed mixed-language sentence in 'Why Do Brands Use Shrinkflation?' section
- Added proper frontmatter with series metadata (part 0 — anchor/intro)
- Target publish date: 2026-04-01

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-22 07:54:12 +00:00