KrinosAI — Environment Configuration
Template ID: TPL-05-04 | Stage: 05-Development-Setup | Version: 0.3
Record: KAI-VORAL-ENV-001 — retrospective draft for Visionary Oral. Not approved.
Purpose: Define each environment, what data it may hold, how it is built from code, and how drift is detected.
Required inputs: HLD deployment view; DPIA data classes; infrastructure code.
Document control
| Field |
Required entry |
| Document ID |
KAI-VORAL-ENV-001 |
| Template used |
TPL-05-04 Environment Configuration v0.3 |
| Product / project / software version or commit SHA |
VORAL (Visionary Oral) / PRJ-001 / a6b4429e3165 (branch app_dev of AI-Dental-Project/Visionary_Oral) |
| Record status and version |
Draft v0.1 |
| Author / technical reviewer / quality reviewer |
Claude Code (drafted with Claude Code for KrinosAI) / Tech Lead (name to be assigned) / Security & Privacy Officer (name to be assigned) |
| Created / updated / approved dates |
2026-10-27 / 2026-10-27 / Pending |
| Applicable SOP and revision |
SOP-LC-05 v0.3 |
| Related issue, commit, requirement and evidence links |
KAI-VORAL-HLD-001 §2; mobile/eas.json |
| Approver and decision record |
Pending |
Applicability and evidence baseline
Product / system boundary: Web app and API (dentalapp/), doctor/admin mobile app (mobile/), PDF Lambda (dentalapp/pdf-lambda/) at a6b4429e3165, and the external services they call.
Related approved requirements, risks and change records: None approved. Related drafts are listed in document control.
Retrospective record? Yes — follows the Retrospective Documentation Protocol (KrinosAI lifecycle pack, 05-References/). Items are labelled Observed (code or Git at a6b4429), Measured (dated run), Stated (named person, dated) or Not recorded. Observed from the repository, Git and build configuration at a6b4429; GitHub settings (branch protection, access lists) are not visible in the repository and are Not recorded unless stated.
Acceptable evidence: an implementation reference (file:line at a commit SHA), a dated test record, a signed decision, a vendor agreement, or another independently verifiable artifact. Never invent approvals, clinical results, measurements or performance data.
1. Environments and data-class boundaries
| Env |
Purpose |
Data allowed |
Account |
| Production |
Live service |
Real patient data |
Host not recorded — OPEN-022 |
| Development (local) |
Developer machines (npm run dev) |
Must be synthetic — not enforced (OPEN-040) |
Developer |
| Staging |
None — OPEN-040 |
— |
— |
| Mobile preview builds |
Testers (eas.json preview profile → production API) |
Real data (points to production) |
Expo krinos_ai |
2. Infrastructure as code and versions
| Item |
Entry |
| Infrastructure as code |
None in repository (only .vercelignore, mobile/eas.json) |
| Versions |
Next.js 16.0.7; Expo SDK 57; Node runtime routes (export const runtime = 'nodejs') |
3. Secrets and identity configuration
| Env |
Secret source |
Identity provider |
| Production |
Host env vars (OPEN-041) |
Clerk (live keys in mobile/eas.json publishable key) |
| Development |
.env files (git-ignored; mobile/.env.example committed) |
Clerk |
4. Logging metrics tracing and alerts
| Env |
Logs |
Metrics / traces |
Retention |
| Production |
console.* to host logs |
None — OPEN-043 |
Host default (not recorded) |
5. Networking isolation and backup
| Env |
Network |
Backups |
| Production |
Public internet; DB network rules not recorded |
Not recorded — OPEN-035 |
6. Environment parity and drift checks
| Item |
Entry |
| Parity |
Preview builds use production — no isolation (OPEN-040) |
| Drift checks |
None; production lagged app_dev on 2026-10-25 (OPEN-022) |
7. Provisioning rollback and decommission
| Action |
Procedure |
| Rollback |
Redeploy previous commit on the host (not documented) |
| Decommission |
Not applicable |
Open issues and decisions
| ID |
Specific gap or decision |
Responsible owner |
Due date |
Blocks gate? |
Evidence required |
Status |
| OPEN-001 |
Tracker project ID, named requester and sponsor, and named reviewers are not recorded |
Product Owner |
2026-11-10 (proposed) |
Yes |
Tracker entry; names with roles |
Open |
| OPEN-007 |
Credential files committed to Git: dentalapp/google-credentials.json, dentalapp/mongoDb_usernamePassword (contents not opened) |
Security & Privacy Officer |
2026-10-31 (proposed) |
Yes |
Credentials rotated; files removed and purged from history; confirmation |
Open |
| OPEN-022 |
Production hosting (Vercel vs Render), deployed version and dated integration checks for Clerk, MongoDB, R2, AWS, OpenRouter, Groq, Cashfree and Resend not recorded |
Tech Lead |
2026-11-30 (proposed) |
No |
Environment record (stage 05) with dated checks |
Open |
| OPEN-035 |
No database schema definition, migrations or index plan in the repository (MongoDB collections created implicitly); backup and restore not recorded |
Backend Lead |
2026-11-30 (proposed) |
No |
Schema/validation rules and index list; backup and restore test |
Open |
| OPEN-040 |
No staging environment or documented environment separation; which data each environment may hold is not recorded |
Tech Lead |
2026-11-30 (proposed) |
No |
Environment record with staging and data-class rules |
Open |
| OPEN-041 |
No secrets vault, rotation schedule or access recertification; secrets live in host environment variables (and two were committed — OPEN-007) |
Security & Privacy Officer |
2026-11-30 (proposed) |
Yes |
Vault or managed secrets with rotation dates |
Open |
| OPEN-043 |
No structured logging, metrics, uptime monitoring or alerting; logs are console.* only |
Tech Lead |
2026-11-30 (proposed) |
Yes |
Monitoring and alerting in place with an on-call contact |
Open |
Review and approval
| Review role |
Named individual |
Decision |
Date |
Signed / controlled record |
| Author |
Claude Code (drafted with Claude Code) |
Draft |
2026-10-27 |
This file at the commit that adds it |
| Technical reviewer |
Tech Lead (name to be assigned) |
Pending |
Pending |
Pending |
| Quality / regulatory reviewer (if applicable) |
Qualified regulatory reviewer (name to be assigned) |
Pending |
Pending |
Pending |
| Authorized approver |
Tech Lead (name to be assigned) |
Pending |
Pending |
Pending |