Use this introductory section to give the project's elevator pitch. Explain the idea. What are we building? Who is it for? What problems does it solve? What are the primary, proprietary aspects of the technology?
To develop and run this app, a few dependencies are required. To check if you have them installed, run the preflight script:
./bin/preflight.sh
This will report which dependency, if any, still needs to be installed and configured.
If all dependencies are present, it'll run asdf
to install language versions.
If the preflight script reports any missing executables or you run into any other errors, here are the prerequisites for running the app. Check you have all of these installed.
- asdf, which manages package versions. We recommend installing with the
git
method. We also need plugins for the versions specified in.tool-versions
(the preflight script will install these for you). Don’t forget to load asdf in your shell. - Docker Desktop (community edition). You can download the Mac version from Docker Hub. It's a self-contained install.
- PostgreSQL, the database. This can be installed with Homebrew:
brew install postgresql
. Be sure to follow the post-installation notes to make sure PG is running:brew info postgresql
. You can start it withbrew services start postgresql
. - A few dependencies for installing languages:
Once you've finished preflight setup, run the setup script:
mix setup
This will do a few things:
- Run
mix deps.get
to fetch Elixir dependencies - Run
ecto.setup
, which creates, migrates, and seeds the DB - Run
npm install --prefix assets
, to fetch Node dependencies for the asset pipeline
To start the web app, run the server command:
mix phx.server
Now you can visit localhost:4000
from your browser.
Refer to our contributing guide for our current standard practices for contributing new features and opening pull requests.
This project uses test-driven development. Tests can be found in the test/
.
To run the test suite, use Mix:
mix test
Refer to our testing guide for our current standard practices on test-driven development.
The codebase is documented where appropriate.
To view the docs in development, run ExDoc:
mix docs
This generates an HTML version available in the doc/
folder. Open to view:
open doc/index.html
The codebase spans Elixir, JS, and CSS, and includes linters for each.
For Elixir, there's the standard formatter, Credo (style) and Sobelow (security):
mix format --check-formatted
mix sobelow
mix credo
For Javascript, there's Prettier (formatting) and ESLint (style):
cd assets
npx prettier --check .
npx eslint js --ext .js,.jsx,.ts,.tsx
For CSS, there's Stylelint (style):
cd assets
npx stylelint "css/*"
This app is based on the NewAperio Phoenix Starter project, which is updated from time to time. Refer to that project for documentation and routine updates.
PhoenixStarter is built by NewAperio, LLC.