Repository navigation
docs(readme): document web interface install + usage - #1128
Conversation
Add a "Web Interface" section covering what the dashboard provides,
honest capabilities and limitations per provider/feature, Terraform
deployment across AWS/GCP/Azure, and how to access the app and
complete the first-login admin bootstrap.
Verified against: frontend/package.json, internal/api/router.go,
internal/server/static.go + http.go + app.go,
terraform/environments/{aws,gcp,azure}/*, docs/DEPLOYMENT.md.
|
@coderabbitai review |
|
Warning Review limit reached
More reviews will be available in 15 minutes and 27 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. 📝 WalkthroughWalkthroughThis PR adds a comprehensive "Web Interface" section to the README documenting a browser-based dashboard shipped with the CLI binary. It covers frontend asset serving, REST API exposure, dashboard features and provider coverage, and provides self-hosted Terraform deployment instructions with cloud runtime guidance and admin setup steps. ChangesWeb Interface Documentation
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
README.md (1)
569-569:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winFix Go version inconsistency.
Line 569 states "Go 1.23 or later" but the badge on line 4 shows "Go 1.25+" and line 489 in the Web Interface section also specifies "Go 1.25+". Update this line to match the project's actual minimum Go version requirement.
🔧 Proposed fix
-- Go 1.23 or later +- Go 1.25 or later🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@README.md` at line 569, Update the inconsistent Go version string by replacing the text "Go 1.23 or later" with "Go 1.25 or later" (to match the badge "Go 1.25+" and the Web Interface section) so all references in README.md consistently state the project's minimum Go version; locate the occurrence of the exact phrase "Go 1.23 or later" and change it to "Go 1.25 or later".
🧹 Nitpick comments (1)
README.md (1)
549-563: ⚡ Quick winConsider adding error handling guidance for nested command.
The nested command substitution in lines 556-557 assumes the Terraform output exists and is properly formatted. If the output is empty or the secret doesn't exist, the command will fail silently or produce a confusing error.
📝 Suggested improvement
Consider adding a note about verifying the output exists first, or show the two-step approach:
```bash # Retrieve the auto-generated admin password (AWS) +# First, get the secret name: +terraform -chdir=terraform/environments/aws output admin_password_secret_name + +# Then retrieve the password: aws secretsmanager get-secret-value \ --secret-id "$(terraform -chdir=terraform/environments/aws output -raw admin_password_secret_name)" \ --query SecretString --output textAlternatively, just add a note: "Ensure the Terraform output `admin_password_secret_name` exists before running this command." </details> <details> <summary>🤖 Prompt for AI Agents</summary>Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.In
@README.mdaround lines 549 - 563, Add guidance to verify the Terraform
output before using it in the nested command: instruct the user to first run
terraform -chdir=terraform/environments/aws output admin_password_secret_name
(or the raw variant) to confirm the value exists and is non-empty, then use that
value in theaws secretsmanager get-secret-value --secret-id "<value>" --query SecretString --output textcommand; alternatively present the two-step approach
shown in the review (get the secret name first, then callaws secretsmanager get-secret-value) and add a short note to ensureadmin_password_secret_name
exists to avoid silent failures.</details> <!-- cr-comment:v1:e04b6a9e96eab110fbf7f428 --> </blockquote></details> </blockquote></details> <details> <summary>🤖 Prompt for all review comments with AI agents</summary>Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.Inline comments:
In@README.md:
- Line 463: Replace the ambiguous phrase "Azure Convertible RIs" in the README
with a clearer term such as "exchangeable Azure VM reservations" to reflect that
the Azure-specific RI Exchange code path yields Azure VM reservation candidates,
while the exchange "target offerings" remain AWS Convertible EC2 Reserved
Instances; update the sentence containing "Azure Convertible RIs" (and any
nearby phrasing referencing the Azure code path) to use the new wording so it
doesn't imply Azure supports AWS-style "convertible RI" semantics.
Outside diff comments:
In@README.md:
- Line 569: Update the inconsistent Go version string by replacing the text "Go
1.23 or later" with "Go 1.25 or later" (to match the badge "Go 1.25+" and the
Web Interface section) so all references in README.md consistently state the
project's minimum Go version; locate the occurrence of the exact phrase "Go 1.23
or later" and change it to "Go 1.25 or later".
Nitpick comments:
In@README.md:
- Around line 549-563: Add guidance to verify the Terraform output before using
it in the nested command: instruct the user to first runterraform -chdir=terraform/environments/aws output admin_password_secret_name(or the raw
variant) to confirm the value exists and is non-empty, then use that value in
theaws secretsmanager get-secret-value --secret-id "<value>" --query SecretString --output textcommand; alternatively present the two-step approach
shown in the review (get the secret name first, then callaws secretsmanager get-secret-value) and add a short note to ensureadmin_password_secret_name
exists to avoid silent failures.</details> <details> <summary>🪄 Autofix (Beta)</summary> Fix all unresolved CodeRabbit comments on this PR: - [ ] <!-- {"checkboxId": "4b0d0e0a-96d7-4f10-b296-3a18ea78f0b9"} --> Push a commit to this branch (recommended) - [ ] <!-- {"checkboxId": "ff5b1114-7d8c-49e6-8ac1-43f82af23a33"} --> Create a new PR with the fixes </details> --- <details> <summary>ℹ️ Review info</summary> <details> <summary>⚙️ Run configuration</summary> **Configuration used**: defaults **Review profile**: CHILL **Plan**: Pro **Run ID**: `a6a7ed1f-36f9-426f-a413-5b9208c9fa5e` </details> <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between 0c10f1a812ce58d39ac5dd3e231a3a054a76cf9f and 41e93a72e6a314813d1891267900510012a11b8e. </details> <details> <summary>📒 Files selected for processing (1)</summary> * `README.md` </details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
| - **Azure**: reservation recommendations and purchases are implemented in the | ||
| API handlers (see `internal/api/handler_recommendations.go`, | ||
| `providers/azure/`), but Azure support is experimental. The RI Exchange | ||
| feature covers Azure Convertible RIs as a distinct code path. |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify RI Exchange implementation scope across providers
# Search for Azure-specific RI exchange implementation
rg -n -C3 --type=go 'exchange.*azure|azure.*exchange' -i
# Check RI exchange handler and routing
rg -n -C3 --type=go 'func.*[Ee]xchange.*Handler|HandleRIExchange|ri.exchange'
# Look for provider-specific exchange logic
ast-grep --pattern $'func $_($$$ provider $$$) {
$$$
exchange
$$$
}'Repository: LeanerCloud/CUDly
Length of output: 50373
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# 1) Show README section around the referenced lines
if [ -f README.md ]; then
echo "---- README.md:450-480 ----"
sed -n '450,480p' README.md | nl -ba -w2 -s':'
else
echo "README.md not found"
fi
# 2) Find where the 'targets AWS' wording exists (in README or elsewhere)
echo "---- Searching for 'targets AWS Convertible EC2' ----"
rg -n -S "targets AWS Convertible EC2|target(s)? AWS Convertible EC2|Convertible EC2 Reserved Instances only" . || true
# 3) Inspect RI exchange handler around target-offerings / execute / quote
echo "---- handler_ri_exchange.go: locate target-offerings and quote/execute ----"
rg -n "target-offerings|listTargetOfferings|execute|quote|Offerings|Convertible" internal/api/handler_ri_exchange.go
echo "---- Show relevant sections of internal/api/handler_ri_exchange.go ----"
# Show around listTargetOfferingsHandler implementation (usually near listTargetOfferings in file)
rg -n "listTargetOfferings|TargetOfferingsResponse" internal/api/handler_ri_exchange.go | head -n 20
# Show chunks around match lines
for ln in $(rg -n "listTargetOfferings|TargetOfferingsResponse" internal/api/handler_ri_exchange.go | awk -F: '{print $1}' | head -n 10); do
start=$((ln-40)); end=$((ln+80));
echo "---- internal/api/handler_ri_exchange.go:${start}-${end} (around ${ln}) ----"
sed -n "${start},${end}p" internal/api/handler_ri_exchange.go | nl -ba -w2 -s':'
done
# 4) Inspect provider-specific execute/quote logic for offerings targets AWS-only
echo "---- Search for AWS-only offering logic in handler_ri_exchange.go and providers ----"
rg -n -S "AWS Convertible|ConvertibleRI|ec2|Offerings|target offer" internal/api/handler_ri_exchange.go providers || trueRepository: LeanerCloud/CUDly
Length of output: 150
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# 1) Show README section around the referenced lines
if [ -f README.md ]; then
echo "---- README.md:450-480 ----"
sed -n '450,480p' README.md | nl -ba -w2 -s':'
else
echo "README.md not found"
fi
# 2) Find where the 'targets AWS' wording exists (in README or elsewhere)
echo "---- Searching for 'targets AWS Convertible EC2' ----"
rg -n -S "targets AWS Convertible EC2|target(s)? AWS Convertible EC2|Convertible EC2 Reserved Instances only" . || true
# 3) Inspect RI exchange handler around target-offerings / execute / quote
echo "---- handler_ri_exchange.go: locate target-offerings and quote/execute ----"
rg -n "target-offerings|listTargetOfferings|execute|quote|Offerings|Convertible" internal/api/handler_ri_exchange.go
echo "---- Show relevant sections of internal/api/handler_ri_exchange.go ----"
rg -n "listTargetOfferings|TargetOfferingsResponse" internal/api/handler_ri_exchange.go | head -n 20
for ln in $(rg -n "listTargetOfferings|TargetOfferingsResponse" internal/api/handler_ri_exchange.go | awk -F: '{print $1}' | head -n 10); do
start=$((ln-40)); end=$((ln+80));
echo "---- internal/api/handler_ri_exchange.go:${start}-${end} (around ${ln}) ----"
sed -n "${start},${end}p" internal/api/handler_ri_exchange.go | nl -ba -w2 -s':'
done
# 4) Inspect provider-specific execute/quote logic for offerings targets AWS-only
echo "---- Search for AWS-only offering logic in handler_ri_exchange.go and providers ----"
rg -n -S "AWS Convertible|ConvertibleRI|ec2|Offerings|target offer" internal/api/handler_ri_exchange.go providers || trueRepository: LeanerCloud/CUDly
Length of output: 150
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Helper to print numbered lines without `nl`
print_range() {
local file="$1" start="$2" end="$3"
awk -v s="$start" -v e="$end" 'NR>=s && NR<=e {printf "%d:%s\n", NR, $0}' "$file"
}
# 1) README context around 450-480
if [ -f README.md ]; then
echo "---- README.md:450-480 ----"
print_range README.md 450 480
else
echo "README.md not found"
fi
# 2) Find exact wording in README (and nowhere else)
echo "---- Searching for the exact wording / close variants ----"
rg -n -S "targets AWS Convertible EC2 Reserved Instances only|Convertible EC2 Reserved Instances only|targets AWS Convertible EC2" README.md || true
# 3) Inspect handler_ri_exchange.go around listTargetOfferings and execute/quote
echo "---- handler_ri_exchange.go matches (target-offerings/execute/quote) ----"
rg -n "listTargetOfferings|target-offerings|execute|quote|TargetOfferings" internal/api/handler_ri_exchange.go
echo "---- handler_ri_exchange.go excerpts around listTargetOfferings ----"
# Print a small window around the first few matches
for ln in $(rg -n "listTargetOfferings|target-offerings|TargetOfferings" internal/api/handler_ri_exchange.go | awk -F: '{print $1}' | head -n 5); do
start=$((ln-60)); end=$((ln+140));
echo "---- internal/api/handler_ri_exchange.go:${start}-${end} (around ${ln}) ----"
sed -n "${start},${end}p" internal/api/handler_ri_exchange.go
done
# 4) Confirm Azure source vs target/offering usage
echo "---- Search for Azure reservations / exchangeable Azure RIs usage ----"
rg -n "azure.*RIs|ExchangeableAzureRIs|listExchangeableAzureRIs|ListExchangeableReservations" internal/api/handler_ri_exchange.go providers/azure/services/compute/exchange.goRepository: LeanerCloud/CUDly
Length of output: 50373
Clarify Azure RI Exchange scope/terminology in README
Lines 463 and 466-467 aren’t contradictory in function: the Azure-specific RI Exchange code path provides exchangeable Azure VM reservation candidates, while the exchange “target offerings” are AWS Convertible EC2 Reserved Instances only. Adjust line 463 to say “exchangeable Azure VM reservations” (or similar) instead of “Azure Convertible RIs” to avoid implying Azure uses the same “convertible RI” concept as AWS.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@README.md` at line 463, Replace the ambiguous phrase "Azure Convertible RIs"
in the README with a clearer term such as "exchangeable Azure VM reservations"
to reflect that the Azure-specific RI Exchange code path yields Azure VM
reservation candidates, while the exchange "target offerings" remain AWS
Convertible EC2 Reserved Instances; update the sentence containing "Azure
Convertible RIs" (and any nearby phrasing referencing the Azure code path) to
use the new wording so it doesn't imply Azure supports AWS-style "convertible
RI" semantics.
Add a prominent experimental note to the Web Interface section heading and opening blockquote. Retitle "AWS Services (Production Ready)" to "AWS Services" to avoid overstating stability. Add an "AWS CLI Support Matrix" subsection under Supported Cloud Providers & Services listing all seven CLI-accessible AWS services (rds, elasticache, ec2, opensearch, redshift, memorydb, savingsplans) verified against providers/aws/services/ and cmd/main.go, with RDS and ElastiCache marked Tested and the remaining five marked Experimental (seeking testers), per owner guidance.
|
@coderabbitai review |
✅ Action performedReview finished.
|
* docs(readme): document web interface install + usage
Add a "Web Interface" section covering what the dashboard provides,
honest capabilities and limitations per provider/feature, Terraform
deployment across AWS/GCP/Azure, and how to access the app and
complete the first-login admin bootstrap.
Verified against: frontend/package.json, internal/api/router.go,
internal/server/static.go + http.go + app.go,
terraform/environments/{aws,gcp,azure}/*, docs/DEPLOYMENT.md.
* docs(readme): mark web GUI experimental + add CLI support matrix
Add a prominent experimental note to the Web Interface section heading
and opening blockquote. Retitle "AWS Services (Production Ready)" to
"AWS Services" to avoid overstating stability.
Add an "AWS CLI Support Matrix" subsection under Supported Cloud
Providers & Services listing all seven CLI-accessible AWS services
(rds, elasticache, ec2, opensearch, redshift, memorydb, savingsplans)
verified against providers/aws/services/ and cmd/main.go, with RDS
and ElastiCache marked Tested and the remaining five marked
Experimental (seeking testers), per owner guidance.
Summary
README.mdcovering what the browser dashboard provides (recommendations, purchase plans, history, inventory/coverage, RI exchange, settings), how it is served (same Go binary,STATIC_DIR-controlled static file serving), and an honest capabilities/limitations subsection per provider (AWS: production-ready; Azure/GCP: experimental, matching CLI maturity).docs/DEPLOYMENT.md.Verified against
frontend/package.json(TypeScript/Webpack build, frontend capabilities)internal/api/router.go(full route table -- which features are actually wired)internal/server/static.go,http.go,app.go(STATIC_DIR, Lambda/HTTP dual transport,ADMIN_EMAIL/ADMIN_PASSWORD_SECRETbootstrap)terraform/environments/{aws,gcp,azure}/(compute options, outputs, admin vars)docs/DEPLOYMENT.md(linked rather than duplicated).markdownlint.yaml+npx markdownlint-cli@0.47.0 README.mdpasses cleanTest plan
terraform -chdir=.../terraform outputactually producesSummary by CodeRabbit