How jean-eudes0/blog works
This repository is the backend for a single-author developer blog: public article and tag APIs, plus administrator authentication and article management. The runtime starts by loading configuration and opening PostgreSQL, then serves Fastify routes; session authentication protects administrator access. The README also describes Markdown presentation and admin CRUD, but this tree contains no frontend, and the admin route file is only a tiny stub. Connections below are limited to relationships shown in excerpts or explicitly documented; unsampled route internals are not inferred.
Main entry points: app.js Fastify app · server.js HTTP server · auth.js Auth routes · sessions.js Session operations
Components 18
Server runtime
- HTTP server
server/src/server.js - Configuration
server/src/config.js - Fastify app
server/src/app.js
Blog content
- Public articles
server/src/routes/articles.js - Tag routes
server/src/routes/tags.js - Admin article management
server/src/routes/admin-articles.js
Admin identity
- Auth routes
server/src/routes/auth.js - Session auth plugin
server/src/plugins/auth.js - Admin accounts
server/src/lib/users.js - Session operations
server/src/lib/sessions.js - Session expiry purge
server/src/lib/purge-sessions.js
Persistence and errors
- PostgreSQL access
server/src/db.js - Database schema
server/migrations - HTTP error helpers
server/src/lib/http-errors.js - Error responses
server/src/plugins/errors.js - Origin checks
server/src/plugins/origine.js
Other components
- Visitor
- Administrator
Connections 23
- Visitor → Fastify app: requests API
README.md - Administrator → Fastify app: uses admin API
README.md - HTTP server → Configuration: loads settings
server/src/server.js - HTTP server → PostgreSQL access: opens database
server/src/server.js - HTTP server → Fastify app: starts app
server/src/server.js - HTTP server → Session expiry purge: starts purge
server/src/server.js - PostgreSQL access → Database schema: applies migrations
server/src/db.js - Fastify app → Auth routes: registers routes
server/src/app.js - Fastify app → Public articles: registers routes
server/src/app.js - Fastify app → Tag routes: registers routes
server/src/app.js - Fastify app → Session auth plugin: registers plugin
server/src/app.js - Fastify app → Origin checks: registers plugin
server/src/app.js - Fastify app → Error responses: registers plugin
server/src/app.js - Public articles → PostgreSQL access: queries content
server/src/routes/articles.js - Auth routes → Admin accounts: checks credentials
server/src/routes/auth.js - Auth routes → Session operations: creates and revokes
server/src/routes/auth.js - Session auth plugin → Session operations: loads session user
server/src/plugins/auth.js - Session operations → PostgreSQL access: reads and writes
server/src/lib/sessions.js - Session expiry purge → Session operations: purges expired
server/src/lib/purge-sessions.js - Auth routes → HTTP error helpers: raises auth errors
server/src/routes/auth.js - Public articles → HTTP error helpers: raises not found
server/src/routes/articles.js - HTTP error helpers → Error responses: formats errors
server/src/lib/http-errors.js - Fastify app → Admin article management: may register routes