A full-stack application for browsing and managing Pokemon data. Built with Python/FastAPI backend, Next.js frontend, and MariaDB database.
βββββββββββββββββββββββββββββββββββββββ
β Frontend (Next.js/React) β
β - Port: 3000 β
β - Docker image: pokepy-frontend β
ββββββββββββββββ¬βββββββββββββββββββββββ
β
ββββββββββββββββΌβββββββββββββββββββββββ
β Backend (FastAPI/Python) β
β - Port: 8000 β
β - Docker image: pokepy-backend β
ββββββββββββββββ¬βββββββββββββββββββββββ
β
ββββββββββββββββΌβββββββββββββββββββββββ
β Database (MariaDB) β
β - Port: 3306 β
βββββββββββββββββββββββββββββββββββββββ
- Docker & Docker Compose
- Git
- Node.js 20.x (for frontend local dev)
- Python 3.x (for backend local dev)
# Start entire stack
docker compose up -d
# View logs
docker compose logs -f
# Stop services
docker compose downServices will be available at:
- Frontend: http://localhost:81
- Backend API: http://localhost:8000
- API Docs: http://localhost:8000/docs
Don't have Docker installed? Use Vagrant to run everything in a virtual machine:
# Start VM and provision Docker
vagrant up
# SSH into the VM
vagrant ssh
# Inside the VM, run:
cd /vagrant
docker compose up -dSee VAGRANT.md for detailed instructions.
cd backend
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
python -m uvicorn src.main:app --reloadcd frontend
npm install
npm run devpokemon-3-tier/
βββ backend/ # FastAPI application
β βββ src/
β β βββ main.py # Entry point
β β βββ config_reader.py # Configuration
β β βββ pokemon/ # Pokemon domain
β βββ requirements.txt # Python dependencies
β βββ Dockerfile
β βββ openapi.yaml # API specification
β
βββ frontend/ # Next.js application
β βββ app/
β β βββ layout.tsx
β β βββ page.tsx
β β βββ lib/
β βββ package.json
β βββ tsconfig.json
β βββ Dockerfile
β
βββ db/ # Database
β βββ init.sql # Schema initialization
β βββ Dockerfile
β βββ data/
β
βββ .github/
β βββ workflows/ # CI/CD pipelines
β βββ backend-build.yml # Backend build & push
β βββ frontend-build.yml # Frontend build & push
β
βββ docker-compose.yml
βββ README.md
This repo uses GitHub Actions for automated builds and deployments.
- Backend: Triggers on changes to
/backendβ Builds and pushes Docker image - Frontend: Triggers on changes to
/frontendβ Builds and pushes Docker image - Deploy: Triggers on release β Deploys to Azure VM
Each workflow only runs when its respective folder changes (path-based filtering).
Published to Docker Hub:
donovicv/pokepy-backend:latestdonovicv/pokepy-frontend:latest
[database]
host = db
port = 3306
user = root
password = your_password
database = pokemonNEXT_PUBLIC_API_URL=http://localhost:8000cd backend
pytest ./src/tests/cd frontend
npm testInteractive API docs available at: http://localhost:8000/docs
API Collection: See /backend/postman/PokePy.postman_collection.json
- CONTRIBUTING.md - Development setup, code standards, and PR process
- VAGRANT.md - Running the app in a virtual machine with Vagrant
- Makefile - Build and run commands -
make helpto see all options - docker-compose.yml - Service configuration and networking
Please read CONTRIBUTING.md for development setup and guidelines.
See LICENSE
- Your Name - Initial work
Questions? Open an issue or check the individual service READMEs in backend/ and frontend/ folders.