Skip to content
GravenDevPublic

About

Site vitrine de la communauté Discord Graven — SvelteKit 5 statique, Tailwind CSS v4, TypeScript. Déployé via Docker + Traefik (GHCR, Portainer) sur https://gravendev.com

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation


Graven - Développement
This project is under the GNU GPL v3 or later license

Website

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.

gravendev.com Deploy License


What is the Graven website?

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">).

Tech stack

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

Getting started

Prerequisites

  • 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.

Setup

npm install
npm run dev      # http://localhost:5173

Checks

npm 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.

Deployment

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 build in node:24-alpine, then nginx:alpine serves build/ on internal port 80.
  • nginx.conf — clean URLs (/omnibot → omnibot.html), 1-year cache on /_app/immutable/**, HTML in no-cache.
  • compose.yml — the stack, with the Traefik labels for gravendev.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):

  1. The image lives at ghcr.io/gravendev/website (must match env.IMAGE in the workflow and image: in compose.yml). It is publicly pullable — keep it that way, or add a pull credential in Portainer.
  2. Traefik runs on the host: network web-gateway, entrypoints web/websecure. gravendev.com is managed at OVH, so the existing DNS-challenge resolver cannot sign it — an ACME resolver using the HTTP-challenge (letsencrypt-http) must be added to traefik.yml (snippet in the header comment of compose.yml), then Traefik restarted.
  3. 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 to compose.yml in this repository, paste the new content into the stack — the webhook redeploys the stored content, it does not re-read the repository.
  4. Add the PORTAINER_WEBHOOK_URL repository secret (Settings → Secrets → Actions).
  5. 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-test

Then open http://localhost:8888/ and http://localhost:8888/omnibot.

Project layout

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.

Common commands

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, watching

Contributing

Contributions are welcome — staff and members alike.

  • The interface stays in French: <html lang="fr">, copy and labels alike.
  • Svelte 5 runes only (runes: true is forced): no export let, no $: labels.
  • All content lives in src/lib/content/, and external links (Discord invite, OmniBot repo and docs, organisation) only in site.ts — never write a URL in a page.
  • Before opening a PR, npm run check must 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: LiveStats refreshes 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.

License

GNU GPL v3 or later

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.

About

Site vitrine de la communauté Discord Graven — SvelteKit 5 statique, Tailwind CSS v4, TypeScript. Déployé via Docker + Traefik (GHCR, Portainer) sur https://gravendev.com

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages