aee066d61155dc31b3706e880953aa38d1847688
Some checks failed
Tests / Build and Push CICD Image (push) Successful in 1h18m58s
Tests / YAML Syntax Check (push) Successful in 40s
Tests / TOML Syntax Check (push) Successful in 33s
Tests / Mixed Line Ending Check (push) Successful in 38s
Tests / TOML Formatting Check (push) Successful in 46s
Tests / Ruff Linting (push) Successful in 35s
Tests / Ruff Format Check (push) Successful in 32s
Tests / Pyright Type Check (push) Successful in 48s
Tests / Darglint Docstring Check (push) Successful in 30s
Tests / No Docstring Types Check (push) Successful in 20s
Tests / ESLint Check (push) Successful in 51s
Tests / Prettier Format Check (push) Successful in 30s
Tests / TypeScript Type Check (push) Successful in 1m4s
Tests / TSDoc Lint Check (push) Successful in 59s
Tests / End of File Check (push) Successful in 10m13s
Tests / Backend Tests (push) Successful in 37s
Tests / Backend Doctests (push) Successful in 20s
Tests / Frontend Tests (push) Successful in 1m30s
Tests / Trailing Whitespace Check (push) Successful in 12m47s
Tests / Integration Tests (push) Successful in 10m43s
Tests / End-to-End Tests (push) Has been cancelled
Signed-off-by: Cliff Hill <xlorep@darkhelm.org>
Plex Playlist Project
A full-stack application for managing Plex playlists with a FastAPI backend and Vue.js frontend.
Architecture
- Backend: Python 3.13 + FastAPI + uv + ruff
- Frontend: TypeScript + Vue.js + Vite
- Database: PostgreSQL 16
- Containerization: Docker + Docker Compose
Development Setup
Prerequisites
- Docker and Docker Compose
- Git
- pre-commit (for development)
Code Quality Tools
This project uses comprehensive linting and formatting:
Backend (Python):
ruff- Fast Python linter and formatterpyright- Type checkingdarglint- Docstring linting (Google style)
Frontend (TypeScript/Vue):
eslint- Linting with Vue and TypeScript supportprettier- Code formattingvue-tsc- Vue TypeScript checkingeslint-plugin-tsdoc- TSDoc documentation linting
General:
pre-commit- Git hooks for automated quality checks- TOML formatting and validation
Setting up pre-commit hooks
pip install pre-commit
pre-commit install
Running in Development Mode
-
Clone the repository and navigate to the project directory:
cd plex-playlist -
Start the development environment:
docker compose -f compose.yml -f compose.dev.yml up --build
This will start:
- PostgreSQL database on port 5433
- FastAPI backend on port 8001 (with hot reload)
- Vue.js frontend on port 5173 (with hot reload)
Running in Production Mode
docker compose up --build -d
This will start:
- PostgreSQL database on port 5432
- FastAPI backend on port 8000
- Vue.js frontend on port 80
Project Structure
plex-playlist/
├── backend/ # FastAPI backend
├── frontend/ # Vue.js frontend
│ └── nginx.conf # Nginx configuration
├── Dockerfile.backend # Backend Docker image
├── Dockerfile.frontend # Frontend Docker image
├── compose.yml # Production Docker Compose
├── compose.dev.yml # Development Docker Compose override
└── README.md
Environment Variables
Backend
DATABASE_URL: PostgreSQL connection stringENVIRONMENT:developmentorproductionRELOAD: Enable uvicorn auto-reload (development only)
Frontend
NODE_ENV:developmentorproduction
Database
The PostgreSQL database is configured with:
- Database:
plex_playlist - User:
plex_user - Password:
plex_password
Development Workflow
- Make changes to your code
- The development containers will automatically reload:
- Backend: uvicorn with
--reloadflag - Frontend: Vite dev server with hot module replacement
- Backend: uvicorn with
API Documentation
When running, the FastAPI automatic documentation is available at:
- Development: http://localhost:8001/docs
- Production: http://localhost:8000/docs
Manual Setup (if not using Docker)
Backend Setup (FastAPI, Python 3.13, uv, ruff, pyright)
1. Create and activate the uv virtual environment
uv venv plex-playlist
source plex-playlist/bin/activate
2. Install dependencies
uv pip install fastapi uvicorn[standard]
uv pip install ruff
3. Install dev tools
uv pip install pyright
4. Project structure
app/- FastAPI application codetests/- Test suitepyrightconfig.json- Pyright type checking configruff.toml- Ruff linter config
5. Run the development server
uvicorn app.main:app --reload
Frontend Setup (Vue 3, Vite, TypeScript)
1. Create the project
cd frontend
npm create vite@latest . -- --template vue-ts
npm install
2. Recommended: Enable strictest TypeScript settings
Edit tsconfig.json and set:
{
"compilerOptions": {
"strict": true,
"noImplicitAny": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"strictBindCallApply": true,
"noImplicitThis": true,
"alwaysStrict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true
}
}
3. Run the frontend
npm run dev
Documentation
Development & Workflow
- Development Environment Setup - Comprehensive guide for setting up your development environment, git workflow, pre-commit hooks, manual tool usage, and CI/CD pipeline understanding
Operations & Troubleshooting
- Gitea Actions Troubleshooting - Solutions for CI/CD pipeline issues, including the critical "jobs waiting forever" problem
- Secure Docker CI/CD - Security considerations and setup for Docker-based CI/CD pipelines
See the backend/ and frontend/ folders for more details.
Description
Languages
Shell
41.7%
TypeScript
33.5%
Python
17.5%
JavaScript
5.8%
HTML
0.8%
Other
0.7%