- Python 3.11+
- Node.js 18+
- Git
# Proje dizinine git
cd lab-report-app\backend
# Sanal ortam oluştur
python -m venv venv
# Sanal ortamı aktifleştir (PowerShell execution policy hatası alırsanız)
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
# Aktifleştir
.\venv\Scripts\Activate.ps1
# Bağımlılıkları yükle
pip install -r requirements.txt
# Örnek verileri yükle
python scripts\seed_data.py
# Backend'i başlat
python app\main.pyBackend çalışıyor: http://localhost:8000
API Dokümanları: http://localhost:8000/docs
# Backend dizininde
pytest tests\test_api.py -vBeklenen çıktı: 13 test PASSED ✅
# Projeleri listele
curl http://localhost:8000/api/projects/
# Sağlık kontrolü
curl http://localhost:8000/healthbackend/
├── app/
│ ├── main.py ✅ FastAPI uygulaması
│ ├── database.py ✅ SQLite bağlantısı
│ ├── models/__init__.py ✅ Veritabanı modelleri
│ ├── schemas.py ✅ API şemaları
│ └── api/
│ ├── projects.py ✅ Proje API (TAMAMLANDI)
│ ├── experiments.py ✅ Deney API (TAMAMLANDI)
│ ├── entries.py ✅ Entry API (TAMAMLANDI)
│ ├── attachments.py 🔲 Dosya yükleme (TODO)
│ ├── datasets.py 🔲 Veri içe aktarma (TODO)
│ ├── reports.py 🔲 Rapor üretimi (TODO)
│ ├── search.py 🔲 Arama (TODO)
│ └── templates.py 🔲 Şablon yönetimi (TODO)
├── tests/
│ └── test_api.py ✅ 13 API testi
├── scripts/
│ └── seed_data.py ✅ Örnek veri yükleyici
├── requirements.txt ✅ Python bağımlılıkları
└── DEVELOPMENT.md ✅ Geliştirici kılavuzu
- Backend iskeleti (FastAPI + SQLModel)
- Veritabanı modelleri (8 tablo)
- Proje API (CRUD)
- Deney API (CRUD)
- Entry API (CRUD + versiyonlama)
- Pydantic şemaları (validasyon)
- Audit trail (create/update kayıtları)
- API testleri (13 test)
- Örnek veri yükleyici
- Dosya yükleme (attachments API)
- Dataset içe aktarma (CSV/XLSX)
- Grafik üretimi (matplotlib PNG)
- DOCX rapor üretimi (docxtpl)
- PDF rapor üretimi (WeasyPrint)
- XLSX rapor üretimi (openpyxl)
- Arama & filtreleme
- Şablon yönetimi
- Frontend (React + TypeScript)
- Tauri desktop paketleme
test_api.py::test_read_root PASSED
test_api.py::test_health_check PASSED
test_api.py::test_create_project PASSED
test_api.py::test_list_projects PASSED
test_api.py::test_get_project PASSED
test_api.py::test_create_experiment PASSED
test_api.py::test_create_entry PASSED
test_api.py::test_update_entry_creates_new_version PASSED
test_api.py::test_list_entries_with_filters PASSED
test_api.py::test_project_not_found PASSED
test_api.py::test_archive_project PASSED
Konum: %APPDATA%\lab-report-app\lab_reports.db
- 3 kullanıcı (Dr. Ahmet, Dr. Ayşe, Prof. Mehmet)
- 2 proje (YBCO, Grafen)
- 3 deney (VDP, Hall, Raman)
- 2 entry (günlük kayıtları)
- 2 şablon (DOCX, HTML)
users(id, name, email, role, created_at)
projects(id, name, description, tags, created_by, created_at)
experiments(id, project_id, title, description, tags, start_ts)
entries(id, experiment_id, author_id, title, body_md, version, ...)
attachments(id, entry_id, file_path, file_type, sha256, ...)
datasets(id, entry_id, name, source_file, columns_json, ...)
charts(id, dataset_id, chart_type, image_path, ...)
templates(id, type, name, file_path, is_default, ...)- Backend API çalışıyor (8000 portu)
- 3 ana endpoint hazır (projects, experiments, entries)
- Entry versiyonlama çalışıyor
- Audit trail kaydediliyor
- API testleri geçiyor (%80+ coverage)
- Örnek veriler yükleniyor
- Dosya yükleme ve önizleme
- CSV içe aktar → grafik PNG üret
- 1 DOCX + 1 PDF + 1 XLSX üretimi
- Arama ve filtreleme
- Frontend UI (React)
- Tauri desktop exe
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUsernetstat -ano | findstr :8000
taskkill /PID <PID> /F# Backend dizininden çalıştırın
cd backend
python app\main.py- API Dokümanları: http://localhost:8000/docs (Swagger UI)
- Geliştirici Kılavuzu:
backend/DEVELOPMENT.md - Ana README:
README.md
Backend MVP'nin ilk fazı tamamlandı. Şimdi testleri çalıştırabilir ve API endpoint'lerini deneyebilirsiniz.
Sonraki adım: attachments.py ve datasets.py endpoint'lerini geliştirmek.