Keep/docs/index.md
sepehr 640fcb26f7 fix: improve note interactions and markdown LaTeX support
## Bug Fixes

### Note Card Actions
- Fix broken size change functionality (missing state declaration)
- Implement React 19 useOptimistic for instant UI feedback
- Add startTransition for non-blocking updates
- Ensure smooth animations without page refresh
- All note actions now work: pin, archive, color, size, checklist

### Markdown LaTeX Rendering
- Add remark-math and rehype-katex plugins
- Support inline equations with dollar sign syntax
- Support block equations with double dollar sign syntax
- Import KaTeX CSS for proper styling
- Equations now render correctly instead of showing raw LaTeX

## Technical Details

- Replace undefined currentNote references with optimistic state
- Add optimistic updates before server actions for instant feedback
- Use router.refresh() in transitions for smart cache invalidation
- Install remark-math, rehype-katex, and katex packages

## Testing

- Build passes successfully with no TypeScript errors
- Dev server hot-reloads changes correctly
2026-01-09 22:13:49 +01:00

7.0 KiB

Memento - Project Documentation Index

Project Overview

  • Type: Multi-part with 2 parts
  • Primary Language: TypeScript (keep-notes), JavaScript (mcp-server)
  • Architecture: Full-stack JAMstack with Microservice Extension

Quick Reference

keep-notes (Memento Web App)

  • Type: Web Application
  • Tech Stack: Next.js 16 + React 19 + TypeScript 5 + Prisma + SQLite
  • Entry Point: keep-notes/app/layout.tsx
  • Architecture Pattern: Full-stack JAMstack with App Router

mcp-server (MCP Server)

  • Type: Backend API
  • Tech Stack: Express 4 + MCP SDK 1.0.4 + Prisma + SQLite (shared)
  • Entry Point: mcp-server/index.js
  • Architecture Pattern: Microservice API

Generated Documentation

Core Documentation

API Documentation

Data & Architecture

Development Guides


Existing Documentation

Root Documentation

Technical Documentation

Component Documentation


Planning Artifacts

Product Planning

Development Planning

Implementation Artifacts

  • Stories - User stories and implementation details
    • Infrastructure setup stories
    • AI abstraction stories
    • Search and tagging features
    • Vector indexing and semantic search
    • Model configuration interface

Getting Started

Prerequisites

  • Node.js 20+
  • npm or yarn
  • SQLite3 (included)

Installation

Web Application:

cd keep-notes
npm install
npm run db:generate
npm run dev
# Access at http://localhost:3000

MCP Server:

cd mcp-server
npm install
npm start

Development Commands

Web App:

  • npm run dev - Start development server
  • npm run build - Build for production
  • npm start - Start production server
  • npm test - Run E2E tests
  • npm run test:ui - Run tests with UI
  • npm run db:generate - Regenerate Prisma client

MCP Server:

  • npm start - Start MCP server (stdio)
  • npm run start:sse - Start SSE variant

Architecture Summary

Multi-Part Project Structure

Parts:

  1. keep-notes/ - Next.js web application (main user interface)
  2. mcp-server/ - Express-based MCP server (N8N integration)

Integration:

  • Shared SQLite database (keep-notes/prisma/dev.db)
  • Database-mediated communication
  • Independent deployment capability

Technology Stack

Frontend:

  • Next.js 16.1.1 (App Router)
  • React 19.2.3
  • TypeScript 5
  • Tailwind CSS 4
  • Radix UI

Backend:

  • Next.js API Routes (keep-notes)
  • Express 4.22.1 (mcp-server)
  • Prisma 5.22.0 (ORM)
  • SQLite (database)

Integration:

  • MCP SDK 1.0.4
  • NextAuth.js 5.0.0-beta.30
  • Vercel AI SDK 6.0.23

Key Features

User Features

  • Rich text notes with markdown support
  • Checklist notes
  • Color-coded notes
  • Labeling/tagging system
  • Pinning and archiving
  • Image attachments
  • Reminders with recurrence
  • Drag-and-drop grid layout
  • Semantic search (AI-powered)
  • Auto-tagging (AI-powered)
  • User authentication
  • Admin panel

Technical Features

  • Progressive Web App (PWA)
  • Responsive design
  • E2E testing (Playwright)
  • MCP integration
  • Multiple AI providers (OpenAI, Ollama)
  • Email notifications

Current Status

Development Stage: Active Development Branch: bmad-features Version: 0.2.0

Completed:

  • 6 user stories implemented
  • PRD and Epics defined
  • Sprint tracking active
  • Core features functional

In Progress:

  • 🔄 Docker setup
  • 🔄 Documentation completion
  • 🔄 Code review and cleanup
  • 🔄 Monetization planning

Documentation for AI Agents

When working with this codebase, AI agents should reference:

  1. Project Context: Read project-overview.md first
  2. API Contracts: Reference api-contracts-keep-notes.md and api-contracts-mcp-server.md
  3. Data Models: Understand schema from data-models.md
  4. PRD: Review prd.md for product context
  5. Epics: Check epics.md for planned features

Next Steps

Immediate:

  1. Complete Docker setup
  2. Finish documentation
  3. Code review
  4. Test cleanup

Short-term:

  1. Implement monitization ("Pay me a coffee")
  2. Business model analysis
  3. GitHub release preparation

Long-term:

  1. Feature enhancements
  2. Community building
  3. Integration marketplace

Contributing

Current Status: Pre-release, not accepting external contributions yet

Future: After GitHub release, contribution guidelines will be added


License

Status: To be determined (MIT/Apache/etc.) Business Model: Open source with optional paid features


Contact & Support

Issues: GitHub Issues (once published) Documentation: This index and linked files Technical Guides: Root-level markdown files


Last Updated: 2026-01-09 Documentation Generated by: BMAD Document Project Workflow