Підготовка контенту платформи Ring
Підготовка контенту платформи Ring
Підготовка контенту платформи Ring
Concepts, value, and typical clone scenarios — less code.
Concepts, value, and typical clone scenarios — less code.
Concepts, value, and typical clone scenarios — less code.
Production Ring clones use DB_BACKEND_MODE=k8s-postgres-fcm — PostgreSQL for application data, Firebase Admin only for FCM push when configured. Legacy DATABASE_MODE is removed. Pick a mode before first boot.
Adapters, FCM vs Firestore, DB_HYBRID_MODE
schema.sql + kingdom migration order
First clone with Postgres
DB_BACKEND_MODE | Application data | Firestore for DB? | Push |
|---|---|---|---|
k8s-postgres-fcm | PostgreSQL (self-hosted, k3s, Docker) | No | FCM + Apple when configured |
supabase-fcm | PostgreSQL on Supabase | No | Same FCM pattern |
firebase-full | Firestore paths | Yes | Full Firebase stack |
Implementation: lib/database/backend-mode-config.ts, lib/database/DatabaseService.ts, lib/database/BackendSelector.ts.
ConnectPlatform (connect-brand.com) is realtime collaboration — not a DB_BACKEND_MODE adapter. See Tunnel protocol.
OSS self-host, k3s, Ringdom handoff, PaymentConductor, News Kingdom, data/schema.sql v4.
Set mode and connection in .env.local:
Optional: DB_POOL_SIZE, DB_TIMEOUT, DB_RETRIES.
Provision PostgreSQL 14+ (18 recommended locally) — Docker docker-compose.dev.yml, Homebrew bootstrap, or your cluster.
Apply schema and migrations:
Full order: Database migrations.
FCM (optional): set NEXT_PUBLIC_FIREBASE_* + service account from env.local.template. App data stays on Postgres.
| Legacy / invalid | Replacement |
|---|---|
DATABASE_MODE=firebase_only / postgresql_only | DB_BACKEND_MODE values above |
npm run db:migrate / db:backup | ./scripts/run-migration.sh, pg_dump |
DB_HYBRID_MODE as primary switch | DB_BACKEND_MODE — see architecture page |
Export data from source (Firestore export or pg_dump).
Provision target Postgres; apply migrations.
Update DB_BACKEND_MODE and connection secrets on staging.
Smoke-test auth, store, payments, news before production cutover.
Pre-launch checklist (Postgres-primary):
DB_BACKEND_MODE set — app starts cleandata/schema.sql + kingdom migrations appliedpg_dump, CNPG, provider snapshots)004_payment_transactions.sql if using paymentsProduction Ring clones use DB_BACKEND_MODE=k8s-postgres-fcm — PostgreSQL for application data, Firebase Admin only for FCM push when configured. Legacy DATABASE_MODE is removed. Pick a mode before first boot.
Adapters, FCM vs Firestore, DB_HYBRID_MODE
schema.sql + kingdom migration order
First clone with Postgres
DB_BACKEND_MODE | Application data | Firestore for DB? | Push |
|---|---|---|---|
k8s-postgres-fcm | PostgreSQL (self-hosted, k3s, Docker) | No | FCM + Apple when configured |
supabase-fcm | PostgreSQL on Supabase | No | Same FCM pattern |
firebase-full | Firestore paths | Yes | Full Firebase stack |
Implementation: lib/database/backend-mode-config.ts, lib/database/DatabaseService.ts, lib/database/BackendSelector.ts.
ConnectPlatform (connect-brand.com) is realtime collaboration — not a DB_BACKEND_MODE adapter. See Tunnel protocol.
OSS self-host, k3s, Ringdom handoff, PaymentConductor, News Kingdom, data/schema.sql v4.
Set mode and connection in .env.local:
Optional: DB_POOL_SIZE, DB_TIMEOUT, DB_RETRIES.
Provision PostgreSQL 14+ (18 recommended locally) — Docker docker-compose.dev.yml, Homebrew bootstrap, or your cluster.
Apply schema and migrations:
Full order: Database migrations.
FCM (optional): set NEXT_PUBLIC_FIREBASE_* + service account from env.local.template. App data stays on Postgres.
| Legacy / invalid | Replacement |
|---|---|
DATABASE_MODE=firebase_only / postgresql_only | DB_BACKEND_MODE values above |
npm run db:migrate / db:backup | ./scripts/run-migration.sh, pg_dump |
DB_HYBRID_MODE as primary switch | DB_BACKEND_MODE — see architecture page |
Export data from source (Firestore export or pg_dump).
Provision target Postgres; apply migrations.
Update DB_BACKEND_MODE and connection secrets on staging.
Smoke-test auth, store, payments, news before production cutover.
Pre-launch checklist (Postgres-primary):
DB_BACKEND_MODE set — app starts cleandata/schema.sql + kingdom migrations appliedpg_dump, CNPG, provider snapshots)004_payment_transactions.sql if using paymentsProduction Ring clones use DB_BACKEND_MODE=k8s-postgres-fcm — PostgreSQL for application data, Firebase Admin only for FCM push when configured. Legacy DATABASE_MODE is removed. Pick a mode before first boot.
Adapters, FCM vs Firestore, DB_HYBRID_MODE
schema.sql + kingdom migration order
First clone with Postgres
DB_BACKEND_MODE | Application data | Firestore for DB? | Push |
|---|---|---|---|
k8s-postgres-fcm | PostgreSQL (self-hosted, k3s, Docker) | No | FCM + Apple when configured |
supabase-fcm | PostgreSQL on Supabase | No | Same FCM pattern |
firebase-full | Firestore paths | Yes | Full Firebase stack |
Implementation: lib/database/backend-mode-config.ts, lib/database/DatabaseService.ts, lib/database/BackendSelector.ts.
ConnectPlatform (connect-brand.com) is realtime collaboration — not a DB_BACKEND_MODE adapter. See Tunnel protocol.
OSS self-host, k3s, Ringdom handoff, PaymentConductor, News Kingdom, data/schema.sql v4.
Set mode and connection in .env.local:
Optional: DB_POOL_SIZE, DB_TIMEOUT, DB_RETRIES.
Provision PostgreSQL 14+ (18 recommended locally) — Docker docker-compose.dev.yml, Homebrew bootstrap, or your cluster.
Apply schema and migrations:
Full order: Database migrations.
FCM (optional): set NEXT_PUBLIC_FIREBASE_* + service account from env.local.template. App data stays on Postgres.
| Legacy / invalid | Replacement |
|---|---|
DATABASE_MODE=firebase_only / postgresql_only | DB_BACKEND_MODE values above |
npm run db:migrate / db:backup | ./scripts/run-migration.sh, pg_dump |
DB_HYBRID_MODE as primary switch | DB_BACKEND_MODE — see architecture page |
Export data from source (Firestore export or pg_dump).
Provision target Postgres; apply migrations.
Update DB_BACKEND_MODE and connection secrets on staging.
Smoke-test auth, store, payments, news before production cutover.
Pre-launch checklist (Postgres-primary):
DB_BACKEND_MODE set — app starts cleandata/schema.sql + kingdom migrations appliedpg_dump, CNPG, provider snapshots)004_payment_transactions.sql if using payments