feat: add Layer 1 foundation - Docker, WhatsApp Core, API Gateway, Frontend setup

- docker-compose.yml with PostgreSQL, Redis, all services
- nginx/nginx.conf reverse proxy configuration
- services/whatsapp-core: package.json, tsconfig.json, Dockerfile
- services/api-gateway: requirements.txt, Dockerfile, app/__init__.py
- frontend: package.json, tsconfig.json, vite.config.ts, index.html, Dockerfile, nginx.conf

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Claude AI
2026-01-29 09:45:00 +00:00
parent b4355fbc96
commit 31d68bc118
15 changed files with 404 additions and 0 deletions

50
nginx/nginx.conf Normal file
View File

@@ -0,0 +1,50 @@
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
upstream api {
server api-gateway:8000;
}
upstream whatsapp {
server whatsapp-core:3001;
}
server {
listen 80;
server_name localhost;
location / {
root /usr/share/nginx/html;
index index.html;
try_files $uri $uri/ /index.html;
}
location /api {
proxy_pass http://api;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_read_timeout 300;
}
location /auth {
proxy_pass http://api;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
location /ws {
proxy_pass http://whatsapp;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_read_timeout 86400;
}
}
}