mirror of
https://git.oceanpay.cc/danial/kami_apple_exchage.git
synced 2025-12-18 11:15:34 +00:00
- 新增 CODEBUDDY.md、GEMINI.md、GEMINI_CN.md 等项目文档 - 更新 Dockerfile 和其他配置文件 - 优化部分代码结构,如 orders.py、tasks.py 等 - 新增 .dockerignore 文件
1.8 KiB
1.8 KiB
CODEBUDDY.md
Development Commands
Frontend (Next.js)
cd frontend && bun install- Install dependenciescd frontend && bun run dev- Start development servercd frontend && bun run build- Build production versioncd frontend && bun run lint- Run ESLint checkscd frontend && bun run test- Run tests
Backend (FastAPI)
cd backend && uv sync- Install dependenciescd backend && uv run python app/main.py- Run development servercd backend && uv run pytest- Run testscd backend && uv run black .- Format code with Blackcd backend && uv run ruff check .- Lint with Ruff
Docker Development
cd backend && docker-compose up -d- Start all servicescd backend && docker-compose down- Stop all services
Architecture Overview
Project Structure
- Frontend: Next.js 15 with App Router, React 18, TypeScript
- Backend: FastAPI with Python 3.13, async/await architecture
- Infrastructure: Docker, Redis, PostgreSQL
Key Directories
- Frontend:
frontend/src/app/(Next.js pages),frontend/src/components/(UI components) - Backend:
backend/app/api/(FastAPI routes),backend/app/core/(core functionality),backend/app/services/(business logic)
Core Features
- Frontend: Real-time dashboard, Apple-style UI, theme switching
- Backend: Distributed web scraping, Redis-based locking, Celery task queue
API Integration
- Backend OpenAPI spec at
http://localhost:8000/openapi.json - Frontend auto-generates API client code
State Management
- Frontend: React Context + TanStack Query
- Backend: PostgreSQL + Redis
Deployment
- Development: Docker Compose for services, Bun/UV for apps
- Production: Docker containers with Nginx, Kubernetes support