db: Appwrite schema (isletmem db, 11 tables, indexes) + SDK helpers
- Created database 'isletmem' with 11 tables via Appwrite MCP: tenant_settings, customers, services, software, customer_software, calendar_events, tasks, finance_entries, invoices, invoice_items, audit_logs - All tables use rowSecurity=true; row-level perms scoped to Appwrite Team (tenant) - 18 indexes (composite on tenantId + queried columns; unique for invoice numbers, tenant_settings) - src/lib/appwrite/schema.ts as TS source of truth (DATABASE_ID, TABLES, row types) - src/lib/appwrite/client.ts (browser SDK) - src/lib/appwrite/server.ts (node-appwrite admin + session clients) - .env.example template, .env.local for dev (gitignored) - typecheck script added
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
# Appwrite (self-hosted, v1.9.0)
|
||||
NEXT_PUBLIC_APPWRITE_ENDPOINT=https://db.kovaksoft.com/v1
|
||||
NEXT_PUBLIC_APPWRITE_PROJECT_ID=
|
||||
NEXT_PUBLIC_APPWRITE_DATABASE_ID=isletmem
|
||||
|
||||
# Server-only — Appwrite API key with sufficient scopes
|
||||
# (databases.read/write, tables.read/write, users.read/write, teams.read/write)
|
||||
APPWRITE_API_KEY=
|
||||
|
||||
# App
|
||||
APP_URL=http://localhost:3000
|
||||
Reference in New Issue
Block a user