A small demo timeline showing the history of Torchbox, built with Next.js and TypeScript.
- Inputs: source files live under
app/(React/TSX pages/components), global styles underapp/globals.css, and static assets inpublic/. - Outputs: during development Next.js serves from its dev server; when built, Next.js writes production artifacts into the
.next/folder. You can optionally export a static site withnext exportinto anout/directory if your app is fully static. - Success: styles and pages render correctly during
npm run dev; afternpm run buildthe app can be served in production mode (npm run start) or exported as static HTML (next export) when appropriate.
- Next.js (app router)
- React + TypeScript
- GSAP (for scroll effects)
- PostCSS + Autoprefixer
app/— Next.js app directory;app/page.tsxis the main page entry andapp/layout.tsxsets shared layout.app/components/— React components used by the pages (timeline, carousel, effects, etc.).app/globals.css— global styles (imported bylayout.tsx).public/— static assets served at the root (images, SVGs, icons).next.config.ts— Next.js configuration.package.json— scripts and dependencies.
Install dependencies:
npm installRun the dev server (fast, HMR enabled):
npm run devOpen http://localhost:3000 in your browser.
Build for production:
npm run buildServe the built app locally (production mode):
npm run startPreview the built app using Next's preview (if you have a preview script configured or use next start after build):
# if your package.json has a preview script
npm run preview
# otherwise, serve the production build
npm run startIf you want a static export (only for fully static apps):
npm run build && npm run export
# this writes to `out/` when using `next export`- This project uses the Next.js app router and client components for interactive features (see
use clientusage in component files). - GSAP ScrollTrigger is used for the horizontal timeline effects; there are scroll listeners, ResizeObserver usage, and image load handling to ensure the timeline length is recalculated when layouts change.
Small changes, bug fixes, and documentation improvements are welcome. Please open a pull request with a short description of the change.