Welcome to Guac, an Elixir/Phoenix based starting point for web apps dedicated to San Francisco food truck data.
Live demo: https://guac.fly.dev/
graph LR;
Guac.CSV.ImportWorker-- Task.Supervisor -->Guac.CSV.Download;
Guac.CSV.Download-- CSV Binary -->Guac.CSV.Importer;
Guac.CSV.Importer-->DB[(Database)];
Works in tandem with an Elixir Task.Supervisor
to facilitate child process CSV imports. Ultimately, this could be promoted to something more robust, like an Oban worker.
Responsible for downloading the CSV binary to a tmp file path, via Briefly.
Parses the CSV binary, via NimbleCSV, then forwards the reduction to our applicaton context for persistence.
- Postgres 14+
- PostGIS extension
- Elixir 1.14+
Using asdf
package manager, install both Postgres and Elixir, as found in the asdf
instructions:
Using brew
package manager, install PostGIS as follows: brew install postgis
To start your server:
- Install dependencies with
mix deps.get
- Create and migrate your database with
mix ecto.setup
- Start Phoenix endpoint with
mix phx.server
or inside IEx withiex -S mix phx.server
- Via
iex
console, seed the latest data with the following:Guac.CSV.ImportWorker.perform
- Navigate to http://localhost:4000