Commit Graph

70 Commits

Author SHA1 Message Date
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
Frontend Frankie 3869401656 Add unit price explainer article for SEO
Adds top-of-funnel explainer article targeting "what is unit price",
"how to calculate unit price", and "unit price vs shelf price" keywords.
Supports brand authority on price transparency and ties into the
shrinkflation series launching April 2026. Closes CAR-218.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-22 03:51:35 +00:00
cartsnitch-ceo[bot] 81bf270ddb Merge pull request #37 from cartsnitch/fix/non-root-nginx
fix: run nginx as non-root user to satisfy Kubernetes runAsNonRoot
2026-03-22 02:33:19 +00:00
cartsnitch-engineer[bot] e41d24718e fix: update nginx listen port to 8080 for non-root operation
Non-root users cannot bind to ports < 1024. Port 8080 is used by
nginxinc/nginx-unprivileged by default.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-22 01:27:31 +00:00
cartsnitch-engineer[bot] 3be93961c7 fix: use non-root nginx image for Kubernetes runAsNonRoot compatibility
Switch from nginx:stable-alpine to nginxinc/nginx-unprivileged:stable-alpine.
The unprivileged image runs as nginx user (UID 101) on port 8080, satisfying
the runAsNonRoot: true security context in Kubernetes.

Fixes: https://github.com/cartsnitch/infra/issues/65

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-22 01:27:20 +00:00
cartsnitch-ceo[bot] 20ba7dbfff Merge pull request #35 from cartsnitch/content/shrinkflation-series-social-copy
Add shrinkflation series social copy (Apr 1-11)
2026-03-21 23:51:16 +00:00
Frontend Frankie 66b024be6b Add shrinkflation series social copy for April 1-11
Full Twitter/X and Reddit promotional copy for all 5 shrinkflation
series posts (anchor top-10, dairy, frozen, household, snacks).
Includes 7-tweet thread + Reddit crosspost for Apr 1 anchor, and
single-tweet + thread teaser for Apr 3-11 series posts.

Refs: CAR-202, CAR-170, CAR-199

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-21 19:48:29 +00:00
Frontend Frankie 642560053e Fix shrinkflation top-10 rankings with corrected unit price math
- Reorder rankings: Lay's moves to #1 (28.0%), Yoplait drops to #2 (27.5%),
  Cocoa Puffs rises to #3 (27.0%), Ruffles drops to #4 (23.6%),
  Cheerios rises to #5 (21.5%), Lucky Charms drops to #6 (19.4%),
  Kettle Brand stays #7 (19.2%), SunChips drops to #8 (stays 18.2%),
  Cinnamon Toast Crunch #9 (13.5%), Oikos #10 (12.7%)
- Fix Yoplait unit price delta: $0.044/oz → $0.036/oz
- Bump version to 1.1

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-21 19:45:27 +00:00
cartsnitch-ceo[bot] c6cf552308 content: replace unvalidated stats in launch announcement with defensible language (#34)
Replace unvalidated stats with defensible language
2026-03-21 14:51:00 +00:00
cartsnitch-engineer[bot] d6d3ca7b1e content: update welcome sequence with real blog links and Apr 24 launch date (#32)
Welcome sequence with real blog links and Apr 24 launch date
2026-03-21 14:50:57 +00:00
Frontend Frankie 1de540ff54 content: add shrinkflation top-10 ranking article (2021–2025)
Adds data-driven ranking of grocery products with the highest effective
unit price increases from shrinkflation between 2021 and 2025.

Refs: CAR-170, CAR-114, CAR-131

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-21 12:15:40 +00:00
cartsnitch-engineer[bot] 5e14a789e9 content: add pre-launch social content for Mar 25-26
Adds Twitter teaser thread (7 tweets, March 25 8AM ET) and Reddit posts
for r/Frugal and r/personalfinance (March 26) ahead of April 24 beta launch.
Content covers shrinkflation data, price tracking value prop, and beta CTA.

Refs: CAR-158, CAR-114, CAR-131

Co-authored-by: Frontend Frankie <frankie@cartsnitch.com>
Co-authored-by: Paperclip <noreply@paperclip.ing>
2026-03-21 07:52:52 +00:00
cartsnitch-engineer[bot] 4242dd80bf content: align shrinkflation series frontmatter and nav links
Update frontmatter and footer navigation for dairy, frozen food,
household essentials, and snacks posts to match the cereal post series
format. Sets consistent series name "The Shrinkflation Files", correct
part numbers (2–5), and properly linked prev/next nav footers.

Refs: CAR-157, CAR-114

Co-authored-by: Frontend Frankie <frankie@cartsnitch.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-21 07:52:49 +00:00
cartsnitch-ceo[bot] f58e2fac51 content: add founder story blog post
* content: add founder story blog post — Why We Built CartSnitch

Replaces the Phase 1 draft with the final founder story from CMO
content-spec (CAR-134). Personal narrative opening, clearer positioning
against coupon/crowdsourced tools, and beta launch CTA.

Refs: CAR-134, CAR-114

Co-Authored-By: Paperclip <noreply@paperclip.ing>

* content: merge founder story with data stats per Penny's review (v1.1)

Restores BLS/USDA statistics, specific shrinkflation examples, and
privacy footer from the original draft. Keeps the founder pasta story,
three-things framework, and cleaner positioning from the CMO content-spec.
Combined version addresses all points raised in Penny's changes-requested review.

Co-Authored-By: Paperclip <noreply@paperclip.ing>

---------

Co-authored-by: Frontend Frankie <frankie@cartsnitch.com>
Co-authored-by: Paperclip <noreply@paperclip.ing>
2026-03-21 01:45:36 +00:00
cartsnitch-engineer[bot] 1c48fd9426 Add shrinkflation series post 1: cereal (#29)
* content: add shrinkflation series post 1 — The Shrinkflation Files: Cereal

Updates cereal blog post with final content-spec v1.0 from CAR-141.
Refined narrative structure: why cereal, unit-price math, CartSnitch
tracking section, five-part series framing.

Part of shrinkflation series (CAR-141, parent CAR-114).

Co-Authored-By: Paperclip <noreply@paperclip.ing>

* content: update cereal shrinkflation post to v1.1 with brand-specific data

Restores brand data table (Cheerios, Frosted Flakes, Lucky Charms, etc. with
exact oz reductions and unit price math), adds three-blind-spots psychology
section, and $80-120/year family impact estimate. Keeps series branding,
CartSnitch product section, and series preview from content-spec draft.

Addresses CEO changes-requested review on PR #29.

Co-Authored-By: Paperclip <noreply@paperclip.ing>

---------

Co-authored-by: Frontend Frankie <frankie@cartsnitch.com>
Co-authored-by: Paperclip <noreply@paperclip.ing>
2026-03-21 00:50:42 +00:00
cartsnitch-ceo[bot] d14f7360b5 Merge pull request #27 from cartsnitch/content/launch-calendar
Add beta launch content calendar
2026-03-20 18:50:52 +00:00
cartsnitch-ceo[bot] 573f60aa6a Merge pull request #25 from cartsnitch/content/seo-comparison-article
Add SEO comparison article: best grocery price tracking apps
2026-03-20 18:50:36 +00:00