A full-stack web application for entertainment-based guessing of Matka Main Bazar results using historical data analysis, machine learning, and heuristic models.
This application is for entertainment purposes only. It provides probabilistic guesses based on historical patterns and does not guarantee accuracy or future results. Always respect the terms of service of data sources like DPBoss.
- Real-time Scraping: Automated scraping of latest results from DPBoss
- Feature Engineering: Comprehensive feature extraction from historical data
- Ensemble Prediction: Combines frequency, Markov chains, independence assumptions, and ML models
- Explainable AI: Provides reasoning for each guess
- Live Verification: Compares predictions with live data
- Admin Controls: Training triggers and model management
- Backend: Node.js, Express, MongoDB, Mongoose
- Frontend: React, TypeScript, Tailwind CSS
- ML: Python, XGBoost, scikit-learn, pandas
- Scraping: Cheerio, Puppeteer
- Deployment: Docker (planned)
- Node.js 16+
- MongoDB 4.4+
- Python 3.8+ (for ML training)
- Git
-
Clone the repository
git clone <repository-url> cd matka-platform
-
Install backend dependencies
cd backend npm install
-
Install frontend dependencies
cd ../frontend npm install
-
Install Python dependencies
pip install pymongo pandas scikit-learn xgboost joblib
-
Set up MongoDB
- Install MongoDB locally or use MongoDB Atlas
- Update connection string in backend code if needed
-
Seed the database
node scripts/seed.js
-
Start MongoDB
mongod
-
Start the backend
cd backend npm start
-
Start the frontend (in another terminal)
cd frontend npm start
-
Access the app
- Frontend: http://localhost:3000
- Backend API: http://localhost:5000
-
Run the training script
python scripts/train_model.py
-
Trigger training via API (admin endpoint)
POST /api/train
GET /api/results
- Get latest resultsGET /api/results/fetch-latest
- Fetch latest resultGET /api/results/guess
- Get predictionsGET /api/results/future
- Get upcoming panel infoGET /api/results/history
- Get historical results
POST /api/train
- Trigger ML trainingPOST /api/results
- Add new resultPOST /api/results/bulk
- Bulk import results
matka-platform/
├── backend/
│ ├── models/
│ │ ├── Result.js
│ │ └── AnalysisRecord.js
│ ├── routes/
│ │ ├── results.js
│ │ └── auth.js
│ ├── services/
│ │ ├── scraper/
│ │ │ └── dpbossScraper.js
│ │ ├── featurizer.js
│ │ └── predictor.js
│ ├── middleware/
│ └── server.js
├── frontend/
│ ├── src/
│ │ ├── pages/
│ │ │ ├── HomePage.tsx
│ │ │ └── HistoryPage.tsx
│ │ ├── lib/
│ │ │ └── api.ts
│ │ └── context/
│ └── public/
├── scripts/
│ ├── train_model.py
│ └── seed.js
├── models/ (generated)
└── README.md
- Scraping: Automated daily scraping from DPBoss
- Feature Engineering: Compute 50+ features per result
- Training: XGBoost model trained on time-series data
- Prediction: Ensemble of heuristics + ML scores
- Serving: REST API with real-time updates
- Fork the repository
- Create a feature branch
- Make changes with tests
- Submit a pull request
This project is for educational purposes. Check individual licenses for dependencies.
For issues or questions, please open a GitHub issue.