Skip to content

Development

Sugers edited this page Jun 24, 2026 · 1 revision

Development

Prerequisites

# Backend
cd backend
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"

# Frontend
cd frontend
npm install

Start Development

# Backend (port 8000)
cd backend && uvicorn app.main:app --reload

# Frontend (port 5173)
cd frontend && npm run dev

Database Migrations

The app auto-migrates on startup. For manual migration:

cd backend && python -m app.db.init_db

Frontend Build

cd frontend
npm run build          # Production build
npm run typecheck      # TypeScript type check

Code Style

  • Backend: Follow existing patterns in backend/app/
  • Frontend: Use Vue 3 Composition API (<script setup>)
  • Comments: Chinese for Chinese-targeted features, English for code
  • CSS: Use CSS variables from frontend/src/styles.css
  • No hardcoded hex colors — always use var(--m-*)

Clone this wiki locally