How corrailius/shortener works
Shortener accepts HTTP requests to create short links and follow their codes. The router validates submitted HTTP(S) URLs, asks the in-memory Agent store to save or retrieve destinations, and returns a short URL or redirect. The OTP application supervises the store and, when enabled, starts Bandit with the router. The README documents these request and response behaviors; implementation details come from the sampled Elixir files.
Main entry points: router.ex HTTP router · store.ex In-memory store · application.ex OTP application
Components 5
Application runtime
- OTP application
lib/shortener/application.ex - Bandit server
Link service
- HTTP router
lib/shortener/router.ex - In-memory store
lib/shortener/store.ex
Other components
- HTTP user
Connections 7
- HTTP user → HTTP router: submits or follows
README.md - OTP application → In-memory store: supervises
lib/shortener/application.ex - OTP application → Bandit server: starts server
lib/shortener/application.ex - Bandit server → HTTP router: dispatches to
- HTTP router → In-memory store: stores destination
lib/shortener/router.ex - HTTP router → In-memory store: looks up code
lib/shortener/router.ex - HTTP router → HTTP user: returns URL or redirect
README.md