Architecture & Infrastructure
Journetta is more than a chat interface. Behind it runs its own infrastructure: Supabase Edge Functions, a multi-layer prompt pipeline, and a memory system built on real vector search rather than a simple chat window. Here's a look at how that actually works behind the scenes.
System-Prompt Pipeline
The chat runs through its own Supabase Edge Function. On every message, the system prompt is rebuilt from scratch - not from a fixed template, but from up to six layers pulled together in real time from different sources before any request ever reaches the language model.
Fixed rules for conversation flow, tone, and coaching-phase transitions - written once, independent of the user's language.
Name, tone of voice, and special instructions from the user's own settings, loaded fresh from the database on every request.
One of six specialized coach personas, chosen automatically based on the topic (multi-agent routing).
Goals, vision, and open commitments straight from the user's own data - no separate lookup, part of the same request.
The most relevant memories, found through similarity search over embeddings (Retrieval-Augmented Generation) instead of plain keyword matching.
A continuously updated conversation summary plus the last messages verbatim, so the model's context window never overflows.
Together, this adds up to a freshly built, fitting system prompt for every single reply.
Memory & RAG
Journetta's long-term memory is built on Retrieval-Augmented Generation: Postgres with the pgvector extension as the vector database, plus an HNSW index for fast similarity search. Memories aren't created during the chat itself - they come from a separate pipeline running in the background.
New conversations are automatically scanned for recurring themes and insights - no one has to actively flag or save anything.
Memories are stored as vectors, so content with the same meaning gets found even when it's phrased differently.
Memories that already exist in substance get recognized and reinforced instead of saved again - robust, recurring patterns emerge over time as a result.
On every new message, exactly the memories most relevant to the current conversation get pulled in.
Memory in several layers
Beyond individual memories, Journetta builds a few more layers of memory - from condensed summaries spanning weeks and months to careful hypotheses about the user. Behind that sit several small, specialized background processes instead of one big one.
Alongside the running conversation summary, a separate workflow aggregates memories over longer stretches of time into higher-level reports - making recurring themes visible across weeks and months.
A weekly process derives careful hypotheses about the user from the memories gathered so far - visible and explicitly contestable, not silent profiling in the background.
Another background process detects moments where someone seems stuck and turns them into its own conversation impulses for the next proactive message - independent of any active chat session.
Fact extraction, writing-style learning, summarization, and overnight impulses all run as separate workflows, each with its own focused AI call - instead of a single do-everything prompt.
Several coaches, one conversation
Instead of one generic system prompt, Journetta keeps six independent coach personas in the database. A classification step figures out which one fits each message and switches mid-conversation the moment the topic noticeably changes.
Professional topics, conflicting priorities, decisions
Habits, routines, procrastination
Stress, self-doubt, inner blocks
Conflict, communication, closeness
Values, identity, open questions
Everything in between - the most common case
Automation in the background
A lot of what makes Journetta work doesn't happen during the chat itself, but afterwards: a separate network of n8n workflows, running on schedules, accessing the same data as the chat through the Supabase API.
Runs automatically in the background, processes new conversations with an AI call, and writes the results back into the database.
Dedicated schedules regularly check for recurring patterns or open commitments and trigger a push message when it makes sense.
Dedicated jobs summarize the week or month, have a language model write a synthesis, and store the result.
Every workflow lives as its own file in the same repository as the rest of the code - traceable instead of scattered.
Native App & Push
At its core, Journetta is a Nuxt application embedded into a native Android app via Capacitor. Instead of maintaining two separate codebases, the app loads the live web version - native features like push notifications still run through real native bridges.
One single Nuxt codebase, extended with native plugins and an Android build through Capacitor.
Notifications run through a dedicated edge function and OneSignal, including their own device management - not directly through Firebase.
Proactive messages and reminders run through the same code for both web push and native push - one path instead of two.
Infrastructure & Privacy
The entire infrastructure runs on Supabase. Only the content users write themselves ever reaches the AI models - never a name, email address, or other directly identifying data. That's built into the system, not just a policy.