Project guide

Project Guide | The Savior

Free narrative prototype planning sheet for branching content and lightweight public demos. This guide organizes the repository's original implementation notes for interactive fiction builders and prototype reviewers.

Reviewed 2026-07-28. This page is derived from checked-in repository evidence and links back to its source.

Live Demo

Curated supporting repo This repository is kept as optional proof, but it no longer leads the portfolio. Current front door: aix-pilot and doeon-kim-portfolio. Reason: Wellness and consumer positioning are not strong enough for the main product or B2B story.

Buddhist-inspired mindfulness platform built on Cloudflare Pages + Functions + OpenAI API.

System Overview

A calm consumer AI surface that tests whether journaling, reflection, and lightweight coaching can retain users without heavy infrastructure.

AreaDetails
UsersWellness creators, small community operators, and solo users looking for low-friction reflection tools.
Technical pathValidate the demo, README, architecture notes, and quality gate before deeper workflow review.
System scopeCloudflare Pages deployment, optional local or hosted AI adapters, journaling flows, and deterministic fallbacks.
Operating boundaryThis is wellness software, not clinical care; sensitive user content needs clear privacy controls and optional local-only mode.
Evaluation pathRun the app locally or inspect the Pages deployment and fallback behavior without requiring external model keys.

Evaluation Path

Architecture Notes

Features

Quick Start

npm install
npm run dev

Open http://localhost:8788 in your browser.

Local Setup (Ollama)

ollama serve
ollama pull llama3.2:latest
npm run dev:ollama

Environment Variables (Cloudflare Pages)

See full list of rate limit and security env vars in the source.

API Endpoints

Architecture

the-savior/
  public/          # Static frontend (SPA)
  functions/api/   # Cloudflare Pages Functions (serverless)
  tests/           # Node.js tests
  ios/ android/    # Capacitor native shells

Request flow (POST /api/chat)

  1. CORS check against allowed origins
  2. Rate limiting (per-IP sliding window)
  3. Input validation (size, content-type, sanitization)
  4. Crisis keyword detection - returns hotline resources immediately if matched
  5. Provider resolution: explicit provider override, then OpenRouter server key, OpenAI BYOK/server key, Gemini server key, Ollama, or explicit offline fallback
  6. LLM call with provider-specific timeouts
  7. Error mapping to safe user-facing messages (keys never exposed)

Tests

npm run check
npm test

Deploy

npm run deploy

Mobile

npm run mobile:add:ios
npm run mobile:add:android
npm run mobile:sync

Security Notes

Cloud + AI Architecture

Enterprise Productization

System Architecture

Service Architecture

Search And Service Surface