How vito-93/ffiiitc works
ffiiitc is a webhook-driven FireFly III transaction classifier. FireFly sends newly created transaction details to the service; the service classifies each description and asks FireFly to update its category. On startup, it loads a saved model or fetches transactions and trains one; a separate endpoint can force retraining, optionally over a date range. The graph also shows configuration, HTTP routing, and the FireFly API boundary. The README documents the webhook and retraining capabilities; source excerpts show the call paths. The model file is referenced in code but is runtime state, not a repository file.
Main entry points: handler.go Webhook handlers · main.go Startup wiring · firefly.go FireFly API client · router.go HTTP router
Components 10
Service entry
- Startup wiring
main.go - Environment config
internal/config/config.go
HTTP endpoints
- HTTP router
internal/router/router.go - Webhook handlers
internal/handlers/handler.go
Classification
- Bayesian classifier
internal/classifier/classifier.go - Saved model
FireFly integration
- FireFly API client
internal/firefly/firefly.go
Other components
- FireFly user
- Transaction webhook
- FireFly API
Connections 16
- FireFly user → Transaction webhook: triggers
README.md - Transaction webhook → HTTP router: posts webhook
README.md - Startup wiring → Environment config: loads config
main.go - Startup wiring → FireFly API client: creates client
main.go - Startup wiring → Bayesian classifier: loads or trains
main.go - Startup wiring → Saved model: loads or saves
main.go - Startup wiring → HTTP router: starts server
main.go - Startup wiring → Webhook handlers: registers routes
main.go - HTTP router → Webhook handlers: dispatches requests
- Webhook handlers → Bayesian classifier: classifies descriptions
internal/handlers/handler.go - Webhook handlers → FireFly API client: requests dataset
internal/handlers/handler.go - Webhook handlers → FireFly API client: updates category
internal/handlers/handler.go - Webhook handlers → Bayesian classifier: trains model
internal/handlers/handler.go - Webhook handlers → Saved model: saves model
internal/handlers/handler.go - FireFly API client → FireFly API: reads transactions
internal/firefly/firefly.go - FireFly API client → FireFly API: updates transaction
internal/firefly/firefly.go