-
Notifications
You must be signed in to change notification settings - Fork 173
Stellar scafold fargate backend #646
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Stellar scafold fargate backend #646
Conversation
Co-authored-by: Eric Lau <[email protected]>
Reviewer's GuideThis PR scaffolds a new Rust-based Stellar backend API deployed via Fargate, integrates it with the existing Svelte UI for scaffold download, reorganizes the AI Deno server and import paths, and updates build/deploy configurations including Docker Compose and GitHub Actions workflows. Sequence diagram for Svelte UI downloading Stellar scaffold via Fargate backendsequenceDiagram
participant User as actor User
participant SvelteUI as Svelte UI
participant StellarAPI as Stellar Rust API (Fargate)
User->>SvelteUI: Click "Download Scaffold"
SvelteUI->>StellarAPI: POST /stellar/upgrade-scaffold (zip blob)
StellarAPI->>StellarAPI: Unzip, upgrade, re-zip contract
StellarAPI-->>SvelteUI: Return scaffold-project.zip
SvelteUI->>User: Save scaffold-project.zip
Class diagram for new and updated Rust backend modulesclassDiagram
class ServerConfig {
+host: String
+port: u16
+rate_limit_requests_per_second: u64
+wizard_origin: String
+from_environment_variables(): ServerConfig
}
class upgrade_scaffold {
+upgrade_to_scaffold(rust_contract_zip: web::Bytes): Result<Vec<u8>, HttpError>
}
class scaffold_upgrade {
+run_scaffold_upgrade_command(project_dir_path: &Path): Result<(), Error>
}
class zip_folder {
+unzip_in_temporary_folder(zip_data: Vec<u8>, expected_files: &[&str]): Result<TempDir, ZipError>
+zip_directory(zip_path: &Path): ZipResult<Vec<u8>>
}
class errors {
+to_http_hidden_error<E: Debug>(error: E): HttpError
+to_io_error<E: Debug>(error: E): IOError
+to_zip_io_error<E: Debug>(error: E): ZipError
}
ServerConfig <|-- upgrade_scaffold
upgrade_scaffold <|-- scaffold_upgrade
scaffold_upgrade <|-- zip_folder
zip_folder <|-- errors
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing Touches🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Summary
packages/ui/api/ai
module.Key Changes
packages/ui/api/stellar
with routes, controllers, utils, and tests.GET /health
and upgrade/scaffold routes (seesrc/routes /*
andsrc/controllers/*
).Dockerfile.dev
,Dockerfile.prod
,.dockerignore
,README.md
,rustfmt.toml
, andCargo.toml/lock
.packages/ui/api/stellar/tests/*
.packages/ui/api/*
topackages/ui/api/ai/*
:packages/ui/api/ai/ai-assistant/*
.packages/ui/api/ai/development-server.ts
.packages/ui/api/ai/.env.example
andDockerfile.dev
.packages/ui/api/docker-compose.yaml
to orchestrate local API components.
.github/workflows/docker-stg.yaml
,.github/workflows/docker-prod.yaml
..github/actions/oidc/action.yaml
.packages/core/stellar/src/zip-rust.ts
update.packages/core/stellar/zip-env-rust.js
to package Rust env/scaffold artifacts.update-scarb-project.ts
,erc20.ts
, and assorted test updates.packages/core/cairo_alpha/CHANGELOG.md
.packages/ui/.env.example
updated with keys used by the new layout..gitignore
,.prettierignore
,package.json
,netlify.toml
,.vscode/*
,rollup.config.mjs
).yarn.lock
.Breaking/Structural Changes
packages/ui/api/ai
. Any imports or tooling referencing the oldpackages/ui/api/*
paths must be updated to the new location.How to Run (Local)
packages/ui/api/stellar
:cargo run
(dev) or build with Docker:doc ker build -f Dockerfile.dev .
GET /health
packages/ui/api/ai
:deno task dev
(seedeno.json
anddevelopment -server.ts
)packages/ui/api
:docker compose up --build
.env.example
to.env
inpackages/ui
,packages/ui/api/ai
, andpackages/ui/api/stellar
as needed.Security/Infra
Testing/Verification
packages/ui/api/stellar/ tests/*
.GET /health
returns healthy.set).
Scope/Risk