Skip to content

Jeeppy/portfolio

Repository files navigation

🚀 Portfolio

Self-hosted developer portfolio — FastAPI REST API + Next.js 15 | Docker + GitHub Actions CI/CD

Tech Stack

Layer Technology
Backend FastAPI — Python 3.12
Frontend Next.js 15 — TypeScript + TailwindCSS + TanStack Query
Database SQLite via SQLModel + Alembic (migrations)
Auth JWT (single-user)
Deploy Coolify (self-hosted PaaS) + Cloudflare Tunnels
CI/CD GitHub Actions → Proxmox (self-hosted)

Code Quality

Tool Role
Ruff Linter + formatter
mypy Static type checking
Bandit Security linter
pytest + pytest-cov Tests + coverage
pip-audit Dependency vulnerability scanner
pre-commit Git hooks (lint, format, security)

Prerequisites

  • pyenv — Python version management
  • uv — Fast Python package manager
  • nvm — Node.js version management
  • Docker & Docker Compose — For containerized deployment

Getting Started

1. Clone & configure

git clone git@github.com:YOUR_USER/portfolio.git
cd portfolio

2. Backend setup

cd backend

# Python version is automatically set via .python-version
pyenv install 3.12.8  # if not already installed

# Install dependencies
uv sync

# Apply database migrations
uv run alembic upgrade head

# Run the API (dev mode with hot reload)
uv run fastapi dev app/main.py

API available at http://localhost:8000 Interactive docs at http://localhost:8000/docs

3. Frontend setup

cd frontend

# Configure environment
cp .env.local.example .env.local
# Edit .env.local : NEXT_PUBLIC_API_URL=http://localhost:8000

npm install
npm run dev

App available at http://localhost:3000

Useful Commands

Backend

cd backend

# Run API
uv run fastapi dev app/main.py

# Apply migrations
uv run alembic upgrade head

# Create a new migration (after model changes)
uv run alembic revision --autogenerate -m "description"

# Lint
uv run ruff check .

# Format
uv run ruff format .

# Type checking
uv run mypy app/

# Security scan (code)
uv run bandit -r app/

# Security scan (dependencies)
uv run pip-audit

# Tests with coverage
uv run pytest

Frontend

cd frontend

# Dev server (hot reload)
npm run dev

# Production build
npm run build

# Lint
npm run lint

Git hooks

# Install pre-commit hooks (run once)
pre-commit install

# Run all hooks manually
pre-commit run --all-files

Docker (dev)

# Build et lancer l'API
docker compose up --build

# En arrière-plan
docker compose up -d

# Logs
docker compose logs -f api

# Arrêter
docker compose down

License

This project is licensed under the MIT License.

About

Self-hosted developer portfolio — FastAPI + Next.js 15 + TypeScript + TailwindCSS | Docker + GitHub Actions CI/CD

Topics

Resources

License

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Contributors