Concepts, value, and typical clone scenarios — less code.
Concepts, value, and typical clone scenarios — less code.
Preparing Ring content
Preparing Ring content
Preparing Ring content
Done when: npm run dev serves pages, GET /api/health is healthy (or you fixed AUTH_SECRET), one Auth.js sign-in establishes a session, and one authenticated CRUD path works (entities or opportunities). Tunnel ready and PaymentConductor membership smoke are extended — not blockers for day-one branding.
Filter with Founder / Developer in the docs sidebar. Run this after Installation and Migrations. Core checks are a short browser pass; payments need PSP env + 004_payment_transactions before you treat checkout as green.
First success means the custom server.ts / Next app serves pages, Auth.js v5 can establish a session, DatabaseService reads/writes without adapter crashes, and core marketplace routes load. It does not require WayForPay, Stripe, PayPal, FCM, or wallet connectivity on day one.
| Pass bar | What must work | Good enough to… |
|---|---|---|
| Core | Homepage + /api/health + one provider sign-in + one CRUD path | Customize branding, invite testers |
| Extended | GET /api/tunnel/test → status: ready; entities + opportunities UI | Demo realtime / discovery |
| Optional payment | Membership initiate → PaymentConductor redirect or credit settle | Sandbox checkout / role-upgrade rehearsal |
Use LegioX MCP legiox-env-validator (or ask the agent with the prompt below) before chasing UI failures. It reports missing env — it does not mutate .env, restart processes, or call PSPs until you approve.
Starter prompt:
Validate this clone for first-success smoke:
AUTH_SECRET,DB_BACKEND_MODE/ PostgresDB_*, and optionalWAYFORPAY_*/STRIPE_*/PAYPAL_*. List missing vars and the Core vs Optional-payment checklist from/docs/getting-started/first-success. Do not write secrets or restart the server until I approve.
Inputs checklist
.env.local from env.local.template (or k8s secret mount)http://localhost:3000 (or your configured site URL)Before stakeholder demos, walk the member happy path yourself:
| Check | Pass? |
|---|---|
npm run dev starts without DB adapter crash | ☐ |
GET /api/health → healthy (or fixed AUTH_SECRET) | ☐ |
| Sign-in completes for one Auth.js provider | ☐ |
| Entity create/list or opportunities list works in UI | ☐ |
GET /api/tunnel/test → status: ready | ☐ |
| Optional: membership initiate returns redirect / credit success | ☐ |
Yes. Core first success is auth + data path. PaymentConductor is optional until you demo paid membership or store checkout.
ready mean SSE is live?No. /api/tunnel/test confirms config/provider detection. Live streams need a signed-in client hitting /api/tunnel/sse (or your configured provider).
004_payment_transactions for Core?No. Apply it before Optional payment smoke so the ledger can record membership / store intents.
firebase-full can pass homepage + auth for a prototype, but PaymentConductor depth and ERP/news features expect Postgres-primary (k8s-postgres-fcm / supabase-fcm). See Database selection.
degraded — is the app down?Process is up; missing AUTH_SECRET (Postgres path) or Firebase critical vars degrade status. Set secrets, restart, re-curl.
GET /api/wallet/balance returns 404 when no wallet row exists yet — not a Core failure. Create/top-up via wallet flows after auth.
Prerequisite: install and env before this smoke checklist.
Prerequisite: schema + 004_payment_transactions before PaymentConductor smoke.
Deep-dive: Auth.js providers and session shape after signup works.
Next-step: rails, ledger, and webhooks after membership initiate succeeds.
Done when: npm run dev serves pages, GET /api/health is healthy (or you fixed AUTH_SECRET), one Auth.js sign-in establishes a session, and one authenticated CRUD path works (entities or opportunities). Tunnel ready and PaymentConductor membership smoke are extended — not blockers for day-one branding.
Filter with Founder / Developer in the docs sidebar. Run this after Installation and Migrations. Core checks are a short browser pass; payments need PSP env + 004_payment_transactions before you treat checkout as green.
First success means the custom server.ts / Next app serves pages, Auth.js v5 can establish a session, DatabaseService reads/writes without adapter crashes, and core marketplace routes load. It does not require WayForPay, Stripe, PayPal, FCM, or wallet connectivity on day one.
| Pass bar | What must work | Good enough to… |
|---|---|---|
| Core | Homepage + /api/health + one provider sign-in + one CRUD path | Customize branding, invite testers |
| Extended | GET /api/tunnel/test → status: ready; entities + opportunities UI | Demo realtime / discovery |
| Optional payment | Membership initiate → PaymentConductor redirect or credit settle | Sandbox checkout / role-upgrade rehearsal |
Use LegioX MCP legiox-env-validator (or ask the agent with the prompt below) before chasing UI failures. It reports missing env — it does not mutate .env, restart processes, or call PSPs until you approve.
Starter prompt:
Validate this clone for first-success smoke:
AUTH_SECRET,DB_BACKEND_MODE/ PostgresDB_*, and optionalWAYFORPAY_*/STRIPE_*/PAYPAL_*. List missing vars and the Core vs Optional-payment checklist from/docs/getting-started/first-success. Do not write secrets or restart the server until I approve.
Inputs checklist
.env.local from env.local.template (or k8s secret mount)http://localhost:3000 (or your configured site URL)Before stakeholder demos, walk the member happy path yourself:
| Check | Pass? |
|---|---|
npm run dev starts without DB adapter crash | ☐ |
GET /api/health → healthy (or fixed AUTH_SECRET) | ☐ |
| Sign-in completes for one Auth.js provider | ☐ |
| Entity create/list or opportunities list works in UI | ☐ |
GET /api/tunnel/test → status: ready | ☐ |
| Optional: membership initiate returns redirect / credit success | ☐ |
Yes. Core first success is auth + data path. PaymentConductor is optional until you demo paid membership or store checkout.
ready mean SSE is live?No. /api/tunnel/test confirms config/provider detection. Live streams need a signed-in client hitting /api/tunnel/sse (or your configured provider).
004_payment_transactions for Core?No. Apply it before Optional payment smoke so the ledger can record membership / store intents.
firebase-full can pass homepage + auth for a prototype, but PaymentConductor depth and ERP/news features expect Postgres-primary (k8s-postgres-fcm / supabase-fcm). See Database selection.
degraded — is the app down?Process is up; missing AUTH_SECRET (Postgres path) or Firebase critical vars degrade status. Set secrets, restart, re-curl.
GET /api/wallet/balance returns 404 when no wallet row exists yet — not a Core failure. Create/top-up via wallet flows after auth.
Prerequisite: install and env before this smoke checklist.
Prerequisite: schema + 004_payment_transactions before PaymentConductor smoke.
Deep-dive: Auth.js providers and session shape after signup works.
Next-step: rails, ledger, and webhooks after membership initiate succeeds.
Done when: npm run dev serves pages, GET /api/health is healthy (or you fixed AUTH_SECRET), one Auth.js sign-in establishes a session, and one authenticated CRUD path works (entities or opportunities). Tunnel ready and PaymentConductor membership smoke are extended — not blockers for day-one branding.
Filter with Founder / Developer in the docs sidebar. Run this after Installation and Migrations. Core checks are a short browser pass; payments need PSP env + 004_payment_transactions before you treat checkout as green.
First success means the custom server.ts / Next app serves pages, Auth.js v5 can establish a session, DatabaseService reads/writes without adapter crashes, and core marketplace routes load. It does not require WayForPay, Stripe, PayPal, FCM, or wallet connectivity on day one.
| Pass bar | What must work | Good enough to… |
|---|---|---|
| Core | Homepage + /api/health + one provider sign-in + one CRUD path | Customize branding, invite testers |
| Extended | GET /api/tunnel/test → status: ready; entities + opportunities UI | Demo realtime / discovery |
| Optional payment | Membership initiate → PaymentConductor redirect or credit settle | Sandbox checkout / role-upgrade rehearsal |
Use LegioX MCP legiox-env-validator (or ask the agent with the prompt below) before chasing UI failures. It reports missing env — it does not mutate .env, restart processes, or call PSPs until you approve.
Starter prompt:
Validate this clone for first-success smoke:
AUTH_SECRET,DB_BACKEND_MODE/ PostgresDB_*, and optionalWAYFORPAY_*/STRIPE_*/PAYPAL_*. List missing vars and the Core vs Optional-payment checklist from/docs/getting-started/first-success. Do not write secrets or restart the server until I approve.
Inputs checklist
.env.local from env.local.template (or k8s secret mount)http://localhost:3000 (or your configured site URL)Before stakeholder demos, walk the member happy path yourself:
| Check | Pass? |
|---|---|
npm run dev starts without DB adapter crash | ☐ |
GET /api/health → healthy (or fixed AUTH_SECRET) | ☐ |
| Sign-in completes for one Auth.js provider | ☐ |
| Entity create/list or opportunities list works in UI | ☐ |
GET /api/tunnel/test → status: ready | ☐ |
| Optional: membership initiate returns redirect / credit success | ☐ |
Yes. Core first success is auth + data path. PaymentConductor is optional until you demo paid membership or store checkout.
ready mean SSE is live?No. /api/tunnel/test confirms config/provider detection. Live streams need a signed-in client hitting /api/tunnel/sse (or your configured provider).
004_payment_transactions for Core?No. Apply it before Optional payment smoke so the ledger can record membership / store intents.
firebase-full can pass homepage + auth for a prototype, but PaymentConductor depth and ERP/news features expect Postgres-primary (k8s-postgres-fcm / supabase-fcm). See Database selection.
degraded — is the app down?Process is up; missing AUTH_SECRET (Postgres path) or Firebase critical vars degrade status. Set secrets, restart, re-curl.
GET /api/wallet/balance returns 404 when no wallet row exists yet — not a Core failure. Create/top-up via wallet flows after auth.
Prerequisite: install and env before this smoke checklist.
Prerequisite: schema + 004_payment_transactions before PaymentConductor smoke.
Deep-dive: Auth.js providers and session shape after signup works.
Next-step: rails, ledger, and webhooks after membership initiate succeeds.
Expect Next.js ready on http://localhost:3000. Package script runs node --import tsx server.ts. With RING_DEPLOY_TARGET=self-hosted, custom server may log native WSS.
Verified shape (app/api/health/route.ts): status is healthy | degraded | unhealthy (not "ok"). services.database is postgresql or firebase. Missing AUTH_SECRET → degraded and HTTP 503. HEAD returns 200 when the process is up.
/ — expect HTTP 200; no blank screen or adapter crash in the terminal./login (locale prefix may apply: /en/login).auth.ts: Google OAuth, Apple, Ring Mailer (OTP / magic link / email+password), Google One Tap, or crypto-wallet credentials. Default tree does not ship GitHub/Discord./profile shows user data; refresh persists. Optional: GET /api/auth/session with browser cookies returns { user: { id, email, role, … } }./api/entities and /api/opportunities require a session — 401 without cookies is expected.
After browser login:
/entities — list + create form submits (visitor may 403 on write — use member/admin test account)./opportunities — list loads for your role.Optional Postgres check:
Expect count ≥ 1 after first sign-in. There is no /api/test-db route — use psql or authenticated APIs.
Expect "ready" and a provider list from lib/tunnel/config. Live SSE: Network tab → /api/tunnel/sse after sign-in. See Tunnel protocol.
Only after Migrations applied 004_payment_transactions.sql and you set processor env from env.local.template (WAYFORPAY_*, and/or STRIPE_*, and/or PAYPAL_*).
UPGRADEABLE_ROLES — not platform-admin purchase)./membership → choose a higher tier and a configured rail (card → WayForPay/Stripe via PaymentConductor, paypal, or credit_balance if the wallet has balance).initiateMembershipPayment (app/_actions/membership-payment.ts) calls PaymentConductor.createCheckout({ purpose: 'membership_upgrade', … }) (or SubscriptionConductor first for some rails)./api/payments/wayforpay/webhook, /api/payments/stripe/webhook, /api/payments/paypal/webhook (getWebhookUrl in lib/payments/payment.config.ts).checkout.session.completed / PayPal capture handling, UI lands on /membership/success or /membership/failure.Do not claim production checkout until HMAC/signature verification and return URLs match your public site URL. Deep dive: PaymentConductor.
Sandbox fee → PaymentConductor → webhook — only after payment env is set.
Auth + one CRUD flow without push notifications or wallet is still a valid dev clone. Wire FCM and PaymentConductor before promising paid membership or store checkout (Environment).
DB_* / DB_BACKEND_MODE.AUTH_SECRET and OAuth redirect URIs (http://localhost:3000/api/auth/callback/google).WAYFORPAY_* / Stripe / PayPal before retrying.| Scripts | npm run type-check, npm run build (build runs type-check) |
Health’s Postgres detection uses DATABASE_BACKEND=postgresql or DB_HOST / POSTGRES_HOST — not the string DB_BACKEND_MODE alone. Keep both families aligned with env.local.template so services.database reports postgresql when you expect it.
Same-workflow: auth and database fixes when a checklist row stays red.
Expect Next.js ready on http://localhost:3000. Package script runs node --import tsx server.ts. With RING_DEPLOY_TARGET=self-hosted, custom server may log native WSS.
Verified shape (app/api/health/route.ts): status is healthy | degraded | unhealthy (not "ok"). services.database is postgresql or firebase. Missing AUTH_SECRET → degraded and HTTP 503. HEAD returns 200 when the process is up.
/ — expect HTTP 200; no blank screen or adapter crash in the terminal./login (locale prefix may apply: /en/login).auth.ts: Google OAuth, Apple, Ring Mailer (OTP / magic link / email+password), Google One Tap, or crypto-wallet credentials. Default tree does not ship GitHub/Discord./profile shows user data; refresh persists. Optional: GET /api/auth/session with browser cookies returns { user: { id, email, role, … } }./api/entities and /api/opportunities require a session — 401 without cookies is expected.
After browser login:
/entities — list + create form submits (visitor may 403 on write — use member/admin test account)./opportunities — list loads for your role.Optional Postgres check:
Expect count ≥ 1 after first sign-in. There is no /api/test-db route — use psql or authenticated APIs.
Expect "ready" and a provider list from lib/tunnel/config. Live SSE: Network tab → /api/tunnel/sse after sign-in. See Tunnel protocol.
Only after Migrations applied 004_payment_transactions.sql and you set processor env from env.local.template (WAYFORPAY_*, and/or STRIPE_*, and/or PAYPAL_*).
UPGRADEABLE_ROLES — not platform-admin purchase)./membership → choose a higher tier and a configured rail (card → WayForPay/Stripe via PaymentConductor, paypal, or credit_balance if the wallet has balance).initiateMembershipPayment (app/_actions/membership-payment.ts) calls PaymentConductor.createCheckout({ purpose: 'membership_upgrade', … }) (or SubscriptionConductor first for some rails)./api/payments/wayforpay/webhook, /api/payments/stripe/webhook, /api/payments/paypal/webhook (getWebhookUrl in lib/payments/payment.config.ts).checkout.session.completed / PayPal capture handling, UI lands on /membership/success or /membership/failure.Do not claim production checkout until HMAC/signature verification and return URLs match your public site URL. Deep dive: PaymentConductor.
Sandbox fee → PaymentConductor → webhook — only after payment env is set.
Auth + one CRUD flow without push notifications or wallet is still a valid dev clone. Wire FCM and PaymentConductor before promising paid membership or store checkout (Environment).
DB_* / DB_BACKEND_MODE.AUTH_SECRET and OAuth redirect URIs (http://localhost:3000/api/auth/callback/google).WAYFORPAY_* / Stripe / PayPal before retrying.| Scripts | npm run type-check, npm run build (build runs type-check) |
Health’s Postgres detection uses DATABASE_BACKEND=postgresql or DB_HOST / POSTGRES_HOST — not the string DB_BACKEND_MODE alone. Keep both families aligned with env.local.template so services.database reports postgresql when you expect it.
Same-workflow: auth and database fixes when a checklist row stays red.
Expect Next.js ready on http://localhost:3000. Package script runs node --import tsx server.ts. With RING_DEPLOY_TARGET=self-hosted, custom server may log native WSS.
Verified shape (app/api/health/route.ts): status is healthy | degraded | unhealthy (not "ok"). services.database is postgresql or firebase. Missing AUTH_SECRET → degraded and HTTP 503. HEAD returns 200 when the process is up.
/ — expect HTTP 200; no blank screen or adapter crash in the terminal./login (locale prefix may apply: /en/login).auth.ts: Google OAuth, Apple, Ring Mailer (OTP / magic link / email+password), Google One Tap, or crypto-wallet credentials. Default tree does not ship GitHub/Discord./profile shows user data; refresh persists. Optional: GET /api/auth/session with browser cookies returns { user: { id, email, role, … } }./api/entities and /api/opportunities require a session — 401 without cookies is expected.
After browser login:
/entities — list + create form submits (visitor may 403 on write — use member/admin test account)./opportunities — list loads for your role.Optional Postgres check:
Expect count ≥ 1 after first sign-in. There is no /api/test-db route — use psql or authenticated APIs.
Expect "ready" and a provider list from lib/tunnel/config. Live SSE: Network tab → /api/tunnel/sse after sign-in. See Tunnel protocol.
Only after Migrations applied 004_payment_transactions.sql and you set processor env from env.local.template (WAYFORPAY_*, and/or STRIPE_*, and/or PAYPAL_*).
UPGRADEABLE_ROLES — not platform-admin purchase)./membership → choose a higher tier and a configured rail (card → WayForPay/Stripe via PaymentConductor, paypal, or credit_balance if the wallet has balance).initiateMembershipPayment (app/_actions/membership-payment.ts) calls PaymentConductor.createCheckout({ purpose: 'membership_upgrade', … }) (or SubscriptionConductor first for some rails)./api/payments/wayforpay/webhook, /api/payments/stripe/webhook, /api/payments/paypal/webhook (getWebhookUrl in lib/payments/payment.config.ts).checkout.session.completed / PayPal capture handling, UI lands on /membership/success or /membership/failure.Do not claim production checkout until HMAC/signature verification and return URLs match your public site URL. Deep dive: PaymentConductor.
Sandbox fee → PaymentConductor → webhook — only after payment env is set.
Auth + one CRUD flow without push notifications or wallet is still a valid dev clone. Wire FCM and PaymentConductor before promising paid membership or store checkout (Environment).
DB_* / DB_BACKEND_MODE.AUTH_SECRET and OAuth redirect URIs (http://localhost:3000/api/auth/callback/google).WAYFORPAY_* / Stripe / PayPal before retrying.| Scripts | npm run type-check, npm run build (build runs type-check) |
Health’s Postgres detection uses DATABASE_BACKEND=postgresql or DB_HOST / POSTGRES_HOST — not the string DB_BACKEND_MODE alone. Keep both families aligned with env.local.template so services.database reports postgresql when you expect it.
Same-workflow: auth and database fixes when a checklist row stays red.