Technical Spec

Architektura Systemu

Zawsze pracowałem w wielojęzycznych zespołach, rozmawiając o pracy po angielsku, dlatego poniższy opis techniczny również został sporządzony w tym języku.

A rchitecture

The Framework

Madika is built on Rails 8, embracing the "One Person Framework" philosophy.

Data & Storage

Using SQLite as database. Using Primo for Wroclaw libraries integration.

Deployment

Deployed to a VPS using Kamal 2. This allows for Docker-based, zero-downtime deployments without the overhead of complex cloud providers.

I ntelligence

The Brain

The main recommendation engine runs on GPT-5.4 (via OpenRouter). After many side-by-side comparisons with Claude and Gemini — using our model_eval rake tasks and tools like Evalry — GPT consistently gave the best balance of quality, structured output, and library-aware suggestions. For quick auxiliary steps (clarification, photo OCR, category pick) I use gemini-flash-lite-latest — fast and cheap.

Geolocation

To help users find their nearest branch, I will be integrating geolocation features powered by convex_hull and geokit gems.

Observability

For error tracking and performance monitoring, the system is guarded by Sentry. Eventually I will explore Grafana and Prometheus.