A modern platform to consolidate, exchange, and monetize digital rewards (cashback, vouchers, scratch cards) from apps like GPay, PhonePe, Paytm, and more.
- Project Overview
- Tech Stack
- Prerequisites
- Setup
- Environment Variables
- Database Migrations
- Running Dev Servers
- Testing
- Deployment
reX lets users scan, manage, exchange, and sell digital rewards from multiple apps, with privacy-first scraping and a global marketplace. Admins can moderate listings and view commission reports.
- Mobile: React Native (Expo), TypeScript, React Navigation, Native Android modules
- Backend: FastAPI, Python 3.10+, SQLAlchemy, Alembic, PostgreSQL
- Auth: JWT (access/refresh), bcrypt
- Payments: Razorpay (India), Stripe (optional)
- Storage: S3/Cloudinary (optional)
- DevOps: Docker, GitHub Actions, .env
- Node.js >= 18
- Python >= 3.10
- Docker & Docker Compose
- PostgreSQL (local or cloud)
- Clone the repo:
git clone <repo-url> cd rexa-android/backend
- Copy and edit environment variables:
cp .env.example .env # Edit .env with your DB, JWT, and API keys - Run with Docker:
Or run locally:
docker build -t rex-backend . docker run --env-file .env -p 8000:8000 rex-backendpip install -r requirements.txt uvicorn app.main:app --reload
- Install dependencies:
cd ../mobile npm install - Start Expo dev server:
npm start # Or: npx expo start - Run on device/emulator:
- Android:
npm run android - iOS:
npm run ios
- Android:
See .env.example for all required variables:
DATABASE_URL- PostgreSQL connection stringJWT_SECRET- JWT signing secretRAZORPAY_KEY_ID/RAZORPAY_KEY_SECRET- Razorpay API keysS3_BUCKET,S3_KEY,S3_SECRET- (optional) S3 storageADMIN_EMAIL,SECRET_KEY- Admin and session secrets
- Initialize Alembic (if not done):
alembic init alembic
- Edit
alembic.iniandenv.pyfor your DB URL. - Create migration:
alembic revision --autogenerate -m "init" - Apply migration:
alembic upgrade head
- Backend:
cd backend uvicorn app.main:app --reload - Frontend:
cd mobile npm start
- Backend:
pytest
- Frontend:
npm test - CI:
- Lint:
flake8,black - Tests:
pytest,jest
- Lint:
- Backend: Deploy Docker image to Railway/Render.
- Frontend: Use Expo/EAS for builds and Play Store publishing.
- CI/CD: GitHub Actions for lint, test, build, and deploy.
- No hard-coded secrets. Use
.envfor all sensitive config. - Scraping modules are opt-in and battery-efficient.
- UI uses a consistent design system (customizable).
- Modular: OCR, accessibility, and storage can be disabled.