Skip to content

A simple crypto tracker written in Elixir and Phoenix

Notifications You must be signed in to change notification settings

GCinellu/ex_crypto_tracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CryptoTracker

To start your Phoenix server:

  • Run mix setup to install and setup dependencies
  • Start Phoenix endpoint with mix phx.server or inside IEx with iex -S mix phx.server

Now you can visit localhost:4000 from your browser.

Ready to run in production? Please check our deployment guides.

CryptoTracker Improvements Checklist

✅ Completed

  • Implemented a mocked price fetcher for development
  • Created CryptoTracker.Fetcher to fetch live prices from CoinMarketCap API
  • Added environment variable support for API key via .env files
  • Implemented a PriceTracker GenServer per coin
  • Introduced CoinTrackerSupervisor (DynamicSupervisor) to manage coin processes
  • Set up Registry to uniquely identify each coin GenServer
  • Price fetching and database insertion works correctly
  • Handled :utc_datetime microseconds issue with DB inserts

☐ To Improve

  • Switch from Process.send_after to :timer.send_interval for fixed update intervals
  • Add retry/backoff logic for API failures to prevent temporary outages from crashing the GenServer
  • Decouple fetching from database writes for better fault tolerance
  • Introduce telemetry events to track fetch success, latency, and errors
  • Configure an in-memory cache (ETS or :persistent_term) for fast price reads
  • Enable dynamic addition of new coins at runtime
  • Implement global rate limiting to respect CoinMarketCap API quotas
  • Create a mock/stub Fetcher for tests to avoid hitting the real API
  • Add logging/alerts for repeated GenServer crashes or failed fetches

About

A simple crypto tracker written in Elixir and Phoenix

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published