A simple Gradio web application with MongoDB integration for user authentication.
- Python 3.x
- MongoDB server running locally on default port (27017)
- Virtual environment (recommended)
- Create and activate virtual environment:
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt- Create a
.envfile in the project root with the following content:
MONGODB_URI=mongodb://localhost:27017/
DB_NAME=SENG472
COLLECTION_NAME=user
- Make sure MongoDB is running locally on port 27017
- Activate the virtual environment (if not already activated):
source venv/bin/activate # On Windows: venv\Scripts\activate- Run the application:
python app.py- Open your web browser and navigate to the URL shown in the terminal (typically http://127.0.0.1:7860)
- User signup with email and password
- User login verification
- MongoDB integration with singleton pattern
- Environment variable configuration