249 lines
6.2 KiB
Markdown
249 lines
6.2 KiB
Markdown
# Webshop System
|
|
|
|
Ein freies Webshop-System basierend auf PrestaShop, jedoch ohne Registrierungszwang für den Betreiber.
|
|
|
|
## 🚀 Features
|
|
|
|
### ✅ Implementiert (Woche 1-3)
|
|
|
|
#### **Woche 1: Grundstruktur & Core**
|
|
- ✅ Docker-Setup (PHP 8.1, MySQL, nginx)
|
|
- ✅ Composer-Konfiguration
|
|
- ✅ Core-Klassen (Context, Shop, Configuration, Tools, Language, Country, Cookie)
|
|
- ✅ Core-Utilities (CacheClearLocker, SessionHandler, Installer)
|
|
- ✅ Datenbankschema mit allen Tabellen
|
|
- ✅ Installer mit Initialdaten
|
|
|
|
#### **Woche 2: Admin-System**
|
|
- ✅ Admin-Login-System
|
|
- ✅ Admin-Dashboard
|
|
- ✅ Produkt-Katalog (CRUD)
|
|
- ✅ Frontend-Warenkorb
|
|
- ✅ Checkout-System
|
|
- ✅ Kundenverwaltung (CRUD)
|
|
- ✅ Bestellungsverwaltung (CRUD)
|
|
- ✅ Kategorienverwaltung (CRUD)
|
|
- ✅ Einstellungen & Konfiguration
|
|
|
|
#### **Woche 3: Frontend & Testing**
|
|
- ✅ **Erweiterte Frontend-Suche** mit AJAX-Live-Suggestions
|
|
- ✅ **Erweiterte Filter** (Kategorie, Preisbereich, Sortierung)
|
|
- ✅ **Pagination** für Suchergebnisse
|
|
- ✅ **Unit-Tests** (PHPUnit) für Produkt-Management
|
|
- ✅ **Integration-Tests** für Admin-Controller
|
|
- ✅ **PHPUnit-Konfiguration** mit Coverage-Reporting
|
|
- ✅ **Composer-Scripts** für Testing und Code-Qualität
|
|
|
|
### 🔄 In Entwicklung (Woche 4)
|
|
|
|
#### **Woche 4: Erweiterte Features**
|
|
- 🔄 **Frontend-Produktdetailseiten** mit Bewertungen
|
|
- 🔄 **Kundenkonto-System** (Registrierung, Login, Profil)
|
|
- 🔄 **Wunschliste-Funktion**
|
|
- 🔄 **Newsletter-System**
|
|
- 🔄 **SEO-Optimierung** (Meta-Tags, Sitemap)
|
|
- 🔄 **Performance-Optimierung** (Caching, CDN)
|
|
- 🔄 **API-System** für externe Integrationen
|
|
|
|
### 📋 Geplant (Woche 5-6)
|
|
|
|
#### **Woche 5: Erweiterte Admin-Features**
|
|
- 📋 **Statistiken & Analytics**
|
|
- 📋 **Bulk-Import/Export** (CSV, Excel)
|
|
- 📋 **Erweiterte Bestellungsverwaltung**
|
|
- 📋 **Lagerverwaltung**
|
|
- 📋 **Rabatt- und Gutschein-System**
|
|
- 📋 **Multi-Shop-Support**
|
|
|
|
#### **Woche 6: Finalisierung & Deployment**
|
|
- 📋 **Payment-Integration** (Stripe, PayPal)
|
|
- 📋 **E-Mail-Templates**
|
|
- 📋 **Backup-System**
|
|
- 📋 **Security-Audit**
|
|
- 📋 **Deployment-Scripts**
|
|
- 📋 **Dokumentation**
|
|
|
|
## 🛠 Installation
|
|
|
|
### Voraussetzungen
|
|
- Docker & Docker Compose
|
|
- Git
|
|
|
|
### Schnellstart
|
|
```bash
|
|
# Repository klonen
|
|
git clone https://github.com/webshop/freeshop.git
|
|
cd freeshop
|
|
|
|
# Docker-Container starten
|
|
docker-compose up -d
|
|
|
|
# Dependencies installieren
|
|
docker-compose exec app composer install
|
|
|
|
# Umgebungsvariablen konfigurieren
|
|
cp .env.example .env
|
|
# .env-Datei anpassen
|
|
|
|
# Datenbank installieren
|
|
docker-compose exec app php install.php
|
|
|
|
# Tests ausführen
|
|
docker-compose exec app composer test
|
|
```
|
|
|
|
### Docker-Services
|
|
- **app**: PHP 8.1 Application
|
|
- **db**: MySQL 8.0 Database
|
|
- **nginx**: Nginx Reverse Proxy
|
|
- **redis**: Redis Cache (optional)
|
|
|
|
## 🧪 Testing
|
|
|
|
### Test-Suites
|
|
```bash
|
|
# Alle Tests
|
|
composer test
|
|
|
|
# Unit-Tests
|
|
composer test:unit
|
|
|
|
# Integration-Tests
|
|
composer test:integration
|
|
|
|
# Feature-Tests
|
|
composer test:feature
|
|
|
|
# Coverage-Report
|
|
composer test:coverage
|
|
```
|
|
|
|
### Code-Qualität
|
|
```bash
|
|
# Code-Style prüfen
|
|
composer cs
|
|
|
|
# Code-Style automatisch korrigieren
|
|
composer cs:fix
|
|
|
|
# Static Analysis
|
|
composer stan
|
|
|
|
# Security-Check
|
|
composer security
|
|
```
|
|
|
|
## 📁 Projektstruktur
|
|
|
|
```
|
|
new/
|
|
├── app/
|
|
│ ├── Admin/controllers/ # Admin-Controller
|
|
│ ├── Front/controllers/ # Frontend-Controller
|
|
│ ├── Core/ # Core-Klassen
|
|
│ └── Helpers/ # Hilfsfunktionen
|
|
├── templates/
|
|
│ ├── admin/ # Admin-Templates
|
|
│ └── front/ # Frontend-Templates
|
|
├── tests/
|
|
│ ├── Unit/ # Unit-Tests
|
|
│ ├── Integration/ # Integration-Tests
|
|
│ └── Feature/ # Feature-Tests
|
|
├── docker-compose.yml # Docker-Konfiguration
|
|
├── composer.json # PHP-Dependencies
|
|
├── phpunit.xml # Test-Konfiguration
|
|
└── README.md # Diese Datei
|
|
```
|
|
|
|
## 🔧 Konfiguration
|
|
|
|
### Umgebungsvariablen (.env)
|
|
```env
|
|
# Datenbank
|
|
DB_HOST=db
|
|
DB_PORT=3306
|
|
DB_DATABASE=freeshop
|
|
DB_USERNAME=freeshop_user
|
|
DB_PASSWORD=freeshop_password
|
|
|
|
# Application
|
|
APP_ENV=production
|
|
APP_DEBUG=false
|
|
APP_URL=https://your-domain.com
|
|
|
|
# Cache
|
|
CACHE_DRIVER=redis
|
|
REDIS_HOST=redis
|
|
REDIS_PORT=6379
|
|
|
|
# Mail
|
|
MAIL_DRIVER=smtp
|
|
MAIL_HOST=smtp.gmail.com
|
|
MAIL_PORT=587
|
|
MAIL_USERNAME=your-email@gmail.com
|
|
MAIL_PASSWORD=your-password
|
|
```
|
|
|
|
## 🚀 Deployment
|
|
|
|
### Production-Setup
|
|
```bash
|
|
# Production-Build
|
|
docker-compose -f docker-compose.prod.yml up -d
|
|
|
|
# SSL-Zertifikat (Let's Encrypt)
|
|
docker-compose exec nginx certbot --nginx
|
|
|
|
# Backup erstellen
|
|
docker-compose exec db mysqldump -u root -p freeshop > backup.sql
|
|
```
|
|
|
|
## 📊 Features im Detail
|
|
|
|
### 🔍 Erweiterte Frontend-Suche
|
|
- **Live-Suggestions** mit AJAX
|
|
- **Erweiterte Filter** (Kategorie, Preis, Sortierung)
|
|
- **Pagination** für große Ergebnislisten
|
|
- **Responsive Design** mit Bootstrap 5
|
|
|
|
### 🧪 Testing-Suite
|
|
- **Unit-Tests** für alle Core-Funktionen
|
|
- **Integration-Tests** für Controller
|
|
- **Code-Coverage** mit detaillierten Reports
|
|
- **Automated Testing** in CI/CD
|
|
|
|
### 🔒 Sicherheit
|
|
- **SQL-Injection-Schutz** durch Prepared Statements
|
|
- **XSS-Schutz** durch Input-Validierung
|
|
- **CSRF-Schutz** für alle Formulare
|
|
- **Session-Management** mit sicheren Cookies
|
|
|
|
## 🤝 Beitragen
|
|
|
|
1. Fork das Repository
|
|
2. Erstelle einen Feature-Branch (`git checkout -b feature/AmazingFeature`)
|
|
3. Committe deine Änderungen (`git commit -m 'Add some AmazingFeature'`)
|
|
4. Push zum Branch (`git push origin feature/AmazingFeature`)
|
|
5. Öffne einen Pull Request
|
|
|
|
## 📄 Lizenz
|
|
|
|
Dieses Projekt ist unter der GPL v3 Lizenz lizenziert - siehe [LICENSE](LICENSE) Datei für Details.
|
|
|
|
## 🙏 Danksagungen
|
|
|
|
- Basierend auf PrestaShop
|
|
- Bootstrap 5 für das Frontend-Design
|
|
- PHPUnit für das Testing-Framework
|
|
- Docker für die Containerisierung
|
|
|
|
## 📞 Support
|
|
|
|
- **Issues**: [GitHub Issues](https://github.com/webshop/freeshop/issues)
|
|
- **Discussions**: [GitHub Discussions](https://github.com/webshop/freeshop/discussions)
|
|
- **Email**: info@webshop-system.de
|
|
|
|
---
|
|
|
|
**Entwicklungsstand**: Woche 3 abgeschlossen ✅
|
|
**Nächster Meilenstein**: Frontend-Verbesserungen & API-System |