How viktorsvertoka/tattoo-studio works
Project type and purpose
• This is a Next.js–based, front‑end‑only web application for a Tattoo Studio. It’s built with React (TSX), Tailwind CSS, and static data under src/data. There is no dedicated backend or database; everything is rendered via Next.js (SSG/SSR) and served as a collection of static/SSR pages.
File structure
• Top‑level config files: ESLint, Prettier, TypeScript (tsconfig), PostCSS, Tailwind, Next.js config.
• src/app/: Next.js “app router” pages—layout.tsx, page.tsx, plus subpaths for “blog” and “gallery.”
• src/components/: UI broken into two folders:
• sections/: high‑level page sections (Hero, About, Services, etc.)
• ui/: reusable UI primitives (Navbar, Modal, GridList, etc.)
• src/data/: JSON‑style data modules to feed the UI.
• src/styles/: global CSS.
README for additional insights
a. Main components
• Client (Browser)
• Next.js renderer (SSG/SSR engine)
• Page modules (src/app)
• Layout component (shared wrapper)
• Section components (src/components/sections)
• UI components (src/components/ui)
• Data modules (src/data)
• Static assets (public/)
• Tooling & build layer (Next.js, Webpack/Turbopack, PostCSS, Tailwind)
• Hosting/CDN (Vercel, Netlify, etc.)
b. Relationships & interactions
1. Browser requests a URL → hits Hosting/CDN → deleg ates to Next.js server (or serves pre‑rendered HTML).
2. Next.js router (src/app) picks the correct page.tsx.
3. Page.tsx imports Layout and feeds it data from src/data.
4. Layout composes various section components, which in turn pull in UI primitives.
5. UI primitives may reference public assets or SVGs (via svgr).
6. Tailwind/PostCSS transforms CSS at build time; TypeScript and ESLint ensure code quality.
7. The final bundle (JavaScript, CSS, HTML) is deployed to the CDN.
c. Architectural patterns & design principles
• Component‑based (atomic design): small UI primitives compose larger sections.
• File‑system routing (Next.js app router).
• Static data provisioning (no runtime API).
• Separation of concerns: pages ↔ layout ↔ sections ↔ UI primitives ↔ data.
• Build‑time rendering: SSG/SSR for performance.
d. Relevant technologies, frameworks, libraries
• Next.js (app router, SSG/SSR)
• React + TypeScript
• Tailwind CSS + PostCSS
• SVGR for SVG imports
• ESLint, Prettier for linting/formatting
Final advice
• Every layer from the developer‑facing code (src/*) to the end‑user experience.
• Where SSG vs. SSR occurs, if any.
• Build pipeline as a separate flow that transforms code/config into deployable artifacts.