Skip to content
This repository was archived by the owner on Mar 17, 2026. It is now read-only.

docs: Refactor add suga guide#48

Merged
davemooreuws merged 10 commits intomainfrom
refactor-add-suga-guide
Sep 9, 2025
Merged

docs: Refactor add suga guide#48
davemooreuws merged 10 commits intomainfrom
refactor-add-suga-guide

Conversation

@raksiv
Copy link
Copy Markdown
Member

@raksiv raksiv commented Sep 3, 2025

Overhauled this guide to be more inline with the other guides. e.g. using steps, and simplifying the language, code comparisons etc.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Sep 3, 2025

Warning

Rate limit exceeded

@davemooreuws has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 12 minutes and 1 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 78fb223 and 8616b61.

📒 Files selected for processing (1)
  • docs/guides/add-suga.mdx (4 hunks)

Walkthrough

The PR rewrites docs/guides/add-suga.mdx, replacing an AWS- and Go-focused migration guide with a cloud-agnostic, step-based flow that uses a visual editor and a migration checklist. AccordionGroup/Accordion structures are replaced by Steps/Step blocks covering Initialize Suga Project, Configure Infrastructure, Add Container Support, Migration Checklist, Test Locally, and Deploy to Cloud. Prerequisites and CLI steps (suga login, suga init) are clarified, suga.yaml structure and ingress/file permissions are updated, AWS-specific examples are replaced with Suga SDK examples, images/info blocks adjusted, and deployment guidance expanded to Terraform for AWS/GCP. docs/guides/overview.mdx updates the first Card’s title and description to “Add Suga to Your Application.”

Possibly related PRs

Suggested reviewers

  • HomelessDinosaur
  • jyecusch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@raksiv raksiv changed the title Refactor add suga guide docs: Refactor add suga guide Sep 3, 2025
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (8)
docs/guides/add-suga.mdx (8)

48-73: Validate provider target syntax and YAML completeness.
Confirm targets: - suga/aws@1 is the correct identifier/version format (e.g., @v1 or semver range). Consider adding an environment block if required by the CLI.

Example:

-  - suga/aws@1
+  - suga/aws@v1

96-99: Add .dockerignore guidance.
Avoid bloated build contexts (node_modules, .git, .suga, etc.).

Add after the Dockerfile:

+<Tip>
+  Add a <code>.dockerignore</code> (e.g., <code>.git</code>, <code>.suga</code>, <code>**/node_modules</code>, <code>build</code>, <code>dist</code>) to reduce image size and build time.
+</Tip>

104-111: Confirm CLI flags and required CLI version for codegen.
Ensure suga generate --go --go-out ./suga --go-package-name suga matches current CLI and document the minimum CLI version.

Proposed addition:

     ```bash title="Generate Go SDK" icon="hammer"
-    suga generate --go --go-out ./suga --go-package-name suga
+    # Requires Suga CLI ≥ X.Y.Z
+    suga generate --go --go-out ./suga --go-package-name suga
     ```

112-119: Expand migration checklist with config/env mapping.
Readers will expect guidance on removing cloud-specific env vars and aligning resource names with suga.yaml.

Apply:

       **Key migration steps:**
       - Replace cloud SDK imports with `import "example/suga"`
       - Initialize Suga client with `app, err := suga.NewClient()`
       - Update API calls (e.g., S3 PutObject → `app.Files.Write()`)
-      - Remove cloud-specific error handling
+      - Remove cloud-specific error handling and configuration
+      - Remove cloud-specific env vars (e.g., `S3_BUCKET_NAME`) and rely on `suga.yaml` resource names
+      - Ensure resource names in code (e.g., `app.Files`) match the `buckets.files` name in `suga.yaml`
       - Test each endpoint after changes

182-221: Note Go version compatibility for ServeMux patterns.
The “GET /hello/{name}” pattern and r.PathValue require recent Go (≥1.22). Call this out to avoid confusion if users are on older versions.

Add before the code block:

+<Info>
+  Requires Go ≥ 1.22 for method-aware patterns and <code>Request.PathValue</code>.
+</Info>

240-247: Clarify ports: app listens on 8080 by default; curl targets 3000.
State explicitly that suga dev exposes ingress on 3000 and proxies to the service, so users don’t try port 8080 directly.

