Bỏ qua

football-data-pipeline

Data pipeline service for Football Field Booking thesis project.

Mục tiêu

Mục tiêu Mô tả
Crawl & Image Thu thập dữ liệu sân bóng từ SerpAPI, download & resize ảnh, upload Cloudflare R2
Demo Generator Generate dữ liệu demo realistic (users, fields, bookings, payments)
Admin Dashboard Streamlit UI để monitor pipeline, xem ảnh, re-run jobs

Setup

cp .env.example .env
# Điền các giá trị trong .env

uv sync

Chạy lần đầu

# 1. Test kết nối settings
uv run python -c "from src.utils.config import settings; print(settings.model_dump())"

# 2. Scrape 5 quận để test
make scrape-5

# 3. Upload ảnh (dry-run trước)
make images-dry
make images

# 4. Sync vào DB
make sync

# 5. Generate demo data
make demo-generate-dry
make demo-generate

# 6. Chạy dashboard để verify
make dashboard
# Mở http://localhost:8502

Makefile Commands

Command Mô tả
make install uv sync
make scrape Scrape tất cả 24 quận
make scrape-5 Scrape 5 quận (test)
make images Download + process + upload ảnh
make sync Sync fields + images vào PostgreSQL
make demo-generate Generate demo users/bookings/payments
make demo-reset Reset demo data
make dashboard Chạy Streamlit tại port 8502
make pipeline-full Chạy full pipeline
make test Chạy unit tests
make lint Lint code với ruff