Commit Graph

71 Commits

Author SHA1 Message Date
Coupon Carl 782448a54a 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
Coupon Carl cc0957fc92 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 f3a7b33093 Merge commit '342906c9d178923d462a08aec35e486703366eba' as 'receiptwitness' 2026-03-28 02:24:22 +00:00
Coupon Carl 342906c9d1 Squashed 'receiptwitness/' content from commit e8d374a
git-subtree-dir: receiptwitness
git-subtree-split: e8d374a89ed8978f429598e02d31b1c5963efe22
2026-03-28 02:24:22 +00:00
Coupon Carl b736e62d4f Merge commit '4cf6f91e954b770198578bcb8db5d98ac964bfed' as 'common' 2026-03-28 02:24:14 +00:00
Coupon Carl 4cf6f91e95 Squashed 'common/' content from commit 28b2939
git-subtree-dir: common
git-subtree-split: 28b2939037b5932ca5d5a6c734b292c012ac675f
2026-03-28 02:24:14 +00:00
Coupon Carl 27fe957074 feat: merge cartsnitch/api into api/ subdirectory
Consolidate API gateway service into monorepo.
Squashed from https://github.com/cartsnitch/api main (89bacb1).

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-28 02:24:02 +00:00
cartsnitch-ceo[bot] fc689a3f90 Merge pull request #33 from cartsnitch/content/shrinkflation-top-10
Add shrinkflation top-10 ranking article
v2026.03.24.2
2026-03-24 22:05:21 +00:00
cartsnitch-ceo[bot] aa4da81b6e Merge pull request #40 from cartsnitch/fix/frontend-dockerfile-user-101
fix: add explicit USER 101 to prod stage Dockerfile
v2026.03.24
2026-03-24 16:12:43 +00:00
Frontend Frankie ce9e71c793 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-ceo[bot] 61540905dd Merge pull request #37 from cartsnitch/fix/non-root-nginx
fix: run nginx as non-root user to satisfy Kubernetes runAsNonRoot
v2026.03.22.2
2026-03-22 02:33:19 +00:00
cartsnitch-engineer[bot] bea3342042 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] 95317884ff 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] ca0dbd0e63 Merge pull request #35 from cartsnitch/content/shrinkflation-series-social-copy
Add shrinkflation series social copy (Apr 1-11)
v2026.03.22
2026-03-21 23:51:16 +00:00
Frontend Frankie cdcffc8582 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 8cccb8cbf0 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] d201753d83 content: replace unvalidated stats in launch announcement with defensible language (#34)
Replace unvalidated stats with defensible language
v2026.03.21.4
2026-03-21 14:51:00 +00:00
cartsnitch-engineer[bot] 516697b4bd 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 b3aa18d7df 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] 6e681b9010 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>
v2026.03.21.3
2026-03-21 07:52:52 +00:00
cartsnitch-engineer[bot] 979a671300 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] 860dd827d3 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>
v2026.03.21.2
2026-03-21 01:45:36 +00:00
cartsnitch-engineer[bot] 7d2e0ba64e 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>
v2026.03.21
2026-03-21 00:50:42 +00:00
cartsnitch-ceo[bot] 118946898b Merge pull request #27 from cartsnitch/content/launch-calendar
Add beta launch content calendar
v2026.03.20.3
2026-03-20 18:50:52 +00:00
cartsnitch-ceo[bot] 90c81f9c8f 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
frontend-frankie[bot] 4baac1ae26 content: add beta launch content calendar
Refs: CAR-131

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-20 13:20:53 +00:00
chip-overstock[bot] 0f1e158e89 Merge pull request #24 from cartsnitch/content/phase-2-onboarding-faq
Add Phase 2 content: onboarding guides and FAQ
v2026.03.20.2
2026-03-20 08:20:33 +00:00
Frontend Frankie a9101246c9 content: add SEO comparison article — best grocery price tracking apps 2026
Adds marketing blog post comparing CartSnitch, Flipp, Basket, and Ibotta.
Covers shrinkflation detection, automatic tracking, and store comparison.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-20 06:13:46 +00:00
Frontend Frankie cf4ae49ad7 Add Phase 2 content: onboarding guides and FAQ
Onboarding guides cover the five core user flows: getting started,
connecting store accounts, setting up price alerts, reading the
dashboard, and comparing stores. FAQ addresses common questions
about how CartSnitch works, data privacy, supported stores, and
troubleshooting.

All guides include screenshot placeholders for integration once
staging is available (blocked on CAR-60).

Ref: CAR-114

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-20 06:11:27 +00:00
chip-overstock[bot] 634d54b7fc Merge pull request #23 from cartsnitch/fix/dockerhub-auth-rate-limit
Add Docker Hub auth to CI to fix 429 rate limit
v2026.03.20
2026-03-20 02:15:44 +00:00
Deploy Debbie c74a4226f4 Add Docker Hub auth to CI to fix 429 rate limit
The build-and-push job pulls nginx:stable-alpine from Docker Hub during
docker build. Anonymous pulls hit rate limits on self-hosted runners.
Add docker/login-action for Docker Hub using org secrets before the
build step (unconditional — needed for both PR and push builds).

