mirror of
https://github.com/Dvorinka/Bookra.git
synced 2026-10-28 15:51:15 +00:00
refactor(db): replace sqlc with handwritten pgx repos
- Finish Paddle-to-Stripe billing migration; drop paddle/stripe libs - Renumber migrations; add 00012 memberships+manage_token, 00013 location_type_capacity - Add tests: admin, auth, bookings customer service - Remove graphify-out artifacts and stale env files Authored By: TDvorak <[email protected]> Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
2039669e2c
commit
f2f7439050
93 files changed
+6987
-69060
No files matched your search
+16
-16
@@ -21,11 +21,11 @@
|
||||
- frontend dashboard now hydrates from API when a Neon Auth JWT is available
|
||||
- frontend dashboard degrades to contract-shaped preview mode when auth is unavailable
|
||||
- Neon Auth token acquisition remains adapter-isolated and still needs production validation against live Neon Auth
|
||||
- `[done/partial]` Milestone 4: Paddle subscription sync and entitlement baseline completed
|
||||
- `[done/partial]` Milestone 4: Stripe subscription sync and entitlement baseline completed
|
||||
- normalized billing snapshot model added to backend and OpenAPI contract
|
||||
- backend-owned subscription state now syncs through one overwrite path
|
||||
- Paddle checkout launch endpoint added
|
||||
- Paddle webhook endpoint added with signature verification and event filtering
|
||||
- Stripe checkout launch endpoint added
|
||||
- Stripe webhook endpoint added with signature verification and event filtering
|
||||
- billing snapshot refresh endpoint added
|
||||
- customer portal endpoint added
|
||||
- plan entitlements now derive from normalized plan state
|
||||
@@ -134,16 +134,16 @@ v1 reminder strategy:
|
||||
- Czech-first provider support is preferred, with room for generic fallback providers later
|
||||
|
||||
## Billing
|
||||
Bookra uses Paddle for B2B SaaS subscription billing.
|
||||
Bookra uses Stripe for B2B SaaS subscription billing. (Migrated from Paddle; the Paddle integration was removed.)
|
||||
|
||||
Paddle scope in v1:
|
||||
Stripe scope in v1:
|
||||
- tenant subscription plans
|
||||
- plan upgrades/downgrades
|
||||
- add-ons such as SMS or expanded limits
|
||||
- webhook-based subscription state sync
|
||||
- customer self-serve billing portal
|
||||
|
||||
Paddle is not used for end-customer booking checkout in v1.
|
||||
Stripe is not used for end-customer booking checkout in v1.
|
||||
|
||||
## Remote-First Architecture
|
||||
Bookra follows the `tdvorak-fullstack` profile with remote deployment overrides.
|
||||
@@ -151,7 +151,7 @@ Bookra follows the `tdvorak-fullstack` profile with remote deployment overrides.
|
||||
### Stack
|
||||
- Frontend: SolidJS + Vite + TypeScript + Tailwind
|
||||
- Backend: Go + Gin
|
||||
- Database: Neon Postgres + sqlc + goose
|
||||
- Database: Neon Postgres + goose (handwritten pgx repositories; sqlc removed)
|
||||
- Auth: Neon Auth
|
||||
- API contract: OpenAPI as source of truth
|
||||
- Frontend deployment: Vercel
|
||||
@@ -245,21 +245,21 @@ Key entities:
|
||||
- delivery logging now exists for reminder execution
|
||||
|
||||
### Phase 4
|
||||
- Paddle subscriptions
|
||||
- Stripe subscriptions
|
||||
- SMS add-on support
|
||||
- plan enforcement
|
||||
- hardening, logging, and operational tooling
|
||||
- status: in progress
|
||||
- current implementation:
|
||||
- billing snapshot persistence added
|
||||
- Paddle checkout route added
|
||||
- Paddle webhook route added
|
||||
- Paddle portal route added
|
||||
- Stripe checkout route added (Checkout Sessions)
|
||||
- Stripe webhook route added with signature verification
|
||||
- Stripe portal route added (customer portal sessions)
|
||||
- subscription refresh route added
|
||||
- entitlement mapping is now available to the frontend
|
||||
- API edge now includes security headers and public route rate limiting
|
||||
- remote job-runner endpoint added for reminder execution
|
||||
- sqlc and goose commands are now wired into repeatable npm scripts
|
||||
- goose commands are wired into repeatable npm scripts
|
||||
|
||||
## Current Implementation Notes
|
||||
- Backend is no longer static-demo-only for booking flows.
|
||||
@@ -276,7 +276,7 @@ Key entities:
|
||||
- Billing now follows a backend-owned snapshot model rather than trusting incremental webhook payloads.
|
||||
- `apps/auth-service` is now retired from active runtime and docs.
|
||||
- Reminder delivery now has a working runtime path instead of just a queued schema.
|
||||
- sqlc generation and goose migration execution are now runnable through workspace scripts.
|
||||
- goose migration execution is runnable through workspace scripts.
|
||||
- Protected backend requests now perform automatic app-side identity sync before tenant membership resolution.
|
||||
- `/dashboard` now includes first-run onboarding instead of only a passive empty state for unassigned authenticated users.
|
||||
|
||||
@@ -284,14 +284,14 @@ Key entities:
|
||||
- Neon Auth token extraction is wired structurally, but still needs live browser validation against a real Neon Auth environment.
|
||||
- Tenant membership bootstrap now syncs identities structurally, but staging still needs seeded membership records and onboarding flows for first-time tenants.
|
||||
- First-time onboarding exists, but there are still no CRUD screens for locations, staff, services, or schedules after workspace creation.
|
||||
- Paddle lifecycle sync is implemented structurally, but still needs live environment validation against real products, price IDs, client token, and webhook signatures.
|
||||
- Stripe lifecycle sync is implemented; still needs live environment validation against real products, price IDs, and webhook signatures.
|
||||
- Real email/SMS provider integrations are not implemented yet; current delivery providers are safe noops.
|
||||
- The internal reminder dispatch route exists, but Railway scheduling and secret rotation still need production setup.
|
||||
|
||||
## Next Build Targets
|
||||
- replace preview-mode dashboard hydration with fully validated Neon Auth JWT flow
|
||||
- sync Neon Auth identities into tenant membership records and onboarding bootstrap
|
||||
- validate Paddle checkout/webhooks/portal and reminder dispatch against live staging infrastructure
|
||||
- validate Stripe checkout/webhooks/portal and reminder dispatch against live staging infrastructure
|
||||
- replace noop notification providers with the first production email transport and a gated SMS transport
|
||||
- add real app management screens for services, staff, locations, and availability after onboarding
|
||||
|
||||
@@ -312,7 +312,7 @@ Bookra is successful when a small business can:
|
||||
- send reminders reliably
|
||||
- manage cancellations and waitlists
|
||||
- view simple business health metrics
|
||||
- subscribe to a paid plan through Paddle
|
||||
- subscribe to a paid plan through Stripe
|
||||
|
||||
## Final Positioning
|
||||
Bookra is not an ERP, not a medical system, and not a marketplace.
|
||||
|
||||
Reference in new issue
Block a user