Daftar teknologi dan versi minimum yang dipakai yellow-bank-soal, plus alasan pemilihan.
Tech Stack
Daftar lengkap dependency inti dan versi minimumnya. Sumber kebenaran: backend/requirements.txt.
Backend
| Teknologi | Versi Minimum | Kegunaan |
|---|
| Python | 3.10+ | Runtime utama (butuh match statement & type hints modern) |
| FastAPI | 0.104.1+ | Web framework, REST API |
| Uvicorn | 0.24.0+ ([standard]) | ASGI server |
| python-multipart | 0.0.6+ | Parsing form upload (Excel import) |
Database & ORM
| Teknologi | Versi Minimum | Kegunaan |
|---|
| PostgreSQL | 14+ | Database utama |
| SQLAlchemy | 2.0.23+ | ORM async (AsyncSession) |
| asyncpg | 0.29.0+ | Driver PostgreSQL async |
| Alembic | 1.13.0+ | Migrasi schema |
Validasi & Konfigurasi
| Teknologi | Versi Minimum | Kegunaan |
|---|
| Pydantic | 2.5.0+ | Validasi schema (v2 — bukan v1) |
| pydantic-settings | 2.1.0+ | Manajemen env vars & config |
| python-dotenv | 1.0.0+ | Load .env (fallback) |
Data & Matematika
| Teknologi | Versi Minimum | Kegunaan |
|---|
| NumPy | 1.26.2+ | Operasi matriks (kalibrasi IRT joint MLE) |
| SciPy | 1.11.4+ | Optimasi (scipy.optimize) untuk MLE theta |
| pandas | 2.1.4+ | Manipulasi data untuk laporan & impor Excel |
| openpyxl | 3.1.2+ | Baca/tulis file .xlsx klien |
AI & HTTP Eksternal
| Teknologi | Versi Minimum | Kegunaan |
|---|
| openai | 1.6.1+ | SDK (dipakai untuk OpenRouter — kompatibel API) |
| httpx | 0.26.0+ | HTTP client async untuk panggilan eksternal |
Background Job
| Teknologi | Versi Minimum | Kegunaan |
|---|
| Celery | 5.3.6+ | Task queue untuk job async (kalibrasi IRT, AI batch) |
| Redis | 5.0.1+ (server 6+) | Broker Celery + cache |
Testing
| Teknologi | Versi Minimum | Kegunaan |
|---|
| pytest | 7.4.3+ | Test runner |
| pytest-asyncio | 0.21.1+ | Test untuk kode async |
Admin Panel
| Teknologi | Versi Minimum | Kegunaan |
|---|
| fastapi-admin | 1.0.0+ | Admin UI dasar untuk CRUD model |
Infrastruktur & Deploy
| Teknologi | Kegunaan |
|---|
| Nginx | Reverse proxy + SSL termination |
| aaPanel + Python Manager | Server management (rekomendasi production) |
| Docker Compose | Alternatif deployment (lihat docker-compose.yml) |
Integrasi Eksternal
| Layanan | Kegunaan | Status |
|---|
| WordPress + Sejoli Tryout | Autentikasi siswa, pembelian, quota attempt | Planned (lihat Integrasi) |
| OpenRouter API | AI question generation (Qwen 2.5 32B, Mistral Small, Llama 3.3 70B) | Aktif |
Catatan Keputusan Teknologi
Beberapa keputusan desain yang patut diketahui kontributor:
Kenapa SQLAlchemy 2.0 async (bukan sync)?
CAT dan AI generation butuh I/O paralel (DB + HTTP ke OpenRouter). Async memungkinkan satu worker menangani banyak request concurrent tanpa blocking.
Kenapa Pydantic v2 (bukan v1)?
Performa 5-50x lebih cepat (Rust core) + dukungan JSON Schema yang lebih baik untuk OpenAPI docs otomatis FastAPI.
Kenapa Celery, bukan BackgroundTasks FastAPI?
BackgroundTasks FastAPI tidak persistent — kalau server restart, job hilang. Kalibrasi IRT bisa makan menit, perlu reliability queue.
Kenapa PostgreSQL (bukan SQLite/MongoDB)?
- Constraint matematika butuh (mis.
irt_b BETWEEN -3 AND 3) — PostgreSQL CHECK CONSTRAINT andal.
- Transaksi multi-tabel atomik saat update
TryoutStats + Session + UserAnswer.
- Full-text search built-in untuk admin search siswa.
Cek Versi Terinstal
Untuk melihat versi aktual yang terpasang di environment Anda:
cd ../yellow-bank-soal
source venv/bin/activate
pip freeze | grep -iE "fastapi|sqlalchemy|pydantic|celery"
Bacaan Lanjutan