How gdsc-konkuk/24-25-proj-planpal-client works
Project type and purpose
• This is a full-stack Next.js web application using the App Router.
• Core features include authentication (Google OAuth, logout), a chat UI, dashboard, event scheduling, explore pages, and integration with Google Maps.
File structure
• Top-level configs: dockerfile, cloudbuild.yaml (CI/CD), firebase.json/.firebaserc (hosting, functions), next.config.mjs, tailwind.config.ts, eslint.config.mjs.
• src/app: App Router layout, nested routes for auth, chat, dashboard, explore, landing.
• src/app/modules: feature modules (auth API endpoints, landing UI).
• src/components & src/components/ui: reusable client components (buttons, dialogs, avatar, calendar, map, etc.).
• src/hooks: custom React hooks (use-api).
• src/lib: shared utilities (fetch-auth, server-fetch, constants).
• src/store: client-side state (auth-store via Zustand).
README
• Confirms a create-next-app bootstrap, Next.js (React) with optimized fonts, suggests Vercel deployment but includes Firebase hosting config.
Column 1: Client (Browser & UI Layer)
• Next.js pages and React components (src/app, src/components)
• CSS & themes (tailwind, globals.css, themes.css)
• Client hooks & store (src/hooks/use-api, src/store/auth-store)
Column 2: Server (Next.js Runtime & APIs)
• App Router server components & layouts
• API routes (src/app/modules/auth/api/logout.ts, oauth.ts)
• Server utilities (src/lib/server-fetch, fetch-auth)
• Authentication initializer (components/auth-initializer.tsx)
Column 3: External Services & Infrastructure
• Google OAuth endpoints (OAuth callback pages)
• Firebase Hosting & Functions (firebase.json, .firebaserc)
• Cloud Build / Docker for CI/CD
• Google Maps API
• (Optional) Vercel platform if deployed there
a. Main components
• Browser / React UI → Next.js server → API modules → External Auth/Hosting/DB
b. Relationships & data flow
• Hooks in client call server API routes (REST endpoints).
• Auth flow: client → Next.js API → Google OAuth → callback → auth-store.
• Server uses fetch-auth and server-fetch to communicate with external services.
c. Architectural patterns
• React Server Components & Client Components separation.
• Module-based feature organization.
• Centralized utility layer for cross-cutting concerns.
• CI/CD via Cloud Build and containerization (Docker).
d. Key technologies
• Next.js 13 App Router, React 18
• Tailwind CSS
• Zustand (auth-store)
• Firebase (hosting, functions)
• Docker, Cloud Build, Vercel (optional)
• Google OAuth & Maps
Detail without overthinking
• Break out as many logical components as possible (pages, modules, utils, hooks, store).
• Both runtime flows (SSR/CSR, API calls) and deployment pipelines (CI/CD, hosting).
• Keep layout column-aligned for clarity and quick scanning.