-
Notifications
You must be signed in to change notification settings - Fork 12
feat: setup alchemy #29
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
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. ✨ Finishing touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
13 files reviewed, 2 comments
🚀 Preview DeployedYour preview is ready! Preview URL: https://gitflare-web-pr-29.mdhruvil.workers.dev This preview was built from commit 21261f4 🤖 This comment will be updated automatically when you push new commits to this PR. |
🚀 Preview DeployedYour preview is ready! Preview URL: https://gitflare-web-pr-29.mdhruvil.workers.dev This preview was built from commit cf24df5 🤖 This comment will be updated automatically when you push new commits to this PR. |
Greptile's behavior is changing!From now on, if a review finishes with no comments, we will not post an additional "statistics" comment to confirm that our review found nothing to comment on. However, you can confirm that we reviewed your changes in the status check section. This feature can be toggled off in your Code Review Settings by deselecting "Create a status check for each PR". |
* feat: migrate to D1 (#28) * chore: add libraries as submodule for context to the AI agents * chore: add .context to zed `file_scan_exclusions` * chore: exclude .context from search in vscode compat * feat: add better auth config and drizzle schema * feat: add db functions * feat: migrate better auth from convext to d1 * feat: migrate to d1 * feat: nuke convex stuff * chore: remove convex from the other files * feat: add @tanstack/react-router-ssr-query integration and update related components * refactor: update issue and pull request database schema to use integer for repositoryId, adjust issue creation logic to increment issue number based on last number * feat: add new migration entry and enhance issue refetching logic in RouteComponent * feat: setup alchemy (#29) * feat: setup alchemy * fix(ci): pnpm not found error * fix(ci): use STAGE env var instead of flag * fix(ci): use right command to deploy * fix(ci): use right url * fix(ci): resolve 5XX in auth endpoints * fix(ci): use alchemy.env * fix(ci): test if console.log appears in logs or not * fix(ci): require permission on pr-preview workflow run * fix(ci): remove logging plus testing the permissions * fix(ci): shared vars in preview.yml * fix(ci): it works now ??
Greptile Summary
This PR migrates the project from direct Wrangler configuration to Alchemy, a declarative infrastructure-as-code framework for Cloudflare. The change centralizes all Cloudflare resource configuration (D1 databases, Durable Objects, Workers) into
alchemy.run.tsand replaces manual deployment workflows with Alchemy's automated deployment system.Key Changes:
wrangler.jsoncand manual Worker config withalchemy.run.tsfor declarative infrastructurealchemy deploy,alchemy destroy)worker-configuration.d.tswith cleanerenv.d.tsusing Alchemy's type inference@cloudflare/vite-pluginto Alchemy's Vite plugin for TanStack Startlibsodium-wrapperscompatibilityBenefits:
Confidence Score: 5/5
Important Files Changed
Sequence Diagram
sequenceDiagram participant Dev as Developer participant GH as GitHub Actions participant Alchemy as Alchemy CLI participant CF as Cloudflare participant App as TanStack Start App alt PR Preview Flow Dev->>GH: Push to PR GH->>GH: Trigger pr-preview workflow GH->>Alchemy: pnpm deploy (STAGE=pr-N) Alchemy->>Alchemy: Read alchemy.run.ts config Alchemy->>CF: Create D1 Database (gitflare-db) Alchemy->>CF: Create Durable Object (Repo) Alchemy->>CF: Deploy Worker with bindings CF-->>Alchemy: Return preview URL Alchemy->>GH: Post comment with preview URL GH-->>Dev: Display preview comment on PR App->>CF: Access REPO, DB, and env bindings else Production Deploy Dev->>GH: Merge to main GH->>GH: Trigger publish workflow GH->>Alchemy: pnpm deploy (STAGE=prod) Alchemy->>Alchemy: Read alchemy.run.ts config Alchemy->>CF: Update/Create D1 Database Alchemy->>CF: Update/Create Durable Object Alchemy->>CF: Deploy to custom domain CF-->>Alchemy: Deployment complete App->>CF: Access REPO, DB, and env bindings else PR Closed Dev->>GH: Close PR GH->>GH: Trigger cleanup-preview job GH->>Alchemy: pnpm destroy (STAGE=pr-N) Alchemy->>CF: Delete preview resources CF-->>Alchemy: Resources deleted end