How team-study-bridge/front-service works
Project Type and Purpose
• This is a single-page application (SPA) frontend for an online education platform (“Aigongbu”).
• Stack: React + TypeScript, Vite for bundling, Tailwind CSS + shadcn-ui for styling, deployed as a Dockerized static service behind Nginx, managed with Helm + ArgoCD on Kubernetes.
Main Components
a. Source & CI/CD
• GitHub repository (with .github/workflows/cl.yml, cd.yml)
• CI jobs: lint/tests → build → Docker image → container registry
b. Containerization & Deployment
• Dockerfile → builds static assets + Nginx
• Helm chart (helm/front-service)
• ArgoCD manifests (argocd/front-app.yaml)
• Kubernetes cluster: Namespaces, Deployment, Service, Ingress
c. Runtime Frontend Service
• Nginx serving index.html, static assets (public/, dist/)
• Vite dev server (in Local Dev environment)
d. External Dependencies & APIs
• Backend microservices (Auth, Lecture, AI, Payment, Notification, Video, Verification)
• Firebase Messaging (push notifications)
• 3rd-party payment gateway
e. Users & Clients
• Browsers (desktop/mobile) consuming the SPA
• Admin users (through /admin pages)
• Instructors, Students
Relationships & Data Flows
• Developer pushes code → GitHub Actions CI builds and pushes Docker image.
• CD job triggers ArgoCD to sync Helm release to Kubernetes.
• Kubernetes Ingress routes client traffic via DNS/TLS to the Front-Service.
• Browser fetches static assets; SPA code issues REST/HTTP calls to external backend APIs.
• SPA registers service worker (public/firebase-messaging-sw.js) for push notifications.
• Payment flows: SPA ↔ Payment API ↔ 3rd-party gateway.
• AI flows: SPA ↔ AI Chat API → external AI engine.
Architectural Patterns & Design Principles
• Single-page application (componentized, with logical feature modules under src/api, src/components, src/pages).
• Containerized static front-end behind reverse proxy (Nginx).
• GitOps deployment (ArgoCD + Helm).
• Clear separation of concerns:
• UI components (src/components/*)
• API clients (src/api/*)
• Context & hooks (src/contexts, src/hooks)
• Assets and config (public/, index.html, nginx.conf, tailwind.config.ts)
Detail Checklist
• [ ] GitHub Actions CI/CD (lint, test, build, push)
• [ ] Docker build context and Nginx config
• [ ] Helm Chart structure and values
• [ ] ArgoCD Application manifest
• [ ] Kubernetes Deployment → Pod → Container
• [ ] Kubernetes Service → Ingress → DNS
• [ ] Browser client → Static assets + API calls
• [ ] External API endpoints (Auth, AI, Lecture, Payment, Noti, Video, Verification)
• [ ] Firebase Messaging integration