WAppCore - The iBoard Project
A Phoenix 1.8 web application with LiveView, real-time PubSub, markdown posts, comments, user authentication, and multi-locale support.
Quick start (development)
cp .env.example .env # copy and adjust settings
mix setup # install deps, create and migrate DB, build assets
mix run priv/repo/seed-posts.exs # (optional) seed markdown posts from data/posts/
mix phx.server # start the dev server
Visit http://localhost:4000.
Emails sent in development are captured locally and visible at http://localhost:4000/dev/mailbox.
Environment variables
Copy .env.example to .env and adjust the values. The application loads the
.env file automatically on startup.
Development
| Variable | Description | Default |
|---|---|---|
ENDPOINT_IP |
IP address Bandit binds to |
127.0.0.1 |
ENDPOINT_PORT |
TCP port the server listens on |
4000 |
ENDPOINT_HOST |
Hostname used in generated URLs (email links) |
localhost |
ENDPOINT_SCHEME |
URL scheme: http or https |
http |
DBUSER |
Database username |
postgres |
DBPASSWORD |
Database password |
postgres |
DBHOST |
Database hostname |
localhost |
DBPORT |
Database port |
5432 |
DBNAME |
Development database name |
w_app_core_dev |
DBNAME_TEST |
Test database name |
w_app_core_test |
POOL_SIZE_DEV |
Database connection pool size |
10 |
LOG_LEVEL |
Logger level (debug, info, warning, …) |
debug |
SECRET_KEY_BASE_DEV |
Secret key base for dev |
(preset in .env.example) |
AVAILABLE_LOCALES |
Comma-separated list of supported locales |
en_US,en_GB,de_DE,de_AT,de_CH |
FALLBACK_LOCALE |
Default locale when none is detected |
en_US |
MAILER_ADAPTER |
local (mailbox UI) or sendgrid |
local |
SENDGRID_API_KEY |
Required when MAILER_ADAPTER=sendgrid |
— |
Production
See DEPLOY.md for a full list of production environment variables and Docker deployment instructions.
Running tests
mix test
Documentation
Generate API docs with ExDoc:
mix docs
The generated docs are written to doc/. In development the docs are also
accessible in the sidebar at /dev/docs.
Deployment
See DEPLOY.
0