diff --git a/docs/cli.mdx b/docs/cli.mdx index 8722e8fd..93e09358 100644 --- a/docs/cli.mdx +++ b/docs/cli.mdx @@ -17,6 +17,9 @@ The Suga CLI is a powerful tool for building, developing, and managing cloud-nat # Install the CLI brew install nitrictech/tap/suga +# Login to Suga +suga login + # Create a new project suga new my-app diff --git a/docs/quickstart.mdx b/docs/quickstart.mdx index 46ec32be..3731f7cd 100644 --- a/docs/quickstart.mdx +++ b/docs/quickstart.mdx @@ -12,6 +12,25 @@ Deploy your first application on the Suga platform in just a few steps. The Suga + + Sign in to the Suga platform: + + ```bash title="Sign In to Suga" icon="user" + suga login + ``` + + You'll see a confirmation: + ```bash + ⚡ Suga Logging in... + + ✓ Logged in as User + ``` + + + Authentication is required to access templates and other Suga platform features. + + + Create a new project from a template: @@ -38,22 +57,9 @@ Deploy your first application on the Suga platform in just a few steps. The Suga - Log in and open the visual editor: - - ```bash title="Login to Suga" icon="user" - suga login - ``` - - You'll see a confirmation: - ```bash - ⚡ Suga Logging in... - - ✓ Logged in as User - ``` - Open the visual editor: - ```bash title="Open Visual Editor" icon="edit" + ```bash title="Open Visual Editor" icon="external-link" suga edit ``` @@ -120,25 +126,25 @@ Deploy your first application on the Suga platform in just a few steps. The Suga - ```bash title="Install Dependencies (node)" icon="cube" + ```bash title="Install Dependencies (node)" icon="package" suga generate --ts --ts-out ./suga/client npm install ``` - ```bash title="Install Dependencies (uv)" icon="cube" + ```bash title="Install Dependencies (uv)" icon="package" suga generate --python --python-out ./suga_gen uv sync ``` Or with pip: - ```bash title="Install Dependencies (pip)" icon="cube" + ```bash title="Install Dependencies (pip)" icon="package" suga generate --python --python-out ./suga_gen pip install -r requirements.txt ``` - ```bash title="Install Dependencies (go)" icon="cube" + ```bash title="Install Dependencies (go)" icon="package" suga generate --go --go-out ./suga --go-package-name suga go mod tidy ``` @@ -168,20 +174,31 @@ Deploy your first application on the Suga platform in just a few steps. The Suga Entrypoints - ✓ Starting [main] http://localhost:3000 + ✓ Starting [main] http://localhost:4000 Use Ctrl-C to exit ``` Test your application: - ```bash title="Test Application" icon="check-circle" - curl http://localhost:3000/hello + ```bash title="Write to Storage" icon="upload" + curl -X POST http://localhost:4000/write/test.txt \ + -H "Content-Type: text/plain" \ + -d "Hello from Suga!" + ``` + + Expected response: + ``` + File 'test.txt' written to bucket. + ``` + + ```bash title="Read from Storage" icon="download" + curl http://localhost:4000/read/test.txt ``` Expected response: - ```json - {"message": "Hello World"} + ``` + Hello from Suga! ``` @@ -279,12 +296,13 @@ Deploy your first application on the Suga platform in just a few steps. The Suga ```mermaid graph TB -One["Created and configured a Suga application from a template"] ==> Two["Developed and tested your application locally with hot reload"] -Two ==> Three["Generated production-ready Terraform infrastructure code"] -Three ==> Four["Deployed your application to your chosen cloud provider"] +One["Signed in to the Suga platform"] ==> Two["Created and configured a Suga application from a template"] +Two ==> Three["Developed and tested your application locally with hot reload"] +Three ==> Four["Generated production-ready Terraform infrastructure code"] +Four ==> Five["Deployed your application to your chosen cloud provider"] classDef nitricGreen stroke:#25b355,stroke-width:2px -class One,Two,Three,Four nitricGreen +class One,Two,Three,Four,Five nitricGreen ```