Quick Start
Prerequisites
Section titled “Prerequisites”- Node.js 18 or later
- npm (comes with Node.js)
Clone and install
Section titled “Clone and install”git clone https://github.com/ahzs645/campus-hub.gitcd campus-hubnpm installDevelopment
Section titled “Development”npm run devOpen http://localhost:3000 to see the landing page.
Key routes
Section titled “Key routes”| Route | Purpose |
|---|---|
/ | Landing page |
/configure | Drag-and-drop layout editor |
/display?config=... | Rendered display (for screens) |
Build for production
Section titled “Build for production”npm run buildThis generates a static site in the out/ directory. Deploy it to any static host:
- Cloudflare Pages — connect your repo and set
npm run buildas the build command,outas the output directory. - GitHub Pages — push the
out/folder or use a CI action. - Any CDN — upload the
out/directory contents.
Try the configurator
Section titled “Try the configurator”- Navigate to
/configure. - Click Add Widget to open the widget library.
- Select a widget — it snaps into the first available grid slot.
- Drag widgets to reposition, use the corner handles to resize.
- Open the Settings tab to change colors, school name, and CORS proxy.
- Click Generate URL to get a shareable link.
- Open the URL on a display screen or in a new tab.
Load a preset
Section titled “Load a preset”The Presets tab in the configurator sidebar provides several pre-built layouts:
- Campus Classic — clock, poster carousel, events, and news ticker
- Media Showcase — YouTube video with supporting images
- Minimal Info — clean clock and weather display
- Events Focus — large event list with posters
- Web Dashboard — embedded website with clock and weather
- Photo Gallery — full slideshow with side events
Select any preset to instantly load its layout and theme.