No description
- Ruby 92.7%
- Dockerfile 3.6%
- Shell 3.2%
- HTML 0.5%
| .forgejo/workflows | ||
| app | ||
| bin | ||
| bruno/rails-template-api | ||
| config | ||
| db | ||
| deploy | ||
| lib | ||
| log | ||
| public | ||
| script | ||
| scripts | ||
| spec | ||
| storage | ||
| tmp | ||
| vendor | ||
| .dockerignore | ||
| .env.example | ||
| .gitignore | ||
| .mise.toml | ||
| .rspec | ||
| .rubocop.yml | ||
| compose.yml | ||
| config.ru | ||
| Dockerfile | ||
| Gemfile | ||
| Gemfile.lock | ||
| lefthook.yml | ||
| package-lock.json | ||
| package.json | ||
| Rakefile | ||
| README.md | ||
Rails 8 API Template
This repository is a production-oriented Rails API starter with JWT auth, JSON:API responses, Pundit policies, Bruno smoke coverage, and Forgejo automation.
Tooling
- Trust the checked-in mise config once with
mise trust .mise.toml - Install pinned tools with
mise install - Install project dependencies with
mise run setup - Run one-off commands with
mise exec -- ...
Local Setup
- Copy
.env.exampleto.env - Trust the repo config with
mise trust .mise.toml - Install the pinned Ruby, Node, and Python versions with
mise install - Install gems, Bruno CLI, and Git hooks with
mise run setup - Start Postgres and the API with
mise exec -- ruby scripts/compose.rb up -d db api - Prepare the database with
mise run db-prepare - Seed a default admin with
mise exec -- bundle exec rails db:seed
Common Commands
mise exec -- bundle exec rails servermise run testmise run lintmise run bruno-smokemise exec -- ruby scripts/compose.rb down -v
Auth Endpoints
POST /api/v1/auth/sign_upPOST /api/v1/auth/sign_inDELETE /api/v1/auth/sign_outGET /api/v1/meGET /api/v1/admin/ping
Automation
- CI: .forgejo/workflows/ci.yml
- Image publish: .forgejo/workflows/release-image.yml
- Deploy: .forgejo/workflows/deploy.yml
- Remote deploy script: scripts/deploy.sh