Business Developer tại Home Credit - Đồng hành cùng doanh nghiệp ngành dịch vụ tăng trưởng bền vững
📊 Version 1.1.0 - Restructured with improved security, performance & architecture
Live: vanthai.io.vn
✅ Security: Telegram token moved to server-side, no client exposure ✅ Performance: Response caching, lazy loading, request deduplication ✅ Architecture: Modular directory structure, separated concerns ✅ Validation: Server-side input validation & sanitization ✅ Rate Limiting: 5 req/min to prevent abuse ✅ Better Code: Centralized utilities, shared validators & formatters
See RESTRUCTURE.md for detailed migration guide.
# Install deps
npm install
# Setup environment
cp .env.example .env.local
# Edit .env.local with your Telegram credentials
# Start backend
npm run dev
# In another terminal - Start profile app
cd apps/profile && npm run dev
# In another terminal - Start xfilm app
cd apps/xfilm && python3 -m http.server 8080
index.html)calculator.html)partner.html)Security Model: Server-side API gateway
.env.local (server only)/api/telegram/send (secure endpoint)Features:
Website được host tại custom domain: vanthai.io.vn
apps/
├── profile/ # Business profile (Next.js)
└── xfilm/ # Movie app (Vanilla JS SPA)
server/ # Express backend
├── routes/ # API endpoints
├── middleware/ # Auth, rate limit, validation
└── services/ # Business logic
shared/ # Reusable utilities
├── validators.js # Input validation
├── constants.js # Centralized config
├── formatters.js # Data formatting
└── errors.js # Custom errors
workers/ # Cloudflare Workers
| Before | After |
|——–|——-|
| Token in code | Token in .env.local |
| Exposed to browser | Server-side only |
| Base64 “obfuscation” | Proper JWT/session |
| Direct Telegram API calls | Secure /api/telegram/send gateway |
/api/telegram/sendSend partner registration
curl -X POST http://localhost:3000/api/telegram/send \
-H "Content-Type: application/json" \
-d '{
"businessName": "ABC Corp",
"taxCode": "0123456789",
"contactPhone": "0987654321",
"contactEmail": "contact@example.com"
}'
/api/healthServer health check
curl http://localhost:3000/api/health