3 KiB
Tech Library
Tech Library is a modular, source-backed reference for modern web, app, and systems development. The Danish PWA serves layered English technical entries for readers at every experience level. Official-source monitoring proposes changes; a human editor always reviews them before publication.
Included
- 32 curated starter topics across web, frontend, backend, data, mobile/desktop, DevOps, testing/observability, and security
- faceted browsing and SQLite FTS5 search
- immutable revisions, publication pointers, rollback, and claim-level provenance
- integrated editorial workspace with secure session and CSRF protection
- idempotent monitoring of official sources with a daily scheduler and manual trigger
- installable React/Vite PWA, Fastify API, SQLite/Drizzle data layer, and independent worker
- Docker Compose deployment, health checks, persistent data, backup and restore guidance
Quick start
Requirements: Node.js 22+ and npm 10+.
npm install
npm run db:migrate
npm run db:seed
$env:ADMIN_PASSWORD_HASH = npm run --silent password:hash -w @tech-library/api -- "development password"
$env:SESSION_SECRET = "replace-this-with-a-long-random-development-secret"
npm run dev
Open http://localhost:5173. The API runs on port 3001. Local content is stored under data/ and is intentionally ignored by Git.
Commands
| Command | Purpose |
|---|---|
npm run dev |
Run web, API, and source worker |
npm run check |
Type-check, test, and build every workspace |
npm run db:migrate |
Apply idempotent SQLite migrations |
npm run db:seed |
Add the curated starter catalog |
docker compose up -d --build |
Build and run the production topology |
Repository structure
apps/web React, Vite, Radix UI, TanStack Query, Zustand, PWA
apps/api Fastify REST API, editorial policy, authentication
apps/worker Official-source monitoring and structured findings
packages/contracts Shared Zod schemas and public TypeScript types
packages/database Drizzle schema, migrations, seed catalog
deploy Reverse-proxy configuration
docs Architecture decisions and operations
scripts Backup and restore helpers
See architecture and operations for system boundaries and production guidance.
Editorial flow
- The worker fetches enabled official sources and normalizes volatile page content.
- A new fingerprint produces one deduplicated finding; failures only update source health.
- An administrator reviews the source and creates an immutable draft revision.
- A revision must be approved before it can be published.
- Publication updates the active pointer and search index in one transaction; rollback selects a prior approved revision.
Development policy
Use short feature branches and focused Conventional Commits. Tests and documentation belong in the same change as the behavior they describe. Comments should explain decisions or non-obvious constraints rather than restating code.