คู่มือการตั้งค่า พัฒนา และ deploy
ระบบจัดการ Mumble • GPS Tracking • IoT • AI Bot
Internet
│
[nginx-proxy:80/443]
(Let's Encrypt SSL)
│
+───────────┬───────────+
│ │
[Next.js Frontend] [Express Backend]
(port 3000) (port 3000)
│ │
├──┬──┬──┬──┬──┬──┬──┬──┤
│ │ │ │ │ │ │ │ │
[Mongo] [Mum] [MQTT] [Tra] [Docker]guide.ipptt.com
packages: - src/frontend # Next.js app - src/backend # Express API - src/shared # Shared TypeScript types/constants - e2e # Playwright E2E tests
Database, MQTT, Passport (3 OAuth), env
auth, roles, validation, rate limit, error handler
Manager, User, Channel, Device, Gateway, Bot, CCTV...
auth, mumble, devices, provision, logs, settings...
Mumble, MQTT, Traccar, Docker, AI Bot...
nginx, mosquitto, murmur-rest, mumble, traccar, ai-bot
Multi-server CRUD, channels, users, config editor, online monitoring
Talkkonnect registration, MQTT auto-provisioning, remote commands
Mapbox GL map, Traccar integration, geofence alerts
SIP-to-Mumble bridge, Docker lifecycle management
Gemini-powered, STT/TTS, configurable prompt
500+ markers, HLS live stream, CSV import
OAuth 2.0 (Google, Azure AD, LINE), JWT, RBAC
Socket.IO for devices, GPS, geofences, events
Full audit trail, search, CSV export
Dark MUI, responsive, rate limiting, Helmet headers
Docker + Docker Compose v2+
Full-stack deployment
Node.js 20+
Local development
pnpm 9+
Package manager
OAuth Provider (อย่างน้อย 1)
Google / Azure AD / LINE
Mapbox Account
GPS/CCTV map features
git clone https://github.com/watcharap0ng/IPPTT-APP-PLATFORM.git cd IPPTT-APP-PLATFORM cp .env.example .env # Edit .env with your credentials docker compose up -d --build # → Access at http://localhost:3000
Starts 8 services: App, MongoDB, Mumble, Murmur-REST, Traccar, Mosquitto, Mumble-Web, Nginx
git clone https://github.com/watcharap0ng/IPPTT-APP-PLATFORM.git cd IPPTT-APP-PLATFORM pnpm install cp .env.example .env # Edit .env # Start infra only docker compose up -d mongodb mumble mosquitto traccar mumble-web murmur-rest # Start backend + frontend pnpm dev
Infra in Docker, app runs locally with hot reload
ต้องตั้งค่าทั้งหมดในไฟล์ .env
| Variable | Required | Description |
|---|---|---|
NODE_ENV | Yes | production / development |
MONGODB_URI | Yes | MongoDB connection string |
JWT_SECRET | Yes | JWT access token signing secret |
JWT_REFRESH_SECRET | Yes | JWT refresh token signing secret |
SESSION_SECRET | Yes | Session encryption secret |
CLIENT_URL | Yes | Frontend URL (e.g. https://app.ipptt.com) |
GOOGLE_CLIENT_ID | OAuth | Google OAuth client ID |
GOOGLE_CLIENT_SECRET | OAuth | Google OAuth client secret |
GOOGLE_CALLBACK_URL | OAuth | Google OAuth callback URL |
AZURE_CLIENT_ID | OAuth | Azure AD client ID |
AZURE_CLIENT_SECRET | OAuth | Azure AD client secret |
AZURE_TENANT_ID | OAuth | Azure AD tenant ID |
LINE_CHANNEL_ID | OAuth | LINE Login channel ID |
LINE_CHANNEL_SECRET | OAuth | LINE Login channel secret |
MUMBLE_API_URL | Voice | Murmur-REST API endpoint |
TRACCAR_API_URL | GPS | Traccar API endpoint |
TRACCAR_API_TOKEN | GPS | Traccar API auth token |
MQTT_BROKER_URL | Devices | MQTT broker URL |
MQTT_USERNAME | Devices | MQTT username |
MQTT_PASSWORD | Devices | MQTT password |
TELEGRAM_BOT_TOKEN | Alerts | Telegram bot token for geofence alerts |
NEXT_PUBLIC_MAPBOX_ACCESS_TOKEN | Maps | Mapbox GL access token |
pnpm install # Install all workspace dependencies pnpm dev # Start backend + frontend concurrently pnpm dev:backend # Start backend only (port 3000) pnpm dev:frontend # Start frontend only (port 3001) pnpm build # Build backend + frontend pnpm test # Run backend + frontend tests pnpm test:e2e # Run Playwright E2E tests pnpm test:e2e:headed # Run E2E tests in browser pnpm lint # Lint all packages
Unit tests for Express routes, services, models
Component tests with React Testing Library
Full integration tests, headed mode available
docker compose -f docker-compose.prod.yml up -d --build # → nginx-proxy (80/443) + app + all services # → Let's Encrypt auto-SSL
CI
lint, typecheck, unit tests, E2E, Docker build
Security
Trivy (deps + containers), Gitleaks (secrets), CodeQL (SAST)
Deploy
Build image → push GHCR → SSH deploy to production
Registry
ghcr.io/watcharap0ng/ipptt-app-platform
Production domain: app.ipptt.com
| Service | Port(s) | Description |
|---|---|---|
nginx-proxy | 80, 443 | Reverse proxy + SSL (production) |
app | 3000 | Express + Next.js |
mongodb | 27017 | Database (localhost only) |
mumble | 64738-64748 TCP+UDP | Voice server |
murmur-rest | 8081 | ICE-to-REST bridge |
traccar | 8082, 5055 | GPS tracking (API + device) |
mosquitto | 1883, 9001 | MQTT broker (TCP + WebSocket) |
mumble-web | 64737 | Browser-based voice client |
Architecture, APIs, data models, services, real-time events (687 lines)
Prerequisites, TLS setup, MQTT auth, backup/restore, troubleshooting
Connecting to existing external Mumble server
Enterprise Agile SDLC — 9 phases, sprint ceremonies, quality gates
Guidelines for Claude Code agents
MCP server, Slack/Teams/Discord/Jira integrations
Claude Code hooks for workflow automation
Example: generating agents for a Todo app
โปรเจคมมีระบบ Multi-Agent Squad สำหรับ AI-assisted development
Plan work, assign tasks, enforce quality gates
PRDs, user stories, sprint management
System design, technical decisions
UI components, state, performance
API, database, integrations
Testing strategy, quality gates
Infrastructure, CI/CD, monitoring
Templates
Workflows