Add under “Test Endpoint”:

+<Tip>
+  <code>suga dev</code> exposes the ingress at <code>http://localhost:3000</code> and forwards to your service. The app itself still listens on <code>$PORT</code> (defaults to <code>8080</code>).
+</Tip>

Also applies to: 214-217


294-301: Unify stack path formatting.
Earlier output shows ./.suga/...; later navigation uses .suga/.... Use one style to reduce copy/paste errors.

Apply:

-    cd .suga/stacks/my-app-aws-*
+    cd ./.suga/stacks/my-app-aws-*

Also applies to: 268-271


84-94: Pin base images to explicit, reproducible versions

  • golang:1.24-alpine is a valid official image. Pin to a specific patch and Alpine variant (e.g., golang:1.24.5-alpine3.22) or parameterize with ARG GO_VERSION for deterministic builds. (docker.aityp.com)
  • Replace alpine:latest with a fixed tag (e.g., alpine:3.20 or alpine:3.21) to avoid unintentional updates. (hub.docker.com)
  • Consider hardening by running the binary as a non-root user (adduser, copy to /bin/app, and use USER).
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between d07918d and 774ce41.

📒 Files selected for processing (2)
  • docs/guides/add-suga.mdx (4 hunks)
  • docs/guides/overview.mdx (1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: davemooreuws
PR: nitrictech/suga#29
File: docs/guides/terraform-backend-config.mdx:0-0
Timestamp: 2025-08-28T06:12:17.266Z
Learning: The Suga project uses Mintlify for documentation. Mintlify provides built-in MDX components like <Steps> and <Step> that don't need to be defined or imported in the repository - they're available by default in Mintlify's documentation platform.
📚 Learning: 2025-08-28T06:12:17.266Z
Learnt from: davemooreuws
PR: nitrictech/suga#29
File: docs/guides/terraform-backend-config.mdx:0-0
Timestamp: 2025-08-28T06:12:17.266Z
Learning: The Suga project uses Mintlify for documentation. Mintlify provides built-in MDX components like <Steps> and <Step> that don't need to be defined or imported in the repository - they're available by default in Mintlify's documentation platform.

Applied to files:

  • docs/guides/add-suga.mdx
🔇 Additional comments (2)
docs/guides/overview.mdx (1)

14-20: Card copy update reads well; aligns with the new guide.
Title/body are clear and consistent with the add-suga guide. No action needed.

docs/guides/add-suga.mdx (1)

44-44: Verify image asset path.
Ensure /images/migrate.png exists and is referenced correctly in the docs site’s static assets.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/guides/add-suga.mdx (1)

185-191: Fix Go import path placeholder to a real module path.

import "example/suga" won’t compile as-is. Use your module path (from go.mod) so the generated package resolves.

-        import (
-            "example/suga"
-            "fmt"
-            "log"
-            "net/http"
-            "os"
-        )
+        import (
+            "github.com/your-org/your-repo/suga" // replace with your module path
+            "fmt"
+            "log"
+            "net/http"
+            "os"
+        )
🧹 Nitpick comments (5)
docs/guides/add-suga.mdx (5)

8-10: Add tooling prerequisites (Go version, Docker, Terraform, CLIs).

Readers need these installed before following later steps and code that uses PathValue (Go ≥1.22).

 <Note>
-  **Prerequisites:** This guide assumes you have an existing application that uses cloud services. If you're starting fresh, see the [Getting Started Guide](/quickstart).
+  **Prerequisites:** 
+  - An existing application that uses cloud services
+  - Go 1.22+ installed (the examples use `http.ServeMux` patterns and `PathValue`)
+  - Docker
+  - Terraform
+  - Relevant cloud CLI (AWS CLI, gcloud, or Azure CLI)
+  If you're starting fresh, see the [Getting Started Guide](/quickstart).
 </Note>

214-217: Clarify dev port vs. app port to avoid confusion.

App defaults to 8080, but the curl uses 3000. Add a note explaining that suga dev exposes the entrypoint on 3000 and routes to the app.

     suga dev
     ```
 
+    <Info>
+      By default, <code>suga dev</code> serves your entrypoint at <code>http://localhost:3000</code> and routes traffic to your service, regardless of the internal app port (e.g., <code>PORT=8080</code>). If you’ve customized ports, check the dev console output.
+    </Info>
+
     Test your migrated application:
 
     ```bash title="Test Endpoint" icon="check-circle"
     curl http://localhost:3000/hello/world
     ```

If 3000 isn’t the default in your setup, update the URL or set/confirm the mapped port in docs.

Also applies to: 240-242


257-272: Tighten CLI output phrasing.

Minor readability fix in the “Next steps” sample output.

     Next steps:
     1. Run cd ./.suga/stacks/my-app-aws-12345 to move to the stack directory
-    2. Initialize the stack terraform init -upgrade
+    2. Initialize the stack with terraform init -upgrade
     3. Optionally, preview with terraform plan
     4. Deploy with terraform apply

294-301: Add a cost warning before Terraform apply.

Helpful guardrail for users running in real cloud accounts.

-    Deploy with Terraform:
+    <Warning>
+      Applying Terraform creates billable cloud resources. Ensure you’re targeting the correct account/project and region.
+    </Warning>
+
+    Deploy with Terraform:

83-94: Consider pinning base image versions for reproducibility.

Using alpine:latest can cause nondeterministic builds. Pin to a minor version or digest.

-    FROM alpine:latest
+    FROM alpine:3.20
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 774ce41 and ba89c9e.

⛔ Files ignored due to path filters (1)
  • docs/images/migrate.png is excluded by !**/*.png
📒 Files selected for processing (1)
  • docs/guides/add-suga.mdx (4 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: davemooreuws
PR: nitrictech/suga#29
File: docs/guides/terraform-backend-config.mdx:0-0
Timestamp: 2025-08-28T06:12:17.266Z
Learning: The Suga project uses Mintlify for documentation. Mintlify provides built-in MDX components like <Steps> and <Step> that don't need to be defined or imported in the repository - they're available by default in Mintlify's documentation platform.
📚 Learning: 2025-08-28T06:12:17.266Z
Learnt from: davemooreuws
PR: nitrictech/suga#29
File: docs/guides/terraform-backend-config.mdx:0-0
Timestamp: 2025-08-28T06:12:17.266Z
Learning: The Suga project uses Mintlify for documentation. Mintlify provides built-in MDX components like <Steps> and <Step> that don't need to be defined or imported in the repository - they're available by default in Mintlify's documentation platform.

Applied to files:

  • docs/guides/add-suga.mdx
🔇 Additional comments (1)
docs/guides/add-suga.mdx (1)

44-44: Verify image path.

Ensure /images/migrate.png exists and renders in Mintlify build; update path or filename if needed.

@raksiv raksiv force-pushed the refactor-add-suga-guide branch from ba89c9e to 26c4050 Compare September 5, 2025 15:16
@raksiv raksiv force-pushed the refactor-add-suga-guide branch from 26c4050 to 0a8652e Compare September 5, 2025 15:17
@raksiv raksiv force-pushed the refactor-add-suga-guide branch from 0a8652e to 2b580d2 Compare September 5, 2025 15:18
@raksiv raksiv added the documentation Improvements or additions to documentation label Sep 5, 2025
@raksiv raksiv self-assigned this Sep 5, 2025
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (3)
docs/guides/add-suga.mdx (3)

6-6: Align messaging and remove Azure mentions for current scope.

Per prior feedback, drop “(no mocks!)” and remove Azure references for consistency across intro, credentials, and closing callout.

- Suga helps you migrate existing applications to a cloud-agnostic architecture. With Suga, you get local development with local emulation of cloud services (no mocks!), the ability to deploy anywhere - AWS, GCP, or Azure from the same code, and auto-generated Terraform for production-ready infrastructure. This guide walks through migrating a Go web service as an example that can be easily adapted to other languages and services.
+ Suga helps you migrate existing applications to a cloud-agnostic architecture. With Suga, you get fast local development with local emulation of cloud services, the ability to deploy to AWS or GCP from the same code, and auto-generated Terraform for production-ready infrastructure. This guide walks through migrating a Go web service as an example that can be easily adapted to other languages and services.
@@
-      <Tab title="Azure">
-        ```bash title="Configure Azure" icon="microsoft"
-        az login
-        ```
-      </Tab>
-  Your application is now cloud-agnostic. Deploy to AWS, GCP, or Azure without code changes.
+  Your application is now cloud-agnostic. Deploy to AWS or GCP without code changes.

Also applies to: 277-291, 317-318


59-61: Remove language-specific dev script from generated YAML.

The editor won’t add this dev block and it’s language-specific; keep the guide cloud/language-agnostic.

-        dev:
-          script: go run main.go

65-67: Consider shorthand permission “all”.

If supported by the platform, replace explicit read/write/delete with all to simplify.

           app:
-            - read
-            - write
-            - delete
+            - all
🧹 Nitpick comments (4)
docs/guides/add-suga.mdx (4)

84-84: Confirm Go image tag; consider pinning to a known-available version.

Verify that golang:1.24-alpine exists; if not, pin to a stable, available tag (e.g., 1.22-alpine) or make it configurable.

-FROM golang:1.24-alpine as builder
+# Consider aligning with your toolchain:
+# FROM golang:1.22-alpine as builder
+FROM golang:1.24-alpine as builder

297-298: Use a consistent stack path format (.suga vs ./.suga).

Minor polish to avoid confusion.

-    cd .suga/stacks/my-app-aws-*
+    cd ./.suga/stacks/my-app-aws-*

Also applies to: 265-269


185-191: Clarify placeholder import path.

Add a note to replace example/suga with the actual module path to avoid copy/paste build errors.

         import (
-            "example/suga"
+            "example/suga" // replace with your module path (from go.mod)
             "fmt"
             "log"
             "net/http"
             "os"
         )

49-51: Align targets with provider selection text.

YAML pins AWS, while the step suggests selecting any provider. Either show tabs for AWS/GCP targets or clarify that the editor updates targets during build.

Also applies to: 261-266

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ba89c9e and 0696ea7.

⛔ Files ignored due to path filters (1)
  • docs/images/migrate.png is excluded by !**/*.png
📒 Files selected for processing (2)
  • docs/guides/add-suga.mdx (4 hunks)
  • docs/guides/overview.mdx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/guides/overview.mdx
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: davemooreuws
PR: nitrictech/suga#29
File: docs/guides/terraform-backend-config.mdx:0-0
Timestamp: 2025-08-28T06:12:17.266Z
Learning: The Suga project uses Mintlify for documentation. Mintlify provides built-in MDX components like <Steps> and <Step> that don't need to be defined or imported in the repository - they're available by default in Mintlify's documentation platform.
📚 Learning: 2025-08-28T06:12:17.266Z
Learnt from: davemooreuws
PR: nitrictech/suga#29
File: docs/guides/terraform-backend-config.mdx:0-0
Timestamp: 2025-08-28T06:12:17.266Z
Learning: The Suga project uses Mintlify for documentation. Mintlify provides built-in MDX components like <Steps> and <Step> that don't need to be defined or imported in the repository - they're available by default in Mintlify's documentation platform.

Applied to files:

  • docs/guides/add-suga.mdx
🔇 Additional comments (2)
docs/guides/add-suga.mdx (2)

104-106: Verify CLI flags for SDK generation.

Confirm these flags match the current suga CLI; surface any renames (e.g., language selectors or output flags).


44-44: Image path verified. The file docs/images/migrate.png exists and maps to /images/migrate.png in the deployed bundle.

@tjholm tjholm force-pushed the refactor-add-suga-guide branch from 0696ea7 to 7d3c0be Compare September 8, 2025 05:16
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

♻️ Duplicate comments (3)
docs/guides/add-suga.mdx (3)

6-6: Drop “(no mocks!)” for clarity and tone consistency.

Multiple reviewers already flagged this; the emulation message stands without the parenthetical.

-Suga helps you migrate existing applications to a cloud-agnostic architecture. With Suga, you get local development with local emulation of cloud services (no mocks!), the ability to deploy anywhere - AWS, GCP, or Azure from the same code, and auto-generated Terraform for production-ready infrastructure. This guide walks through migrating a Go web service as an example that can be easily adapted to other languages and services.
+Suga helps you migrate existing applications to a cloud-agnostic architecture. With Suga, you get local development with high‑fidelity local emulation of cloud services, the ability to deploy to your chosen cloud provider from the same code, and auto-generated Terraform for production-ready infrastructure. This guide walks through migrating a Go web service as an example that can be easily adapted to other languages and services.

241-241: Fix port mismatch: curl should hit 8080 (app defaults to 8080).

This breaks the quick test.

-    curl http://localhost:3000/hello/world
+    curl http://localhost:8080/hello/world

287-291: Remove Azure references unless Azure deploy is currently supported.

Prior feedback asked to drop Azure. If Azure isn’t GA here, scrub mentions to avoid user confusion; if it is supported, please ignore.

@@
-      <Tab title="Azure">
-        ```bash title="Configure Azure" icon="microsoft"
-        az login
-        ```
-      </Tab>
+      <!-- Azure omitted intentionally until supported -->
@@
-  Your application is now cloud-agnostic. Deploy to AWS, GCP, or Azure without code changes.
+  Your application is now cloud-agnostic. Deploy to AWS or GCP without code changes.
@@
-Suga helps you migrate existing applications to a cloud-agnostic architecture. With Suga, you get local development with local emulation of cloud services (no mocks!), the ability to deploy anywhere - AWS, GCP, or Azure from the same code, and auto-generated Terraform for production-ready infrastructure. This guide walks through migrating a Go web service as an example that can be easily adapted to other languages and services.
+Suga helps you migrate existing applications to a cloud-agnostic architecture. With Suga, you get local development with high‑fidelity local emulation of cloud services, the ability to deploy to AWS or GCP from the same code, and auto-generated Terraform for production-ready infrastructure. This guide walks through migrating a Go web service as an example that can be easily adapted to other languages and services.

Also applies to: 316-318, 6-6

🧹 Nitpick comments (3)
docs/guides/add-suga.mdx (3)

84-84: Verify the Go base image tag exists; consider pinning to a known tag or parametrize.

Avoid example breakage if golang:1.24-alpine doesn’t exist on the user’s machine yet.

-FROM golang:1.24-alpine as builder
+# Option A: pin to a known tag (update if 1.24-alpine is confirmed)
+FROM golang:1.23-alpine as builder

Alternatively, make it configurable:

+ARG GO_VERSION=1.23
-FROM golang:1.24-alpine as builder
+FROM golang:${GO_VERSION}-alpine as builder

269-269: Tiny grammar fix in generated “Next steps” text.

-    2. Initialize the stack terraform init -upgrade
+    2. Initialize the stack with terraform init -upgrade

114-119: Clarify checklist item about error handling (don’t drop it entirely).

Recommend narrowing to “cloud-SDK-specific” handling so users still handle errors robustly.

-      - Remove cloud-specific error handling
+      - Remove cloud-SDK-specific handling you no longer need (keep robust HTTP/app error handling)
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0696ea7 and 7d3c0be.

📒 Files selected for processing (1)
  • docs/guides/add-suga.mdx (4 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: davemooreuws
PR: nitrictech/suga#29
File: docs/guides/terraform-backend-config.mdx:0-0
Timestamp: 2025-08-28T06:12:17.266Z
Learning: The Suga project uses Mintlify for documentation. Mintlify provides built-in MDX components like <Steps> and <Step> that don't need to be defined or imported in the repository - they're available by default in Mintlify's documentation platform.
📚 Learning: 2025-08-28T06:12:17.266Z
Learnt from: davemooreuws
PR: nitrictech/suga#29
File: docs/guides/terraform-backend-config.mdx:0-0
Timestamp: 2025-08-28T06:12:17.266Z
Learning: The Suga project uses Mintlify for documentation. Mintlify provides built-in MDX components like <Steps> and <Step> that don't need to be defined or imported in the repository - they're available by default in Mintlify's documentation platform.

Applied to files:

  • docs/guides/add-suga.mdx
🔇 Additional comments (1)
docs/guides/add-suga.mdx (1)

182-222: Before/After code samples read well and align with the narrative.

Nice, concise migration illustration.

@raksiv raksiv force-pushed the refactor-add-suga-guide branch from 7d96c20 to 4ebe1e3 Compare September 8, 2025 19:10
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

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)
docs/guides/add-suga.mdx (1)

185-190: Align Go import path placeholder with your module path

Replace the import placeholder in the example:

-            "example/suga"
+            "github.com/<your-org>/<your-repo>/suga"

Ensure your OpenAPI Generator CLI invocation includes --git-user-id <your-org> --git-repo-id <your-repo> (or sets goModuleName=github.com/<your-org>/<your-repo>/suga via --additional-properties) so the generated code’s module path matches this import.

♻️ Duplicate comments (1)
docs/guides/add-suga.mdx (1)

239-241: Fix port mismatch in curl example (app listens on 8080).

This currently 404s for most users.

-    curl http://localhost:3000/hello/world
+    curl http://localhost:8080/hello/world
🧹 Nitpick comments (5)
docs/guides/overview.mdx (1)

18-19: Smoother phrasing for the Card description.

Use a gerund to read more naturally.

-    Step-by-step guide to add Suga infrastructure management to your
-    existing applications.
+    Step-by-step guide for adding Suga infrastructure management to your
+    existing applications.
docs/guides/add-suga.mdx (4)

6-6: Tighten intro phrasing; remove duplicate “local”.

Minor copy edit for clarity.

-Suga helps you migrate existing applications to a cloud-agnostic architecture. With Suga, you get local development with local emulation of cloud services, the ability to deploy anywhere - AWS or GCP from the same code, and auto-generated Terraform for production-ready infrastructure.
+Suga helps you migrate existing applications to a cloud-agnostic architecture. With Suga, you get local development with emulated cloud services, the ability to deploy anywhere—AWS or GCP—from the same code, and auto-generated Terraform for production-ready infrastructure.

49-72: Avoid hard-coding AWS in a cloud-agnostic guide.

The sample suga.yaml pins targets to AWS, while the guide promotes AWS/GCP choice later. Either omit targets here or show a placeholder.

-    targets:
-      - suga/aws@1
+    # targets can be selected at build time; omit here for portability
+    # targets:
+    #   - suga/{provider}@1   # e.g., suga/aws@1 or suga/gcp@1

267-271: Unify path style for .suga directory.

Use the same convention throughout to reduce confusion.

-    1. Run cd ./.suga/stacks/my-app-aws-12345 to move to the stack directory
+    1. Run cd .suga/stacks/my-app-aws-12345 to move to the stack directory
-    cd .suga/stacks/my-app-aws-*
+    cd .suga/stacks/my-app-aws-*

(Note: second block already uses the preferred form; this keeps both consistent.)

Also applies to: 290-292


82-93: Confirm Go base image tag (golang:1.24-alpine exists); optionally update to latest stable release
Confirmed that golang:1.24-alpine is available. The current Go stable release is 1.25.0 (Aug 12, 2025). Consider updating to golang:1.25-alpine (or golang:1.25.0-alpine) if you want the latest stable version.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ba5024c and 4ebe1e3.

⛔ Files ignored due to path filters (1)
  • docs/images/migrate.png is excluded by !**/*.png
📒 Files selected for processing (2)
  • docs/guides/add-suga.mdx (4 hunks)
  • docs/guides/overview.mdx (1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: davemooreuws
PR: nitrictech/suga#29
File: docs/guides/terraform-backend-config.mdx:0-0
Timestamp: 2025-08-28T06:12:17.266Z
Learning: The Suga project uses Mintlify for documentation. Mintlify provides built-in MDX components like <Steps> and <Step> that don't need to be defined or imported in the repository - they're available by default in Mintlify's documentation platform.
📚 Learning: 2025-08-28T06:12:17.266Z
Learnt from: davemooreuws
PR: nitrictech/suga#29
File: docs/guides/terraform-backend-config.mdx:0-0
Timestamp: 2025-08-28T06:12:17.266Z
Learning: The Suga project uses Mintlify for documentation. Mintlify provides built-in MDX components like <Steps> and <Step> that don't need to be defined or imported in the repository - they're available by default in Mintlify's documentation platform.

Applied to files:

  • docs/guides/add-suga.mdx
🔇 Additional comments (1)
docs/guides/add-suga.mdx (1)

311-312: Messaging consistency looks good.

Azure references removed; “cloud-agnostic” statement aligns with AWS/GCP throughout.

@raksiv raksiv force-pushed the refactor-add-suga-guide branch from 4ebe1e3 to 78fb223 Compare September 8, 2025 19:27
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

♻️ Duplicate comments (2)
docs/guides/add-suga.mdx (2)

111-118: Clarify error-handling guidance to avoid readers removing it entirely.

“Simplify error handling” can be misread as “remove it.” Suggest provider-agnostic phrasing.

-      - Simplify error handling (no need for AWS/GCP-specific error types)
+      - Replace provider-specific error types with Suga-agnostic handling (keep proper error checks)
+      - Verify error paths (e.g., permission denied, not found) after migration

239-241: Fix port mismatch: curl should hit 8080 (matches code default).

The server defaults to PORT or 8080; curl uses 3000.

Apply:

-    curl http://localhost:3000/hello/world
+    curl http://localhost:8080/hello/world
🧹 Nitpick comments (6)
docs/guides/add-suga.mdx (6)

49-72: Make targets cloud-agnostic in YAML example (aligns with AWS or GCP path later).

Hardcoding suga/aws@1 while the guide claims multi-cloud can confuse first-time readers.

-    targets:
-      - suga/aws@1
+    targets:
+      - suga/<provider>@1  # e.g. suga/aws@1 or suga/gcp@1

290-292: Generalize stack path for both providers.

Current path is AWS-specific; suggest a provider placeholder or both examples.

-    cd .suga/stacks/my-app-aws-*
+    cd .suga/stacks/my-app-<provider>-*   # e.g. my-app-aws-* or my-app-gcp-*

74-76: Double-check whether the editor sets dev.script automatically.

If suga edit doesn’t generate services.app.dev.script, call this out to avoid confusion; suggest manual edit fallback.

-      The visual editor automatically maintains valid YAML syntax and ensures proper resource relationships.
+      The visual editor maintains valid YAML and resource relationships. If a local dev script isn't added automatically, edit `suga.yaml` and set `services.app.dev.script` manually (e.g., `go run main.go` or `npm run dev`).

95-97: Pin Docker base images; avoid latest in runtime.

Use specific versions for reproducibility; consider pinning the runtime image too.

-FROM golang:1.24-alpine as builder
+FROM golang:1.24-alpine as builder   # pin to a specific minor you support
@@
-FROM alpine:latest
+FROM alpine:3.19                     # avoid 'latest' for stable builds

113-116: Use a module placeholder for Go import path.

example/suga may mislead; use a template path.

-      - Replace cloud SDK imports with `import "example/suga"`
+      - Replace cloud SDK imports with `import "<module>/suga"`

184-190: Align code sample import with placeholder module path.

Keep examples consistent with the checklist guidance.

-            "example/suga"
+            "<module>/suga"
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4ebe1e3 and 78fb223.

📒 Files selected for processing (1)
  • docs/guides/add-suga.mdx (4 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: davemooreuws
PR: nitrictech/suga#29
File: docs/guides/terraform-backend-config.mdx:0-0
Timestamp: 2025-08-28T06:12:17.266Z
Learning: The Suga project uses Mintlify for documentation. Mintlify provides built-in MDX components like <Steps> and <Step> that don't need to be defined or imported in the repository - they're available by default in Mintlify's documentation platform.
🔇 Additional comments (2)
docs/guides/add-suga.mdx (2)

6-6: Messaging consistency looks good (and Azure removed).

Intro and local-dev note now consistently describe “local emulation,” and Azure references are gone.

Also applies to: 249-251


64-67: Bucket access shorthand ‘all’ is clear and concise.

Matches prior feedback about shorthand; good call.

@davemooreuws davemooreuws force-pushed the refactor-add-suga-guide branch from 89c4f2d to 8616b61 Compare September 9, 2025 00:13
@davemooreuws davemooreuws merged commit c2d02d1 into main Sep 9, 2025
4 checks passed
@davemooreuws davemooreuws deleted the refactor-add-suga-guide branch September 9, 2025 00:14
@nitric-bot
Copy link
Copy Markdown

🎉 This PR is included in version 0.0.5 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

documentation Improvements or additions to documentation released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants