A comprehensive exam preparation platform with AI-powered question explanations, mock tests, and PYQ practice.
- User Authentication: Secure JWT-based authentication
- PYQ Practice: Previous Year Questions with AI explanations
- Mock Tests: Timed mock tests with detailed analytics
- AI Explanations: Intelligent question explanations using Together AI
- Payment Integration: Razorpay payment gateway for premium features
- User Limits: Tier-based usage limits (Free/Pro)
- Responsive Design: Mobile-first responsive UI
- FastAPI: Modern Python web framework
- SQLAlchemy: Database ORM
- PostgreSQL: Primary database
- SQLite: Fallback database
- JWT: Authentication
- Together AI: AI explanations
- Razorpay: Payment processing
- HTML5/CSS3: Modern responsive design
- JavaScript: Vanilla JS with ES6+ features
- Font Awesome: Icons
- Canvas Confetti: Celebrations
-
Clone the repository
git clone <your-repo-url> cd appbackup
-
Install dependencies
cd backend pip install -r requirements.txt -
Run the backend
python main.py
-
Open frontend
- Open
frontend/index.htmlin your browser - Or serve with a local server
- Open
-
Build and run with Docker Compose
docker-compose up --build
-
Access the application
- Frontend: http://localhost
- API: http://localhost/api
- Health check: http://localhost/health
-
Push your code to a Git repository
-
Deploy using render.yaml (Automatic)
- Go to Render Dashboard
- Click "New +" → "Blueprint"
- Connect your repository
- Render will automatically deploy using
render.yaml
-
Manual Deployment
- Create a PostgreSQL database on Render
- Create a web service pointing to your repository
- Set environment variables (see
RENDER_DEPLOYMENT.md)
Required for production:
DATABASE_URL=postgresql://user:pass@host:port/db
SECRET_KEY=your-secret-key
TOGETHER_API_KEY=your-together-api-key
ALGORITHM=HS256
ACCESS_TOKEN_EXPIRE_MINUTES=30
ENVIRONMENT=production
DEBUG=false
POST /signup- User registrationPOST /token- User loginGET /users/me- Get current user
POST /questions/- Get questions with filtersPOST /questions/explain- Get AI explanation
GET /payment/plans- Get available plansPOST /payment/create-order- Create payment orderPOST /payment/verify- Verify payment
GET /user/limits- Get user limits statusPOST /user/check-limit/{usage_type}- Check usage limitPOST /user/record-usage/{usage_type}- Record usage
appbackup/
├── backend/
│ ├── main.py # FastAPI application
│ ├── models.py # Database models
│ ├── database.py # Database configuration
│ ├── auth.py # Authentication logic
│ ├── questions.py # Questions API
│ ├── payment_service.py # Payment integration
│ ├── utils.py # Utility functions
│ └── requirements.txt # Python dependencies
├── frontend/
│ ├── index.html # Main page
│ ├── auth.html # Authentication page
│ ├── pyq.html # PYQ practice page
│ ├── mocktest.html # Mock tests page
│ ├── config.js # API configuration
│ └── auth-utils.js # Authentication utilities
├── render.yaml # Render deployment config
├── docker-compose.yml # Docker configuration
├── Dockerfile # Docker image
└── README.md # This file
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License.
For deployment issues, see RENDER_DEPLOYMENT.md
For general questions, create an issue in the repository.