feat: initial basic flow of backoffice (flow-testing)#41
Conversation
|
@FabianSanchezD is attempting to deploy a commit to the Trustless Work Team on Vercel. A member of the Team first needs to authorize it. |
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (2)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThe pull request migrates backend API routes from the Next.js frontend application to a dedicated NestJS core service, introduces ROI vault management and campaign flow testing features across frontend and backend, and updates environment configuration and CORS settings accordingly. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant FrontendUI as Frontend UI
participant Wallet as Wallet Provider
participant CoreAPI as Core API
participant Stellar as Stellar RPC
User->>FrontendUI: Initiate ROI Vault Creation
FrontendUI->>Wallet: Get wallet address
Wallet->>FrontendUI: Return address
FrontendUI->>CoreAPI: POST /deploy/vault (params)
CoreAPI->>Stellar: Build contract call transaction
Stellar->>CoreAPI: Return unsigned XDR
CoreAPI->>FrontendUI: Return unsignedXdr
FrontendUI->>Wallet: Sign transaction
Wallet->>FrontendUI: Return signed XDR
FrontendUI->>Stellar: Submit signed transaction
Stellar->>FrontendUI: Return vault contract address
FrontendUI->>CoreAPI: PATCH /campaigns/{id} (vaultId)
CoreAPI->>FrontendUI: Confirm update
FrontendUI->>User: Show success
sequenceDiagram
participant User
participant CreateFlow as Create Campaign Flow
participant WalletCtx as Wallet Context
participant CoreAPI as Core API
participant DB as Backend DB
participant Stellar as Stellar RPC
User->>CreateFlow: Start campaign creation
CreateFlow->>WalletCtx: Validate wallet connection
WalletCtx->>CreateFlow: Return address
rect rgba(100, 150, 255, 0.5)
Note over CreateFlow: Step 1: Campaign Form
CreateFlow->>CreateFlow: Collect campaign data
end
rect rgba(150, 200, 100, 0.5)
Note over CreateFlow: Step 2: Initialize Escrow
CreateFlow->>CoreAPI: POST /deploy/escrow (multi-release)
CoreAPI->>Stellar: Build & submit transaction
Stellar->>CoreAPI: Return contract ID
CoreAPI->>DB: Store escrow reference
CoreAPI->>CreateFlow: Return contractId
end
rect rgba(200, 150, 100, 0.5)
Note over CreateFlow: Step 3: Tokenize Escrow
CreateFlow->>CoreAPI: Deploy token factory
CreateFlow->>CoreAPI: Deploy participation token
CreateFlow->>CoreAPI: Set admin
CreateFlow->>CoreAPI: POST /campaigns (create campaign)
CoreAPI->>DB: Store campaign
end
CreateFlow->>User: Complete & navigate
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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. Comment |
3572ceb to
6200627
Compare
** para pasar de página hacerlo con /flow-testing y /flow-roi **
This is the basic flow that will have all logic (not good UI) so we can work with this same logic.
With this, the work later will be much easier once we have all endpoints and can delegate all tasks for mostly front-end only work.
all under /flow-testing and /flow-roi (to prevent conflicts of any type)
its missing: proper UI (and ok route)
Summary by CodeRabbit
Release Notes
New Features
Chores