Skip to content

feat: add support for Cloudflare R2 object storage and update related configurations#12

Merged
Mujhtech merged 1 commit into
mainfrom
feature-r2-support
Jul 11, 2026
Merged

feat: add support for Cloudflare R2 object storage and update related configurations#12
Mujhtech merged 1 commit into
mainfrom
feature-r2-support

Conversation

@Mujhtech

Copy link
Copy Markdown
Owner

Description

[Provide a brief description of the changes in this pull request]

Related Issue

[If applicable, link to the issue this PR addresses]

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Code refactor
  • Other (please specify)

Checklist

  • I have read the contribution guidelines
  • My code follows the project's coding style
  • I have tested my changes
  • I have updated the documentation accordingly

Additional Notes

[Add any additional information or context about the PR here]

Copilot AI review requested due to automatic review settings July 11, 2026 09:46
@gitguardian

gitguardian Bot commented Jul 11, 2026

Copy link
Copy Markdown

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secret in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
34736079 Triggered Generic High Entropy Secret 5a9ad07 backend/internal/pkg/s3store/s3.go View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds first-class Cloudflare R2 support as an alternative S3-compatible object storage provider, wiring it through backend config/feature APIs and frontend UI so deployments can switch providers and default regions appropriately.

Changes:

  • Introduces an OBJECT_STORAGE_PROVIDER config switch with R2-specific env vars and validation.
  • Updates the backend S3 client/store to derive R2 endpoint + enforce R2’s auto region behavior.
  • Updates the frontend feature model/tests and app creation UI to reflect provider + region constraints.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
README.md Documents R2 configuration and clarifies provider behavior.
frontend/tests/services/feature.test.ts Extends feature service test fixtures with new object-storage fields.
frontend/app/models/feature.ts Adds Zod schema fields for object storage provider/region/configured status.
frontend/app/components/app/create-app-dialog.tsx Uses feature data to constrain selectable regions (R2 => auto).
backend/services/create_app.go Adds ForceDefaultRegion to ensure configured storage region can be enforced.
backend/services/create_app_test.go Tests that configured storage region is enforced (e.g., R2 auto).
backend/internal/pkg/s3store/s3.go Resolves provider-specific storage config (R2 endpoint/region) and region handling.
backend/internal/pkg/s3store/s3_test.go Adds tests for storage config resolution + R2 region/bucket-creation behavior.
backend/config/type.go Adds object storage provider types, config structs, and region helper.
backend/config/config.go Adds default provider and validates R2 configuration inputs.
backend/config/config_test.go Adds config loading/validation tests for R2 and invalid providers.
backend/api/handler/feature.go Exposes provider/region/configured status via the feature endpoint.
backend/api/handler/app.go Uses configured object storage region and enforces it for R2 on app creation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread backend/internal/pkg/s3store/s3.go
Comment thread backend/config/config.go
Comment thread backend/internal/pkg/s3store/s3_test.go
@Mujhtech Mujhtech merged commit 7f78600 into main Jul 11, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants