The group project for unit CITS5505 agile web development
The application uses Flask-WTF for CSRF (Cross-Site Request Forgery) protection
- Python 3.9 or newer
- pip (Python package installer)
please follow these steps manually to ensure the application runs correctly:
-
Activate the virtual environment:
-
macOS/Linux:
source .venv/bin/activateor
source venv/bin/activate -
Windows (Command Prompt):
venv\Scripts\activate.bat
-
Windows (PowerShell):
venv\Scripts\Activate.ps1
-
-
Install required packages:
pip install -r requirements.txt
-
Set environment variables:
-
For development:
export FLASK_ENV=development export FLASK_APP=run.py export $(cat .env.development | xargs)
-
For production:
export FLASK_ENV=production export FLASK_APP=run.py export $(cat .env.production | xargs)
-
-
Run database migrations:
flask db init # Only if 'migrations/' does not exist flask db migrate -m "Auto migration" flask db upgrade
-
Run the application:
flask run
Tip: To avoid forgetting steps, we recommend using the ./start script — it automates everything for you.
-
Create a virtual environment (if you haven't yet):
python -m venv venv
Or if you're using macOS or naming conventions for mac:
python -m venv .venv
-
Install dependencies:
The script will automatically install the packages from
requirements.txt.
Run the following command from the project root directory:
./start devor
./start prod-
devwill:- Activate the virtual environment
- Load environment variables from
.env.development - Set
FLASK_ENV=development - Apply database migrations
- Start the Flask development server
-
prodwill:- Load
.env.productioninstead - Set
FLASK_ENV=production
- Load
- If your environment file is missing (e.g.,
.env.developmentor.env.production), the script will stop with an error. - If no
migrations/folder exists, it will auto-initialize one withflask db init. - You can customize the startup behavior by editing
startdirectly. - The script is designed to be cross-platform compatible (Windows/macOS/Linux).
-
Activation failed? Make sure you're using a shell that supports sourcing (
sourcecommand), like Bash or Zsh. -
Environment not loading? Check that
.env.developmentor.env.productionexists and is correctly formatted (KEY=valueper line). -
Permission denied? If the script is not executable, run:
chmod +x start
To run the test suite:
./test| UWA ID | Name | Github user name |
|---|---|---|
| 24386873 | Edward Yuan | @Seikasahara |
| 24638832 | Parna Basak | @parnabasak |
| 24146595 | Yechang Wu | @Wycers |
| 24349497 | Zhengdong Jiang | @dgyz8 |
