How jeffkko/ticket-ninja-site works
Project Type and Purpose
• This is a Next.js–based static/SSR marketing site for “TICKET.Ninja,” which serves as an informational and promotional frontend.
• It does not include its own backend/API or database layers; it relies on static generation and external services (e.g., Google Analytics, Discord).
File Structure
• Top‐Level Files:
• next.config.js, tsconfig.json, package.json → build & config
• pages/ → Next.js routing (SSR/SSG React pages)
• src/ → shared React components, theming, analytics integration
• No “api/” or “backend/” folder indicates no custom server APIs – this is purely a frontend app.
Extract Key Insights from the README
• Purpose: A peaceful ticket‐snatching discussion platform, modernizing Taiwan’s ticket‐buying system.
• External Links: Discord, “about” page, social channels.
Main Components
a. Client (User’s Browser)
• Loads React/Next.js pages (HTML, JS, CSS)
• Interacts with the UI components (src/*.tsx)
b. Hosting/CDN Layer (Vercel, Netlify, or similar)
• Serves pre‐rendered static pages or SSR responses
• Caches assets from public/
c. Build Pipeline
• next build & next export steps, using next.config.js, tsconfig.json, .prettierrc
• Emotion CSS-in-JS via createEmotionCache.ts & theme.ts
d. External Services
• Google Analytics 4 (ga4.ts, useGoogleAnalytics.ts)
• Discord (link out)
• Sitemap (public/sitemap.xml)
e. Development Tooling
• TypeScript (next-env.d.ts)
• ESLint/Prettier (.prettierrc)
• VSCode settings (.vscode/)
Relationships & Interactions
• Browser ←→ CDN/Hosting: Initial page requests (SSG or SSR), static assets fetch
• Browser → Google Analytics: Pageview & event tracking calls
• Browser → External links (Discord, About) via <Link> components
• CI/CD → Git repo & build pipeline → CDN/Hosting deploy
Architectural Patterns & Design Principles
• Component‐based React UI (src/ stand‐alone components)
• Static Site Generation (SSG) & Incremental Static Regeneration (ISR) via Next.js
• Separation of concerns:
• pages/ for routing
• src/ for reusable UI and logic
• public/ for assets
• CSS‐in‐JS with Emotion for theme consistency
Technologies, Frameworks & Libraries
• Next.js (React SSR/SSG framework)
• TypeScript
• Emotion (styled components & theming)
• Google Analytics 4
• Prettier / VSCode for code style
Final Advice
• Be thorough but not cluttered: group UI components together, group config/build tools together.
• Every folder’s role in the pipeline.