Closes #22

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-20 02:05:33 +00:00
chip-overstock[bot] 14c8aa5797 ci: add CalVer tagging to CI workflow
ci: add CalVer tagging to CI workflow
2026-03-20 02:02:02 +00:00
Deploy Debbie 77c45e7eac ci: add CalVer tagging to build-and-push workflow
Tag container images with YYYY.MM.DD CalVer format on merge to main,
with build number suffix for same-day collisions. Creates matching
git tags (vYYYY.MM.DD). Retains latest tag as convenience alias.

GitHub issue: cartsnitch/infra#24

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-19 23:56:05 +00:00
chip-overstock[bot] d6175760d1 Merge pull request #15 from cartsnitch/frankie/add-marketing-content
Add marketing content from CMO content phase 1
2026-03-19 23:09:07 +00:00
Frontend Frankie 6a130a9d76 Add 6 missing marketing content files from CMO content phase 1
Add brand voice guide, website landing page, launch announcement,
social media strategy, and email templates (shrinkflation alert,
weekly digest) to content/marketing/ directory structure.

Resolves CAR-90.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-19 21:50:19 +00:00
Frontend Frankie 38c860f1bb Add marketing content files from CMO content phase 1
Copy 10 marketing content files from the cmo/content-phase1 branch
of cartsnitch/agents into content/marketing/, preserving the
blog/, email/, and social/ subdirectory structure.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 21:50:19 +00:00
chip-overstock[bot] 91ff8f76d0 Merge pull request #18 from cartsnitch/fix/runner-label
fix(ci): correct ARC runner label
2026-03-19 21:47:40 +00:00
Deploy Debbie ab358f44bb fix(ci): use correct ARC runner label runners-cartsnitch
The correct self-hosted ARC runner label is runners-cartsnitch, not
cartsnitch-runners. All CI jobs were failing because no runners
matched the old label.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-19 21:25:51 +00:00
chip-overstock[bot] 5b8d132948 Merge pull request #17 from cartsnitch/fix/ci-runner-and-mirrors
fix(ci): correct runner label + revert GHCR mirrors
2026-03-19 21:10:12 +00:00
Deploy Debbie 66565fff5c fix(ci): remove Docker Hub login step
We push to GHCR only per infrastructure policy. The Docker Hub login
step was added in error and would fail since DOCKERHUB_USERNAME/TOKEN
secrets are not configured.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-19 19:14:46 +00:00
Debbie a65361106c fix(ci): correct runner label to cartsnitch-runners
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-19 18:57:28 +00:00
Deploy Debbie 66376f6a87 fix(ci): add Docker Hub login to avoid rate limits on base image pulls
Self-hosted ARC runners share an IP — unauthenticated Docker Hub pulls
hit rate limits. Add Docker Hub login before build step.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-19 18:50:31 +00:00
Deploy Debbie 580864ac69 fix(ci): correct runner label and revert GHCR mirrors to Docker Hub
Fixes runner label (local-ubuntu-latest-cartsnitch → runners-cartsnitch)
and reverts GHCR mirror images to Docker Hub direct per board directive.

Supersedes #16

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-19 17:59:16 +00:00
Chris Farhood e8a53399c2 Merge pull request #14 from cartsnitch/revert-ghcr-mirrors
Revert GHCR mirror configs to Docker Hub direct pulls
2026-03-18 21:53:46 -04:00
Deploy Debbie b8091e367e Remove Docker Hub auth and debug step
Confirmed secrets are length 0 from CI runners. Docker Hub auth
cannot work until secrets are properly scoped to these repos.

Refs: CAR-77

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-19 01:48:17 +00:00
Deploy Debbie d0c887e29f Debug: check Docker Hub secret accessibility from CI runners
Adding diagnostic step to verify secret length before login attempt.

Refs: CAR-77

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-19 01:45:43 +00:00
Deploy Debbie c81e14b8e7 Re-add Docker Hub auth to test secret accessibility
Board confirms DOCKERHUB_USERNAME/DOCKERHUB_TOKEN exist. Testing
whether they're now accessible from self-hosted runners.

Refs: CAR-77

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-19 01:43:34 +00:00
Debbie (Paperclip Agent) ec81004268 Remove Docker Hub auth (secrets not accessible from CI runners)
DOCKERHUB_USERNAME/DOCKERHUB_TOKEN secrets are not accessible from
the self-hosted runners. Remove credentials blocks and login steps
to avoid template validation failures. Docker Hub pulls will use
anonymous access.

Refs: CAR-77

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-19 00:59:10 +00:00
Debbie (Paperclip Agent) fb6f4a0ed4 Retrigger CI after org secrets provisioned
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-19 00:55:24 +00:00
Debbie (Paperclip Agent) e6f09a0212 Fix: remove conditional on Docker Hub login
Board confirmed DOCKERHUB_USERNAME/DOCKERHUB_TOKEN secrets exist.
Remove the conditional (which had a YAML parsing issue with unquoted !=).

Refs: CAR-77

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-19 00:52:11 +00:00