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> |
2 weeks ago | |
|---|---|---|
| .github | 2 weeks ago | |
| cmd/memos | 3 weeks ago | |
| internal | 2 weeks ago | |
| plugin | 3 weeks ago | |
| proto | 2 weeks ago | |
| scripts | 3 weeks ago | |
| server | 2 weeks ago | |
| store | 2 weeks ago | |
| web | 2 weeks ago | |
| .dockerignore | 3 years ago | |
| .gitignore | 3 weeks ago | |
| .golangci.yaml | 7 months ago | |
| .goreleaser.yaml | 3 weeks ago | |
| AGENTS.md | 3 weeks ago | |
| CODEOWNERS | 3 years ago | |
| LICENSE | 9 months ago | |
| README.md | 4 weeks ago | |
| SECURITY.md | 2 years ago | |
| go.mod | 2 weeks ago | |
| go.sum | 2 weeks ago | |
README.md
Special thanks to our sponsor:
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.
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.
Every contribution, no matter the size, makes a difference!
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 Guide • Code of Conduct
