Skip to content

Latest commit

Β 

History

History
92 lines (73 loc) Β· 2.7 KB

File metadata and controls

92 lines (73 loc) Β· 2.7 KB

Contributing to MemoryOS

Thank you for your interest in contributing! πŸŽ‰

Ways to Contribute

  • πŸ› Bug reports β€” open an issue with steps to reproduce
  • πŸ’‘ Feature requests β€” open an issue with your use case
  • πŸ”§ Code β€” open a PR (see dev setup below)
  • πŸ“– Docs β€” improve any .md file
  • ⭐ Star β€” helps others discover the project

Dev Setup

git clone https://github.com/SamoTech/memoryos
cd memoryos

# Backend
cd backend
python -m venv .venv
source .venv/bin/activate      # Windows: .venv\Scripts\activate
pip install -e '.[dev]'

# Run backend
uvicorn app.main:app --reload --port 8765

# Run tests
pytest tests/ -v --tb=short

# Lint + type check
ruff check app cli
mypy app --ignore-missing-imports

# Frontend
cd ../frontend
npm install
npm run dev          # http://localhost:3000

# Extension
cd ../extension
npm install
npm run build        # outputs to extension/dist/
npm run watch        # watch mode

Code Style

  • Python: ruff formatter, 88 char line limit, type hints everywhere
  • TypeScript: strict mode, no any (use unknown)
  • Commits: conventional commits (feat:, fix:, docs:, chore:)

PR Checklist

  • Tests pass (pytest tests/ -v)
  • Linting passes (ruff check app cli)
  • Added/updated tests for new features
  • Updated docs if API changed
  • Added entry to CHANGELOG.md

Project Structure

memoryos/
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ app/
β”‚   β”‚   β”œβ”€β”€ api/v1/endpoints/   # FastAPI route handlers
β”‚   β”‚   β”œβ”€β”€ core/               # Config, DB, vector store
β”‚   β”‚   β”œβ”€β”€ models/             # SQLAlchemy ORM models
β”‚   β”‚   β”œβ”€β”€ schemas/            # Pydantic schemas
β”‚   β”‚   β”œβ”€β”€ services/           # Business logic
β”‚   β”‚   β”œβ”€β”€ workers/            # Background tasks
β”‚   β”‚   └── main.py             # FastAPI app entry
β”‚   └── cli/
β”‚       └── main.py             # Click CLI
β”œβ”€β”€ extension/
β”‚   β”œβ”€β”€ content/                # Per-site content scripts
β”‚   β”œβ”€β”€ popup/                  # Extension popup UI
β”‚   └── background.ts           # Service worker
β”œβ”€β”€ frontend/
β”‚   └── src/
β”‚       β”œβ”€β”€ app/                # Next.js pages
β”‚       β”œβ”€β”€ components/         # React components
β”‚       β”œβ”€β”€ hooks/              # Custom React hooks
β”‚       └── lib/                # API client
β”œβ”€β”€ docs/                       # Full documentation
└── scripts/                    # Build + install scripts

Questions?

Open a GitHub Discussion or tag @SamoTech in an issue.