How rt-codes/rt-productions works
Project type and purpose
• This is a React-based static personal homepage built with Next.js (using the app router), styled with Tailwind CSS, and hosted on Vercel.
• Purpose: render several self-contained sections (intro, about, experience, projects, skills, footer) with client-side interactivity (via React context) and serve static assets (PDFs, images, CSS).
File structure
• app/
• layout.tsx – top-level wrapper (common header, footer, <html>/<body>)
• page.tsx – root page that assembles sections
• globals.css – global styles imported into layout
• components/ – small, reusable UI components for each section
• context/active-section-context.tsx – React Context to track which section is in view
• lib/ – helper code (data.ts supplies content, hooks.ts for custom hooks, types.ts for TS interfaces)
• public/ – static assets (PDFs, images) served from the CDN
• config files (next.config.js, tailwind.config.ts, tsconfig.json, postcss.config.js) for build and styling
• package.json & package-lock.json – dependencies (next, react, tailwindcss)
README for additional insights
• Confirms it’s a simple Next.js site, focuses on displaying personal information, no backend or database.
• Hosted by Vercel, so deployment pipeline is “push to Git → Vercel builds & deploys → global CDN”.
Main components and their interactions
a. Developer/local environment
• Source code (app/, components/, lib/, context/)
• Build tools (Next.js compiler, PostCSS/Tailwind)
b. Vercel build system
• Pulls from Git, runs npm build, produces static HTML/CSS/JS
c. CDN & edge network
• Hosts static pages and assets under global edge nodes
d. Browser (end user)
• Requests page → served pre-rendered HTML + CSS + JS bundle
• JS bundle hydrates React, context logic activates interactive menu/section highlighting
e. External services
• None beyond Vercel & public CDNs; PDFs and static files under public/
Architectural patterns & design principles
• Component-based UI: each UI “section” lives in its own component file under components/.
• App router / file-based routing: Next.js uses app/page.tsx and nested layouts if needed.
• Static Site Generation (SSG): pages are built at deploy time, minimal runtime overhead.
• Separation of concerns:
• lib/ supplies typed data and hooks
• context/ isolates shared state (active section)
• components/ handle purely presentation
• Clear labels on all components (e.g., “app/layout.tsx” vs “components/intro.tsx”)
• Source code vs build process vs runtime/CDN vs client browser
• Static assets vs generated pages vs hydrated React app