A Flask-based backend that registers multiple feature blueprints and serves a static frontend (HTML/CSS/JS) directly from the repository. Designed for quick local development and simple deployments.
- 🐍 Python 3.10+ — Core programming language
- ⚡ Flask — Backend & API framework
- 🍃 MongoDB — Database (via
MONGO_URI) - 🎨 HTML / CSS / JS — Static frontend pages
- 🔐 Flask-CORS & Sessions — Auth & security
- 🧪 Pytest — Testing framework
🌐 Demo: Click Here to Try It
This application exposes API blueprints and serves the frontend pages from a sibling frontend/ directory.
Blueprints registered:
- 🔐 Auth →
auth_bp - 👥 Organizer →
organizer_bp - 🙋 Participant →
participant_bp - 🤝 Collaboration →
collab_bp - 🖥️ Virtual Event →
virtual_bp
. ├─ backend/ │ ├─ app.py # Entry point registering blueprints and serving frontend │ ├─ config.py # Flask app, CORS, secrets, DB config │ └─ routes/ │ ├─ auth.py # auth_bp │ ├─ organizer.py # organizer_bp │ ├─ participant.py # participant_bp │ ├─ collaboration.py # collab_bp │ └─ virtual_event.py # virtual_bp ├─ frontend/ -│ ├─ common_dashboard.html │ ├─ signin.html │ ├─ signup.html │ ├─ organizer_dashboard.html │ ├─ participant_dashboard.html │ ├─ virtual_event.html │ └─ assets/ │ ├─ css/ ... │ └─ js/ ... └─ README.md
📝 Ensure
backend/__init__.pyexists sobackendis recognized as a package.
- 🐍 Python 3.10+
- 📦 pip & virtualenv (or poetry/uv)
- 🍃 MongoDB (if using DB features)
- 🔑 Environment variables configured
# 1) Clone the repo
git clone <repo-url>
cd <project-folder>
# 2) Create & activate a virtual environment
python -m venv .venv
# Windows
.venv\Scripts\activate
# macOS/Linux
source .venv/bin/activate
# 3) Install dependencies
pip install -r requirements.txt
# 4) Create .env file
cp .env.example .env
Example .env:
SECRET_KEY=supersecretkey
MONGO_URI=mongodb://localhost:27017/your-db
PORT=5000
FLASK_DEBUG=True
Recommended (module mode from root):
python -m backend.app
Alternative (Flask CLI):
$env:FLASK_APP="backend.app"; $env:FLASK_DEBUG="True"; flask run --host 0.0.0.0 --port 5000
export FLASK_APP=backend.app export FLASK_DEBUG=True flask run --host 0.0.0.0 --port 5000
📍 Default: http://0.0.0.0:5000
- 🏠
GET /→frontend/common_dashboard.html - 🔑
GET /signin→frontend/signin.html - 📝
GET /signup→frontend/signup.html - 🗂️
GET /organizer_dashboard→frontend/organizer_dashboard.html - 🙋
GET /participant_dashboard→frontend/participant_dashboard.html - 🖥️
GET /virtual_event→frontend/virtual_event.html - 🎨
GET /assets/<path>→ serves fromfrontend/assets/
All other unknown paths will fallback to common_dashboard.html.
- 🏠 / → common_dashboard.html
- 🔑 /signin → signin.html
- 📝 /signup → signup.html
- 🗂️ /organizer_dashboard → organizer_dashboard.html
- 🙋 /participant_dashboard → participant_dashboard.html
- 🖥️ /virtual_event → virtual_event.html
- 🎨 /assets/ → static files
- Run from project root (not inside backend/)
- Always keep backend/init.py present
- Add new HTML → frontend/
- Map new routes → backend/app.py
- pytest -q
⚠️ Set FLASK_DEBUG=False and a strong SECRET_KEY- 🌍 Use WSGI server (gunicorn/waitress)
pip install gunicorn
gunicorn -w 4 -b 0.0.0.0:${PORT:-5000} backend.app:app
- Fork repo
- Create feature branch
- Commit changes with clear messages
- Open a PR
📝 MIT , Daval malik sayad ali makandar, Md Saif Ali




