A complete working example of a multi-platform Python application demonstrating the architecture from Ship Python, Orchestrate AI: Professional Python in the AI Era by Michael Borck.
This example shows a simple task manager application with:
- FastAPI backend with RESTful API
- React frontend with TypeScript
- Electron desktop wrapper
- Docker deployment configuration
cd backend
uv sync
uv run uvicorn my_app.main:app --reloadVisit http://localhost:8000/docs to see the API documentation.
cd frontend
npm install
npm run devVisit http://localhost:5173 to see the app.
docker-compose -f docker/docker-compose.yml upcd frontend && npm run build
cd ../electron
npm install
npm start- API-First Architecture: Backend and frontend communicate through a well-defined REST API
- Type Safety: Pydantic models (backend) and TypeScript (frontend) ensure type safety
- Modern Tooling: uv, Vite, React Query for efficient development
- Multi-Platform Distribution: Same codebase runs as web app, PWA, and desktop app
- AI-Ready Structure: CLAUDE.md provides context for AI assistants
ship-python-example/
├── backend/ # FastAPI backend
│ ├── src/my_app/ # Application code
│ └── tests/ # API tests
├── frontend/ # React frontend
│ └── src/ # Components and services
├── electron/ # Desktop wrapper
├── docker/ # Container configs
├── .github/workflows/ # CI/CD
└── CLAUDE.md # AI context
If you want to use this architecture for your own project:
- Cookiecutter template:
cookiecutter gh:michael-borck/ship-python-cookiecutter- Full customization - GitHub template: ship-python-template - Quick start
- Ship Python, Orchestrate AI - The companion book
- ship-python-cookiecutter - Cookiecutter template
- ship-python-template - GitHub template
MIT License - see LICENSE for details.