An open source, lightweight note-taking service. Easily capture and share your great thoughts.
Go to file
Johnny 1b11e8c841 refactor(editor): complete state machine and services migration
BREAKING CHANGE: MemoEditor internal architecture completely refactored

## Summary

Refactored MemoEditor from hooks-based state management to a three-layer
architecture (Presentation → State → Services) using useReducer pattern.

## Changes

### Architecture
- **State Layer** (5 new files): types, actions, reducer, context, barrel export
- **Service Layer** (6 new files): error, validation, upload, cache, memo services + barrel
- **Component Layer** (3 new files): EditorToolbar, EditorContent, EditorMetadata
- **Simplified Hooks** (3 new files): useMemoInit, useAutoSave, useKeyboard

### Code Reduction
- Main component: ~380 lines → ~140 lines (-63%)
- Hooks removed: 5 old hooks (useMemoEditorState, useMemoSave, etc.)
- Total lines removed: 508 lines of old code
- Utility hooks preserved: 8 hooks still in use (useLocation, useDragAndDrop, etc.)

### Improvements
-  Predictable state transitions with useReducer
-  Testable business logic in pure service functions
-  Cleaner component code (presentation only)
-  Better separation of concerns
-  Type-safe actions with discriminated unions
-  Centralized error handling

## Statistics
- Files changed: 26
- Commits created: 25 (squashed into 1)
- New files: 17
- Removed files: 5
- TypeScript errors: 0
- Lint errors: 0

## Testing
Manual testing required for:
- Editor functionality (create, edit, save)
- Drag and drop
- Focus mode
- Keyboard shortcuts (Cmd/Ctrl + Enter)
- Auto-save to localStorage
2025-12-23 08:38:02 +08:00
.github chore: remove goreleaser 2025-11-30 11:42:46 +08:00
cmd/memos refactor: remove unused constants 2025-10-16 20:40:46 +08:00
internal chore: bump version 2025-11-25 22:17:45 +08:00
plugin feat: implement scheduler plugin 2025-12-20 15:43:25 +08:00
proto refactor: remove deprecated Sessions and AccessTokens settings 2025-12-19 08:35:57 +08:00
scripts refactor: rename workspace to instance throughout codebase 2025-11-05 23:35:35 +08:00
server chore: prevent sensitive data caching 2025-12-20 12:33:16 +08:00
store refactor: remove deprecated Sessions and AccessTokens settings 2025-12-19 08:35:57 +08:00
web refactor(editor): complete state machine and services migration 2025-12-23 08:38:02 +08:00
.dockerignore chore: update resource dialog style (#982) 2023-01-21 08:46:49 +08:00
.gitignore refactor: user auth improvements (#5360) 2025-12-18 18:15:51 +08:00
.golangci.yaml chore: update golangci config 2025-04-02 22:53:17 +08:00
CLAUDE.md docs: update Memos Codebase Guide for clarity and structure 2025-12-02 08:19:20 +08:00
CODEOWNERS chore: update readme (#1047) 2023-02-08 08:51:36 +08:00
LICENSE chore: update LICENSE (#4394) 2025-02-11 15:45:20 +08:00
README.md chore: add Vercel OSS Program badge 2025-11-10 20:18:41 +08:00
SECURITY.md chore(docs): update security policy to prevent public vulnerability disclosure 2025-11-21 09:13:40 +08:00
go.mod chore: implement session sliding expiration and JWT authentication 2025-12-15 10:04:11 +08:00
go.sum chore: implement session sliding expiration and JWT authentication 2025-12-15 10:04:11 +08:00

README.md

Memos

Memos

An open-source, self-hosted note-taking service. Your thoughts, your data, your control — no tracking, no ads, no subscription fees.

Home Live Demo Docs Discord Docker Pulls

Memos Demo Screenshot

Warp — The AI-powered terminal built for speed and collaboration

Warp - The AI-powered terminal built for speed and collaboration

LambdaTest - Cross-browser testing cloud

LambdaTest - Cross-browser testing cloud

Overview

Memos is a privacy-first, self-hosted knowledge base that works seamlessly for personal notes, team wikis, and knowledge management. Built with Go and React, it offers lightning-fast performance without compromising on features or usability.

Why choose Memos over cloud services?

Feature Memos Cloud Services
Privacy Self-hosted, zero telemetry Your data on their servers
Cost Free forever, MIT license Subscription fees
Performance Instant load, no latency ⚠️ Depends on internet
Ownership Full control & export Vendor lock-in
API Access Full REST + gRPC APIs ⚠️ Limited or paid
Customization Open source, forkable Closed ecosystem

Features

  • 🔒 Privacy-First Architecture

    • Self-hosted on your infrastructure with zero telemetry
    • Complete data ownership and export capabilities
    • No tracking, no ads, no vendor lock-in
  • 📝 Markdown Native

    • Full markdown support
    • Plain text storage — take your data anywhere
  • Blazing Fast

    • Built with Go backend and React frontend
    • Optimized for performance at any scale
  • 🐳 Simple Deployment

    • One-line Docker installation
    • Supports SQLite, MySQL, and PostgreSQL
  • 🔗 Developer-Friendly

    • Full REST and gRPC APIs
    • Easy integration with existing workflows
  • 🎨 Beautiful Interface

    • Clean, minimal design and dark mode support
    • Mobile-responsive layout

Quick Start

docker run -d \
  --name memos \
  -p 5230:5230 \
  -v ~/.memos:/var/opt/memos \
  neosmemo/memos:stable

Open http://localhost:5230 and start writing!

Try the Live Demo

Don't want to install yet? Try our live demo first!

Other Installation Methods

  • Docker Compose - Recommended for production deployments
  • Pre-built Binaries - Available for Linux, macOS, and Windows
  • Kubernetes - Helm charts and manifests available
  • Build from Source - For development and customization

See our installation guide for detailed instructions.

Contributing

We welcome contributions of all kinds! Whether you're fixing bugs, adding features, improving documentation, or helping with translations — every contribution matters.

Ways to contribute:

Sponsors

Love Memos? Sponsor us on GitHub to help keep the project growing!

Star History

Star History Chart

License

Memos is open-source software licensed under the MIT License.


WebsiteDocumentationDemoDiscordX/Twitter

Vercel OSS Program