Bun-based server that handles HTTP requests, async item pipeline processing & serves a simple React frontend.
- Bun 1.3+
- No external database needed (uses local SQLite database via Bun)
- Optional: Devbox for a pinned Bun toolchain (run
devbox shell)
bun installbun dev- Automatically applies pending migrations before starting
- Serves on http://localhost:3000
- Check server logs for pipeline processing output
bun run build
bun run start- Sets
NODE_ENV=production - Outputs to
dist/ - Automatically applies pending migrations before starting
bun run db:generate— Generates Drizzle migration files based on current schema changes.bun run db:migrate— Applies all pending migrations to the local SQLite database.- Auto-migrations:
bun devandbun run startautomatically run migrations before starting the server (viapredevandprestartscripts). - Storage: The database is stored locally as a SQLite file on disk (
database/local.db).
Pipelines are designed to be extensible via custom processors.
To add a new processor:
-
Implement
PipelineItemProcessorinterface- Create a new class (e.g.,
CustomProcessor) that complies withPipelineItemProcessorinterface. - Ensure it exposes the required methods (e.g., a
processmethod and any lifecycle hooks expected by the pipeline). - Processors are able to stop the pipeline execution by returning
{stop: true}from theirprocessmethod.
- Create a new class (e.g.,
-
Register it in the processor registry
- Add your processor to
processor-registry.tsso the system can resolve it by class name.
- Add your processor to
-
Reference it from a pipeline-specific config
- In the pipeline’s configuration file (like
item-pipeline-config.ts), reference your processor by its class name. - Include any settings the processor needs under its config entry.
- In the pipeline’s configuration file (like
At runtime, the pipeline builder will resolve processors from the registry based on the pipeline config and construct the pipeline dynamically.