Profile

🏦 Thái Nguyễn - Profile Website (Restructured)

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

🌐 Website

Live: vanthai.io.vn

⚡ What’s New in v1.1.0

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.

🚀 Quick Start

# 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

📋 Tính năng

🏠 Trang chủ (index.html)

💰 Tính lãi suất (calculator.html)

🤝 Đăng ký đối tác (partner.html)

🛠️ Công nghệ sử dụng

🤖 Telegram Bot Integration (v1.1.0)

Security Model: Server-side API gateway

Features:

📞 Liên hệ

🚀 Deploy

Website được host tại custom domain: vanthai.io.vn

📝 SEO

🎨 Design

⚡ Performance

📁 Project Structure (v1.1.0)

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

🔒 Security Improvements

Secrets Management

| 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 |

Protection Features

⚡ Performance Features

🛠️ Backend API

POST /api/telegram/send

Send 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"
  }'

GET /api/health

Server health check

curl http://localhost:3000/api/health