Flask is the Python web framework powering RapidPM's REST API backend.
| Feature | Purpose |
|---|---|
| REST API | All frontend-backend communication |
| Authentication | JWT-based auth with Google OAuth |
| File Uploads | Document and artifact management |
| Business Logic | Project, task, user operations |
| Environment | Version |
|---|---|
| All | 3.0.0 |
| Server | Status |
|---|---|
| rapidpm-prod | Docker container (Gunicorn) |
| rapidpm-test | Docker container (Gunicorn) |
| Local dev | Flask dev server or Gunicorn |
Flask==3.0.0
Flask-Cors==4.0.0
Flask-RESTful==0.3.9
Flask-SQLAlchemy==3.1.1
Flask-Mail==0.9.1
Flask-Admin==1.6.1
app/
├── __init__.py # App factory
├── controllers/ # API endpoints (routes)
├── services/ # Business logic
├── models/ # SQLAlchemy models
├── serde/ # Marshmallow schemas
└── common_util.py # Shared utilities
Environment variables loaded from:
environments/production.env (prod)environments/test.env (test)environments/local.env (local development)The venv shebang references /home/jc/CascadeProjects/rapid-pm/venv/bin/python3.
If venv is broken, fix with:
# Check if venv works
venv/bin/python3 -c "import flask; print('OK')"
# If broken, upgrade venv
python3 -m venv --upgrade venv
# If shebang is wrong, fix it
sed -i '1s|.*|#!/home/jc/CascadeProjects/rapid-pm/venv/bin/python3|' venv/bin/flask
# Load env vars and start Flask
set -a && source environments/local.env && set +a
venv/bin/python3 -m flask run --host=0.0.0.0 --port=5000
# Or as one command (for scripts)
bash -c 'source environments/local.env && venv/bin/python3 -m flask run --host=0.0.0.0 --port=5000'
Note: The set -a exports all variables, required because source alone doesn't export them.
gunicorn -c gunicornconfig.py \
--bind=unix:/sock/rapidpm.sock \
--timeout 3600 \
--workers=4 \
wsgi
Type: BSD-3-Clause (Open Source)
Cost: Free
See Licenses for details.
app/
├── controllers/
│ ├── project.py # Project CRUD
│ ├── task.py # Task operations
│ ├── artifact.py # Document management
│ └── auth.py # Authentication
├── services/
│ ├── project_service.py
│ ├── task_service.py
│ └── auth_service.py
└── models/
├── project.py
├── task.py
└── user.py