The backend repository for Munarchy'25 - IIT Roorkee's flagship MUN event.
- Framework: Quart
- Database: MongoDB
- Email Service: SMTP
- Deployment: Docker & Docker Compose
- ASGI Server: Gunicorn with Uvicorn workers
- Python 3.11+
- Docker and Docker Compose
- MongoDB instance
-
Clone the repository
git clone https://github.com/baync180705/munarchy_backend.git cd munarchy-backend
-
Set up virtual environment
python -m venv venv source venv/bin/activate # On Windows use: venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
-
Run the development server
gunicorn app:app -c gunicorn_config.py
-
Build and run using Docker Compose
docker-compose up --build
-
Or run individual commands
# Build the image sudo docker build -t munarchy-backend . # Run the container sudo docker run -p 8000:8000 munarchy-backend
- api/routes/: API routes and business logic for user registration, payment and allotment.
- models/: Data models for the application.
- services/: Services and utility functions for the application.
- config/: Configuration settings for the application.
- core/: Core functionality and database operations.
Create a .env
file in the root directory with the following variables:
- MERCHANT_KEY
- SALT
- ENV
- MONGO_URI
- SENDER_EMAIL
- EMAIL_SECRET_KEY
- SURL
- FURL
- BASE_URL
- SSL_KEYFILE
- SSL_CERTFILE
The application is containerized and can be deployed using Docker. The included Docker configuration handles all dependencies and environment setup.