Skip to content

feat: add nova_kura project template#56

Closed
Taure wants to merge 4 commits intonovaframework:masterfrom
Taure:feat/nova-kura-template
Closed

feat: add nova_kura project template#56
Taure wants to merge 4 commits intonovaframework:masterfrom
Taure:feat/nova-kura-template

Conversation

@Taure
Copy link
Copy Markdown
Contributor

@Taure Taure commented Mar 11, 2026

Summary

  • New template: rebar3 new nova_kura my_app scaffolds a Nova project with Kura ORM
  • Repo module with DATABASE_URL parsing via uri_string for cloud deploys (Fly.io, GCP, etc.)
  • Dev sys.config with local postgres defaults, prod with JSON logging + graceful shutdown
  • Creates src/migrations/ and src/schemas/ directories
  • Reuses shared template files (router, health controller, Dockerfile, fly.toml)

Depends on: #55

Usage

rebar3 new nova_kura my_app
cd my_app
# Create postgres database
createdb my_app_dev
# Start dev server
rebar3 shell

Template contents

File Purpose
src/{name}_repo.erl Kura repo with DATABASE_URL support
src/{name}_app.erl App startup with kura:start/1
config/dev_sys.config.src Local postgres config
config/prod_sys.config.src Prod config (uses DATABASE_URL)
src/migrations/ Migration directory
src/schemas/ Schema directory

Test plan

  • rebar3 new nova_kura test_app generates all expected files
  • Repo module compiles and implements kura_repo behaviour
  • DATABASE_URL parsing handles standard postgres:// URLs
  • Dev config connects to local postgres
  • Template reuses shared nova files correctly

🤖 Generated with Claude Code

Taure and others added 4 commits March 10, 2026 22:20
- Add multi-stage Dockerfile with ARG for erlang/rebar versions from .tool-versions
- Add .dockerignore to keep build context clean
- Use nova_jsonlogger in prod_sys.config for structured JSON logging
- Add shutdown_delay and shutdown_drain_timeout config for graceful shutdown
- Disable distributed Erlang by default in vm.args (commented out -sname/-setcookie)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace /heartbeat with /healthz and /readyz endpoints following k8s
conventions. Add fly.toml template and rebar3 nova fly provider for
one-command deploys to Fly.io.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
New template (rebar3 new nova_kura my_app) that scaffolds a Nova project
with Kura ORM pre-configured. Includes repo module with DATABASE_URL
parsing for cloud deploys, dev/prod sys.config with postgres settings,
and src/migrations + src/schemas directories.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add static file route for /assets/[...] in dev environment only,
so rebar3 nova openapi output is accessible without manual routing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@burbas burbas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are mixing two PR here. Both for k8s and also templates for kura. Remove the k8s and it's approved :)

@Taure
Copy link
Copy Markdown
Contributor Author

Taure commented Mar 19, 2026

Superseded by #61 (rebar3 nova new myapp --kura)

@Taure Taure closed this Mar 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants