Skip to content
lamplitlabsPublic

About

licht - the German tutor that runs in the browser; source of ai.lamplitlabs.com and the lamplitlabs/licht-german-tutor releases

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

22 Commits

Folders and files

Repository files navigation

ai.lamplitlabs.com

The Lamplit Labs AI landing page: small, specialised models you host yourself, listed as offerings with the numbers they were measured on. This repository is the site's source and its deploy - nothing else. The models are trained, measured and published elsewhere; this site only shows what their producer wrote into one data file and links to where each one can be tried (ADR-001).

js/ui/            the site - React 19, Tailwind CSS 4, Vite; one build, index.html -> dist/
  src/site/       pages (/ , /models, /benchmarks, /try, 404), layout, the router, the lab vocabulary, theme, logo
  src/data/site.json   every number and every product name the pages show - generated by the producer, committed here
  vercel.json     the host's rules: /models and /benchmarks rewrite to their own prerendered page (models.html, benchmarks.html: the app with that page's title, description and og:url in its static head, for link previews that run no JavaScript; emitted by vite.config.ts from src/site/routeHead.ts), unknown paths get a real 404, /try -> the flagship's demo, Cross-Origin headers
  scripts/        preview-static.mjs serves dist/ the way the host does, for the headless check; sitemap.mjs regenerates public/sitemap.xml
js/check-site.mjs every route headless: <h1>, fonts, console errors, failed requests; screenshots on request
js/find-browser.mjs  which browser check-site launches: --browser, BROWSER_PATH, Playwright's headless shell, Chrome for Testing, then an installed Chrome/Chromium/Brave (never Edge); always --use-mock-keychain
scripts/verify.sh            the full check in one command: `make lint && make test` (runs `make setup` first when node_modules lacks tsc)
scripts/watch-hub-links.sh   runs `make setup` if node_modules lacks tsc, builds, then runs `make hub-links`; prints only when a showcased hub link is dead or the check could not run
.github/workflows/deploy-site.yml   build and test on GitHub, then `vercel deploy --prebuilt` (the host never sees the source)
docs/             the PULSE control plane and the site's records (ADR-001, FEAT-001, WU-001, WU-002, MEM-001, MEM-002)

Work on it

make setup      # cd js/ui && npm ci
make ui-dev     # Vite dev server, http://127.0.0.1:5173
make lint       # tsc -b, lint:js (unused exports), node --check on the scripts, FEAT-001 vitest count, README routes vs check-site defaults, site.json hub slugs
make test       # vitest, node --test js/find-browser.test.mjs (check-site's browser order) and a production build; `npm run build` first runs js/ui/scripts/sitemap.mjs (prebuild), which regenerates js/ui/public/sitemap.xml from the routes - commit it when you change a route
make clean      # rm -rf js/ui/dist
make ui-check   # every route headless in dark 1280 and light 390 on the built site (finds Playwright's chrome-headless-shell, e.g. from `npx playwright install chromium --only-shell`, else Chrome for Testing or an installed Chrome/Chromium/Brave, never Edge; BROWSER_PATH to choose)
make hub-links  # ui-check plus a HEAD request to every showcase hub link (Try it / View weights); a 404 fails (needs network)
node js/check-site.mjs --base http://127.0.0.1:4174 --shots /tmp/site   # screenshots per route
sh scripts/verify.sh           # make lint && make test in one go (installs deps first if node_modules lacks tsc)
sh scripts/watch-hub-links.sh  # build + make hub-links; silent when every hub link answers, prints the dead ones otherwise (needs network)

Light and dark share one store (localStorage['lamplit.theme'], the pendant lamp in the header; ?theme=dark|light previews without saving). Fonts are bundled (@fontsource-variable/*); the page makes no third-party request and sets no cookie.

Where the numbers come from

Every figure and every product name on the pages is in js/ui/src/data/site.json. A producer - the repository that trains and measures the models - writes it from its own runs (gate reports, judge verdicts, export manifests) and its curated table of lines, editions, pitches, purposes, licences and measured speeds. The shape is src/site/data.ts; the JSON carries no paths, hosts or names (src/site/data.test.ts asserts it). Commit the regenerated file here and push: the deploy follows.

The site shows the newest measured version of each line and nothing older, one card per edition, and a card for a model built to order. "Try the ..." labels are derived from the line's name and open the model's own demo on Hugging Face; the site ships no runtime. /try forwards to the flagship's demo (a test keeps the redirect in step with the data).

Deploy

Pushes to main that touch js/ui/** (and manual runs of the workflow) build and test the site on GitHub, then the Vercel CLI uploads the built output; pull requests get a preview URL. The three repository secrets are the owner's: VERCEL_TOKEN (scope: the team that owns the project), VERCEL_ORG_ID, VERCEL_PROJECT_ID. Without them the workflow still builds and tests and names the missing secret; with them the deploy job first checks the three against Vercel's API (.github/scripts/vercel-preflight.sh). vite preview is not a static host; use js/ui/scripts/preview-static.mjs. Lessons: MEM-001.

Licence

MIT (LICENSE). Fonts under the SIL Open Font License 1.1; React, lucide-react, Vite and Tailwind under MIT.

About

licht - the German tutor that runs in the browser; source of ai.lamplitlabs.com and the lamplitlabs/licht-german-tutor releases

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages