🚀 Features Implemented: - Full-stack SvelteKit application with Express backend - Role-based authentication (Admin, Fuel Manager, Goods Manager) - Real-time notifications with Socket.IO - SQLite database with auto-initialization in /db directory - Comprehensive user management and fuel slip tracking - Responsive design with Turkish language support 🏗️ Architecture: - Frontend: Svelte + SvelteKit + Vite - Backend: Node.js + Express + Socket.IO - Database: SQLite3 with automatic schema creation - Security: bcrypt password hashing + session management - Real-time: Socket.IO for instant notifications 📁 Project Structure: - Organized documentation in /docs directory - Database files in /db directory with auto-setup - Clean separation of API routes and UI components - Comprehensive documentation including processes, architecture, and user guides 📚 Documentation: - PROJECT_PROCESSES.md: Comprehensive project documentation - KNOWLEDGE_BASE.md: Quick reference and user guide - TEST_GUIDE.md: Testing and quality assurance guide - README_ADMIN_FEATURES.md: Admin functionality guide - Full API documentation and system architecture 🔒 Security Features: - Role-based authorization system - Encrypted password storage with bcrypt - Session-based authentication - SQL injection protection with parameterized queries - CORS configuration and input validation 🎯 Key Features: - Fuel slip creation and approval workflow - Real-time notifications between users - PDF generation for fuel slips - User and vehicle management - Comprehensive audit logging 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
166 lines
4.4 KiB
Markdown
166 lines
4.4 KiB
Markdown
# YTP Bilgi Bankası
|
||
|
||
Yakıt Takip Sistemi kapsamlı bilgi bankası - hızlı referans, kılavuzlar ve sorun giderme rehberi.
|
||
|
||
|
||
### İlk Yakıt Fişi Oluşturma
|
||
|
||
1. **Giriş Yap**: Yakıt sorumlusu ile giriş yapın
|
||
2. **Kaynak Kontrolü**: Araç, birlik ve personel kayıtlarını kontrol edin
|
||
3. **Fiş Oluştur**: "Yeni Fiş" butonuna tıklayın
|
||
4. **Form Doldur**: Tüm zorunlu alanları doldurun
|
||
5. **Onay Gönder**: Mal sorumlusuna gönder
|
||
6. **Bildirim Takibi**: Real-time bildirimleri izleyin
|
||
|
||
## 🏗️ Sistem Mimarisi
|
||
|
||
### Mimari Diyagram
|
||
```
|
||
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
|
||
│ Frontend │ │ Backend │ │ Database │
|
||
│ (Svelte) │◄──►│ (Express) │◄──►│ (SQLite) │
|
||
│ │ │ │ │ │
|
||
│ - UI Components │ │ - REST API │ │ - users │
|
||
│ - State Mgmt │ │ - Socket.IO │ │ - vehicles │
|
||
│ - Routing │ │ - Auth/Authz │ │ - units │
|
||
│ - API Client │ │ - PDF Generation│ │ - fuel_personnel│
|
||
└─────────────────┘ └─────────────────┘ │ - fuel_slips │
|
||
└─────────────────┘
|
||
```
|
||
|
||
### Teknoloji Stack Karşılaştırması
|
||
|
||
| Katman | Teknoloji | Neden? | Alternatifler |
|
||
|--------|-----------|--------|---------------|
|
||
| Frontend | Svelte + Vite | Hızlı, küçük bundle, reaktif | React, Vue, Angular |
|
||
| Backend | Node.js + Express | Hızlı development, JavaScript ekosistemi | Python, PHP, Java |
|
||
| Database | SQLite3 | Hafif, kurulum gerektirmeyen, taşınabilir | PostgreSQL, MySQL |
|
||
| Real-time | Socket.IO | WebSocket wrapper, fallback mekanizmaları | Raw WebSocket, SSE |
|
||
| PDF | PDFKit | Node.js uyumlu, esnek | Puppeteer, jsPDF |
|
||
|
||
## 👥 Kullanıcı Rolleri ve Yetkileri
|
||
|
||
### Admin (Sistem Yöneticisi)
|
||
**Yetkiler:**
|
||
- ✅ Tüm kullanıcıları yönetme
|
||
- ✅ Mal sorumluları ekleme/güncelleme/silme
|
||
- ✅ Araç kayıtlarını yönetme
|
||
- ✅ Birlik bilgilerini yönetme
|
||
- ✅ Personel kayıtlarını yönetme
|
||
- ✅ Sistem ayarlarını yapılandırma
|
||
- ❌ Yakıt fişi oluşturma
|
||
- ❌ Fiş onaylama/reddetme
|
||
|
||
**Kullanım Alanları:**
|
||
- Sistem kurulum ve bakım
|
||
- Kullanıcı yönetimi
|
||
- Temel veri girişi
|
||
- Raporlama ve analiz
|
||
|
||
### Yakıt Sorumlusu
|
||
**Yetkiler:**
|
||
- ✅ Yakıt fişi oluşturma
|
||
- ✅ Fiş durumlarını takip etme
|
||
- ✅ PDF fiş indirme
|
||
- ✅ Kaynak bilgilerini görme
|
||
- ❌ Kullanıcı yönetimi
|
||
- ❌ Fiş onaylama
|
||
- ❌ Temel veri düzenleme
|
||
|
||
**Kullanım Alanları:**
|
||
- Günlük yakıt ikmal işlemleri
|
||
- Fiş oluşturma ve takip
|
||
- Raporlama
|
||
|
||
### Mal Sorumlusu
|
||
**Yetkiler:**
|
||
- ✅ Atanan fişleri görme
|
||
- ✅ Fiş onaylama/reddetme
|
||
- ✅ Onay/reddetme gerekçesi ekleme
|
||
- ✅ Atanan fişleri arşivleme
|
||
- ❌ Fiş oluşturma
|
||
- ❌ Kullanıcı yönetimi
|
||
- ❌ Temel veri düzenleme
|
||
|
||
**Kullanım Alanları:**
|
||
- Yakıt ikmal onay süreçleri
|
||
- Stok takibi
|
||
- Raporlama
|
||
|
||
## 🔄 İş Akışları
|
||
|
||
### 1. Kullanıcı Yönetimi Akışı (Admin)
|
||
```
|
||
Başlangıç
|
||
↓
|
||
Admin Girişi
|
||
↓
|
||
"Kullanıcı Yönetimi" → "Mal Sorumluları"
|
||
↓
|
||
"Ekle" butonu → Form doldur → Kaydet
|
||
↓
|
||
Kullanıcı oluşturuldu → Bilgilendirme
|
||
↓
|
||
Bitiş
|
||
```
|
||
|
||
### 2. Yakıt Fişi Oluşturma Akışı
|
||
```
|
||
Başlangıç
|
||
↓
|
||
Yakıt Sorumlusu Girişi
|
||
↓
|
||
"Yeni Fiş" butonu
|
||
↓
|
||
Form doldurma:
|
||
├─ Tarih seçimi
|
||
├─ Kuvvet seçimi
|
||
├─ Birlik seçimi
|
||
├─ Araç seçimi
|
||
├─ Yakıt bilgileri
|
||
├─ Personel seçimi
|
||
└─ Mal sorumlusu atama
|
||
↓
|
||
"Oluştur" butonu
|
||
↓
|
||
Validasyon → Veritabanı kayıt
|
||
↓
|
||
Mal sorumlusuna bildirim
|
||
↓
|
||
PDF fiş oluştur (opsiyonel)
|
||
↓
|
||
Bitiş
|
||
```
|
||
|
||
### 3. Fiş Onay Akışı
|
||
```
|
||
Başlangıç
|
||
↓
|
||
Mal Sorumlusu Girişi
|
||
↓
|
||
"Atanan Fişler" listesi
|
||
↓
|
||
Fiş seçimi → Detay görüntüle
|
||
↓
|
||
Karar verme:
|
||
├─ "Onayla" → Durum: approved
|
||
└─ "Reddet" → Gerekçe gir → Durum: rejected
|
||
↓
|
||
Yakıt sorumlusuna bildirim
|
||
↓
|
||
Bitiş
|
||
```
|
||
|
||
### 4. Real-time Bildirim Akışı
|
||
```
|
||
Olay Tetiklenir
|
||
↓
|
||
Server Event Oluştur
|
||
↓
|
||
Socket.IO Emit
|
||
↓
|
||
İlgili Client'a Gönder
|
||
↓
|
||
UI Güncellenir
|
||
↓
|
||
Kullanıcı Bilgilendirilir |