@@ -15,9 +15,9 @@ set shell := ["bash", "-uc"]
1515set dotenv-load := true
1616set positional-arguments := true
1717
18- # Project metadata - CUSTOMIZE THESE
19- project := " RSR-template-repo "
20- version := " 0.1 .0"
18+ # Project metadata
19+ project := " http-capability-gateway "
20+ version := " 1.0 .0"
2121tier := " infrastructure" # 1 | 2 | infrastructure
2222
2323# ═══════════════════════════════════════════════════════════════════════════════
@@ -55,29 +55,20 @@ info:
5555
5656# Build the project (debug mode)
5757build * args :
58- @ echo " Building {{ project}} ..."
59- # TODO: Add build command for your language
60- # Rust: cargo build {{args}}
61- # ReScript: npm run build
62- # Elixir: mix compile
58+ mix compile {{ args}}
6359
6460# Build in release mode with optimizations
6561build-release * args :
66- @ echo " Building {{ project}} (release)..."
67- # TODO: Add release build command
68- # Rust: cargo build --release {{args}}
62+ MIX_ENV=prod mix compile {{ args}}
6963
7064# Build and watch for changes
7165build-watch :
72- @ echo " Watching for changes..."
73- # TODO: Add watch command
74- # Rust: cargo watch -x build
75- # ReScript: npm run watch
66+ @ echo " No dedicated watch recipe configured; use 'iex -S mix' for interactive development."
7667
7768# Clean build artifacts [reversible: rebuild with `just build`]
7869clean :
79- @ echo " Cleaning..."
80- rm -rf target _build dist lib node_modules
70+ mix clean
71+ rm -rf _build deps doc coverage
8172
8273# Deep clean including caches [reversible: rebuild]
8374clean -all: clean
@@ -89,46 +80,31 @@ clean-all: clean
8980
9081# Run all tests
9182test * args :
92- @ echo " Running tests..."
93- # TODO: Add test command
94- # Rust: cargo test {{args}}
95- # ReScript: npm test
96- # Elixir: mix test
83+ mix test {{ args}}
9784
9885# Run tests with verbose output
9986test-verbose :
100- @ echo " Running tests (verbose)..."
101- # TODO: Add verbose test
87+ mix test --trace
10288
10389# Run tests and generate coverage report
10490test-coverage :
105- @ echo " Running tests with coverage..."
106- # TODO: Add coverage command
107- # Rust: cargo llvm-cov
91+ mix test --cover
10892
10993# ═══════════════════════════════════════════════════════════════════════════════
11094# LINT & FORMAT
11195# ═══════════════════════════════════════════════════════════════════════════════
11296
11397# Format all source files [reversible: git checkout]
11498fmt :
115- @ echo " Formatting..."
116- # TODO: Add format command
117- # Rust: cargo fmt
118- # ReScript: npm run format
119- # Elixir: mix format
99+ mix format
120100
121101# Check formatting without changes
122102fmt-check :
123- @ echo " Checking format..."
124- # TODO: Add format check
125- # Rust: cargo fmt --check
103+ mix format --check-formatted
126104
127105# Run linter
128106lint :
129- @ echo " Linting..."
130- # TODO: Add lint command
131- # Rust: cargo clippy -- -D warnings
107+ mix compile --warnings-as-errors
132108
133109# Run all quality checks
134110quality : fmt-check lint test
@@ -144,39 +120,27 @@ fix: fmt
144120
145121# Run the application
146122run * args :
147- @ echo " Running {{ project}} ..."
148- # TODO: Add run command
149- # Rust: cargo run {{args}}
123+ mix run --no-halt {{ args}}
150124
151125# Run in development mode with hot reload
152126dev :
153- @ echo " Starting dev mode..."
154- # TODO: Add dev command
127+ iex -S mix
155128
156129# Run REPL/interactive mode
157130repl :
158- @ echo " Starting REPL..."
159- # TODO: Add REPL command
160- # Elixir: iex -S mix
161- # Guile: guix shell guile -- guile
131+ iex -S mix
162132
163133# ═══════════════════════════════════════════════════════════════════════════════
164134# DEPENDENCIES
165135# ═══════════════════════════════════════════════════════════════════════════════
166136
167137# Install all dependencies
168138deps :
169- @ echo " Installing dependencies..."
170- # TODO: Add deps command
171- # Rust: (automatic with cargo)
172- # ReScript: npm install
173- # Elixir: mix deps.get
139+ mix deps.get
174140
175141# Audit dependencies for vulnerabilities
176142deps-audit :
177- @ echo " Auditing dependencies..."
178- # TODO: Add audit command
179- # Rust: cargo audit
143+ mix hex.audit
180144
181145# ═══════════════════════════════════════════════════════════════════════════════
182146# DOCUMENTATION
@@ -220,18 +184,18 @@ cookbook:
220184man :
221185 #!/usr/bin/env bash
222186 mkdir -p docs/ man
223- cat > docs / man / {{ project }} .1 << EOF
224- .TH RSR-TEMPLATE-REPO 1 " $(date +%Y-%m-%d)" " {{ version}} " " RSR Template Manual"
225- .SH NAME
226- {{ project}} \- RSR standard repository template
227- .SH SYNOPSIS
228- .B just
229- [recipe] [args...]
230- .SH DESCRIPTION
231- Canonical template for RSR (Rhodium Standard Repository) projects.
232- .SH AUTHOR
233- Hyperpolymath <hyperpolymath@proton.me>
234- EOF
187+ printf ' %s\n' \
188+ ' .TH HTTP-CAPABILITY-GATEWAY 1 "$(date +%Y-%m-%d)" "{{ version}} " "HTTP Capability Gateway Manual"' \
189+ ' .SH NAME' \
190+ ' {{ project}} \- policy-driven HTTP capability gateway' \
191+ ' .SH SYNOPSIS' \
192+ ' .B just' \
193+ ' [recipe] [args...]' \
194+ ' .SH DESCRIPTION' \
195+ ' Utility recipes for building, testing, and validating the HTTP capability gateway.' \
196+ ' .SH AUTHOR' \
197+ ' Hyperpolymath <hyperpolymath@proton.me>' \
198+ > docs / man / {{ project }} .1
235199 echo " Generated: docs/man/{{ project}} .1"
236200
237201# ═══════════════════════════════════════════════════════════════════════════════
@@ -288,11 +252,7 @@ ci: deps quality
288252# Install git hooks
289253install-hooks :
290254 @ mkdir -p .git/ hooks
291- @ cat > .git/ hooks/ pre-commit << ' EOF'
292- #!/ bin/ bash
293- just fmt-check || exit 1
294- just lint || exit 1
295- EOF
255+ @ printf ' %s\n' ' #!/bin/bash' ' just fmt-check || exit 1' ' just lint || exit 1' > .git/ hooks/ pre-commit
296256 @ chmod + x .git/ hooks/ pre-commit
297257 @ echo " Git hooks installed"
298258
@@ -348,7 +308,7 @@ validate-state:
348308 fi
349309
350310# Full validation suite
351- validate : validate-rsr validate-state
311+ validate : fmt-check lint test validate-rsr validate-state
352312 @ echo " All validations passed!"
353313
354314# ═══════════════════════════════════════════════════════════════════════════════
0 commit comments