https://github.com/collava/base_ash_template
Base template for new projects with some common stuff implemented
https://github.com/collava/base_ash_template
ash-framework elixir elixir-phoenix phoenix-framework phoenix-liveview template-project
Last synced: 25 days ago
JSON representation
Base template for new projects with some common stuff implemented
- Host: GitHub
- URL: https://github.com/collava/base_ash_template
- Owner: collava
- Created: 2024-12-11T15:17:32.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2026-05-25T02:10:02.000Z (28 days ago)
- Last Synced: 2026-05-25T04:29:49.663Z (28 days ago)
- Topics: ash-framework, elixir, elixir-phoenix, phoenix-framework, phoenix-liveview, template-project
- Language: Elixir
- Homepage:
- Size: 691 KB
- Stars: 7
- Watchers: 1
- Forks: 1
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- Agents: AGENTS.md
Awesome Lists containing this project
README
# AshBaseTemplate
Base project using Ash and Phoenix, with authentication, authorization, email sending, security for apis, error tracking and more.
## Features
- Github actions setup for all checks and deployment to Fly.io
- Formatters configured
- Authentication and authorization samples
- Protected admin
- Simple User roles
- Automatic version update, tag and release creation.
- Dependabot and Renovate setup for all dependencies (pick 1)
- Honeybadger and Sentry and in project error tracking
## After cloning
### Install pre-commit
### Rename all folders and modules according to your project
### Get dependencies
```bash
mix deps.get
```
### Rename project
```bash
mix rename AshBaseTemplate MyNewProject
```
> [!NOTE]
> The rename script might not update the email sender addresses in `config/config.exs` and `lib/my_new_project/accounts/emails.ex`.
> Please check those files and update the email addresses to match your new project's domain manually.
> You also have to manually change `tailwind.config.js`
> "../lib/ash_base_template_web.ex",
> "../lib/ash_base_template_web/**/*.*ex",
Search for any `ash_base_template` references and replace them with your new project name
### Setup the project
```bash
mix setup
```
### Test pre-commit
```bash
pre-commit run --all-files
```
### Start the project
```bash
iex -S mix phx.server
```
- Home:
- Sign in:
- After registering or requesting the magic link, you will see in the terminal the link to login.
- Admin:
- You have to update the user you registered to have the role `admin` in the database.
- Swagger:
### Pre commit to run
- Dialyzer
- Sobelow
- mix format
- credo
- mix tests, with bash script to only run tests related to modifications we have done
Other features:
- Oban for background jobs, and ObanLiveDashboard for monitoring.
- Error tracking / reporting using Tower.
- Email sending with Swoosh.
- Auth using AshAuthentication.
- Security for APIs with OpenApiSpex and Plug.Cors.
- Error reporting with TowerErrorTracker.
- Testing with ExUnit, Mneme, Mox, and Smokestack.
- Code quality with Credo, Styler.
- Security scanning with Sobelow, Hammer and MixAudit.