🌊 Red Sea Dreams Dokumentation
Klicken Sie auf "Als PDF drucken" um diese Seite als PDF zu speichern.

🚀 Red Sea Dreams - Installations & Setup Anleitung

Schnellstart

Diese Anleitung erklärt, wie Sie das Red Sea Dreams Projekt lokal einrichten oder auf einem eigenen Server deployen können.


📋 Voraussetzungen

Software

Software Version Download
Node.js 18+ nodejs.org
Python 3.11+ python.org
MongoDB 6+ mongodb.com
Git 2.40+ git-scm.com

Accounts (für volle Funktionalität)


📥 Schritt 1: Projekt herunterladen

Von GitHub (empfohlen)

git clone https://github.com/IHR-USERNAME/redseadreams.git
cd redseadreams

Oder ZIP entpacken

unzip redseadreams.zip
cd redseadreams

🗄️ Schritt 2: MongoDB einrichten

Option A: Lokale Installation

# MongoDB starten
mongod --dbpath /data/db

# Verbindung testen
mongosh

Option B: MongoDB Atlas (Cloud)

  1. Account erstellen: mongodb.com/atlas
  2. Cluster erstellen (Free Tier verfügbar)
  3. Connection String kopieren

⚙️ Schritt 3: Backend einrichten

3.1 In Backend-Ordner wechseln

cd backend

3.2 Python Virtual Environment erstellen

# Virtual Environment erstellen
python -m venv venv

# Aktivieren (Windows)
venv\Scripts\activate

# Aktivieren (Mac/Linux)
source venv/bin/activate

3.3 Dependencies installieren

pip install -r requirements.txt

3.4 Umgebungsvariablen konfigurieren

# .env Datei erstellen
cp .env.example .env

# .env bearbeiten
nano .env

.env Inhalt:

# Datenbank
MONGO_URL=mongodb://localhost:27017
DB_NAME=redseadreams

# Stripe (von stripe.com/dashboard)
STRIPE_SECRET_KEY=sk_test_...
STRIPE_WEBHOOK_SECRET=whsec_...

# Amadeus (von developers.amadeus.com)
AMADEUS_API_KEY=...
AMADEUS_API_SECRET=...

# E-Mail (optional)
SMTP_HOST=smtp.example.com
SMTP_PORT=587
SMTP_USER=...
SMTP_PASSWORD=...

# AI Chatbot (optional)
EMERGENT_LLM_KEY=...

3.5 Backend starten

# Entwicklung
uvicorn server:app --host 0.0.0.0 --port 8001 --reload

# Produktion
gunicorn server:app -w 4 -k uvicorn.workers.UvicornWorker -b 0.0.0.0:8001

3.6 Backend testen

# In neuem Terminal
curl http://localhost:8001/api/hotels

🎨 Schritt 4: Frontend einrichten

4.1 In Frontend-Ordner wechseln

cd frontend

4.2 Dependencies installieren

# Mit Yarn (empfohlen)
yarn install

# Oder mit npm
npm install

4.3 Umgebungsvariablen konfigurieren

# .env Datei erstellen
cp .env.example .env

# .env bearbeiten
nano .env

.env Inhalt:

REACT_APP_BACKEND_URL=http://localhost:8001

4.4 Frontend starten

# Entwicklung
yarn start

# Build für Produktion
yarn build

4.5 Im Browser öffnen

http://localhost:3000

🌱 Schritt 5: Datenbank initialisieren

Das Backend erstellt automatisch Testdaten beim ersten Start. Falls Sie die Datenbank manuell initialisieren möchten:

# MongoDB Shell öffnen
mongosh

# Datenbank auswählen
use redseadreams

# Testdaten prüfen
db.hotels.find().count()
db.activities.find().count()

🔐 Schritt 6: Admin-Zugänge

Super-Admin erstellen

// In MongoDB Shell
use redseadreams

db.super_admins.insertOne({
  id: "admin-1",
  email: "admin@redseadreams.com",
  password_hash: "$2b$12$...", // bcrypt hash von "admin123"
  created_at: new Date()
})

Hotel-Admin erstellen

db.hotel_admins.insertOne({
  id: "hotel-admin-1",
  email: "hotel@example.com",
  password_hash: "$2b$12$...",
  hotel_id: "hotel-uuid-hier",
  created_at: new Date()
})

🌐 Deployment Optionen

Option A: Emergent Platform (Einfachste)

  1. Projekt auf Emergent entwickeln
  2. Preview testen
  3. Deploy klicken
  4. Domain verbinden

Option B: VPS / Cloud Server

Nginx Konfiguration

server {
    listen 80;
    server_name www.redseadreams.com;

    # Frontend
    location / {
        root /var/www/redseadreams/frontend/build;
        try_files $uri $uri/ /index.html;
    }

    # Backend API
    location /api {
        proxy_pass http://localhost:8001;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
    }
}

Systemd Service für Backend

# /etc/systemd/system/redseadreams.service
[Unit]
Description=Red Sea Dreams Backend
After=network.target

[Service]
User=www-data
WorkingDirectory=/var/www/redseadreams/backend
ExecStart=/var/www/redseadreams/backend/venv/bin/gunicorn server:app -w 4 -k uvicorn.workers.UvicornWorker -b 127.0.0.1:8001
Restart=always

[Install]
WantedBy=multi-user.target

Option C: Docker

# Dockerfile.backend
FROM python:3.11-slim
WORKDIR /app
COPY backend/requirements.txt .
RUN pip install -r requirements.txt
COPY backend/ .
CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "8001"]
# Dockerfile.frontend
FROM node:18-alpine AS build
WORKDIR /app
COPY frontend/package.json frontend/yarn.lock ./
RUN yarn install
COPY frontend/ .
RUN yarn build

FROM nginx:alpine
COPY --from=build /app/build /usr/share/nginx/html
# docker-compose.yml
version: '3.8'
services:
  backend:
    build:
      context: .
      dockerfile: Dockerfile.backend
    ports:
      - "8001:8001"
    environment:
      - MONGO_URL=mongodb://mongo:27017
      - DB_NAME=redseadreams
    depends_on:
      - mongo

  frontend:
    build:
      context: .
      dockerfile: Dockerfile.frontend
    ports:
      - "80:80"

  mongo:
    image: mongo:6
    volumes:
      - mongo_data:/data/db

volumes:
  mongo_data:

🔧 Troubleshooting

Problem: MongoDB Verbindung fehlgeschlagen

# Prüfen ob MongoDB läuft
sudo systemctl status mongod

# MongoDB starten
sudo systemctl start mongod

Problem: Port bereits belegt

# Prozess auf Port finden
lsof -i :8001
lsof -i :3000

# Prozess beenden
kill -9 <PID>

Problem: Node Modules Fehler

# Node Modules löschen und neu installieren
rm -rf node_modules
rm yarn.lock
yarn install

Problem: Python Dependencies

# Virtual Environment neu erstellen
rm -rf venv
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt

📞 Support

Bei Fragen oder Problemen: - GitHub Issues erstellen - Dokumentation: /app/memory/ - Emergent Support (wenn auf Emergent gehostet)


Installations-Anleitung erstellt: 21. Januar 2026