How sam-goodwin/alchemy works
Project Type and Purpose
• Its purpose is to let developers declare, create, update, and delete cloud and local resources via memoized async functions, running anywhere (node, Bun, browser, serverless, durable workflows).
File Structure
• Top-level directories:
• alchemy/ → Core library source
• alchemy-web/ → Documentation website (Vitepress)
• examples/ → Consumer projects demonstrating usage on AWS, Cloudflare, Redwood, Vite, Workers, etc.
• stacks/ → Reusable stack definitions or scripts
• scripts/ → Build and smoke test scripts
• Within alchemy/src:
• Core modules: alchemy.ts, apply.ts, destroy.ts, context.ts, state.ts, secret.ts, env.ts, serde.ts
• Provider modules: aws/, cloudflare/, dns/, fs/, github/, neon/, os/, stripe/, upstash/
• AI tooling: ai/
• Web‐centric helpers: web/ (Astro, Vitepress, Tailwind)
• Internal: internal/docs, util/, test/
• Configuration and CI:
• tsconfig*.json, package.json (core & web), .github/workflows, .gitignore, bun.lock, biome.json
README for Additional Insights
• README emphasizes zero dependencies, pure ESM, async-native resources, embeddability, extensibility, AI-first ethos.
• High-level example shows an “app” context, resource function invocation (e.g., Worker()), and app.finalize().
• Features list confirms modular provider architecture.
Detailed Checklist
– Clear labels for:
• App Context & Lifecycle
• Resource Executor (apply/destroy)
• State Store
• Provider Plugin Interface
• Individual Provider Modules
• Consumer projects & Docs
• Invocation of resource functions
• Read/write of state files
• Plugin registration and execution
• Core vs. Providers vs. Consumers vs. Docs