
Graven - Développement
This project is under the GNU GPL v3 or later license
The projects of the GravenDev organisation are used by the Discord server discord.gg/graven, by its moderators and members alike.
Most contributors are part of the staff, but members are welcome to contribute too.
The showcase site of the French-speaking development community Graven — gravendev.com. Two pages: the landing page of the Discord server (/) and a page dedicated to OmniBot, the organisation's open-source bot (/omnibot).
It is 100% static: every route is pre-rendered at build time (@sveltejs/adapter-static, fallback: null, prerender = true) — no server, no API route, no database. The only runtime call is the public Discord invite API, used by LiveStats to refresh the member counters in the browser, with a frozen fallback when it is unreachable. The interface is entirely in French (<html lang="fr">).
| Area | Choice |
|---|---|
| Language | TypeScript (strict) 6 |
| Framework | SvelteKit 3, Svelte 5 runes only (runes: true is forced in vite.config.ts) |
| Build | Vite 8, @sveltejs/adapter-static — all routes pre-rendered into build/ |
| Styling | Tailwind CSS v4 via @tailwindcss/vite, CSS-first config (@theme in src/app.css) |
| Fonts | Outfit (display + body, self-hosted via @fontsource), JetBrains Mono for code |
| Container | Multi-stage Docker: node:24-alpine builds, nginx:alpine serves build/ |
| Edge | Traefik v3 (ACME HTTP-challenge TLS, HSTS, www → apex) + nginx (clean URLs, immutable caching) |
| Deploy | GHCR image, Portainer stack re-pulled by webhook on every push to main |
- Node.js ≥ 20.19 (Vite 8 / SvelteKit 3 requirement; the Docker build pins 24 LTS) and npm.
- No environment variables, no database: the site is fully static.
npm install
npm run dev # http://localhost:5173npm run check # svelte-kit sync + svelte-check (TypeScript + accessibility)npm run check is the quality gate: the project must stay at zero errors, Svelte accessibility warnings included. There is no test suite.
Push on main → the deploy.yml workflow builds the image and pushes it to GHCR (:latest + :<sha>) → POSTs the Portainer stack webhook → the stack re-pulls :latest (pull_policy: always) and restarts.
Files:
Dockerfile—npm ci && npm run buildinnode:24-alpine, thennginx:alpineservesbuild/on internal port 80.nginx.conf— clean URLs (/omnibot→omnibot.html), 1-year cache on/_app/immutable/**, HTML inno-cache.compose.yml— the stack, with the Traefik labels forgravendev.com(HTTPS,www→ apex 301, HTTP → HTTPS, HSTS)..github/workflows/deploy.yml— build & push, then trigger the webhook.
One-time setup (already done, kept for reference):
- The image lives at
ghcr.io/gravendev/website(must matchenv.IMAGEin the workflow andimage:incompose.yml). It is publicly pullable — keep it that way, or add a pull credential in Portainer. - Traefik runs on the host: network
web-gateway, entrypointsweb/websecure.gravendev.comis managed at OVH, so the existing DNS-challenge resolver cannot sign it — an ACME resolver using the HTTP-challenge (letsencrypt-http) must be added totraefik.yml(snippet in the header comment ofcompose.yml), then Traefik restarted. - Create the Portainer stack from the content of
compose.yml, then enable its webhook and copy the URL. ⚠ Portainer keeps its copy of the compose file: after any change tocompose.ymlin this repository, paste the new content into the stack — the webhook redeploys the stored content, it does not re-read the repository. - Add the
PORTAINER_WEBHOOK_URLrepository secret (Settings → Secrets → Actions). - Push on
main: the workflow deploys.
Check the image locally (requires Docker):
docker build -t site-gravendev-test .
docker run --rm -p 8888:80 site-gravendev-testThen open http://localhost:8888/ and http://localhost:8888/omnibot.
src/
├─ app.css # Tailwind v4 design tokens (@theme), from the Graven brand chart
├─ lib/
│ ├─ components/ # LiveStats, ChatMock, Discord/GitHub SVG icons
│ └─ content/ # ALL editorial content, typed: site.ts, omnibot.ts
└─ routes/
├─ +layout.svelte # sticky header, footer, fonts, favicon
├─ +layout.ts # prerender = true (static site)
├─ +page.svelte # landing page of the Discord community
└─ omnibot/+page.svelte # OmniBot page
static/
├─ logo.png, logo-omnibot.png, robots.txt
└─ charte/ # brand colours & fonts references (SVG)
Pages import their text from src/lib/content/ — they never hold hard-coded copy, and external URLs live only in site.ts.
npm run dev # Vite dev server (http://localhost:5173)
npm run build # pre-render every route into build/
npm run preview # serve the production build
npm run check # svelte-kit sync + svelte-check
npm run check:watch # same, watchingContributions are welcome — staff and members alike.
- The interface stays in French:
<html lang="fr">, copy and labels alike. - Svelte 5 runes only (
runes: trueis forced): noexport let, no$:labels. - All content lives in
src/lib/content/, and external links (Discord invite, OmniBot repo and docs, organisation) only insite.ts— never write a URL in a page. - Before opening a PR,
npm run checkmust pass with zero errors, accessibility warnings included (for example a<li>holding text must wrap it in a<span>, not a<div>). - Conventional Commits (
feat:,fix:,docs:,build:…) are used on this repository. - Server numbers (
FALLBACK_STATS) and the OmniBot descriptions are snapshots:LiveStatsrefreshes the counters client-side, but the frozen values and editorial copy should be re-checked periodically. - The dark « code editor » theme is a design choice — there is no light mode to build.
This project is free software: you can redistribute it and/or modify it under the
terms of the GNU General Public License
as published by the Free Software Foundation, either version 3 of the License,
or (at your option) any later version (GPL-3.0-or-later). The full text is in
LICENSE.
