An open source, lightweight note-taking service. Easily capture and share your great thoughts.
Go to file
Steven f5624fa682 refactor: standardize MobX store architecture with base classes and utilities
Refactored all stores to follow consistent patterns and best practices while keeping MobX:

New Infrastructure:
- Created base-store.ts with StandardState base class and factory functions
- Added store-utils.ts with RequestDeduplicator, StoreError, and OptimisticUpdate helpers
- Added config.ts for MobX configuration and strict mode
- Created comprehensive README.md with architecture guide and examples

Server State Stores (API data):
- attachment.ts: Added request deduplication, error handling, computed properties, delete/clear methods
- workspace.ts: Added Theme type validation, computed memoization, improved initialization
- memo.ts: Enhanced with optimistic updates, request deduplication, structured errors
- user.ts: Fixed temporal coupling, added computed memoization, request deduplication

Client State Stores (UI state):
- view.ts: Added helper methods (toggleSortOrder, setLayout, resetToDefaults), input validation
- memoFilter.ts: Added utility methods (hasFilter, clearAllFilters, removeFiltersByFactor)

Improvements:
- Request deduplication prevents duplicate API calls (all server stores)
- Computed property memoization improves performance
- Structured error handling with error codes
- Optimistic updates for better UX (memo updates)
- Comprehensive JSDoc documentation
- Type-safe APIs with proper exports
- Clear separation between server and client state

All stores now follow consistent patterns for better maintainability and easier onboarding.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-23 19:13:42 +08:00
.github chore: bump actions/setup-node from 4 to 5 (#5134) 2025-10-22 22:41:45 +08:00
cmd/memos refactor: remove unused constants 2025-10-16 20:40:46 +08:00
internal refactor: update migration history methods 2025-10-20 23:05:50 +08:00
plugin refactor: remove unused constants 2025-10-16 20:40:46 +08:00
proto feat(api): support username lookup in GetUser endpoint 2025-10-22 21:48:34 +08:00
scripts refactor: remove unused constants 2025-10-16 20:40:46 +08:00
server chore: remove basic filter support from ListAttachments method 2025-10-22 22:41:24 +08:00
store chore: update memo content formatting and enhance link styling 2025-10-22 08:50:09 +08:00
web refactor: standardize MobX store architecture with base classes and utilities 2025-10-23 19:13:42 +08:00
.dockerignore chore: update resource dialog style (#982) 2023-01-21 08:46:49 +08:00
.gitignore refactor: remove unused constants 2025-10-16 20:40:46 +08:00
.golangci.yaml chore: update golangci config 2025-04-02 22:53:17 +08:00
.goreleaser.yaml refactor: remove unused constants 2025-10-16 20:40:46 +08:00
AGENTS.md refactor: remove unused constants 2025-10-16 20:40:46 +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: update sponsors 2025-10-08 20:42:15 +08:00
SECURITY.md chore: update security 2023-11-23 08:55:57 +08:00
go.mod chore: tweak demo data 2025-10-21 23:41:46 +08:00
go.sum chore: tweak demo data 2025-10-21 23:41:46 +08:00

README.md

Special thanks to our sponsor:

Memos

Memos

A modern, open-source, self-hosted knowledge management and note-taking platform designed for privacy-conscious users and organizations. Memos provides a lightweight yet powerful solution for capturing, organizing, and sharing thoughts with comprehensive Markdown support and cross-platform accessibility.

Home Page Documentation Live Demo Blog

Docker Pulls Docker Image Size Discord

Memos Application Screenshot

Table of Contents

Overview

Memos is a lightweight, self-hosted alternative to cloud-based note-taking services. Built with privacy and performance in mind, it offers a comprehensive platform for personal knowledge management without compromising data ownership or security.

Key Features

Privacy & Security

  • Complete Data Ownership — All data stored locally in your chosen database
  • Self-Hosted Architecture — Full control over infrastructure and access policies
  • No External Dependencies — Zero third-party services or cloud connections required

Content Creation

  • Instant Save — Streamlined plain text input with automatic persistence
  • Rich Markdown Support — Full Markdown rendering with syntax highlighting
  • Media Integration — Native support for images, links, and embedded content

Performance & Technology

  • High-Performance Backend — Built with Go for optimal resource utilization
  • Modern React Frontend — Responsive, intuitive user interface
  • Lightweight Deployment — Minimal system requirements, maximum efficiency
  • Cross-Platform — Linux, macOS, Windows, and containerized environments

Customization

  • Configurable Interface — Custom branding, themes, and UI elements
  • API-First Design — RESTful API for seamless third-party integrations
  • Multi-Database Support — SQLite, PostgreSQL, and MySQL compatibility

Cost-Effective

  • Open Source (MIT) — Full source code availability with permissive licensing
  • Zero Subscription Fees — No usage limits, premium tiers, or hidden costs
  • Community-Driven — Transparent development with active community support

Quick Start

Get Memos running in under 1 minutes with Docker:

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

Access Memos at http://localhost:5230 and complete the initial setup.

Alternative methods: For Docker Compose, binary installation, or building from source, see our Installation Guide.

Pro Tip: The data directory stores all your notes, uploads, and settings. Include it in your backup strategy!

Sponsors

Memos is made possible by the generous support of our sponsors. Their contributions help ensure the project's continued development, maintenance, and growth.

warp yourselfhosted fixermark alik-agaev

Every contribution, no matter the size, makes a difference!

Sponsor Memos

Contributing

Memos welcomes contributions from developers, designers, and users worldwide. We value quality, innovation, and community feedback.

Ways to Contribute:

  • Code contributions (bug fixes, features, performance improvements)
  • Documentation and user guides
  • Testing and bug reporting
  • Localization and translation
  • Community support

Get Started: Contributing GuideCode of Conduct

Star History

Star History Chart