How team-tecktrek/tecktrek works
Project Type & Purpose
• This is a frontend-centric, Next.js web application (no separate backend repository).
File Structure Insights
Top-level directories/files:
– src/app → Next.js “app router” pages (dev, top, play).
– mocks → MSW handlers for test/dev HTTP stubbing.
– .storybook → Storybook config for component development.
– vitest.config.ts, vitest.shims.d.ts → Test runner config.
Architectural patterns:
– Next.js SSR/CSR with “app router”
– Component-based UI (React + TypeScript)
– MSW for local API simulation & tests
– Storybook for isolated component development
Main Components & Relationships
a. Next.js Server Layer (Node.js/Vercel)
• Hosts SSR/Static pages from src/app
• Serves static assets from public/
b. React Frontend Layer
• Pages:
– /top → UserCreateModal + NoticeList
– /play → DrawingBoard + CanvasToolbar + Timer + ColorPalette + CardCounter
c. State Management & Hooks
• useNotifyTimeUp, local React state for drawing, timer
d. Mocks & Testing Layer
• MSW browser/server (mocks/*) intercepts fetch/XHR in dev/tests
• Vitest for unit tests & Storybook for visual tests
e. Static Assets
f. Build & Tooling
• ESLint (.eslintrc), Prettier, Stylelint, Husky pre-commit
• PostCSS, next/font, next.config.ts
Architectural Patterns & Principles
– Separation of concerns: Pages vs. shared components
– Component reusability & isolation (Storybook)
– Client-side API abstraction (MSW)
– Zero-trust state: hooks encapsulate logic
– SSR vs CSR balance via Next.js app router
Must-Include
– Component boundaries (server vs. client vs. dev)
– Tech stack labels (Next.js, React, MSW, Storybook, Vitest)