Find out why you are the way you are.
Roots is not a chatbot. It is a guided psychological excavation — taking you through four layers of depth to surface the root cause of how you feel, why you behave the way you do, and who you actually are underneath it all.
Most apps help you manage how you feel. Roots helps you understand why you feel it.
The experience is built around one structured journey:
- ⛏️ Excavation — a 40-question session across four psychological depth layers, each one going deeper than the last
- 👁️ Root Reveal — a structured, personalized insight generated from everything you shared
- 🧠 Living Memory — your answers, patterns, and profile accumulate across sessions so the app genuinely knows you over time
- 🌱 Healing — daily practices, reflections, and a visual self-map that grows as you grow
The organizing question behind every product decision: does this make the app feel like it genuinely knows the user?
The entire premise of the application is that our daily struggles — anxiety, relationship tension, procrastination, or burnout — are merely symptoms. They are the leaves of a tree. To create lasting psychological change, you have to dig up the Root.
In Roots, your Root is a multi-dimensional psychological profile compiled from your answers, consisting of:
- 🗡️ The Core Wound: The foundational event, environment, or early relationship dynamic that taught you a specific lesson about safety, worth, and survival (represented by Hero Archetypes like Batman's "Abandonment" or Tyler Durden's "False Identity").
- 🔗 Attachment Style: How that root wound informs your subconscious rules for human connection, intimacy, and trust.
- ⚡ Trauma Response: Your default physiological reaction to stress (Fight, Flight, Freeze, or Fawn).
- 🧩 Core Schema: The deeply ingrained, unconditional belief about yourself and the world (e.g., Defectiveness, Relentless Standards, Subjugation).
- 🫀 Nervous System Baseline: Your autonomic baseline (Sympathetic hyperarousal vs. Dorsal vagal shutdown) when you feel threatened.
By the end of your initial 40-question Excavation, the AI pipeline analyzes your linguistic patterns, avoidances, and emotional resonances to determine your unique Root Profile. This Profile becomes the lens through which every future interaction in the app happens — from the personalized daily healing practices it creates, to the memory-aware Talk responses it generates.
The core of Roots is a single 40-question excavation structured across four layers:
| Layer | Questions | Purpose |
|---|---|---|
| The Surface | 1 – 10 | What you're feeling right now |
| The Patterns | 11 – 20 | Recurring behaviors and responses |
| The Origin | 21 – 30 | Where those patterns first appeared |
| The Root | 31 – 40 | The core belief or wound underneath everything |
Each answer generates a micro-insight before the next question arrives. The session ends with a full root reveal streamed directly from your transcript.
Auth → Welcome → Hero Selection → Excavation → Root Reveal → Main App
Inside the main app:
- 💬 Talk — open-ended conversation that remembers your history
- ❤️🩹 Healing — daily reflection question + personalized practices + progress tracking
- 📍 Self Map — a visual map of your patterns, triggers, and healing state
- 📋 Core Report — your full psychological profile, built from everything you've shared
┌─────────────────────────────────────┐
│ Frontend · Vercel │
│ React + Vite + TypeScript │
│ Tailwind · Framer Motion · Zustand │
└────────────────┬────────────────────┘
│ HTTPS · JSON · SSE
▼
┌─────────────────────────────────────┐
│ Backend · Render │
│ Node.js + Express │
│ JWT auth · Mongoose · SSE streams │
│ │
│ Services: │
│ excavation · talk · healing │
│ profile · map · session pipeline │
└──────┬──────────────────────────────┘
│
├──► NVIDIA · Gemma 3 (excavation, profile, schema work)
├──► NVIDIA · Gemma 3 (healing generation)
│
▼
┌─────────────────────────────────────┐
│ MongoDB Atlas │
│ Users · Sessions · Layers │
│ Profiles · Messages · Map Nodes │
│ Healing Artifacts · Schema Tracker │
└─────────────────────────────────────┘
| Technology | |
|---|---|
| Framework | React 18 + Vite |
| Language | TypeScript |
| Styling | Tailwind CSS + custom CSS variables |
| Animation | Framer Motion |
| State | Zustand |
| HTTP | Axios + fetch SSE |
| Voice | Web Speech API |
| Technology | |
|---|---|
| Runtime | Node.js 18+ |
| Framework | Express 4 |
| Auth | JWT in httpOnly cookies |
| Database | MongoDB + Mongoose |
| Streaming | Server-Sent Events |
| Validation | express-validator + bcryptjs |
| Model | Role |
|---|---|
| Gemma 3 (NVIDIA) | Excavation questions, session summaries, schema tracking, profile rewriting |
| Gemma 3 (NVIDIA) | Healing question and practice generation |
Both are accessed via a single NVIDIA_API_KEY.
| Model | Purpose |
|---|---|
User |
Account, phase, hero, onboarding state |
Session |
Excavation or talk session lifecycle |
Layer |
Individual question/answer + micro-insight |
RawMessage |
Full transcript for every session type |
SessionSummary |
Compressed memory after each session |
LivingProfile |
Evolving internal user model with confidence-gated fields |
RootProfile |
Reveal-oriented root-cause profile |
SchemaTracker |
Long-running psychological schema signals |
SelfMapNode |
Pattern and trigger nodes for the visual map |
HealingEvent |
Breakthroughs, regressions, and healing signals |
HealingPractice |
Personalized practices with streak tracking |
DailyPractice |
Today's reflection question and response |
IdentityCard |
User and AI-generated identity statements |
After every excavation or talk session, the backend runs a full memory enrichment pipeline:
- Generate a dense
SessionSummary - Classify healing signals and regressions from the transcript
- Rewrite the
LivingProfilewith confidence gating - Detect and resolve conflicts against existing confirmed fields
- Merge healing-progress markers
- Upsert
SelfMapNodeentries from new patterns and triggers
This is what makes Talk, Healing, and the Core Report feel connected to who you actually are — not just what you typed today.
Roots/
├── backend/
│ ├── server.js
│ └── src/
│ ├── config/ db · gemma 3
│ ├── constants/ heroes
│ ├── controllers/ auth · excavation · healing · map · profile · talk
│ ├── middleware/ auth · error · validator
│ ├── models/ all data models
│ ├── routes/ all API routes
│ └── services/ context · excavation prompt & pipeline · session · map · ai
├── frontend/
│ └── src/
│ ├── components/
│ ├── hooks/
│ ├── screens/ Auth · Welcome · HeroSelection · Excavation · RootReveal
│ │ CoreReport · TalkTab · HealingPage · SelfMap
│ ├── services/ sse · voice · api
│ ├── store/ zustand stores
│ └── utils/
├── render.yaml
└── README.md
| Method | Path | Purpose |
|---|---|---|
GET |
/api/auth/lookup |
Check if email exists and which provider |
POST |
/api/auth/register |
Create account and set session cookie |
POST |
/api/auth/login |
Sign in and set session cookie |
POST |
/api/auth/logout |
Clear session |
GET |
/api/auth/me |
Return current user |
PATCH |
/api/auth/hero |
Save hero selection |
PATCH |
/api/auth/onboarding |
Mark onboarding complete |
| Method | Path | Purpose |
|---|---|---|
POST |
/api/excavation/start |
Start or resume excavation |
GET |
/api/excavation/resume |
Hydrate active session and layers |
POST |
/api/excavation/layer |
SSE — micro-insight + next question |
POST |
/api/excavation/end |
Complete session and trigger pipeline |
POST |
/api/excavation/reveal |
SSE — streamed root reveal |
GET |
/api/excavation/status |
Progress and reveal readiness |
| Method | Path | Purpose |
|---|---|---|
POST |
/api/talk/start |
Create talk session |
POST |
/api/talk/message |
SSE — streamed reply |
POST |
/api/talk/end |
Complete session and trigger pipeline |
| Method | Path | Purpose |
|---|---|---|
GET |
/api/profile |
Root profile + living profile |
GET |
/api/profile/report |
Merged data for Core Report |
GET |
/api/profile/identity |
Identity cards |
POST |
/api/profile/identity |
Create identity card |
GET |
/api/profile/map |
Self-map nodes |
GET |
/api/profile/activity |
Recent healing events |
| Method | Path | Purpose |
|---|---|---|
GET |
/api/map |
All self-map nodes |
PATCH |
/api/map/:nodeId |
Update node healing state |
| Method | Path | Purpose |
|---|---|---|
GET |
/api/healing/today |
Load or generate today's healing payload |
POST |
/api/healing/practice/complete |
Toggle practice completion |
POST |
/api/healing/practice/respond |
Save daily reflection response |
- Node.js 18+
- MongoDB (local or Atlas)
NVIDIA_API_KEY
# Backend
cd backend
npm install
cp .env.example .env # fill in your values
npm run dev # runs on :3001
# Frontend (new terminal)
cd frontend
npm install
npm run dev # runs on :5173, proxies /api to :3001backend/.env
PORT=3001
NODE_ENV=development
MONGODB_URI=mongodb://localhost:27017/roots
JWT_SECRET=your-long-random-secret
JWT_EXPIRES_IN=30d
NVIDIA_API_KEY=nvapi-your-key
CLIENT_URL=http://localhost:5173frontend/.env
VITE_API_URL=/api- Root directory:
frontend - Build command:
npm run build - Output directory:
dist
VITE_API_URL=https://your-render-backend.onrender.com/apiUses render.yaml at the repo root. Set all backend env vars in the Render dashboard.
NODE_ENV=production
MONGODB_URI=...
JWT_SECRET=...
NVIDIA_API_KEY=...
CLIENT_URL=https://find-your-root.vercel.appDeploy backend first. Confirm GET /api/health returns 200. Then deploy frontend.
Roots uses JWTs in httpOnly cookies. In production, cookies are configured for cross-site use (Secure, SameSite=None, Partitioned) because the frontend (Vercel) and backend (Render) are on different origins.
The frontend sends withCredentials: true on every request.
Excavation, reveal, and talk all use Server-Sent Events — tokens stream as they are generated, not delivered all at once.
Relevant files:
frontend/src/services/sse.tsbackend/src/services/gemma.service.js
Voice input is available where the Web Speech API is supported. Excavation output is intentionally text-only.
Roots is a psychological companion. It is not a licensed therapist, medical device, or crisis service.
If you are building on this for real users, treat safety, escalation, consent, and crisis-handling as first-class requirements.