fix: resolve F-Droid blockers (flag Razorpay, replace Maps)
Overview
This MR resolves issues blocking the application from being accepted into F-Droid by removing proprietary dependencies and ensuring the project is fully open-source compliant and buildable.
What does this MR do and why?
F-Droid requires applications to avoid proprietary SDKs and be reproducible from source. The project previously included Razorpay and Google Maps, which violate these guidelines.
To address this:
- Razorpay is retained but disabled using a build-time feature flag (
VITE_ENABLE_PAYMENTS) so it is excluded from F-Droid builds - Google Maps is replaced with OpenStreetMap, an open-source alternative
- Updated "private" flag in package.json to false (can be toggled manually if needed)
Trade-off:
- Payment functionality is not available in F-Droid builds but preserved for other environments
Changes Made
- Updated
src/pages/DonationPage.tsxto feature-flag Razorpay integration - Replaced Google Maps iframe with OpenStreetMap in
src/pages/AboutPage.tsx(updated to Swecha office location) - Updated "private" flag in package.json to false (can be toggled manually if needed)
Technical Details
Root Cause:
- Use of proprietary services (Razorpay, Google Maps) violated F-Droid policies
Fix:
- Introduced environment-based feature flag to disable Razorpay in restricted builds
- Replaced proprietary map service with OpenStreetMap embed
Type of Change
-
🐛 Bug fix (non-breaking change that fixes an issue) -
🔧 Configuration change
Related Issues / References
- Closes F-Droid compliance issue !280 (merged)
Screenshots or Screen Recordings
| Before | After |
|---|---|
| Google Maps embed | OpenStreetMap embed with updated location |
How to Set Up and Validate Locally
- Checkout this branch:
git checkout fix/fdroid-compliance Install dependencies: bun install Configure environment variables: VITE_ENABLE_PAYMENTS=true # Enable Razorpay Run the app: bun dev To test F-Droid-compatible build: VITE_ENABLE_PAYMENTS=false bun build Validate: Razorpay loads only when enabled Donation page shows static details when disabled Map displays using OpenStreetMap with correct location
Documentation
README.md updated
.env.example updated
CHANGELOG.md updated (if applicable)
Edited by Greeshma Kanukunta

