Inspiration

I had recently been reading Greek mythology and wanted to create something genuinely useful inspired by one of its gods. While exploring different myths, Lethe's purpose immediately excited me

I imagined an app anyone could use to log the moments of everyday life, learn from them, avoid repeating the same mistakes and gradually improve with a thoughtful companion that can stay with them for years. The goal was not another diary or isolated chatbot, but a private place where memory helps someone become who they want to be.

What it does

Lethe is a local-first growth journal with a whole-user context Brain. A person records ordinary moments, receives grounded reflections, asks for advice across their life, and explicitly approves only the patterns worth carrying forward.

The Brain does not paste a lifetime transcript into every prompt. It assembles a bounded context pack from relevant and recent journal moments, pinned moments, user-approved patterns and prior Lethe advice. Every answer contains a “What Lethe remembered” receipt showing what shaped the response, what was only considered, and which model and persona version were used.

Lethe also provides a controlled counterfactual. Mnemosyne answers with the remembered profile; Lethe temporarily releases selected memories for an isolated answer. The resulting memory check reveals whether an old pattern is actually steering the recommendation.

After a reflection, a user may carry one small experiment forward. Lethe later asks what happened, without streaks, overdue counters or shame mechanics.

How we built it

I used Codex for literally every stage of the project, starting from a blank folder: exploring the mythology, shaping the product, planning the experience, writing the frontend and backend, building the Supabase schema and policies, debugging the local ChatGPT connection, refining Lethe's personality and testing complete user journeys with Playwright. Building this way was an excellent experience because I could move continuously from an idea, to a working feature, to verification without breaking the creative flow.

Under the hood, Lethe uses React, TypeScript and a Next-compatible App Router. Supabase provides email authentication, Postgres persistence and Row Level Security. Journal saves, reflections, recommendations and follow-up resolutions use transactional database functions and client operation IDs, so retries return the canonical result rather than duplicating private data.

Both AI paths default to the GPT-5.6 family alias. API-key users call GPT-5.6 through the OpenAI Responses API with Structured Outputs. ChatGPT subscribers can instead connect a loopback-only Codex app-server companion. OAuth tokens stay in a private credential home on the owner’s computer; the browser and Supabase never receive them. The companion runs generation in fresh empty directories with command, file, network, web, app and plugin tools disabled.

How Codex accelerated the project

Codex was the primary engineering collaborator throughout the Build Week implementation. It helped turn product conversations into working vertical slices: the Supabase schema and RLS policies, transactional retry semantics, the bounded Brain retrieval system, context provenance receipts, the Codex app-server bridge, structured-output schemas, automated regression tests and the responsive four-state Lethe presence animation.

Codex also shortened the design loop. We repeatedly tested the live app, identified where it felt like a generic SaaS dashboard or chatbot, and rebuilt the experience around two clear gestures: Lethe looks away while the user journals and turns to listen when asked for help.

The human decisions were the product boundaries: user-approved durable memory, no silent identity inference, receipts for recalled context, no streak-based pressure, a measured mythic voice, and a local-first open-source distribution model.

Challenges

The hardest creative challenge was bringing the personality of Lethe into the product without turning her into excessive mythological roleplay. She needed to feel calm, private and present: looking away while someone journals, turning to listen when asked, and speaking with the restraint of a companion rather than a generic assistant. Codex helped research that balance and turn it into the visual design, animation and agent voice.

The hardest trust challenge was making whole-person memory useful without making it creepy. Relevance had to be bounded, inspectable and revocable. A second challenge was reliability: an AI request can time out after the database has committed, so every important write needed idempotent operation IDs and transactional replay. The local ChatGPT connection added a third security boundary because OAuth material could not enter browser JavaScript, Supabase or application logs.

Accomplishments

  • A working consent-based Brain rather than an opaque transcript dump
  • Stored context receipts with provider, model and persona provenance
  • User-controlled recall, pinned moments and explicit pattern approval
  • A controlled Lethe/Mnemosyne memory counterfactual
  • A gentle next-day return ritual without gamified pressure
  • A loopback-only ChatGPT/Codex connection with tools disabled
  • Row Level Security and transactional retry protection throughout the backend
  • 38 application contracts and 8 companion protocol/security tests
  • A distinctive animated mythic identity that still behaves like a simple app

What we learned

AI memory is not only a retrieval problem; it is a consent and interface problem. Showing the user exactly what shaped an answer changes memory from an invisible capability into a relationship they can inspect. We also learned that forgetting should not mean deletion. Often the useful operation is to preserve the fact while loosening its authority over the next decision.

What's next

The next step is a fully local database option alongside Supabase, followed by export/import tooling, encrypted backups and small user-authored Brain rules. The core principle will remain unchanged: Lethe may remember only in ways the owner can see, understand and undo.

Built With

  • api
  • app-server
  • chatgpt
  • cloudflareworkers
  • codex
  • gpt-5.6
  • next.js
  • openai
  • postgresql
  • react
  • responses
  • rls
  • structuredoutputs
  • supabase
  • tailwindcss
  • typescript
  • vinext
  • zod
Share this project:

Updates