diff --git a/.env.example b/.env.example index a06b583..7478abd 100644 --- a/.env.example +++ b/.env.example @@ -7,7 +7,7 @@ # Production default is https://api.kaffepos.my.id when this value is empty. # Set this only when you want to override that behavior. VITE_API_BASE_URL= -VITE_INSFORGE_URL=https://6x4q2bgn.ap-southeast.insforge.app +VITE_INSFORGE_URL=https://849uckhn.ap-southeast.insforge.app VITE_INSFORGE_ANON_KEY= # ── App Config ──────────────────────────────────────────────────── diff --git a/AGENTS.md b/AGENTS.md index e49fb0b..e02a138 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -5,7 +5,7 @@ This project uses [InsForge](https://insforge.dev): an all-in-one, open-source Postgres-based backend (BaaS) that gives this app a database, authentication, file storage, edge functions, realtime, an AI model gateway, and payments through one platform. -- **Project:** **kaffepos-v2** (API base `https://6x4q2bgn.ap-southeast.insforge.app`) +- **Project:** **Kaffe POS** (API base `https://849uckhn.ap-southeast.insforge.app`) - **Skills:** these InsForge skills are installed for supported coding agents. Reach for them before implementing any InsForge feature instead of guessing the API: - `insforge`: app code with the `@insforge/sdk` client (database CRUD, auth, storage, edge functions, realtime, AI, email, and Stripe payments). - `insforge-cli`: backend and infrastructure via the `insforge` CLI (projects, SQL, migrations, RLS policies, storage buckets, functions, secrets, payment setup, schedules, deploys). diff --git a/README.md b/README.md index ef5aa5c..6bb9ede 100644 --- a/README.md +++ b/README.md @@ -214,7 +214,7 @@ The repair command reads ignored local staging env files, requires `STAGING_PROF - **Session Management:** Custom (SHA-256 token hashing) ### Infrastructure & Cloud Services -- **Cloud Backend & Database:** InsForge Cloud PostgreSQL (`6x4q2bgn.ap-southeast.insforge.app`, 46 tables with full RLS + 160+ indexes) & InsForge Edge Functions (`@insforge/sdk`) +- **Cloud Backend & Database:** InsForge Cloud PostgreSQL (`849uckhn.ap-southeast.insforge.app`, 46 tables with full RLS + 160+ indexes) & InsForge Edge Functions (`@insforge/sdk`) - **Payment Gateway:** Mayar Headless API v2 (`https://api.mayar.id/hl/v2` production / `https://api.mayar.io/hl/v2` sandbox) - **CDN & Storage:** Cloudflare CDN & R2 / InsForge Storage - **Transactional Email:** Resend diff --git a/backend/.env.example b/backend/.env.example index 4a07423..e3afc27 100644 --- a/backend/.env.example +++ b/backend/.env.example @@ -22,12 +22,12 @@ CLOUDFLARE_IMAGES_ACCOUNT_HASH= CLOUDFLARE_IMAGES_DELIVERY_URL= # InsForge Cloud & PostgreSQL Database (prefer DATABASE_URL in staging/production). -INSFORGE_PROJECT_ID=0246a183-d8b0-4de6-8d41-9240e2380d50 -INSFORGE_URL=https://6x4q2bgn.ap-southeast.insforge.app +INSFORGE_PROJECT_ID=9be3a9b0-568c-4a0c-bd32-f655dcfcdc79 +INSFORGE_URL=https://849uckhn.ap-southeast.insforge.app INSFORGE_ANON_KEY= INSFORGE_API_KEY= -DATABASE_URL=postgresql://postgres:replace-me@6x4q2bgn.ap-southeast.database.insforge.app:5432/insforge?sslmode=require -DB_HOST=6x4q2bgn.ap-southeast.database.insforge.app +DATABASE_URL=postgresql://postgres:replace-me@849uckhn.ap-southeast.database.insforge.app:5432/insforge?sslmode=require +DB_HOST=849uckhn.ap-southeast.database.insforge.app DB_PORT=5432 DB_NAME=insforge DB_USER=postgres diff --git a/backend/src/core/db.test.ts b/backend/src/core/db.test.ts index 8105dd2..95cc116 100644 --- a/backend/src/core/db.test.ts +++ b/backend/src/core/db.test.ts @@ -42,7 +42,7 @@ describe('database SSL config', () => { DB_SSL: 'false', DB_SSL_REJECT_UNAUTHORIZED: 'true', DB_SSL_CA: undefined, - DATABASE_URL: 'postgresql://postgres:secret@6x4q2bgn.ap-southeast.database.insforge.app:5432/insforge?sslmode=require', + DATABASE_URL: 'postgresql://postgres:secret@849uckhn.ap-southeast.database.insforge.app:5432/insforge?sslmode=require', })).toMatchObject({ rejectUnauthorized: true }); }); }); diff --git a/backend/src/core/insforge.test.ts b/backend/src/core/insforge.test.ts index 7810c24..dd8ef32 100644 --- a/backend/src/core/insforge.test.ts +++ b/backend/src/core/insforge.test.ts @@ -10,7 +10,7 @@ describe('InsForge backend integration helpers', () => { it('identifies InsForge managed PostgreSQL hostnames', () => { expect( isInsforgeDatabaseTarget( - 'postgresql://postgres:secret@6x4q2bgn.ap-southeast.database.insforge.app:5432/insforge?sslmode=require', + 'postgresql://postgres:secret@849uckhn.ap-southeast.database.insforge.app:5432/insforge?sslmode=require', ), ).toBe(true); expect(isInsforgeDatabaseTarget('postgresql://kaffepos:secret@localhost:5432/kaffepos')).toBe( diff --git a/backend/src/core/insforge.ts b/backend/src/core/insforge.ts index 153d579..6093719 100644 --- a/backend/src/core/insforge.ts +++ b/backend/src/core/insforge.ts @@ -6,8 +6,8 @@ import type { createAdminClient, createClient } from '@insforge/sdk'; import { env } from './env'; import { isManagedTlsDatabaseUrl } from './db'; -export const INSFORGE_DEFAULT_PROJECT_ID = '0246a183-d8b0-4de6-8d41-9240e2380d50'; -export const INSFORGE_DEFAULT_HOST = 'https://6x4q2bgn.ap-southeast.insforge.app'; +export const INSFORGE_DEFAULT_PROJECT_ID = '9be3a9b0-568c-4a0c-bd32-f655dcfcdc79'; +export const INSFORGE_DEFAULT_HOST = 'https://849uckhn.ap-southeast.insforge.app'; export function isInsforgeDatabaseTarget(databaseUrl = env.DATABASE_URL): boolean { if (!databaseUrl) return false; diff --git a/insforge.toml b/insforge.toml index 0d3d1cc..a5e22f4 100644 --- a/insforge.toml +++ b/insforge.toml @@ -1,8 +1,8 @@ [project] -id = "0246a183-d8b0-4de6-8d41-9240e2380d50" -name = "kaffepos-v2" +id = "9be3a9b0-568c-4a0c-bd32-f655dcfcdc79" +name = "Kaffe POS" region = "ap-southeast" -host = "https://6x4q2bgn.ap-southeast.insforge.app" +host = "https://849uckhn.ap-southeast.insforge.app" [database] migrations_directory = "migrations" diff --git a/insforge/functions/kaffepos-status.ts b/insforge/functions/kaffepos-status.ts index a94523a..a581fc8 100644 --- a/insforge/functions/kaffepos-status.ts +++ b/insforge/functions/kaffepos-status.ts @@ -23,7 +23,7 @@ export default async function (req: Request): Promise { } const startedAt = Date.now(); - const baseUrl = Deno.env.get('INSFORGE_URL') || 'https://6x4q2bgn.ap-southeast.insforge.app'; + const baseUrl = Deno.env.get('INSFORGE_URL') || 'https://849uckhn.ap-southeast.insforge.app'; const anonKey = Deno.env.get('INSFORGE_ANON_KEY') || Deno.env.get('ANON_KEY') || ''; try { diff --git a/scripts/smoke-insforge-backend.mjs b/scripts/smoke-insforge-backend.mjs index 452aeae..1c39fec 100644 --- a/scripts/smoke-insforge-backend.mjs +++ b/scripts/smoke-insforge-backend.mjs @@ -39,7 +39,7 @@ const insforgeUrl = process.env.INSFORGE_URL || backendEnv.INSFORGE_URL || rootEnv.VITE_INSFORGE_URL || - 'https://6x4q2bgn.ap-southeast.insforge.app'; + 'https://849uckhn.ap-southeast.insforge.app'; const insforgeAnonKey = process.env.INSFORGE_ANON_KEY || backendEnv.INSFORGE_ANON_KEY || diff --git a/src/lib/insforge.ts b/src/lib/insforge.ts index 7443dbd..7639747 100644 --- a/src/lib/insforge.ts +++ b/src/lib/insforge.ts @@ -1,6 +1,6 @@ import { createClient } from '@insforge/sdk'; -export const INSFORGE_DEFAULT_HOST = 'https://6x4q2bgn.ap-southeast.insforge.app'; +export const INSFORGE_DEFAULT_HOST = 'https://849uckhn.ap-southeast.insforge.app'; const rawBaseUrl = (import.meta.env.VITE_INSFORGE_URL as string | undefined)?.trim(); const rawAnonKey = (import.meta.env.VITE_INSFORGE_ANON_KEY as string | undefined)?.trim();