- Backend API - 100% Complete ✅
- Flutter App Core - 60% Complete ⏳
- Admin Dashboard - 0% Pending ❌
Riogold/
├── backend/ ✅ COMPLETE
│ ├── src/
│ │ ├── config/ # Database, Firebase, Razorpay
│ │ ├── controllers/ # API request handlers
│ │ ├── middleware/ # Auth, premium check
│ │ ├── models/ # Database models
│ │ ├── routes/ # API routes
│ │ ├── services/ # Business logic
│ │ └── server.js # Main server + cron jobs
│ ├── package.json
│ ├── .env.example
│ └── README.md
│
├── flutter_app/ ⏳ 60% COMPLETE
│ ├── lib/
│ │ ├── models/ ✅ Complete
│ │ ├── services/ ✅ Complete
│ │ ├── providers/ ✅ User provider done
│ │ ├── screens/ ⏳ 2/10 screens done
│ │ ├── widgets/ ❌ Pending
│ │ └── main.dart ✅ Complete
│ ├── android/
│ └── pubspec.yaml ✅ Complete
│
├── admin-dashboard/ ❌ NOT STARTED
│ └── (To be created)
│
└── COMPLETE_PROJECT_GUIDE.md 📚 Full documentation
Location: backend/
- ✅ PostgreSQL database with auto-setup
- ✅ Web scraping for 6 Teer games
- ✅ AI predictions engine (historical analysis)
- ✅ Multi-language dream bot (100+ symbols)
- ✅ Firebase Cloud Messaging integration
- ✅ Razorpay auto-recurring subscriptions
- ✅ Complete API endpoints (public, premium, admin)
- ✅ Automated cron jobs:
- Scrape results every 10 mins
- Generate predictions at 5:30 AM
- Send notifications at 6:00 AM
- Expiry reminders at 9:00 AM
- Data cleanup at 2:00 AM
- Public:
/api/results,/api/user/register,/api/user/:userId/status - Premium:
/api/predictions,/api/dream-interpret,/api/common-numbers,/api/calculate-formula - Payment:
/api/payment/create-subscription,/api/payment/webhook - Admin:
/api/admin/login,/api/admin/stats,/api/admin/users,/api/admin/notification/send
Start Backend:
cd backend
npm install
cp .env.example .env
# Fill in credentials
npm run dev
# Runs on http://localhost:5000Location: flutter_app/
- ✅ Project structure with all dependencies
- ✅ Models: Result, Prediction, User, DreamInterpretation
- ✅ API Service (complete backend integration)
- ✅ Storage Service (SharedPreferences wrapper)
- ✅ Notification Service (Firebase CM)
- ✅ User Provider (state management)
- ✅ Main app initialization
- ✅ Splash Screen (example)
- ✅ Home Screen (example with result grid)
provider, http, shared_preferences
firebase_core, firebase_messaging
razorpay_flutter
flutter_spinkit, shimmer, cached_network_image
google_fonts, uuid, intl, url_launcherCreate these 8 screens in flutter_app/lib/screens/:
-
predictions_screen.dart
- Premium gate for free users
- Show predictions for all 6 games
- Display FR/SR numbers, analysis, confidence
- Refresh functionality
-
dream_screen.dart
- Premium gate
- Language selector dropdown (Hindi, Bengali, English, etc.)
- Text input for dream description
- Submit button → Call API
- Display results: symbols, numbers, analysis
- Dream history list (past dreams)
-
subscribe_screen.dart
- Hero section: "50% OFF - ₹29/month"
- Features list with checkmarks
- Razorpay payment button
- Handle payment success/failure
- Activate premium after payment
-
profile_screen.dart
- User info (email if entered)
- Premium status card:
- If free: "Upgrade" button
- If premium: "Active until [date]", "Manage" button
- Settings: Notifications toggle, Language dropdown
- About app, Logout
-
result_detail_screen.dart
- Game name header
- Today's FR/SR (large display)
- Quick stats card
- Past results table (7 or 30 days based on premium)
- Premium upsell if free
-
common_numbers_screen.dart
- Game selector dropdown
- Hot numbers display (with frequency)
- Cold numbers display
- Day-wise analysis (premium only)
- Premium upsell if free
-
formula_calculator_screen.dart
- Premium gate
- Formula type selector (House, Ending, Sum)
- Input fields for previous FR/SR
- Calculate button
- Results display with explanation
-
manage_subscription_screen.dart
- Subscription details card
- Next billing date
- Amount
- Cancel subscription button (with confirmation dialog)
In subscribe_screen.dart:
import 'package:razorpay_flutter/razorpay_flutter.dart';
// Initialize
late Razorpay _razorpay;
@override
void initState() {
super.initState();
_razorpay = Razorpay();
_razorpay.on(Razorpay.EVENT_PAYMENT_SUCCESS, _handlePaymentSuccess);
_razorpay.on(Razorpay.EVENT_PAYMENT_ERROR, _handlePaymentError);
}
// Open Razorpay checkout
void _openCheckout() async {
// 1. Call API to create subscription
final result = await ApiService.createSubscription(userId, email, planId);
// 2. Open Razorpay
var options = {
'key': 'rzp_live_YOUR_KEY',
'subscription_id': result['subscriptionId'],
'name': 'Teer Khela Premium',
'description': 'Monthly Subscription',
'prefill': {'email': email},
};
_razorpay.open(options);
}
// Handle success
void _handlePaymentSuccess(PaymentSuccessResponse response) {
// Update user premium status
Provider.of<UserProvider>(context, listen: false).setPremium(true);
// Show success dialog
// Navigate to predictions
}In main.dart:
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp();
await StorageService.init();
await NotificationService.initialize();
// Set notification tap handler
NotificationService.onNotificationTap = (screen) {
// Navigate based on screen
navigatorKey.currentState?.pushNamed('/$screen');
};
runApp(MyApp());
}
// Add global navigator key
final GlobalKey<NavigatorState> navigatorKey = GlobalKey<NavigatorState>();
// In MaterialApp:
MaterialApp(
navigatorKey: navigatorKey,
...
)Create new project:
npm create vite@latest admin-dashboard -- --template react
cd admin-dashboard
npm install react-router-dom axios chart.js react-chartjs-2Pages to create:
- Login (
/login) - Dashboard (
/) - Stats, charts - Users (
/users) - Table, filters, actions - Predictions (
/predictions) - Override form - Notifications (
/notifications) - Send form, history - Results (
/results) - Manual entry - Analytics (
/analytics) - Charts - Settings (
/settings) - Config
All admin API calls require JWT:
axios.defaults.headers.common['Authorization'] = `Bearer ${token}`;cd backend
npm install
cp .env.example .env
# Edit .env with your credentials
npm run devcd flutter_app
flutter pub get
# Complete remaining screens (see above)
flutter run
# When ready:
flutter build apk --release# Create project first (see above)
npm install
npm run devDATABASE_URL=postgresql://user:pass@host:port/db
Get from: railway.app
RAZORPAY_KEY_ID=rzp_live_xxx
RAZORPAY_KEY_SECRET=xxx
RAZORPAY_PLAN_ID=plan_xxx
RAZORPAY_WEBHOOK_SECRET=xxx
Get from: dashboard.razorpay.com
FIREBASE_PROJECT_ID=xxx
FIREBASE_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----..."
FIREBASE_CLIENT_EMAIL=xxx@xxx.iam.gserviceaccount.com
Get from: Firebase Console → Project Settings → Service Accounts
ADMIN_USERNAME=admin
ADMIN_PASSWORD=your_secure_password
JWT_SECRET=your_random_secret
- Go to Firebase Console → Add Android app
- Download
google-services.json - Place in:
flutter_app/android/app/google-services.json - Firebase automatically configured (already in
main.dart)
- Go to Razorpay Dashboard → Subscriptions → Plans
- Create New Plan:
- Name: "Teer Khela Premium"
- Amount: ₹2900 (₹29 in paise)
- Billing Interval: Monthly
- Auto-charge: Yes
- Copy Plan ID to
.env
- Go to Settings → Webhooks
- Add Webhook URL:
https://your-api.com/api/payment/webhook - Select Events: All subscription events
- Copy Webhook Secret to
.env
- Complete Guide:
COMPLETE_PROJECT_GUIDE.md(detailed) - Backend README:
backend/README.md - This File: Overview and quick reference
| Task | Time | Priority |
|---|---|---|
| Flutter UI Screens (8) | 2-3 days | 🔴 High |
| Razorpay Integration | 4-6 hours | 🔴 High |
| Firebase Navigation | 2-3 hours | 🟡 Medium |
| Admin Dashboard | 2-3 days | 🟡 Medium |
| Testing & Polish | 1-2 days | 🟡 Medium |
| Total | 5-8 days |
- ✅ Backend is ready - Start backend server
- 🔥 Create 8 Flutter UI screens (templates provided)
- 💳 Implement Razorpay payment flow
- 🔔 Complete Firebase notification navigation
- 🎨 Build React admin dashboard
- ✅ Test everything end-to-end
- 🚀 Deploy to production
- Check
.envhas all variables - Test database connection
- Verify Firebase/Razorpay credentials
- Run
flutter pub get - Check
google-services.jsonis inandroid/app/ - Update Flutter:
flutter upgrade
- Use Razorpay test mode for development
- Verify plan ID is correct
- Check webhook is receiving events
- Backend is production-ready and fully functional
- Flutter app has complete API integration - just needs UI
- All services (scraping, predictions, dream bot) are working
- Cron jobs start automatically when backend runs
- Database tables auto-create on first run
- Admin APIs are ready for dashboard
A production-ready backend with:
- AI predictions engine
- Multi-language dream interpretation
- Auto-recurring subscriptions
- Push notifications
- Web scraping
- Admin APIs
- Automated tasks
Plus 60% of Flutter app with:
- Complete backend integration
- State management
- Models and services
- 2 example screens
If you encounter issues:
- Check relevant README files
- Verify all credentials in
.env - Check console logs for errors
- Test API endpoints with Postman
Built with ❤️ for Teer enthusiasts
Backend: Node.js + Express + PostgreSQL + Firebase + Razorpay Frontend: Flutter + Provider + Razorpay SDK Admin: React (to be built)
Good luck building! 🚀