A data analytics web application that allows users to upload personal datasets, view insightful automated visualizations, and selectively share results with trusted users.
- Help users make sense of their personal health data through automated analysis and visualization.
- Enable secure and selective sharing of health insights with trusted individuals (e.g., doctors, family).
- Frontend: Clean, responsive interface built with HTML, TailwindCSS, CSS, and JavaScript (with some jQuery).
- Backend: Developed using Flask with SQLAlchemy ORM and an SQLite database.
- User Capabilities:
- Register and manage a personal account.
- Upload CSV files containing health data (e.g., steps, sleep hours, mood).
- Automatically generate bar, line, and pie charts to visualize trends.
- Manage sharing preferences for individual data types.
- Focus Areas:
- Simplicity and clarity in user interaction.
- Strong data privacy and selective sharing.
- Mobile-responsive design for cross-device accessibility.
| UWA ID | Name | GitHub Username |
|---|---|---|
| 24117314 | Mohaimen Al Rashid | kdmars0168 |
| 24343523 | Boyu Shen | Ethan-zzz-zzz |
| 24103568 | Silvia Gao | SilviaRuth |
-
Clone the repository:
git clone https://github.com/your-username/data-analytics-app.git cd data-analytics-app -
Create a Python virtual environment:
python -m venv venv
-
Activate the virtual environment:
- On Windows:
venv\Scripts\activate
- On MacOS/Linux:
source venv/bin/activate
- On Windows:
-
Install the required dependencies:
pip install -r requirements.txt
-
Run database migrations (only first time):
flask db init flask db migrate -m "Initial migration" flask db migrate -m "Add Dataset table" flask db upgrade
-
Launch the application:
python run.py
-
Open the app in your browser:
http://127.0.0.1:5000/
Some Selenium tests rely on logging in with a predefined user.
➡️ You must create a user with the following credentials for tests to pass:
- Email:
123@gmail.com - Password:
123456
Steps:
- Run the app.
- Visit
http://127.0.0.1:5000/register. - Register a user using the above email and password (fill other fields as needed).
Designed to verify individual backend functions or routes using an in-memory SQLite DB.
pytest tests -vAutomated UI tests simulating real user actions via browser.
pytest tests_selenium -vdata-analytics-app/
│
├── app/
│ ├── __init__.py # App factory
│ ├── forms.py # WTForms definitions
│ ├── models.py # SQLAlchemy models
│ ├── routes.py # Flask routes/views
│ ├── utils.py # Utility functions
│ ├── new_utils.py # (Optional: Additional helpers)
│ ├── static/
│ │ ├── css/ # Tailwind/CSS styles
│ │ ├── js/ # Custom JS scripts
│ │ │ ├── dashboard.js
│ │ │ ├── main.js
│ │ │ ├── share.js
│ │ │ ├── shared_with_me.js
│ │ │ └── upload.js
│ │ └── assets/ # Images/assets
│ ├── uploads/ # Sample CSVs for dev/testing
│ │ ├── sample.csv
│ │ └── sample_valid.csv
│ └── templates/
│ ├── base.html
│ ├── index.html
│ ├── login.html
│ ├── register.html
│ ├── profile.html
│ ├── edit_profile.html
│ ├── upload.html
│ ├── dashboard.html
│ ├── shared_with_me.html
│ ├── share.html
│ └── partials/
│ └── sidebar.html
│
├── instance/
│ └── app.db # Local SQLite DB
│
├── migrations/ # Alembic DB migrations
│ ├── versions/
│ ├── env.py
│ ├── README
│ └── script.py.mako
│
├── tests/ # Unit tests
│ ├── conftest.py
│ ├── test_routes.py
│ ├── test_models.py
│ ├── test_upload.py
│ ├── test_utils.py
│ └── uploads/
│ └── ... CSVs for unit tests
│
├── tests_selenium/ # Selenium UI tests
│ ├── conftest.py
│ ├── test_login.py
│ ├── test_register.py
│ ├── test_profile.py
│ ├── test_upload.py
│ ├── test_dashboard.py
│ └── uploads/
│ └── ... Selenium test CSVs
│
├── venv/ # Virtual environment (excluded)
├── config.py # App configuration
├── run.py # App entry point
├── requirements.txt # Pip dependencies
├── create_demo_user.py # (Optional script)
├── .gitignore
└── README.md