Leia em Português · Lee en Español · Try the Demo · Quick Start · Contributing
A son asks: "Dad, what is courage to you?" — ALMA responds using real memories, adapted to his age.
ALMA is a platform that lets you preserve your voice, values, and memories for the people you love — so they can talk to you even when you're no longer there.
It's not a chatbot. It's not a memorial page. It's a living archive of who you are, powered by RAG (Retrieval-Augmented Generation) and AI, that your children, partner, parents, or friends can have real conversations with — and hear answers that sound like you, because they're built from your own words.
Think of it as a backup of your soul.
alma-demo.netlify.app — Login:
Lucas/demo123The demo uses fictional data (a character named Rafael Mendes). No real personal information.
ALMA started from a real emotional-legacy use case.
The core idea is simple: many people want to leave behind more than photos, documents, and assets. They want to leave voice, context, values, mistakes, stories, and guidance for the people they love.
The project was then turned into an open-source platform so anyone can run their own version with their own writing, relationships, memories, and tone.
ALMA is free. ALMA is open source. Because every person who wants to leave something real behind deserves the tools to do it.
| Feature | ALMA | Typical "memorial" tools |
|---|---|---|
| Conversations | Real-time AI chat based on your actual words | Pre-recorded video clips |
| Context-aware | Adapts tone per person (child vs. partner vs. parent) | Same content for everyone |
| Self-correcting | Author can correct AI responses in real-time | Static, no feedback loop |
| Content moderation | AI-powered moderation on all user inputs | None |
| Searchable memory | Full-text search across all memories (RAG) | Manual browsing only |
| Directive system | Per-person behavioral rules for the AI | No customization |
| Multi-language | i18n ready (PT-BR, EN, ES — add your own) | Single language |
| Free & open | MIT License, zero cost to run | $100+/month subscriptions |
| Self-hosted | Your data stays yours (Netlify + Neon free tier) | Vendor lock-in |
┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ Your Son │────▶│ ALMA Chat │────▶│ Claude AI │
│ asks a │ │ (Frontend) │ │ (Anthropic) │
│ question │ └──────┬───────┘ └──────▲───────┘
└──────────────┘ │ │
▼ │
┌──────────────┐ ┌──────────────┐
│ Netlify │────▶│ RAG Engine │
│ Functions │ │ Search your │
│ (Backend) │ │ memories in │
└──────────────┘ │ Neon DB │
└──────────────┘
- Someone asks a question — "Dad, what do I do when I feel like I'm not enough?"
- ALMA searches your memories — Full-text search with person-aware reranking
- Builds context — Pulls relevant memories + corrections + directives + tone config
- AI responds as you — Using your actual words as foundation, not generic responses
- You can correct it — If the AI gets your voice wrong, correct it. ALMA learns.
ALMA runs on free infrastructure. You can deploy your own instance in under 30 minutes.
- A Netlify account (free tier)
- A Neon PostgreSQL database (free tier)
- An Anthropic API key (for Claude AI)
- (Optional) An ElevenLabs API key (for voice synthesis)
- Node.js 18+
# 1. Clone the repository
git clone https://github.com/your-user/alma.git
cd alma
# 2. Install dependencies
npm install
# 3. Configure environment
cp .env.example .env
# Edit .env with your DATABASE_URL and ANTHROPIC_API_KEY
# 4. Initialize the database
node db/run-seed.mjs
# 5. Deploy to Netlify
npx netlify-cli deploy --prod --dir=. --functions=netlify/functions- Open your ALMA site
- Log in as admin
- Start adding your memories — write about your values, your stories, your mistakes, your love
- Share the login with the people you want to talk to
- Correct the AI when it doesn't sound like you — ALMA learns from every correction
alma/
├── index.html # Dashboard / home
├── chat.html # Chat interface
├── admin.html # Admin panel (memories, corrections, directives)
├── login.html # Authentication with i18n
├── css/
│ ├── style.css # Main styles
│ └── admin.css # Admin panel styles
├── js/
│ ├── alma.js # Chat engine + correction system + directives
│ └── i18n.js # Internationalization system
├── netlify/
│ └── functions/
│ ├── auth.mjs # Auth with bcrypt + auto-migration
│ ├── chat.mjs # RAG chat engine with person-aware reranking
│ ├── memories.mjs # Memory CRUD + corrections + directives + moderation
│ └── alma-voice.mjs # TTS proxy (ElevenLabs voice synthesis)
├── locales/
│ ├── en.json # English
│ ├── es.json # Spanish
│ └── pt-BR.json # Portuguese (Brazil)
├── db/
│ ├── seed.sql # Database schema
│ ├── run-seed.mjs # Schema runner
│ ├── seed-demo.sql # Demo data (fictional)
│ ├── run-seed-demo.mjs # Demo seeder
│ ├── backup.mjs # Database backup to JSON
│ └── import-json.mjs # CLI tool to import memory chunks from JSON
├── docs/
│ └── banner.svg # README banner
├── netlify.toml # Netlify config (redirects, headers, security)
└── package.json
- Frontend: Vanilla HTML/CSS/JS — no framework, no build step, fast everywhere
- Backend: Netlify Functions (serverless) with ESBuild bundling
- Database: Neon PostgreSQL (serverless) with configurable full-text search (
SEARCH_LANGUAGE— supports any language) - AI: Anthropic Claude (Sonnet) via API
- Voice: ElevenLabs TTS (optional — hear ALMA speak)
- Security: bcrypt password hashing, CORS lockdown, content moderation
- Auth: Token-based sessions stored in database
- i18n: JSON locale files with auto-detection (PT/EN/ES)
ALMA takes data protection seriously:
- Bcrypt password hashing — Passwords auto-migrate from plain text on first login
- CORS lockdown — API only responds to the configured domain
- Content moderation — All corrections and directives pass through AI moderation before saving
- Sensitive data removed from code — Children's psychological profiles stored in DB only, not in source code
- Database isolation — Demo and production use completely separate databases
- Chunks: Your memories are stored as searchable text chunks in PostgreSQL with
tsvectorindexing. The search language is configurable viaSEARCH_LANGUAGEenv var (simplefor universal,portuguese,english,spanish, etc.) - RAG: When someone asks a question, ALMA searches for relevant chunks using full-text search + tag mapping + person-aware reranking, then injects them as context for the AI
- Person-aware reranking: Memories tagged with the current person's name get boosted in search results
- Corrections: If the AI gets something wrong, the author corrects it. Corrections are injected into future prompts with highest priority
- Directives: Per-person or global behavioral rules (e.g., "Avoid comparing siblings")
- Person Context: ALMA adapts its tone based on who's talking — a child hears "Dad", a sibling hears "bro", a mother hears "son"
- Copy
locales/en.jsontolocales/your-language.json - Translate all strings
- Submit a pull request
That's it. The community can help translate ALMA into every language on Earth.
ALMA is bigger than one person. We welcome contributions of all kinds:
- Translations — Help ALMA speak your language
- Code — Bug fixes, new features, performance improvements
- Documentation — Guides, tutorials, how-tos
- Stories — Share how you're using ALMA (with permission)
See CONTRIBUTING.md for guidelines.
- Core chat with RAG memory search
- Per-person tone adaptation
- Correction system (human-in-the-loop)
- Directive system (per-person + global)
- Admin panel for memory management
- Multi-language support (PT/EN/ES)
- Bcrypt auth + CORS lockdown
- Content moderation (AI-powered)
- Person-aware memory reranking
- Demo site with fictional data
- Age-aware responses (adapts tone to child's current age)
- Conversation history (persistent, saved per person)
- PWA support (installable, offline-capable)
- Voice synthesis via ElevenLabs TTS (hear ALMA speak)
- Visual memory browser (BD Revisor — browse, filter, edit chunks)
- SQL import system for structured memory batches
- Self-hosted AI mode (Ollama/LM Studio) — see proposal
- One-click setup wizard
- Import from journals, WhatsApp exports, voice memos
- "Letter mode" — scheduled messages for future dates
MIT License — free for everyone, forever. See LICENSE.
"Legacy is context, not just remembrance."
ALMA started as a deeply personal project and became something bigger — an invitation for anyone who wants to leave behind more than photos and possessions.
Your voice matters. Your story matters. Your mistakes and your love and your values — they matter.
ALMA gives you the tools to make sure they're never lost.
Built with love by the ALMA community.