source: Klonkt/src/server.js@ a8b4f10

main
Last change on this file since a8b4f10 was a8b4f10, checked in by Robin Genis <roboburr@…>, 2 months ago

chore(headers): Referrer-Policy -> strict-origin-when-cross-origin

  • Property mode set to 100644
File size: 22.5 KB
Line 
1/**
2 * Klonkt Beta — server bootstrap
3 *
4 * Personal multi-site platform — Node + SQLite + htmx.
5 * Stack: Express + better-sqlite3 + EJS + htmx + ws.
6 */
7
8import 'dotenv/config';
9import express from 'express';
10import helmet from 'helmet';
11import session from 'express-session';
12import bodyParser from 'body-parser';
13import path from 'path';
14import fs from 'fs';
15import crypto from 'crypto';
16import { fileURLToPath } from 'url';
17import http from 'http';
18import db, { initializeDatabase } from './config/database.js';
19import { startScheduler } from './services/Scheduler.js';
20import { SqliteSessionStore } from './services/SqliteSessionStore.js';
21import { ensurePrimarySite } from './services/ensurePrimarySite.js';
22import { resolveSite, loadAudioTracks, loadTheme } from './middleware/site.js';
23import { isViewer } from './middleware/auth.js';
24import { renderPage } from './middleware/render.js';
25import { audioEnabled } from './config/features.js';
26import authRoutes from './routes/auth.js';
27import accountRoutes from './routes/account.js';
28import adminRoutes from './routes/admin.js';
29import adminAudioRoutes from './routes/admin-audio.js';
30import adminPlaylistsRoutes from './routes/admin-playlists.js';
31import adminSitesRoutes from './routes/admin-sites.js';
32import adminUsersRoutes from './routes/admin-users.js';
33import adminSettingsRoutes from './routes/admin-settings.js';
34import adminSeoRoutes from './routes/admin-seo.js';
35import audioRoutes from './routes/audio.js';
36import searchRoutes from './routes/search.js';
37import tagsRoutes from './routes/tags.js';
38import typesRoutes from './routes/types.js';
39import usersRoutes from './routes/users.js';
40import feedRoutes from './routes/feed.js';
41import postsRoutes from './routes/posts.js';
42import langRoutes from './routes/lang.js';
43import adminUpdatesRoutes from './routes/admin-updates.js';
44import adminPatreonRoutes from './routes/admin-patreon.js';
45import adminStatsRoutes from './routes/admin-stats.js';
46import circleRoutes from './routes/circle.js';
47import epkRoutes from './routes/epk.js';
48import newsletterRoutes from './routes/newsletter.js';
49import adminNewsletterRoutes from './routes/admin-newsletter.js';
50import downloadRoutes from './routes/download.js';
51import linkbioRoutes from './routes/linkbio.js';
52import embedRoutes from './routes/embed.js';
53import showsRoutes from './routes/shows.js';
54import adminShowsRoutes from './routes/admin-shows.js';
55import adminEpkRoutes from './routes/admin-epk.js';
56import changelogRoutes from './routes/changelog.js';
57import ogRoutes from './routes/og.js';
58import apRoutes from './routes/activitypub.js';
59import { apWants, startDeliveryWorker, selfHealTimeline } from './services/ActivityPubService.js';
60
61// SESSION_SECRET: use the env var if set. Otherwise auto-generate a strong one
62// and persist it next to the database, so it stays stable across restarts and
63// updates. This lets Docker / bare-Node installs run with zero manual config.
64if (!process.env.SESSION_SECRET) {
65 const dataDir = path.dirname(process.env.DATABASE_PATH || './storage/database.sqlite');
66 const secretFile = path.join(dataDir, '.session-secret');
67 try { process.env.SESSION_SECRET = fs.readFileSync(secretFile, 'utf8').trim(); } catch { /* not yet generated */ }
68 if (!process.env.SESSION_SECRET) {
69 fs.mkdirSync(dataDir, { recursive: true });
70 process.env.SESSION_SECRET = crypto.randomBytes(32).toString('hex');
71 fs.writeFileSync(secretFile, process.env.SESSION_SECRET, { mode: 0o600 });
72 console.log(`🔑 Generated a SESSION_SECRET (stored in ${secretFile})`);
73 }
74}
75
76// A SESSION_SECRET that was explicitly set in the env must still be strong in prod.
77if (process.env.NODE_ENV === 'production' && process.env.SESSION_SECRET.length < 32) {
78 console.error('❌ FATAL: SESSION_SECRET is too weak for production (set a longer, random one in .env)');
79 process.exit(1);
80}
81
82const __dirname = path.dirname(fileURLToPath(import.meta.url));
83const PORT = process.env.PORT || 3000;
84// Interface to bind. Default 0.0.0.0 (needed for Docker port-forwarding). Behind a
85// reverse proxy on the same host, set HOST=127.0.0.1 so the app is NOT reachable
86// directly from the internet (only via the proxy) — see README/install docs.
87const HOST = process.env.HOST || '0.0.0.0';
88const isDev = process.env.NODE_ENV !== 'production';
89
90const app = express();
91const server = http.createServer(app);
92
93// Per-request CSP nonce for the strict script-src (nonce + strict-dynamic). Must be set
94// before helmet builds the CSP header below. The nonce is injected into every <script> tag
95// at render time (see middleware/render.js injectCspNonce).
96app.use((req, res, next) => { res.locals.cspNonce = crypto.randomBytes(16).toString('base64'); next(); });
97
98app.use(helmet({
99 contentSecurityPolicy: {
100 directives: {
101 defaultSrc: ["'self'"],
102 // Strict CSP: a per-request nonce + 'strict-dynamic' (no 'unsafe-inline', no broad host
103 // sources — securityheaders/Observatory flag those). Trusted (nonce'd) scripts may load
104 // further scripts, which covers htmx-swapped inline scripts AND the external player APIs
105 // that embed-player.js injects (YouTube/SoundCloud/Spotify). The nonce is added to every
106 // <script> tag at render time (middleware/render.js injectCspNonce).
107 scriptSrc: [
108 "'strict-dynamic'",
109 (req, res) => `'nonce-${res.locals.cspNonce}'`,
110 ],
111 // Helmet's default sets script-src-attr to 'none', which blocks ALL inline
112 // event handlers (onchange/onclick/onsubmit) — causing e.g. the avatar
113 // upload (<input onchange="this.form.submit()">) and the role dropdown to
114 // silently do nothing. We explicitly allow inline handlers, consistent with
115 // the already-allowed inline <script> above.
116 scriptSrcAttr: ["'unsafe-inline'"],
117 styleSrc: ["'self'", "'unsafe-inline'"],
118 // blob: required for the image editor (Cropper) — it displays the chosen
119 // photo via URL.createObjectURL(blob:…). Without blob: the CSP silently
120 // blocks the <img> → empty edit window. (media-src already has blob: for audio.)
121 imgSrc: ["'self'", "data:", "https:", "blob:"],
122 connectSrc: ["'self'", "wss:", "ws:", "https://*.spotifycdn.com", "https://*.scdn.co"],
123 // blob: is required for the audio player — it fetch()es track bytes and
124 // plays from a blob: object URL (Spotify-style). Without blob: here the
125 // CSP silently blocks <audio>.src = blob:… → the player fires 'error' and
126 // auto-skips every track. 'self'/https: do NOT imply blob:.
127 mediaSrc: ["'self'", "https:", "blob:"],
128 fontSrc: ["'self'"],
129 // Embeds (platform players + cross-site Klonkt audio players) are framed broadly:
130 // ANY https origin, so embeds work in any context (feed, htmx/PWA nav, public pages).
131 // The sensitive /authorize_interaction page tightens frame-src back to 'self' in
132 // renderPage — it shows untrusted remote content next to the interact buttons.
133 frameSrc: ["'self'", "https:"],
134 },
135 },
136 hsts: { maxAge: 31536000, includeSubDomains: true, preload: true },
137 frameguard: { action: 'sameorigin' },
138 referrerPolicy: { policy: 'strict-origin-when-cross-origin' },
139}));
140
141app.set('view engine', 'ejs');
142app.set('views', path.join(__dirname, 'views'));
143
144app.use(bodyParser.urlencoded({ extended: true, limit: '10mb' }));
145app.use(bodyParser.json({ limit: '10mb' }));
146
147// Trust one upstream proxy in production. NPM (or Caddy / nginx) terminates
148// HTTPS and forwards to us over plain HTTP, setting X-Forwarded-Proto: https.
149// Without this, Express sees req.protocol === 'http' and won't issue secure
150// cookies — sessions never persist past the redirect after login.
151if (!isDev) app.set('trust proxy', 1);
152
153// Collapse leading duplicate slashes in the path. A reverse proxy that proxies with
154// `RewriteRule ^(.*)$ http://localhost:3000/$1` (Apache [P]) sends "//" for the root and
155// "//path" for sub-paths (the captured $1 keeps its leading slash) → Express matches no
156// route → the whole site 404'd behind such a proxy. Normalising here makes Klonkt resilient
157// to that common reverse-proxy setup. (Only the leading slashes; the query string is intact.)
158app.use((req, res, next) => {
159 if (req.url.startsWith('//')) req.url = req.url.replace(/^\/+/, '/');
160 next();
161});
162
163// Create/migrate the schema BEFORE anything touches the DB: the session store
164// queries the `sessions` table on construction, so on a fresh install the tables
165// must exist first (otherwise: "no such table: sessions" → crash loop on first boot).
166initializeDatabase();
167startScheduler(); // release planning: publish scheduled posts when publish_at is reached
168startDeliveryWorker(); // retry failed fediverse deliveries with backoff
169selfHealTimeline(); // once per SELFHEAL_VERSION bump: re-sync the fediverse cache (covers/edits) after a drastic update
170
171// Safety net: guarantee that there is always a primary site (solo/hub/circle).
172// Idempotent — does nothing if a site already exists or there is no admin yet.
173ensurePrimarySite();
174
175// Session middleware extracted into a variable so the WebSocket upgrade
176// handler can reuse it (it needs req.session to authenticate sockets).
177const sessionMiddleware = session({
178 store: new SqliteSessionStore(),
179 secret: process.env.SESSION_SECRET,
180 resave: false,
181 saveUninitialized: false,
182 name: 'pcms.sid',
183 cookie: {
184 httpOnly: true,
185 secure: !isDev,
186 sameSite: 'lax',
187 maxAge: 30 * 24 * 60 * 60 * 1000,
188 },
189});
190app.use(sessionMiddleware);
191
192app.use('/assets', express.static(path.join(__dirname, 'assets'), { maxAge: isDev ? 0 : '1y' }));
193app.use('/media', express.static(process.env.MEDIA_PATH || './storage/media', {
194 // Public media (post covers, avatars) must be cross-origin embeddable by other
195 // Klonkt sites in their CIRCLE. Helmet sets CORP=same-origin by default, which
196 // causes the browser to block those images (the file arrives, but the browser
197 // refuses to render it). Set cross-origin explicitly for /media.
198 setHeaders: (res) => res.setHeader('Cross-Origin-Resource-Policy', 'cross-origin'),
199}));
200
201// (Removed) TWA / digital-asset-links — only needed for the APK/TWA variant.
202// Klonkt is PWA-only; assetlinks.json is no longer served.
203
204// Bundle HTMX: copy from node_modules into our own assets dir so we can serve
205// it locally (no third-party CDN). Idempotent — only copies if size differs.
206(function ensureLocalHtmx() {
207 const src = path.join(__dirname, '..', 'node_modules', 'htmx.org', 'dist', 'htmx.min.js');
208 const dest = path.join(__dirname, 'assets', 'js', 'htmx.min.js');
209 try {
210 const srcStat = fs.statSync(src);
211 const destStat = fs.existsSync(dest) ? fs.statSync(dest) : null;
212 if (!destStat || destStat.size !== srcStat.size) {
213 fs.copyFileSync(src, dest);
214 console.log(`📦 HTMX bundled locally: ${srcStat.size} bytes`);
215 }
216 } catch (e) {
217 console.warn('⚠️ Could not bundle HTMX:', e.message, '— run `npm install`');
218 }
219})();
220
221// ActivityPub: WebFinger + /ap/* (site-agnostic, resolves the site by slug).
222app.use(apRoutes);
223
224// Themed OG cards (/og/:slug.png) — resolve the site by slug themselves, so they
225// run before resolveSite and need no site context.
226app.use('/og', ogRoutes);
227
228app.use(resolveSite);
229app.use(loadAudioTracks);
230app.use(loadTheme);
231
232// ActivityPub content negotiation on the human URLs: an AP request (Accept:
233// application/activity+json) to a profile/post URL is redirected to its /ap/*
234// representation — same URL serves HTML to browsers, AP-JSON to servers (this is
235// how Mastodon resolves a pasted profile/post URL). Gated on apWants() so normal
236// browser requests pay nothing.
237app.use((req, res, next) => {
238 if (req.method !== 'GET' || !apWants(req)) return next();
239 const site = res.locals.site;
240 if (!site || !site.slug) return next();
241 const seg = req.path.replace(/^\/+|\/+$/g, '');
242 if (seg === '') return res.redirect(302, `/ap/users/${encodeURIComponent(site.slug)}`);
243 if (!seg.includes('/')) {
244 try {
245 const post = db.prepare(
246 "SELECT id FROM posts WHERE site_id = ? AND slug = ? AND status = 'published' AND (fan_only IS NULL OR fan_only = 0)"
247 ).get(site.id, seg);
248 if (post) return res.redirect(302, `/ap/notes/${post.id}`);
249 } catch { /* fall through to normal HTML handling */ }
250 }
251 return next();
252});
253
254// Lightweight CSRF defense: reject cross-origin state-mutating requests.
255// Same-origin forms + HTMX send a matching Origin; missing Origin is allowed
256// through (non-browser clients). sameSite:'lax' on the session cookie is the
257// second layer. (Does not apply to GET/HEAD/OPTIONS.)
258app.use((req, res, next) => {
259 if (req.method === 'GET' || req.method === 'HEAD' || req.method === 'OPTIONS') return next();
260 const origin = req.get('origin');
261 if (!origin) return next(); // no Origin → no browser CSRF vector
262 let originHost;
263 try { originHost = new URL(origin).host; } catch { return res.status(403).send('Ongeldige origin'); }
264 // Behind a reverse proxy the raw Host is the backend bind (e.g. localhost:3000, when the
265 // proxy doesn't preserve it — common with Apache .htaccess proxying), so also accept the
266 // operator-configured PUBLIC_BASE_URL host and the proxy's X-Forwarded-Host. Both are
267 // operator/proxy-controlled and can't be forged via a victim's browser, so this is safe.
268 const allowedHosts = [req.get('host'), req.get('x-forwarded-host')];
269 if (process.env.PUBLIC_BASE_URL) { try { allowedHosts.push(new URL(process.env.PUBLIC_BASE_URL).host); } catch { /* ignore bad config */ } }
270 if (!allowedHosts.includes(originHost)) return res.status(403).send('Cross-origin request geweigerd');
271 next();
272});
273
274// Viewer accounts: may view everything (including Admin), change nothing. This is
275// the ONLY write gate — fail-closed, before all route handlers. Every state-mutating
276// method is rejected (the login POST sets the session after this guard, so it is
277// not affected). Instead of raw 403 text we render a clean page (or, for HTMX,
278// a swapped-in message).
279app.use((req, res, next) => {
280 const mutating = req.method !== 'GET' && req.method !== 'HEAD' && req.method !== 'OPTIONS';
281 if (mutating && isViewer(req.session?.user)) {
282 if (req.headers['hx-request'] === 'true') {
283 // htmx doesn't swap on 4xx; send 200 + retarget so the message appears in #pcms-main.
284 res.setHeader('HX-Retarget', '#pcms-main');
285 res.setHeader('HX-Reswap', 'innerHTML');
286 res.status(200);
287 } else {
288 res.status(403);
289 }
290 return renderPage(req, res, 'pages/viewer-blocked', {
291 pageTitle: 'Kijker-modus',
292 bodyClass: 'on-special',
293 });
294 }
295 next();
296});
297
298app.use('/auth', authRoutes);
299app.use('/account', accountRoutes);
300// NB: /notifications is the fediverse notifications page (in postsRoutes). The old
301// user-notifications route was removed — it collided with the fedi route after the
302// /meldingen -> /notifications rename, and the user-notifications system is dead.
303if (audioEnabled()) {
304 app.use('/admin/audio', adminAudioRoutes);
305 app.use('/admin/playlists', adminPlaylistsRoutes);
306}
307app.use('/admin/sites', adminSitesRoutes);
308app.use('/admin/users', adminUsersRoutes);
309app.use('/admin/settings', adminSettingsRoutes);
310app.use('/admin/seo', adminSeoRoutes);
311app.use('/admin/updates', adminUpdatesRoutes);
312app.use('/admin/patreon', adminPatreonRoutes);
313app.use('/admin/stats', adminStatsRoutes);
314app.use('/admin/newsletter', adminNewsletterRoutes);
315app.use('/admin/shows', adminShowsRoutes);
316app.use('/admin/epk', adminEpkRoutes);
317app.use('/admin', adminRoutes);
318if (audioEnabled()) app.use('/audio', audioRoutes);
319app.use('/search', searchRoutes);
320app.use('/tag', tagsRoutes);
321app.use('/type', typesRoutes);
322app.use('/users', usersRoutes);
323// Feed/sitemap routes are mounted at root because they're at well-known paths
324app.use('/', feedRoutes);
325app.use('/', circleRoutes); // /cirkel-feed (solo: next() -> postsRoutes)
326app.use('/', epkRoutes); // /pers perskit (premium; niet-premium: next() -> 404)
327app.use('/', newsletterRoutes); // /nieuwsbrief in/uitschrijven (premium; niet-premium: next())
328if (audioEnabled()) app.use('/', downloadRoutes); // /downloads + /download/:id (audio; lite: uit)
329app.use('/', linkbioRoutes); // /links link-in-bio + klikstats (premium)
330if (audioEnabled()) app.use('/', embedRoutes); // /embed inbedbare audiospeler (audio; lite: uit)
331app.use('/', showsRoutes); // /shows agenda + notify-me (premium)
332app.use('/', changelogRoutes); // /changelog publieke release-/wijzigingen-pagina
333app.use('/', langRoutes); // /lang/:code — interface-taal kiezen (vóór de catch-all)
334app.use('/', postsRoutes);
335
336app.get('/manifest.webmanifest', (req, res) => {
337 const site = res.locals.site;
338
339 // PWA scope: confines installed apps to ONE site. If a user is in the
340 // bedrijf1 PWA and clicks a link to /sites/bedrijf2/..., the browser will
341 // open it in a regular tab (out-of-scope) instead of within the PWA.
342 // Same applies to APK packaging — the WebView is locked to this scope.
343 //
344 // For path-mounted sites: scope = /sites/<slug>/
345 // For root/subdomain sites: scope = /
346 const base = res.locals.siteUrlBase || ''; // '' or '/sites/<slug>'
347 const scope = (base || '') + '/';
348 const startUrl = (base || '') + '/?source=pwa';
349
350 // A stable identity per site so installs don't collide (Chromium uses `id`).
351 // NB: changing the id orphans existing PWA installs (no migration carries an
352 // install across an id change) — anyone who already installed the site as a
353 // PWA will need to reinstall once. Data stays server-side, so nothing is lost.
354 const idBase = site?.slug ? `klonkt-${site.slug}` : 'klonkt';
355
356 res.set('Cache-Control', 'no-cache');
357 res.json({
358 id: idBase,
359 name: site?.title || 'Klonkt',
360 short_name: (site?.title || 'Klonkt').slice(0, 12),
361 description: site?.description || site?.tagline || '',
362 scope,
363 start_url: startUrl,
364 display: 'standalone',
365 display_override: ['standalone', 'minimal-ui'],
366 orientation: 'any',
367 background_color: '#1a1a17',
368 theme_color: site?.accent || '#e8b04b',
369 lang: site?.language || 'nl',
370 icons: [
371 { src: '/favicon.svg', sizes: 'any', type: 'image/svg+xml' },
372 { src: '/favicon.ico', sizes: '64x64', type: 'image/x-icon' },
373 ],
374 // Hint to capable browsers: capture all in-scope links inside the PWA
375 capture_links: 'existing-client-navigate',
376 });
377});
378
379// Favicon — served as SVG so it picks up the site's accent color dynamically.
380// Browsers also request /favicon.ico by convention; we serve the same SVG
381// content there with a forgiving content-type since modern browsers accept it.
382function _renderFavicon(res, accent) {
383 const safeAccent = /^#[0-9a-fA-F]{3,8}$/.test(accent) ? accent : '#e8b04b';
384 // Site mark: rounded square in the site accent + bold white 'K' (Klonkt)
385 const svg = `<?xml version="1.0" encoding="UTF-8"?>
386<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
387 <rect width="64" height="64" rx="14" fill="${safeAccent}"/>
388 <text x="50%" y="50%" dy="0.35em" text-anchor="middle"
389 font-family="Arial, Helvetica, sans-serif"
390 font-size="42" font-weight="800" fill="#fff">K</text>
391</svg>`;
392 res.set('Content-Type', 'image/svg+xml');
393 res.set('Cache-Control', 'public, max-age=86400');
394 res.send(svg);
395}
396
397app.get('/favicon.svg', (req, res) => {
398 _renderFavicon(res, res.locals.site?.accent);
399});
400app.get('/favicon.ico', (req, res) => {
401 // Browsers requesting .ico will accept SVG content; chrome/firefox both fine.
402 // Keeping the route prevents 404 spam in the console.
403 _renderFavicon(res, res.locals.site?.accent);
404});
405
406app.get('/sw.js', (req, res) => {
407 res.set('Content-Type', 'application/javascript');
408 res.set('Cache-Control', 'no-cache');
409 res.send(`
410const CACHE_VERSION = 'pcms-v16-' + new Date().toISOString().split('T')[0];
411self.addEventListener('install', e => {
412 e.waitUntil(caches.open(CACHE_VERSION).then(c => c.addAll(['/'])));
413 self.skipWaiting();
414});
415self.addEventListener('activate', e => {
416 e.waitUntil(caches.keys().then(keys => Promise.all(
417 keys.filter(k => k !== CACHE_VERSION).map(k => caches.delete(k))
418 )));
419 self.clients.claim();
420});
421// ONLY intercept navigations (HTML pages) for an offline fallback.
422// Do NOT touch images, CSS, JS or /media — let the browser handle those natively.
423// Otherwise a failed network fetch could fall back to an empty cache match
424// (undefined) and "break" an image on a normal refresh (hard reload bypasses
425// the SW, which is why that case worked fine).
426self.addEventListener('fetch', e => {
427 if (e.request.method !== 'GET') return;
428 if (e.request.mode !== 'navigate') return; // page loads only
429 // Same-origin ONLY. A cross-origin navigate request is an <iframe> embed
430 // (YouTube/Spotify/SoundCloud …) — routing those through the SW yields an
431 // opaque/altered response the iframe cannot render → blank embeds in the
432 // installed PWA (which is always SW-controlled). Let the browser load them.
433 try { if (new URL(e.request.url).origin !== self.location.origin) return; } catch (err) { return; }
434 e.respondWith(
435 fetch(e.request).catch(() => caches.match('/').then(r => r || Response.error()))
436 );
437});
438 `);
439});
440
441process.on('unhandledRejection', (reason) => {
442 console.error('⚠️ Unhandled Rejection:', reason);
443});
444
445app.use((err, req, res, next) => {
446 console.error('❌ Error:', err);
447 res.status(err.status || 500).send(
448 isDev ? `<pre>${err.stack || err.message}</pre>` : 'Internal Server Error'
449 );
450});
451
452app.use((req, res) => {
453 res.status(404);
454 // Clean, mobile-friendly 404 via the shell (viewport + nav + site theme).
455 // Falls back to bare HTML if rendering unexpectedly fails.
456 try {
457 return renderPage(req, res, 'pages/404', {
458 pageTitle: '404 — niet gevonden',
459 bodyClass: 'on-special on-404',
460 });
461 } catch (e) {
462 return res.send('<!doctype html><meta name="viewport" content="width=device-width,initial-scale=1"><div style="font-family:system-ui;max-width:500px;margin:4rem auto;text-align:center;padding:2rem"><h1 style="font-size:4rem;margin:0">404</h1><p>Pagina niet gevonden</p><a href="/">← Home</a></div>');
463 }
464});
465
466server.listen(PORT, HOST, () => {
467 const baseUrl = (process.env.PUBLIC_BASE_URL || '').replace(/\/+$/, '');
468 console.log('');
469 console.log('🪶 Klonkt');
470 console.log(` ${baseUrl || `http://localhost:${PORT}`}`);
471 if (baseUrl) console.log(` (bound to ${HOST}:${PORT})`);
472 console.log('');
473 console.log(` ✓ Security: Helmet, CSP, secure sessions`);
474 console.log(` ✓ Privacy: Self-hosted fonts, no third-party requests`);
475 console.log(` ✓ Layout: v9 editorial feel (top nav, profile header)`);
476 console.log(` ✓ Auth: wachtwoord (beheer) + Google (luisteraars) / logout`);
477 console.log(` ✓ Posts: create / edit / view / archive`);
478 console.log('');
479 console.log(` Mode: ${isDev ? 'development' : 'PRODUCTION'}`);
480 console.log('');
481});
482
483export default app;
Note: See TracBrowser for help on using the repository browser.