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:
19
services/whatsapp-core/Dockerfile
Normal file
19
services/whatsapp-core/Dockerfile
Normal file
@@ -0,0 +1,19 @@
|
||||
FROM node:20-alpine
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN apk add --no-cache python3 make g++
|
||||
|
||||
COPY package*.json ./
|
||||
RUN npm ci
|
||||
|
||||
COPY tsconfig.json ./
|
||||
COPY src ./src
|
||||
|
||||
RUN npm run build
|
||||
|
||||
RUN mkdir -p /app/sessions
|
||||
|
||||
EXPOSE 3001
|
||||
|
||||
CMD ["npm", "start"]
|
||||
29
services/whatsapp-core/package.json
Normal file
29
services/whatsapp-core/package.json
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"name": "whatsapp-core",
|
||||
"version": "1.0.0",
|
||||
"description": "WhatsApp Core service using Baileys",
|
||||
"main": "dist/index.js",
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"start": "node dist/index.js",
|
||||
"dev": "ts-node-dev --respawn src/index.ts",
|
||||
"lint": "eslint src/**/*.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@whiskeysockets/baileys": "^6.7.16",
|
||||
"express": "^4.21.2",
|
||||
"socket.io": "^4.8.1",
|
||||
"ioredis": "^5.4.1",
|
||||
"pino": "^9.6.0",
|
||||
"qrcode": "^1.5.4",
|
||||
"uuid": "^11.0.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/express": "^5.0.0",
|
||||
"@types/node": "^22.10.7",
|
||||
"@types/uuid": "^10.0.0",
|
||||
"@types/qrcode": "^1.5.5",
|
||||
"typescript": "^5.7.3",
|
||||
"ts-node-dev": "^2.0.0"
|
||||
}
|
||||
}
|
||||
19
services/whatsapp-core/tsconfig.json
Normal file
19
services/whatsapp-core/tsconfig.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2022",
|
||||
"module": "commonjs",
|
||||
"lib": ["ES2022"],
|
||||
"outDir": "./dist",
|
||||
"rootDir": "./src",
|
||||
"strict": true,
|
||||
"esModuleInterop": true,
|
||||
"skipLibCheck": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"resolveJsonModule": true,
|
||||
"declaration": true,
|
||||
"declarationMap": true,
|
||||
"sourceMap": true
|
||||
},
|
||||
"include": ["src/**/*"],
|
||||
"exclude": ["node_modules", "dist"]
|
||||
}
|
||||
Reference in New Issue
Block a user