How vtempest/svelte-starter-docs works
Project Type and Purpose
• This is a hybrid full-stack project combining:
a) A SvelteKit-based dynamic web app (starter DOCS site) with built-in API routes, server logic, and database integration.
b) A static documentation generator (“create-api-docs” CLI + Docusaurus) to produce self-hosted API/function docs.
• Purpose: Provide a “Next.js-like” Svelte starter with OAuth/email auth, Drizzle ORM on Cloudflare Workers/D1, plus docs-driven development for your JS functions.
High-Level File Structure Analysis
• Top-level src/
• lib/server: auth.ts, email.ts, drizzle.config.ts, users.ts, validations.ts – business logic & DB layer.
• Database & Migrations
• drizzle.config.ts, migrations/ – Drizzle ORM config & D1 schema migrations.
• Static docs artifact
• create-api-docs/: CLI tool (Node/Bun script + Docusaurus site under api-docs-standard) → generates docs/
• docs-config/: Custom Docusaurus setup for hosting docs alongside functions.
• docs/: Output static files (HTML/CSS/JS) served by Pages.
• Deployment config
• wrangler.toml: Cloudflare Workers + Pages config
• Vite, Tailwind, SvelteKit configs (vite.config.ts, svelte.config.js, tailwind.config.js)
README Insights
• Key stacks: SvelteKit, Tailwind, shadcn-svelte, Drizzle ORM with D1, Better Auth (OAuth + Resend), Cloudflare Workers & Pages.
• Docs-Driven Development: generate docs from code (create-api-docs) alongside the live Svelte app.
• Commands: bun dev (local), bun serve (deploy worker), wrangler for Cloudflare.