How jennifertjen/partnerdashboardcekatai works
Project type and purpose
• This is a full-stack, serverless React dashboard built on Next.js (TypeScript) for “PartnerDashboardCekatAI.”
• It serves a multi-page admin UI (in pages/…) with localized content, Redux state management, and a small set of Next.js API routes (“backend for frontend”) that interact with a Supabase backend and external services (Facebook SDK, SMTP/email provider).
File structure
• Top‐level config: .eslintrc.json, tsconfig.json, next.config.js, tailwind.config.js, i18n config.
• pages/: all user-facing pages plus pages/api/ routes (e.g. add-agent.tsx).
• store/: Redux Toolkit slices (broadcastSlice.tsx, partnerSlice.tsx, etc.) and central store/index.tsx.
• utils/: helper modules (supabaseClient.ts, http.ts, auth.ts, FacebookSDK.ts, etc.).
• public/: static assets (images, audio), translation JSONs, templates.
• styles/: global and third-party CSS.
README
• Confirms a deployed Vercel app, credentials for testing.
a. Main components
• Browser / Client
• Next.js Frontend (SSR/SSG/CSR pages)
• Redux Store (client-side state)
• Next.js API routes (BFF layer)
• Supabase (Auth + Database)
• External Services (Facebook SDK, SMTP/email provider)
• CDN / Vercel hosting for static assets
b. Relationships and interactions
• Browser ⇄ Next.js Frontend: page requests, client hydration
• Frontend → Redux Store → Async thunks → Next.js API → Supabase
• Frontend → utils/supabaseClient for direct DB reads (if any)
• Next.js API routes ⇄ Supabase for data mutations and auth
• Frontend loads Facebook SDK via utils/FacebookSDK.ts
• Frontend or API routes send emails via SMTP provider (wrapped in smtpSlice)
• Static assets & locale JSONs served from public/ via CDN
c. Architectural patterns & principles
• JAMstack / serverless (Next.js pages + API routes on Vercel)
• Backend-for-Frontend (BFF) in pages/api/
• Hybrid rendering (SSG for public pages, SSR for authenticated sections, CSR for interactions)
• Redux Toolkit slices for modular state
• i18n via locale JSON files
d. Key technologies & frameworks
• Next.js (SSR/SSG/CSR)
• React & TypeScript
• Redux Toolkit
• Supabase (Auth, Postgres)
• Tailwind CSS & PostCSS
• next-i18next or custom i18n loader
• Vercel (hosting & CDN)