summaryrefslogtreecommitdiff
path: root/src/weepinbell/core.clj
AgeCommit message (Collapse)Author
11 daysall: use JF2 as a single source of truth, compile ↵eltrac
microformats/JSON-LD/<meta> to JF2 (#80) closes #75 This is a large squash commit. For details, see https://codeberg.org/eltrac/weepinbell/pulls/80
2026-10-23storage: migrate from SQLite to H2eltrac
add ADR-0002 about migrating to H2
2026-10-21core: add embeded nREPL servereltrac
2026-10-19core, migration: add migrate-db, from edn to sqliteeltrac
2026-10-16Implement SQLite storage #7 (#73)eltrac
- new config `:storage-type` (default `:edn`, also support `:sqlite`) - `LICENSE` change: add exceptions to `next.jdbc` (which uses EPL) Reviewed-on: https://codeberg.org/eltrac/weepinbell/pulls/73
2026-10-15core: allow configuring minimal log level, default :infoeltrac
- refactored weepinbell.core/start-system. moved config loading outside start-system, loaded in -main function. - use :log-level in config and set timbre :min-level in -main
2026-10-14processor, storage: clear queues before shutting down proceesor and storage ↵eltrac
worker
2026-10-14core, storage: add storage worker that handles writes asynchronously and ↵eltrac
thread-safely fix
2026-10-13style: cljfmt everythingeltrac
2026-10-10test: cover config, core, webserver; add edge cases in existing testseltrac
- test loading and merging config - test start-system and graceful shutdown - test /endpoint and /api/send - test receiver handling nil input - test webserver startup and graceful shutdown
2026-10-10config, core: use WEEPINBELL_CONFIG env var to set custom config file patheltrac
- config/load-config now accepts one arg, which is the config file path - core uses WEEPINBELL_CONFIG env, fallback to "config.edn"
2026-10-10edn_storage, handler, core: decouple stroage conformity responsibilityeltrac
- handler and core no longer care if storage is a valid vtable - use-store assert storage is valid before it was returned - AssertionError should be spotted while testing
2026-10-07processor, webserver: move two main subsystems to own dir and make facadeseltrac
add docstrings format code
2026-10-06core, processor: refactor startup; graceful shutdowneltrac
- implement a functional rewrite of core.clj, no more `def`, no more states. callable from an REPL - handle SIGINT/SIGTERM and perform graceful shutdown - print clear logs when starting up and shutting down
2026-09-23processor: refactor processor; replace mf2j with mf2cljeltrac
- replace mf2j with mf2clj - remove utils.clj completely - refactored processor, use Chain of Responsibilities pattern and pass around maps to reuse data (so we don't have to make a separate HTTP request just to parse microformats, etc.) - test: add more test cases to verifier test - test: add basic test cases to all processing steps - add more logging to each processing steps. good for debugging.
2026-09-19processor, webhook: send webhooks with customizable payloadeltrac
- processor will call hook functions with webmention data - refactor webhook.clj massively - add dynamic parameter substitution for urls, e.g. {source} {target} {event}...... - add config option :webhook-request, a function with parameters [hook, data] that returns a map (resembling {:headers ... :body ...}). webhook.clj uses this function to generate payload. - allow map besids URL string in config option :webhook. if it's a URL, sends webhook request to it with payload generated by :webhook-request; if it's a map, it should be like {:url ... :request-fn ...}, which specifies a payload generator. - add request-fn preset :ntfy
2026-09-18docs: add missing docstrings and mark certain components as deprecatedeltrac
2026-09-16logs: print server start message; print data when it's corruptedeltrac
2026-09-16wrapper, storage, mf: add spec check and improve project structureeltrac
wrapper: use spec to check webmention data before writing to storage warn when data does not meet spec (corrupted). for now we're not dealing with corruption, just collect logs and analyze. microformats: use spec to validate data and warn if it's in bad form microformats: move parsers/wrappers to one sub-directory storage: move weepinbell.spec to weepinbell.storage.spec
2026-09-14processor, verifier, webhook: tidy up log msg/level; improve code styleeltrac
processor: tidy up log msg and level; improve code style - all messages start with a lower-case letter - all webmention-related logging contains first 8-digit of its id - use WARN level when something is deleted, not INFO - use WARN level when exceptional cases happen, not ERROR - get rid of emojis in log messages utils: digest-short function for logging verifier: tidy up log messages; improve code style - use `cond` instead of nested `if`s - same message format as processor's logs webhook: tidy up log messages; send webhooks robustly - use same logging formats as processor and verifier - handle error, 4xx, 5xx status and log them - move logging inside webhook module, away from core.clj
2026-09-11refactor(core): replace jetty-adapter with http-kiteltrac
2026-09-10test(storage, spec): add conformity check before loading storage; add spec ↵eltrac
and test case #7
2026-05-12refactor: move wmc declaration to core.cljeltrac
2026-05-12feat: port is now configurable in config fileeltrac
2026-05-12refactor: clean up core.cljeltrac
2026-05-12refactor(storage): make storage vtable in its nseltrac
2026-05-12refactor(storage): do not depend on config directlyeltrac
2026-05-12refactor(processor): do not depend on config directlyeltrac
2026-05-09refactor(config): feed/handler.clj no longer depend on config.cljeltrac
2026-05-09refactor(storage): now only core.clj dependon storage.cljeltrac
2026-05-07style(lsp-warning): rename unused 'args' to '_'eltrac
2026-05-06refactor(processor): a thin wrapper of process-webmentioneltrac
process-webmention used to start a go-loop directly. this commit separates go-loop from processing logic, core.clj now calls to processor/start, the wrapper function.
2026-05-06refactor(processor): remove storage dependency in processoreltrac
2026-05-02refactor: decouple handler.clj and webmention queueeltrac
a new component 'channel.clj' is created to manage `wmc` (Webmention channel). It's a dirty technical detail that should only be called in core.clj and handler.clj, business rules should not interact with it directly.
2026-04-22refactor: DRY callbacks constructoreltrac
2026-04-22refactor: simple DI using callbackseltrac
2026-03-16refactor: log with timbre instead of printlneltrac
2026-03-10chore: add main entry pointeltrac
2026-02-25chore: reinitialize as a web app using Compojureeltrac
2026-02-21initial commiteltrac