This commit addresses API design inconsistencies identified during
standardization review against Google AIP (API Improvement Proposals)
and REST API best practices.
## Changes Made
### 1. WorkspaceSetting Resource Namespace (proto)
- Fixed: `api.memos.dev/WorkspaceSetting` → `memos.api.v1/WorkspaceSetting`
- Location: proto/api/v1/workspace_service.proto (lines 57, 181)
- Impact: Aligns with consistent namespace pattern used across all other resources
### 2. Identity Provider HTTP Paths (proto)
- Changed: `/api/v1/identityProviders` → `/api/v1/identity-providers`
- Changed: `identityProviders/{idp}` → `identity-providers/{idp}`
- Location: proto/api/v1/idp_service.proto (all HTTP annotations and resource pattern)
- Rationale: REST conventions prefer lowercase with hyphens (kebab-case) over camelCase
- Follows: GitHub API standards and industry best practices
### 3. Backend Resource Name Constants (Go)
- Updated: `IdentityProviderNamePrefix = "identity-providers/"`
- Location: server/router/api/v1/resource_name.go:19
- Impact: Ensures resource name parsing matches new proto pattern
### 4. Backend Tests (Go)
- Updated all hardcoded identity provider resource names
- Location: server/router/api/v1/test/idp_service_test.go
- Changed: `identityProviders/*` → `identity-providers/*` (4 occurrences)
### 5. Frontend Constants (TypeScript)
- Updated: `identityProviderNamePrefix = "identity-providers/"`
- Location: web/src/store/common.ts:4
- Impact: Frontend resource name handling aligns with backend
## Breaking Changes
⚠️ **IMPORTANT**: This is a breaking change for Identity Provider API consumers.
**Before:**
```
GET /api/v1/identityProviders
GET /api/v1/identityProviders/123
```
**After:**
```
GET /api/v1/identity-providers
GET /api/v1/identity-providers/123
```
**Migration:** API clients must update URLs from `identityProviders` to `identity-providers`.
## Next Steps Required
1. **Regenerate proto code** (requires buf CLI):
```bash
cd proto
buf generate
```
This will update:
- proto/gen/api/v1/*.pb.go (Go generated code)
- proto/gen/api/v1/*.pb.gw.go (gRPC-Gateway code)
- web/src/types/proto/api/v1/*.ts (TypeScript definitions)
- proto/gen/openapi.yaml (OpenAPI spec)
2. **Test thoroughly:**
- Backend tests: `go test ./server/router/api/v1/test/...`
- Frontend integration tests
- Manual API testing with new paths
3. **Update documentation:**
- API documentation mentioning identity provider endpoints
- Migration guides for existing API consumers
## References
- Google AIP-122: Resource names
- Google AIP-132: Standard List methods
- REST API naming conventions (lowercase with hyphens)
- GitHub API design standards
## Binary Endpoint Design (No Changes)
After research, confirmed that the current `/file/*` path for binary content
is correct and follows best practices:
- Separates binary content delivery from structured API responses
- Enables easier CDN integration and caching
- Follows Google's pattern of using google.api.HttpBody with distinct paths
|
||
|---|---|---|
| .github | ||
| cmd/memos | ||
| internal | ||
| plugin | ||
| proto | ||
| scripts | ||
| server | ||
| store | ||
| web | ||
| .dockerignore | ||
| .gitignore | ||
| .golangci.yaml | ||
| .goreleaser.yaml | ||
| CLAUDE.md | ||
| CODEOWNERS | ||
| LICENSE | ||
| README.md | ||
| SECURITY.md | ||
| go.mod | ||
| go.sum | ||
README.md
Memos
An open-source, self-hosted note-taking service. Your thoughts, your data, your control — no tracking, no ads, no subscription fees.
💎 Featured Sponsors
Warp — The AI-powered terminal built for speed and collaboration
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 (Recommended)
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:
- 🐛 Report bugs
- 💡 Suggest features
- 🔧 Submit pull requests
- 📖 Improve documentation
- 🌍 Help with translations
Sponsors
Love Memos? Sponsor us on GitHub to help keep the project growing!
Star History
License
Memos is open-source software licensed under the MIT License.
Website • Documentation • Demo • Discord • X/Twitter
Made with ❤️ by the Memos community