abf761db07be18cd877eb8b2061261b880ec301b
Ich habe soweit automatisiert the Emails sortieren aber ich muss noch schauen was es fur bugs es gibt wenn die app online ist deswegen wurde ich mit diesen Commit die website veroffentlichen obwohjl es sein konnte das es noch nicht fertig ist und verkaufs bereit
EmailSorter
KI-gestützte E-Mail-Sortierung für mehr Produktivität und weniger Stress.
Überblick
EmailSorter ist eine SaaS-Anwendung, die automatisch E-Mails kategorisiert und sortiert. Die Anwendung nutzt:
- React + Vite Frontend mit Tailwind CSS
- Node.js + Express Backend
- Appwrite für Datenbank und Authentifizierung
- Stripe für Zahlungen und Subscriptions
- Mistral AI für KI-basierte E-Mail-Kategorisierung
- Gmail/Outlook API für E-Mail-Integration
- n8n (optional) für Automatisierungsworkflows
Projektstruktur
/
├── client/ # React Frontend
│ ├── src/
│ │ ├── components/ # UI Komponenten
│ │ ├── pages/ # Seiten
│ │ ├── context/ # React Context
│ │ └── lib/ # Utilities
│ └── package.json
├── server/ # Node.js Backend
│ ├── routes/ # API Routen
│ ├── services/ # Business Logic
│ └── package.json
├── n8n/ # n8n Workflows
│ └── workflows/
└── public/ # Legacy Frontend
Quick Start
1. Repository klonen
git clone <repo-url>
cd emailsorter
2. Dependencies installieren
# Frontend
cd client
npm install
# Backend
cd ../server
npm install
3. Umgebungsvariablen konfigurieren
# Frontend
cd client
cp env.example .env
# Bearbeite .env mit deinen Appwrite Credentials
# Backend
cd ../server
cp env.example .env
# Bearbeite .env mit allen erforderlichen Credentials
4. Appwrite Datenbank einrichten
cd server
npm run bootstrap:v2
5. Development Server starten
# Terminal 1: Backend
cd server
npm run dev
# Terminal 2: Frontend
cd client
npm run dev
Die App ist nun erreichbar unter:
- Frontend: http://localhost:5173
- Backend: http://localhost:3000
Konfiguration
Appwrite Setup
- Erstelle ein Projekt auf cloud.appwrite.io
- Erstelle einen API Key mit allen Berechtigungen
- Führe
npm run bootstrap:v2aus, um die Datenbank zu erstellen
Stripe Setup
- Erstelle einen Account auf stripe.com
- Erstelle Produkte und Preise für Basic, Pro, Business Pläne
- Konfiguriere den Webhook für
/api/subscription/webhook
Google OAuth (Gmail)
- Erstelle ein Projekt in der Google Cloud Console
- Aktiviere die Gmail API
- Erstelle OAuth 2.0 Credentials
- Füge
http://localhost:3000/api/oauth/gmail/callbackals Redirect URI hinzu
Microsoft OAuth (Outlook)
- Registriere eine App in Azure AD
- Füge Microsoft Graph Berechtigungen hinzu (Mail.Read, Mail.ReadWrite)
- Füge
http://localhost:3000/api/oauth/outlook/callbackals Redirect URI hinzu
Mistral AI API
- Erstelle einen API Key auf console.mistral.ai
- Füge den Key als
MISTRAL_API_KEYhinzu
Features
Landing Page
- Hero Section mit CTA
- Feature-Übersicht
- Pricing-Tabelle mit 3 Plänen
- Testimonials
- FAQ Sektion
Authentifizierung
- E-Mail/Passwort Registration
- Login mit Session-Management
- Passwort-Reset (konfigurierbar)
Dashboard
- E-Mail-Statistiken (sortiert heute/Woche/Monat)
- Kategorien-Verteilung
- Verbundene E-Mail-Konten
- Schnellzugriff-Aktionen
E-Mail-Sortierung
- Automatische Kategorisierung mit KI
- Unterstützte Kategorien:
- VIP / Wichtig
- Kunden / Projekte
- Rechnungen / Belege
- Newsletter
- Werbung / Promotions
- Social Media
- Security / 2FA
- Versand / Bestellungen
Subscription
- 14 Tage kostenlose Testphase
- 3 Pläne: Basic (9€), Pro (19€), Business (49€)
- Stripe Customer Portal
- Automatische Verlängerung
API Dokumentation
Authentifizierung
Die API nutzt Appwrite Sessions für Authentifizierung.
Endpoints
GET /api/email/accounts- Verbundene E-Mail-Konten abrufenPOST /api/email/connect- Neues E-Mail-Konto verbindenDELETE /api/email/accounts/:id- E-Mail-Konto trennenGET /api/email/stats- Sortierstatistiken abrufenPOST /api/email/sort- Manuelle Sortierung auslösen
OAuth
GET /api/oauth/gmail- Gmail OAuth startenGET /api/oauth/gmail/callback- Gmail OAuth CallbackGET /api/oauth/outlook- Outlook OAuth startenGET /api/oauth/outlook/callback- Outlook OAuth Callback
Subscription
POST /api/subscription/checkout- Checkout Session erstellenGET /api/subscription/status- Subscription Status abrufenPOST /api/subscription/portal- Customer Portal Session
n8n Integration (Optional)
Für visuelle Automatisierung kann n8n verwendet werden:
- Importiere den Workflow aus
n8n/workflows/email-sorter-workflow.json - Konfiguriere Gmail OAuth und OpenAI Credentials
- Aktiviere den Webhook-Trigger
Siehe n8n/README.md für Details.
Deployment
Frontend (Vercel/Netlify)
cd client
npm run build
# Deploye dist/ Ordner
Backend (Railway/Render/Heroku)
- Setze alle Umgebungsvariablen
- Deploy mit
npm startals Start-Befehl
Stripe Webhook
Aktualisiere die Webhook-URL im Stripe Dashboard auf deine Produktions-URL:
https://your-domain.com/api/subscription/webhook
Troubleshooting
Frontend startet nicht
- Prüfe, ob alle npm packages installiert sind
- Prüfe
.envDatei im client Ordner
Backend-Fehler
- Prüfe alle Umgebungsvariablen in
.env - Prüfe Appwrite Verbindung und API Key
OAuth funktioniert nicht
- Prüfe Redirect URIs in Google/Microsoft Console
- Prüfe Client ID und Secret
KI-Kategorisierung fehlerhaft
- Prüfe Mistral API Key
- Prüfe Rate Limits auf console.mistral.ai
Lizenz
ISC
Description
Languages
TypeScript
47.1%
JavaScript
42.2%
HTML
9%
CSS
1%
PowerShell
0.7%