How kwamevaughan/credit-bank-microsite works
Project type and purpose
• This is a full-stack React/Next.js web application, bootstrapped with create-next-app.
• It provides a client dashboard (account opening, transactions, quizzes, referrals, leaderboards, help-desk), uses Supabase as its backend, and offers a set of serverless API endpoints for transactional workflows (email, transaction verification, referrals).
File structure
• Top level
• next.config.js, jsconfig.json, tailwind.config.mjs, postcss.config.mjs: build and framework configs
• lib/supabase.js: Supabase client wrapper
• public/: static assets (images, misc data like countries.json, sample-data.xls, web manifest)
• src/
• app/: global CSS and Next.js app config
• pages/: routing layer
– pages/api/: serverless API endpoints (helpdeskEmail, leaderboard, redeemReferral, etc.)
– pages/*.js: client-side routes (dashboard, login, quiz, referrals, etc.)
– _app.js/_document.js: app bootstrap and document overrides
• layouts/: shared layout wrappers (headers, footer, sidebar)
• context/: React context for user/session state
• hooks/: custom React hooks for business logic (data fetching, real-time updates, modals, theme)
• utils/imageKitService.js: integration with ImageKit for image uploads
• data/: client-side JSON (questions.js)
• styles/: global and utility CSS
README for additional insights
• Confirms Next.js usage, optimization via next/font, deployment on Vercel
Detail
• Context/hooks layer feeding into UI components (optional sub-layer)
• Clearly separate frontend vs. backend concerns
• Data flow from user actions → API → database/external services → UI updates
• Your use of Next.js serverless architecture, Supabase, and third-party integrations
• Be easy to read, maintain, and extend as the product evolves