This is a demo repo that is carefully crafted to showcase the capabilities of Amp centered around an example e-commerce platform with a FastAPI backend and React frontend. Data is stored in SQLite so it is self contained and easy to run.
For more information about Amp visit the Amp manual.
See the DEMO.md for more information about how to effectively use this repo for an array of different demo purposes ranging from fixes an issue with a PR to advanced refactors.
.
├── .github/ # GitHub workflows and CI configuration
├── backend/ # FastAPI backend
│ ├── app/ # Application source code
│ ├── tests/ # Backend tests
│ ├── alembic/ # Database migrations
│ ├── pyproject.toml # Python dependencies (managed by uv)
│ ├── pytest.ini # Test configuration
│ ├── main.py # FastAPI entry point
│ ├── AGENTS.md # Agent documentation for backend
│ └── store.db # SQLite database file
├── frontend/ # React frontend (TypeScript/Vite)
│ ├── src/ # React components and pages
│ ├── e2e/ # Playwright E2E tests
│ ├── public/ # Static assets
│ ├── package.json # Node.js dependencies
│ ├── vite.config.ts # Vite configuration
│ ├── AGENTS.md # Agent documentation for frontend
│ └── playwright.config.ts # Playwright test configuration
├── justfile # Development automation commands
├── package.json # Root package.json for shared dependencies
├── AGENTS.md # Agent documentation for overall project
├── DEMO.md # Demo usage guide
└── README.md # README
- Just - Command runner (
brew install just
) - Python 3.13+ - Python runtime
- uv - Python package manager
- Node.js 20+ - JavaScript runtime
- npm - Package manager (ships with Node.js)
Clone the project and verify prerequisites:
git clone https://github.com/sourcegraph/amp-demo.git
cd amp-demo
# Verify you have required tools
just --version
python --version
uv --version
node --version
Install dependencies and setup testing:
just install-all # Install all dependencies (backend, frontend, E2E browsers)
Run the application:
just dev # Start both services with native hot-reload using concurrently
Access the application:
- Frontend: http://localhost:3001
- Backend API: http://localhost:8001
just dev # Start both services (native hot-reload)
just dev-backend # Start only backend
just dev-frontend # Start only frontend
just seed # Populate database with sample data (only needed if database changes)
Install dependencies (if not already done):
just install-all # All dependencies (backend, frontend, E2E browsers)
Run services individually (if needed):
just dev-backend # Start only backend
just dev-frontend # Start only frontend
just setup-e2e # Install Playwright browsers
# Backend tests (native)
just test-local # Backend tests
just test-cov-local # Backend tests with coverage
just test-local-single TEST # Run single test
# E2E tests
just test-e2e # E2E tests (headless)
just test-e2e-headed # E2E tests (headed - for debugging)
# Combined test suites
just test-all-local # All tests (backend + E2E)
# backend
just check # Run linting (ruff) and type checking (mypy)
just format # Format backend code
# frontend
just lint # Lint frontend TypeScript
Before pushing to CI, ensure all checks pass locally to avoid CI failures:
# One-time setup (if not done already)
just install-all # Install all dependencies
# Run complete CI pipeline locally
just ci # Runs: lint, tests, build, e2e (mirrors CI exactly)
just ci
runs the exact same checks as the GitHub Actions CI pipeline:
- Backend Quality: Ruff linting + MyPy type checking
- Backend Tests: Full test suite with coverage
- Frontend Quality: ESLint + TypeScript build
- E2E Tests: End-to-end Playwright tests
just build # Build frontend for production
cd frontend && npm run build # Alternative frontend build
just reset-db # Reset SQLite database
just db-shell # Open SQLite CLI
just migrate-create "message" # Create new migration
just migrate-up # Apply migrations
just migrate-down # Rollback migration
just health # Check service health
just logs # View last 100 lines from backend and frontend logs
just logs-follow # Follow both logs live (Ctrl+C to exit)
Based on the ecommerce-demo repo.