Add accounts, members, and processor-agnostic payment linking

- account table (billing entity, soft-delete, company-scoped)
- member table (people on an account, is_minor from DOB)
- account_processor_link table (maps accounts to any payment
  processor — stripe, global_payments — instead of stripe_customer_id
  directly on account)
- Full CRUD routes + search (name, email, phone, account_number)
- Member routes nested under accounts with isMinor auto-calculation
- Zod validation schemas in @forte/shared
- 19 tests passing
This commit is contained in:
Ryan Moon
2026-03-27 17:41:33 -05:00
parent 979a9a2c00
commit 5ff31ad782
12 changed files with 1429 additions and 1 deletions

View File

@@ -7,6 +7,7 @@ import { authPlugin } from './plugins/auth.js'
import { devAuthPlugin } from './plugins/dev-auth.js'
import { healthRoutes } from './routes/v1/health.js'
import { authRoutes } from './routes/v1/auth.js'
import { accountRoutes } from './routes/v1/accounts.js'
export async function buildApp() {
const app = Fastify({
@@ -33,6 +34,7 @@ export async function buildApp() {
// Routes
await app.register(healthRoutes, { prefix: '/v1' })
await app.register(authRoutes, { prefix: '/v1' })
await app.register(accountRoutes, { prefix: '/v1' })
return app
}