Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
97 changes: 97 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# ╔══════════════════════════════════════════════════════════════════╗
# ║ TicketFlow Environment Variables ║
# ║ Copy this file to .env and fill in your values ║
# ╚══════════════════════════════════════════════════════════════════╝

# ─────────────────────────────────────────────
# SECURITY
# ─────────────────────────────────────────────
# JWT secret: minimum 32 characters, use a random string in production
# Generate with: openssl rand -base64 64
JWT_SECRET=dev-secret-change-in-production-must-be-at-least-32-chars-long

# ─────────────────────────────────────────────
# DATABASES
# ─────────────────────────────────────────────

# PostgreSQL (used by: User Service, Booking Service, Inventory Service)
DB_USERNAME=postgres
DB_PASSWORD=postgres

# MongoDB (used by: Event Service, Payment Service, Notification Service)
MONGO_USERNAME=mongo
MONGO_PASSWORD=mongo

# Redis (used by: Inventory Service for distributed seat locking)
REDIS_PASSWORD=redis_dev_password
REDIS_URL=redis://localhost:6379

# ─────────────────────────────────────────────
# SERVICE URLS (for local development without Docker)
# ─────────────────────────────────────────────
USER_SERVICE_URL=http://localhost:3001
EVENT_SERVICE_URL=http://localhost:3002
BOOKING_SERVICE_URL=http://localhost:3003
INVENTORY_SERVICE_URL=http://localhost:3004
PAYMENT_SERVICE_URL=http://localhost:3005
NOTIFICATION_SERVICE_URL=http://localhost:3006

# ─────────────────────────────────────────────
# INDIVIDUAL SERVICE DATABASE URLS
# ─────────────────────────────────────────────

# PostgreSQL connection strings for each service
USER_DB_URL=jdbc:postgresql://localhost:5432/ticketflow_users
BOOKING_DB_URL=jdbc:postgresql://localhost:5432/ticketflow_bookings
INVENTORY_DB_URL=postgresql://postgres:postgres@localhost:5432/ticketflow_inventory

# MongoDB connection strings for each service
EVENT_MONGODB_URL=mongodb://mongo:mongo@localhost:27017
PAYMENT_MONGODB_URL=mongodb://mongo:mongo@localhost:27017
NOTIFICATION_MONGODB_URL=mongodb://mongo:mongo@localhost:27017

# ─────────────────────────────────────────────
# MESSAGING - APACHE KAFKA
# ─────────────────────────────────────────────
# Use 9093 from localhost (9092 is internal docker-to-docker)
KAFKA_BOOTSTRAP_SERVERS=localhost:9093

# ─────────────────────────────────────────────
# EMAIL (SMTP)
# ─────────────────────────────────────────────
# For development: use Mailpit (http://localhost:8025)
SMTP_HOST=localhost
SMTP_PORT=1025
SMTP_FROM=noreply@ticketflow.com
SMTP_USERNAME=
SMTP_PASSWORD=

# For production: use a real SMTP provider (e.g., SendGrid, AWS SES)
# SMTP_HOST=smtp.sendgrid.net
# SMTP_PORT=587
# SMTP_USERNAME=apikey
# SMTP_PASSWORD=your-sendgrid-api-key

# ─────────────────────────────────────────────
# PAYMENT
# ─────────────────────────────────────────────
# Success rate for mock payment (0.0 to 1.0, default 0.95 = 95% success)
# Set to 1.0 to always succeed, 0.0 to always fail (for testing)
PAYMENT_SUCCESS_RATE=0.95

# ─────────────────────────────────────────────
# FRONTEND
# ─────────────────────────────────────────────
VITE_API_BASE_URL=http://localhost:3000

# For production
FRONTEND_API_URL=https://api.yourdomain.com

# ─────────────────────────────────────────────
# KUBERNETES (production overrides)
# ─────────────────────────────────────────────
# These are used when deploying to Kubernetes
# Replace with actual values from your K8s secrets
K8S_NAMESPACE=ticketflow
DOCKER_REGISTRY=your-registry.io/ticketflow
IMAGE_TAG=latest
128 changes: 128 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
# =============================================================================
# TicketFlow — Polyglot Monorepo .gitignore
# Covers: Node/Bun, Java/Maven, Python, Docker, IDE, OS
# =============================================================================

# ---------------------------------------------------------------------------
# Node / Bun (gateway, inventory-service, frontend)
# ---------------------------------------------------------------------------
node_modules/
dist/
.next/
.nuxt/
build/
*.tsbuildinfo
bun.lockb
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*
.pnpm-store/
.yarn/
.cache/

# ---------------------------------------------------------------------------
# Java / Maven (user-service, booking-service)
# ---------------------------------------------------------------------------
target/
*.class
*.jar
*.war
*.ear
*.nar
hs_err_pid*
.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/

# ---------------------------------------------------------------------------
# Python (event-service, payment-service, notification-service)
# ---------------------------------------------------------------------------
__pycache__/
*.py[cod]
*$py.class
*.pyo
*.pyd
.venv/
venv/
env/
ENV/
*.egg
*.egg-info/
eggs/
.eggs/
pip-log.txt
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
coverage.xml
*.cover
.pytest_cache/

# ---------------------------------------------------------------------------
# Environment / Secrets
# ---------------------------------------------------------------------------
.env
.env.*
!.env.example
*.pem
*.key
*.cert
*.p12
secrets/

# ---------------------------------------------------------------------------
# Docker
# ---------------------------------------------------------------------------
docker-compose.override.yml

# ---------------------------------------------------------------------------
# Kubernetes / Helm
# ---------------------------------------------------------------------------
*.kubeconfig
kubeconfig
charts/*.tgz

# ---------------------------------------------------------------------------
# IDE / Editor
# ---------------------------------------------------------------------------
.idea/
.vscode/
*.iml
*.iws
*.ipr
.project
.classpath
.settings/
*.swp
*.swo
*~

# ---------------------------------------------------------------------------
# OS
# ---------------------------------------------------------------------------
.DS_Store
Thumbs.db
.AppleDouble
.LSOverride
Icon

# ---------------------------------------------------------------------------
# Logs & temp files
# ---------------------------------------------------------------------------
logs/
*.log
*.log.*
tmp/
temp/
.tmp/

# ---------------------------------------------------------------------------
# Test / Coverage output
# ---------------------------------------------------------------------------
coverage/
.nyc_output/
test-results/
surefire-reports/
Loading