Altes Projekt hinzugefuegt
This commit is contained in:
@@ -0,0 +1,434 @@
|
||||
# 🤖 BotKonzept - SaaS Platform für KI-Chatbots
|
||||
|
||||
## 📋 Übersicht
|
||||
|
||||
BotKonzept ist eine vollständige SaaS-Plattform für KI-Chatbots mit automatischer Kundenregistrierung, Trial-Management und E-Mail-Automation.
|
||||
|
||||
### Hauptfunktionen
|
||||
|
||||
- ✅ **Automatische Kundenregistrierung** über Website
|
||||
- ✅ **Automatische LXC-Instanz-Erstellung** für jeden Kunden
|
||||
- ✅ **7-Tage-Trial** mit automatischen Upgrade-Angeboten
|
||||
- ✅ **E-Mail-Automation** (Tag 3, 5, 7)
|
||||
- ✅ **Rabatt-System** (30% → 15% → Normalpreis)
|
||||
- ✅ **Supabase-Integration** für Kunden-Management
|
||||
- ✅ **Stripe/PayPal** Payment-Integration
|
||||
- ✅ **DSGVO-konform** (Daten in Deutschland)
|
||||
|
||||
## 🏗️ Architektur
|
||||
|
||||
```
|
||||
┌─────────────────────────────────────────────────────────────┐
|
||||
│ BotKonzept Platform │
|
||||
├─────────────────────────────────────────────────────────────┤
|
||||
│ │
|
||||
│ ┌──────────────┐ ┌──────────────┐ ┌───────────┐ │
|
||||
│ │ Website │─────▶│ n8n Webhook │─────▶│ PVE20 │ │
|
||||
│ │ botkonzept.de│ │ Registration │ │ install.sh│ │
|
||||
│ └──────────────┘ └──────────────┘ └───────────┘ │
|
||||
│ │ │ │ │
|
||||
│ │ ▼ ▼ │
|
||||
│ │ ┌──────────────┐ ┌───────────┐ │
|
||||
│ │ │ Supabase │ │ LXC (CTID)│ │
|
||||
│ │ │ PostgreSQL │ │ n8n │ │
|
||||
│ │ │ Customers │ │ PostgREST│ │
|
||||
│ │ │ Instances │ │ Postgres │ │
|
||||
│ │ └──────────────┘ └───────────┘ │
|
||||
│ │ │ │
|
||||
│ ▼ ▼ │
|
||||
│ ┌──────────────┐ ┌──────────────┐ │
|
||||
│ │ Trial Mgmt │ │ Email Auto │ │
|
||||
│ │ Workflow │─────▶│ Day 3,5,7 │ │
|
||||
│ │ (Cron Daily) │ │ Postfix/SES │ │
|
||||
│ └──────────────┘ └──────────────┘ │
|
||||
│ │
|
||||
└─────────────────────────────────────────────────────────────┘
|
||||
```
|
||||
|
||||
## 📁 Projekt-Struktur
|
||||
|
||||
```
|
||||
customer-installer/
|
||||
├── botkonzept-website/ # Landing Page & Registrierung
|
||||
│ ├── index.html # Hauptseite
|
||||
│ ├── css/style.css # Styling
|
||||
│ └── js/main.js # JavaScript (Form-Handling)
|
||||
│
|
||||
├── sql/
|
||||
│ ├── botkonzept_schema.sql # Datenbank-Schema
|
||||
│ └── init_pgvector.sql # Vector-DB für RAG
|
||||
│
|
||||
├── BotKonzept-Customer-Registration-Workflow.json
|
||||
│ # n8n Workflow für Registrierung
|
||||
│
|
||||
├── BotKonzept-Trial-Management-Workflow.json
|
||||
│ # n8n Workflow für Trial-Management
|
||||
│
|
||||
├── install.sh # LXC-Installation
|
||||
├── libsupabase.sh # Helper-Funktionen
|
||||
├── setup_nginx_proxy.sh # NGINX Reverse Proxy
|
||||
└── BOTKONZEPT_README.md # Diese Datei
|
||||
```
|
||||
|
||||
## 🚀 Installation & Setup
|
||||
|
||||
### 1. Datenbank einrichten
|
||||
|
||||
```bash
|
||||
# Supabase PostgreSQL Schema erstellen
|
||||
psql -U postgres -d customer < sql/botkonzept_schema.sql
|
||||
```
|
||||
|
||||
### 2. n8n Workflows importieren
|
||||
|
||||
1. Öffnen Sie n8n: `https://n8n.userman.de`
|
||||
2. Importieren Sie die Workflows:
|
||||
- `BotKonzept-Customer-Registration-Workflow.json`
|
||||
- `BotKonzept-Trial-Management-Workflow.json`
|
||||
3. Konfigurieren Sie die Credentials:
|
||||
- **SSH (PVE20):** Private Key für Proxmox
|
||||
- **PostgreSQL (Supabase):** Lokale Supabase-Instanz
|
||||
- **SMTP (Postfix/SES):** E-Mail-Versand
|
||||
|
||||
### 3. Website deployen
|
||||
|
||||
```bash
|
||||
# Website-Dateien auf Webserver kopieren
|
||||
cd botkonzept-website
|
||||
rsync -avz . user@botkonzept.de:/var/www/botkonzept/
|
||||
|
||||
# Oder lokal testen
|
||||
python3 -m http.server 8000
|
||||
# Öffnen: http://localhost:8000
|
||||
```
|
||||
|
||||
### 4. Webhook-URL konfigurieren
|
||||
|
||||
In `botkonzept-website/js/main.js`:
|
||||
|
||||
```javascript
|
||||
const CONFIG = {
|
||||
WEBHOOK_URL: 'https://n8n.userman.de/webhook/botkonzept-registration',
|
||||
// ...
|
||||
};
|
||||
```
|
||||
|
||||
## 📊 Customer Journey
|
||||
|
||||
### Tag 0: Registrierung
|
||||
|
||||
1. **Kunde registriert sich** auf botkonzept.de
|
||||
2. **n8n Webhook** empfängt Daten
|
||||
3. **Validierung** der Eingaben
|
||||
4. **Passwort generieren** (16 Zeichen)
|
||||
5. **Kunde in DB speichern** (Supabase)
|
||||
6. **LXC-Instanz erstellen** via `install.sh`
|
||||
7. **Instanz-Daten speichern** in DB
|
||||
8. **Willkommens-E-Mail** senden mit Zugangsdaten
|
||||
|
||||
**E-Mail-Inhalt:**
|
||||
- Dashboard-URL
|
||||
- Login-Daten
|
||||
- Chat-Webhook-URL
|
||||
- Upload-Formular-URL
|
||||
- Quick-Start-Guide
|
||||
|
||||
### Tag 3: Frühbucher-Angebot
|
||||
|
||||
**Automatisch um 9:00 Uhr:**
|
||||
- **E-Mail:** "30% Frühbucher-Rabatt"
|
||||
- **Preis:** €34,30/Monat (statt €49)
|
||||
- **Ersparnis:** €176,40/Jahr
|
||||
- **Gültigkeit:** 48 Stunden
|
||||
|
||||
### Tag 5: Erinnerung
|
||||
|
||||
**Automatisch um 9:00 Uhr:**
|
||||
- **E-Mail:** "Nur noch 2 Tage - 15% Rabatt"
|
||||
- **Preis:** €41,65/Monat (statt €49)
|
||||
- **Ersparnis:** €88,20/Jahr
|
||||
- **Warnung:** Instanz wird bald gelöscht
|
||||
|
||||
### Tag 7: Letzte Chance
|
||||
|
||||
**Automatisch um 9:00 Uhr:**
|
||||
- **E-Mail:** "Trial endet heute"
|
||||
- **Preis:** €49/Monat (Normalpreis)
|
||||
- **Keine Rabatte** mehr verfügbar
|
||||
- **Dringlichkeit:** Instanz wird um Mitternacht gelöscht
|
||||
|
||||
### Tag 8: Instanz löschen
|
||||
|
||||
**Automatisch um 9:00 Uhr:**
|
||||
- **LXC-Instanz löschen** via `pct destroy`
|
||||
- **Status aktualisieren** in DB
|
||||
- **Goodbye-E-Mail** mit Feedback-Umfrage
|
||||
|
||||
## 💰 Preis-Modell
|
||||
|
||||
### Trial (7 Tage)
|
||||
- **Preis:** €0
|
||||
- **Features:** Voller Funktionsumfang
|
||||
- **Limit:** 100 Dokumente, 1.000 Nachrichten
|
||||
|
||||
### Starter
|
||||
- **Normalpreis:** €49/Monat
|
||||
- **Tag 3 Rabatt:** €34,30/Monat (30% OFF)
|
||||
- **Tag 5 Rabatt:** €41,65/Monat (15% OFF)
|
||||
- **Features:**
|
||||
- Unbegrenzte Dokumente
|
||||
- 10.000 Nachrichten/Monat
|
||||
- Prioritäts-Support
|
||||
- Custom Branding
|
||||
- Analytics Dashboard
|
||||
|
||||
### Business
|
||||
- **Preis:** €149/Monat
|
||||
- **Features:**
|
||||
- 50.000 Nachrichten/Monat
|
||||
- Mehrere Chatbots
|
||||
- API-Zugriff
|
||||
- Dedizierter Support
|
||||
- SLA-Garantie
|
||||
|
||||
## 🔧 Technische Details
|
||||
|
||||
### Datenbank-Schema
|
||||
|
||||
**Haupttabellen:**
|
||||
- `customers` - Kundendaten
|
||||
- `instances` - LXC-Instanzen
|
||||
- `subscriptions` - Abonnements
|
||||
- `payments` - Zahlungen
|
||||
- `emails_sent` - E-Mail-Tracking
|
||||
- `usage_stats` - Nutzungsstatistiken
|
||||
- `audit_log` - Audit-Trail
|
||||
|
||||
### n8n Workflows
|
||||
|
||||
#### 1. Customer Registration Workflow
|
||||
|
||||
**Trigger:** Webhook (POST /webhook/botkonzept-registration)
|
||||
|
||||
**Schritte:**
|
||||
1. Validate Input
|
||||
2. Generate Password & Trial Date
|
||||
3. Create Customer in DB
|
||||
4. Create Customer Instance (SSH)
|
||||
5. Parse Install Output
|
||||
6. Save Instance to DB
|
||||
7. Send Welcome Email
|
||||
8. Log Email Sent
|
||||
9. Success Response
|
||||
|
||||
#### 2. Trial Management Workflow
|
||||
|
||||
**Trigger:** Cron (täglich 9:00 Uhr)
|
||||
|
||||
**Schritte:**
|
||||
1. Get Trial Customers (SQL Query)
|
||||
2. Check Day 3/5/7/8
|
||||
3. Send entsprechende E-Mail
|
||||
4. Log Email Sent
|
||||
5. (Tag 8) Delete Instance
|
||||
|
||||
### E-Mail-Templates
|
||||
|
||||
Alle E-Mails sind:
|
||||
- ✅ **Responsive** (Mobile-optimiert)
|
||||
- ✅ **HTML-formatiert** mit Inline-CSS
|
||||
- ✅ **Branded** mit Logo und Farben
|
||||
- ✅ **CTA-optimiert** mit klaren Buttons
|
||||
- ✅ **Tracking-fähig** (Opens, Clicks)
|
||||
|
||||
### Security
|
||||
|
||||
- ✅ **HTTPS** für alle Verbindungen
|
||||
- ✅ **JWT-Tokens** für API-Authentifizierung
|
||||
- ✅ **Row Level Security** in Supabase
|
||||
- ✅ **Passwort-Hashing** (bcrypt)
|
||||
- ✅ **DSGVO-konform** (Daten in DE)
|
||||
- ✅ **Input-Validierung** auf allen Ebenen
|
||||
|
||||
## 📧 E-Mail-Konfiguration
|
||||
|
||||
### Postfix Gateway (OPNsense)
|
||||
|
||||
```bash
|
||||
# SMTP-Server: 192.168.45.1
|
||||
# Port: 25 (intern)
|
||||
# Relay: Amazon SES
|
||||
```
|
||||
|
||||
### Sendy.co Integration (optional)
|
||||
|
||||
Für Newsletter und Marketing-E-Mails:
|
||||
|
||||
```javascript
|
||||
// In js/main.js
|
||||
function subscribeNewsletter(email) {
|
||||
const sendyUrl = 'https://sendy.userman.de/subscribe';
|
||||
// ...
|
||||
}
|
||||
```
|
||||
|
||||
## 💳 Payment-Integration
|
||||
|
||||
### Stripe
|
||||
|
||||
```javascript
|
||||
// Stripe Checkout Session erstellen
|
||||
const session = await stripe.checkout.sessions.create({
|
||||
customer_email: customer.email,
|
||||
line_items: [{
|
||||
price: 'price_starter_monthly',
|
||||
quantity: 1,
|
||||
}],
|
||||
mode: 'subscription',
|
||||
success_url: 'https://botkonzept.de/success',
|
||||
cancel_url: 'https://botkonzept.de/cancel',
|
||||
});
|
||||
```
|
||||
|
||||
### PayPal
|
||||
|
||||
```javascript
|
||||
// PayPal Subscription erstellen
|
||||
paypal.Buttons({
|
||||
createSubscription: function(data, actions) {
|
||||
return actions.subscription.create({
|
||||
plan_id: 'P-STARTER-MONTHLY'
|
||||
});
|
||||
}
|
||||
}).render('#paypal-button-container');
|
||||
```
|
||||
|
||||
## 📈 Analytics & Tracking
|
||||
|
||||
### Google Analytics
|
||||
|
||||
```html
|
||||
<!-- In index.html -->
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=GA_MEASUREMENT_ID"></script>
|
||||
```
|
||||
|
||||
### Conversion Tracking
|
||||
|
||||
```javascript
|
||||
// In js/main.js
|
||||
function trackConversion(eventName, data) {
|
||||
gtag('event', eventName, {
|
||||
'event_category': 'registration',
|
||||
'event_label': 'trial',
|
||||
'value': 0
|
||||
});
|
||||
}
|
||||
```
|
||||
|
||||
## 🧪 Testing
|
||||
|
||||
### Lokales Testing
|
||||
|
||||
```bash
|
||||
# Website lokal testen
|
||||
cd botkonzept-website
|
||||
python3 -m http.server 8000
|
||||
|
||||
# n8n Workflow testen
|
||||
curl -X POST https://n8n.userman.de/webhook/botkonzept-registration \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"firstName": "Max",
|
||||
"lastName": "Mustermann",
|
||||
"email": "test@example.com",
|
||||
"company": "Test GmbH"
|
||||
}'
|
||||
```
|
||||
|
||||
### Datenbank-Queries
|
||||
|
||||
```sql
|
||||
-- Alle Trial-Kunden anzeigen
|
||||
SELECT * FROM customer_overview WHERE status = 'trial';
|
||||
|
||||
-- E-Mails der letzten 7 Tage
|
||||
SELECT * FROM emails_sent WHERE sent_at >= NOW() - INTERVAL '7 days';
|
||||
|
||||
-- Trials die bald ablaufen
|
||||
SELECT * FROM trials_expiring_soon;
|
||||
|
||||
-- Revenue-Übersicht
|
||||
SELECT * FROM revenue_metrics;
|
||||
```
|
||||
|
||||
## 🔄 Workflow-Verbesserungen
|
||||
|
||||
### Vorschläge für Erweiterungen
|
||||
|
||||
1. **A/B Testing**
|
||||
- Verschiedene E-Mail-Varianten testen
|
||||
- Conversion-Rates vergleichen
|
||||
|
||||
2. **Personalisierung**
|
||||
- Branchen-spezifische E-Mails
|
||||
- Nutzungsbasierte Empfehlungen
|
||||
|
||||
3. **Retargeting**
|
||||
- Abgebrochene Registrierungen
|
||||
- Reaktivierung inaktiver Kunden
|
||||
|
||||
4. **Referral-Programm**
|
||||
- Kunden werben Kunden
|
||||
- Rabatte für Empfehlungen
|
||||
|
||||
5. **Upselling**
|
||||
- Automatische Upgrade-Vorschläge
|
||||
- Feature-basierte Empfehlungen
|
||||
|
||||
## 📞 Support & Kontakt
|
||||
|
||||
- **Website:** https://botkonzept.de
|
||||
- **E-Mail:** support@botkonzept.de
|
||||
- **Dokumentation:** https://docs.botkonzept.de
|
||||
- **Status:** https://status.botkonzept.de
|
||||
|
||||
## 📝 Lizenz
|
||||
|
||||
Proprietär - Alle Rechte vorbehalten
|
||||
|
||||
## 🎯 Roadmap
|
||||
|
||||
### Q1 2025
|
||||
- [x] Website-Launch
|
||||
- [x] Automatische Registrierung
|
||||
- [x] Trial-Management
|
||||
- [ ] Stripe-Integration
|
||||
- [ ] PayPal-Integration
|
||||
|
||||
### Q2 2025
|
||||
- [ ] Mobile App
|
||||
- [ ] White-Label-Option
|
||||
- [ ] API-Dokumentation
|
||||
- [ ] Marketplace für Templates
|
||||
|
||||
### Q3 2025
|
||||
- [ ] Multi-Language Support
|
||||
- [ ] Advanced Analytics
|
||||
- [ ] Team-Features
|
||||
- [ ] Enterprise-Plan
|
||||
|
||||
## 🙏 Credits
|
||||
|
||||
Entwickelt mit:
|
||||
- **n8n** - Workflow-Automation
|
||||
- **Supabase** - Backend-as-a-Service
|
||||
- **Proxmox** - Virtualisierung
|
||||
- **PostgreSQL** - Datenbank
|
||||
- **PostgREST** - REST API
|
||||
- **Ollama** - LLM-Integration
|
||||
|
||||
---
|
||||
|
||||
**Version:** 1.0.0
|
||||
**Letzte Aktualisierung:** 25.01.2025
|
||||
**Autor:** MediaMetz
|
||||
Reference in New Issue
Block a user