- Rename directory keep-notes -> memento-note with all code references - Prisma: SQLite -> PostgreSQL (both app and MCP server schemas) - Sync MCP schema with main app (add missing fields, relations, indexes) - Delete 17 SQLite migrations (clean slate for PostgreSQL) - Remove SQLite dependencies (@libsql/client, better-sqlite3, etc.) - Fix MCP server: hardcoded Windows DB paths -> DATABASE_URL env var - Fix MCP server: .dockerignore excluded index-sse.js (SSE mode broken) - MCP Dockerfile: node:20 -> node:22 - Docker Compose: add postgres service, remove SQLite volume - Generate favicon.ico, icon-192.png, icon-512.png, apple-icon.png - Update layout.tsx icons and manifest.json for PNG icons - Update all .env files for PostgreSQL - Rewrite README.md with updated sections - Remove mcp-server/node_modules and prisma/client-generated from git tracking Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
5.6 KiB
5.6 KiB
Memento - Smart Note-Taking App
A modern, AI-powered note-taking application inspired by Google Keep. Built with Next.js 16, PostgreSQL, Prisma, and Tailwind CSS 4.
Features
Core
- Create, edit, delete notes with text or checklists
- Pin, archive, and organize notes into notebooks
- Labels with contextual colors
- Real-time search across all notes
- 10 soft pastel color themes + dark mode
- Responsive masonry grid layout (1-5 columns)
- Image upload with original size preservation
- Drag-and-drop note reordering
- Markdown support
AI-Powered
- Automatic title suggestions
- Semantic search across notes
- Paragraph refactoring
- Memory Echo: surfaces connections between your notes
- Multi-provider: OpenAI, Ollama, or auto-detect
MCP Server (22 Tools)
Full Model Context Protocol server for AI agent integration:
- Notes: create, read, update, delete, search, duplicate
- Notebooks: create, list, update, delete
- Labels: create, list, update, delete, assign to notes
- System: health check, stats, bulk operations
- Modes: stdio (Claude Desktop) or SSE (N8N, HTTP)
Authentication & Security
- NextAuth.js with credentials provider
- Email/password authentication
- Password reset via SMTP
- Role-based access (USER/ADMIN)
Quick Start (Local)
Prerequisites: Node.js 22, PostgreSQL 16
cd memento-note
npm install
# Configure database
cp .env.example .env
# Edit .env with your PostgreSQL connection string
# Setup database
npx prisma migrate dev --name init
# Start development server
npm run dev
Docker Deployment
Using Docker Compose (root)
# Configure environment
cp .env.docker.example .env.docker
# Edit .env.docker with your settings
# Start all services (PostgreSQL + app + MCP server)
docker compose up -d
# Check status
docker compose ps
Services:
- memento-note - Web app on port 3000
- postgres - PostgreSQL 16 on port 5432 (configurable via
POSTGRES_PORT) - mcp-server - MCP server on port 3001 (SSE mode)
- ollama - Optional local LLM (use profile
--profile ollama)
Standalone (memento-note only)
cd memento-note
chmod +x deploy.sh
./deploy.sh build
./deploy.sh start
Useful Commands
docker compose logs -f memento-note # View logs
docker compose exec memento-note sh # Shell access
./deploy.sh backup # PostgreSQL backup (pg_dump)
./deploy.sh update # Pull, rebuild, restart
MCP Server
The MCP server enables AI agents to interact with your notes programmatically.
Configuration
Set in .env.docker:
MCP_MODE=stdio # or "sse" for HTTP/N8N
MCP_PORT=3001 # SSE mode port
N8N Integration
Configure an MCP tool node in N8N pointing to:
http://mcp-server:3001/sse
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"memento": {
"command": "node",
"args": ["path/to/mcp-server/index.js"],
"env": {
"DATABASE_URL": "postgresql://memento:memento@localhost:5432/memento"
}
}
}
}
Tech Stack
| Component | Technology |
|---|---|
| Frontend | Next.js 16, React 19, TypeScript |
| Styling | Tailwind CSS 4, shadcn/ui |
| Database | PostgreSQL 16, Prisma 5 |
| Auth | NextAuth.js v5 |
| AI | OpenAI SDK, Ollama |
| MCP | @modelcontextprotocol/sdk |
| Deploy | Docker, Docker Compose |
Project Structure
memento-note/ # Main Next.js application
├── app/ # App Router pages & API routes
├── components/ # React components
├── lib/ # Utilities, Prisma client, i18n
├── prisma/ # Database schema & migrations
├── public/ # Static assets, icons, uploads
└── scripts/ # Utility scripts
mcp-server/ # MCP protocol server
├── index.js # Stdio mode entry
├── index-sse.js # SSE mode entry
├── prisma/ # Shared database schema
└── Dockerfile
docker-compose.yml # Root orchestration
.env.docker.example # Environment template
Configuration
Environment Variables
| Variable | Description | Default |
|---|---|---|
DATABASE_URL |
PostgreSQL connection string | postgresql://memento:memento@localhost:5432/memento |
POSTGRES_PORT |
PostgreSQL host port | 5432 |
POSTGRES_PASSWORD |
PostgreSQL password | memento |
NEXTAUTH_SECRET |
Auth encryption key | (required) |
NEXTAUTH_URL |
Public URL | http://localhost:3000 |
AI_PROVIDER |
AI provider (openai, ollama, auto) |
auto |
OPENAI_API_KEY |
OpenAI API key | (optional) |
OLLAMA_BASE_URL |
Ollama endpoint | (optional) |
MCP_MODE |
MCP server mode (stdio or sse) |
stdio |
Contributing
Contributions welcome! Please:
- Report bugs
- Suggest features
- Submit pull requests
Support
Memento is free and open-source. If you find it useful:
- Ko-fi - One-time or monthly support
- BuyMeACoffee - Buy me a coffee
- GitHub Sponsors - Recurring support
- Star the repo - Free and helps visibility!
License
MIT License - feel free to use for personal or commercial projects.