A full-stack Telegram Mini App for audio guides in Nizhny Novgorod, featuring an interactive map with route visualization, attraction details, and audio playback.
- Interactive map with Yandex Maps integration
- Attraction details with text, photos, and audio guides
- HTML5 audio player with controls
- Telegram Mini App with theme support
- Responsive design for mobile devices
- Type-safe codebase (TypeScript + Python type hints)
- Docker support with multi-stage builds
- Python 3.11+ with FastAPI
- uv package manager
- JSON data storage
- Code quality: ruff, mypy, pylint
- TypeScript with React 18+
- Vite build tool
- Yandex Maps API
cd backend
pip install uv
uv sync
cp .env.example .env
# Edit .env with your credentialscd frontend
npm install
cp .env.example .env
# Edit .env with your credentialsBackend:
cd backend
uv run uvicorn app.main:app --reload --port 8000Frontend:
cd frontend
npm run devAccess:
- Frontend: http://localhost:3000
- Backend: http://localhost:8000
- API Docs: http://localhost:8000/docs
cp .env.example .env
# Edit .env with your credentials
docker-compose up --buildStop:
docker-compose downGET /api/v1/health- Health checkGET /api/v1/attractions- List all attractionsGET /api/v1/attractions/{id}- Get attraction by IDGET /api/v1/routes- List all routesGET /api/v1/routes/{id}- Get route by IDGET /api/v1/routes/{id}/attractions- Get route attractions
Interactive documentation: http://localhost:8000/docs
merchant/
├── backend/
│ ├── app/
│ │ ├── main.py # FastAPI entry point
│ │ ├── api/ # API routes and models
│ │ ├── core/ # Config and security
│ │ └── services/ # Business logic
│ ├── data/ # JSON data files
│ ├── tests/ # Test files
│ └── pyproject.toml # Package configuration
├── frontend/
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── services/ # API client
│ │ ├── types/ # TypeScript types
│ │ └── utils/ # Utilities
│ └── package.json
└── docker-compose.yml
| Variable | Description | Required | Default |
|---|---|---|---|
BOT_TOKEN |
Telegram Bot Token | Yes | - |
YANDEX_MAPS_API_KEY |
Yandex Maps API Key | Yes | - |
BACKEND_HOST |
Backend host | No | 0.0.0.0 |
BACKEND_PORT |
Backend port | No | 8000 |
CORS_ORIGINS |
Allowed origins | No | * |
| Variable | Description | Required | Default |
|---|---|---|---|
VITE_API_URL |
Backend API URL | Yes | http://localhost:8000/api/v1 |
VITE_YANDEX_MAPS_API_KEY |
Yandex Maps API Key | Yes | - |
docker-compose build
docker-compose up -d
docker-compose logs -f- Set up HTTPS/SSL certificates
- Configure nginx reverse proxy
- Set up monitoring and logging
- Configure backup strategy for JSON data
- Set up CI/CD pipeline
- Perform security audit
MIT License
Contributions welcome! Submit a Pull Request.