this repo has no description
Development Guide#
Prerequisites#
- Bun v1.3+
Setup#
bun install
Project Structure#
sitebase/
├── packages/
│ ├── core/ # Export library (@sitebase/core)
│ ├── cli/ # CLI tool (@sitebase/cli)
│ └── web/ # Web management UI (@sitebase/web)
├── scripts/ # Utility scripts
├── biome.json # Linter/formatter config
└── tsconfig.json # TypeScript config
Commands#
Verification#
Run these before committing:
# Run all checks (typecheck + lint)
bun run check
# Individual checks
bun run typecheck # TypeScript type checking
bun run lint:check # Biome lint (no auto-fix)
bun run format:check # Biome format (no auto-fix)
Fixing Issues#
bun run lint # Auto-fix lint issues
bun run format # Auto-fix formatting
Code Style#
Enforced by Biome:
- Indentation: Tabs
- Quotes: Double quotes
- Imports: Auto-organized on save (via
biome.jsonassist)
TypeScript is configured with strict mode and additional safety flags:
noUncheckedIndexedAccess- Array/object index access may be undefinednoFallthroughCasesInSwitch- Require break/return in switch casesnoImplicitOverride- Requireoverridekeyword
Packages#
@sitebase/core#
Core export functionality. No runtime dependencies except Handlebars.
Key files:
src/types.ts- Type definitionssrc/export.ts- Export logicsrc/config.ts- Config file loadingsrc/templates.ts- Handlebars helpers, slugifysrc/atproto.ts- ATProto fetch utilities
@sitebase/cli#
CLI wrapper around core. Uses Commander for argument parsing.
cd packages/cli
bun run src/index.ts export --config ../path/to/config.ts
@sitebase/web#
Hono-based web server with ATProto OAuth.
cd packages/web
bun run dev
See packages/web/CLAUDE.md for web-specific details.
ATProto Integration#
The project uses ATProto lexicons:
site.standard.publication- Blog/publication metadatasite.standard.document- Individual documents/posts
Documents are fetched from any PDS via:
- Parse AT URI to extract DID
- Resolve DID to PDS endpoint via
plc.directory - Fetch records via
com.atproto.repo.getRecord/listRecords
Adding Features#
New Handlebars Helper#
Add to packages/core/src/templates.ts in registerHelpers():
hbs.registerHelper("myHelper", (arg1: unknown) => {
// Return transformed value
return String(arg1).toUpperCase();
});
New Export Option#
- Add type to
packages/core/src/types.tsinExportOptionsandExportTarget - Handle in
packages/core/src/export.tsinexportPublication() - Update
packages/core/src/config.tsif it affects config loading - Document in README.md
Workspace Dependencies#
Use workspace protocol for internal deps:
{
"dependencies": {
"@sitebase/core": "workspace:*"
}
}