Skip to content

Commit

Permalink
Release v1.5.0 (#111)
Browse files Browse the repository at this point in the history
* Feature flask aws replacement (#62)

* Initial commit - removed AWS service usage in app.py

APP DOES NOT FUNCTION YET.

* Added db fuctionality for user registartion and log-in functions + HTML changes.

App is working now.

* cleaning up old markdown details and removing uneeded files

* Update README.md

* Update requirements.txt

* Update requirements.txt

* Update requirements.txt

* Update requirements.txt

* Update requirements.txt

* Onboarding Environment

Onboarding Environment

* Update README.md (#64)

Removed the text "AWS CLI Installed on Local Machine" which was still listed under ### Requirements.

Signed-off-by: Jezza12345 <[email protected]>

* Feature flask dashboard 2.0 (#66)

* Added new dashboard skeleton, refactored footer

* Added new chart.js charts to dashboard

* Added desc stats for first level of dashboard.

* All values for dashboard have been passed.

* Dashboard v2 is ready for FE CSS

* Delete transactions_ut.db

* Create transactions_ut.db

* Delete transactions_ut.db

* Added foundation code for dolfin_analytica data science dashboard. (#67)

* Update README.md

* Update README.md

* Update README.md

Signed-off-by: MoreDread <[email protected]>

* expenditure_visualization_prototype (#69)

* expenditure_visualization_prototype

kmeans model prototype +word cloud prototype

* Removed .idea and added it to gitignore

---------

Co-authored-by: ShaneD <[email protected]>

* expenditure_pattern_visualization_web_prototype (#70)

expenditure_pattern_visualization_web_prototype

* feature_FRONT_update_login (#71)

Completed the coding design of the login page in the Front End as the Dolfin Front End Figma Design for T2 2023.

Co-authored-by: ShaneD <[email protected]>

* Fixed db commit bug

* Added loading page template and Flask logic (#72)

Simply follow the way /dash/load/ is programmed to add a loading screen for any request. The loading page will revert back to the parent directory (/dash/ in this case) once /dash/ is returned. You can test it by adding a time.sleep() before returning the /dash/ or any test page.

* Create auto_kmeans.py (#75)

* Added Geo Lock middleware restricting DolFin to Australia (#73)

* Added Geo Lock middleware restricting DolFin to Australia

I used wsgi_app to create a GeoLockChecker middleware. It checks for user's IP against IP-API to retrieve the country info. The user is only allowed to access all of the pages if they're located in Australia or accessing from localhost (for dev purposes).

* Added Test Function and Status Code to GeoLock Response

If the end user is geolocked they will receive a 403 status code along with a content-restricted message. The status codes were asserted along with the message using pytest using IPs of NordVPN servers in Australia, France, and USA.

* Update user_database.db

* update

* Feature front das hv2 css (#81)

* Added account filter skeleton to dashv2

* You can now load multiple account data into the dashboard.

* Update dash2.html

* Add call to get balance data from .db per account

* Final version of dashboard, tested on test datasets.

* New Branch with the latest DolFin (#80)

1.general development for Register.html & Register.css

2.1.general development for login.html & login.css

* Create reinforcement_cloud.py (#82)

AI-S: Define a new frequence caculation function for Word Cloud Model

* styled login page (#83)

added css and upated login.html

* conflict solved

* Revert "conflict solved"

This reverts commit 2164bb7.

* Feature new test user data (#88)

* Create auto_setup_fake_account.py

not good API

* new_test_user_data

* Create auto_setup_fake_account.py (#87)

not good API

* Updated user datbase with test users (#93)

Updated user database file with test users based off the first 5 persona in the Basiq testing data.

Sets the stage at a later date to be linked with the database following a DB refresh.

* Extend Jiangjun Kai's expenditure_ Pattern_ Visualization_ Prototype … (#92)

* Extend Jiangjun Kai's expenditure_ Pattern_ Visualization_ Prototype implantation has been integrated into the dashboard columns, and corresponding interactive effects have been optimized and added.

1.Extend Jiangjun Kai's expenditure_ Pattern_ Visualization_ Prototype implantation has been integrated into the dashboard columns.
2.corresponding interactive effects have been optimized and added.

* adjusted the code

small changes

* Separate the Js code.

Separate the Js code: Dashboard_extneded.js.

* Feature front login responsive (#90)

* login responsiveness

* login responsive

* Feature front article content creation (#91)

* Branching for Articles

Branching off develop to create article content

* Delete articleTemplate_Savings.html

deleted a file i accidentally created

* article html

reset my duplcation of the article html

* Dynamically generated articles

I created a json document to store different articles so I can iterate through them for the different article links. Altered the articleTemplate.html to dynamically insert various paragraphs and quotes. The news.html href's was changed to link to the article sites id's. Finally in app.py I imported the json module. changed the Article template route to accept article id's. It gets the current directory and constructs the path than reads the JSON data than finds a particular id. Than renders the article template

* Update article.json

Added the content for 5 money savings tips

* Delete transactions_ut.db

---------

Co-authored-by: ShaneD <[email protected]>

* Design and functionality adjustments to FAQ page (#84)

- Altered page title section size to take up less space
- Changed title text font and size for more modern look
- Adjusted colours for better balance
- Added backing to the question boxes to make page feel less empty
- Allowed for question boxes to remain open when multiple boxes are opened

* Fixed db bug

* Feature front chatbot css (#95)

* New change

* chatbot animation

* removed copy files at Aditya's request

---------

Co-authored-by: ShaneD <[email protected]>

* Implementing cleaning of user transaction data (#94)

* Update FAQ.html (#96)

Signed-off-by: MoreDread <[email protected]>
Co-authored-by: Mar-Prz <[email protected]>

* fixed links on navbar

* Added initial page structure to project (#97)

* Add files via upload

Enhanced word cloud generation with NLP preprocessing and modular structure

Signed-off-by: mazyhehe <[email protected]>

* register styled (#106)

* fixed the faq responsive (#105)

* Update .gitignore

* Update .gitignore

* Create .gitignore

* Delete transactions_ut.db

* Feature front update profile (#101)

* added comment home.html line 83

* Updated profile route

Updated the app.route for the profile.html page to read the username of the current logged in user, query the user database and return the username and email address values. Cleaned these values to remove excess symbols so text would display as plain text in the html file, passed the values to the html page.

* Fix form errors and show user details

Removed all references to forms as this was all data linked to the old aws db. Added in a new section to just show the username and email address of the current logged in user.

---------

Co-authored-by: ShaneD <[email protected]>

* Feature flask update profile (#100)

* added comment home.html line 83

* Updated profile route

Updated the app.route for the profile.html page to read the username of the current logged in user, query the user database and return the username and email address values. Cleaned these values to remove excess symbols so text would display as plain text in the html file, passed the values to the html page.

* Delete transactions_ut.db

---------

Co-authored-by: ShaneD <[email protected]>

* Feature front resetpw (#99)

* added comment home.html line 83

* Updated profile route

Updated the app.route for the profile.html page to read the username of the current logged in user, query the user database and return the username and email address values. Cleaned these values to remove excess symbols so text would display as plain text in the html file, passed the values to the html page.

* Fix form errors and show user details

Removed all references to forms as this was all data linked to the old aws db. Added in a new section to just show the username and email address of the current logged in user.

* Create resetpw.html

Created resetpw.html so when the reset password button is clicked on the profile.html page, there is a page to navigate to. Added basic form structure to take user input for a new password and a button to submit the change.

* Delete transactions_ut.db

---------

Co-authored-by: ShaneD <[email protected]>

* Added CSS for highlighting active pages (#103)

Consolidate CSS for active pages to navbar. Added variable to detect active page in router. Current active pages were used to enable Navbar highlight.

Co-authored-by: ShaneD <[email protected]>

* Address fields to registration page (#104)

Address fields added to registration
 page

Co-authored-by: ShaneD <[email protected]>

* Feature back user database entries (#98)

* Initial commit

Still in progress. Committing to be on safe side in case if local copy is lost.

* 22 Nov final commit

22 Nov final commit

* Final task commit

Transaction db moved under database folder. All the paths updated accordingly.
Load database function created to use appropriate file to load the transactional database,

---------

Co-authored-by: ShaneD <[email protected]>

* Added logging of Registration and Login attempts to Database (#74)

* Added logging of Registration and Login attempts to Database

I created a schema for "Log" which adds the current time along with topic and message. I created logging for registration and login attempts.

* Add txt output and audit database

Logs will be output to both (new) audit database as well as audit.txt, will create if it doesn't exist. Database restructured to support multiple binding databases.

---------

Co-authored-by: ShaneD <[email protected]>

* Feature front register new styled (#109)

* register styled

* register new feild styled

* Update .gitignore

* Update .gitignore

* Update .gitignore

* Delete .DS_Store

* Delete config.py

---------

Signed-off-by: Jezza12345 <[email protected]>
Signed-off-by: MoreDread <[email protected]>
Signed-off-by: mazyhehe <[email protected]>
Co-authored-by: Chris <[email protected]>
Co-authored-by: Jezza12345 <[email protected]>
Co-authored-by: userstarwind <[email protected]>
Co-authored-by: Chris <[email protected]>
Co-authored-by: alkatra <[email protected]>
Co-authored-by: Was8gm <[email protected]>
Co-authored-by: SIHENG WEI <[email protected]>
Co-authored-by: fbhatti97 <[email protected]>
Co-authored-by: StarShip <[email protected]>
Co-authored-by: wongaid <[email protected]>
Co-authored-by: Adi <[email protected]>
Co-authored-by: Alvin Odunga <[email protected]>
Co-authored-by: damonrimanic <[email protected]>
Co-authored-by: Jensen-T <[email protected]>
Co-authored-by: Mar-Prz <[email protected]>
Co-authored-by: mazyhehe <[email protected]>
Co-authored-by: Denica <[email protected]>
Co-authored-by: Ben D <[email protected]>
Co-authored-by: Apparmar <[email protected]>
  • Loading branch information
20 people authored Nov 26, 2023
1 parent cc26e09 commit 191eb65
Show file tree
Hide file tree
Showing 104 changed files with 7,493 additions and 1,533 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
neo_dolfin/transactions_ut.db
Neo_Dolfin/.DS_Store
76 changes: 20 additions & 56 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# NE0 DolFin
Updated: 29/08/2023
Updated: 16/11/2023

## Branch Management
### Authorised Code Owners:
* Shane Dzartov (@SDzartov)
* Jackson Thompson (@thompsonjac)
* Christopher Russo (@CRussoDeakin)
* Jeremy Conway (Jezza12345)
* Aidan John Stuart Wong (wongaid)

### GitHub Management
#### Branch Structure
Expand Down Expand Up @@ -70,66 +70,30 @@ git push origin your-branch-name --force
### Requirements:
* IDE, like *Visual Studio Code*
* Python Version == **3.11**
* AWS CLI installed on your local machine.
* GitHub Desktop (RECOMMENDED)

## {NEW} MFA CONFIG SET UP
* In order for the SignIn route to function post MFA, you must ensure that your AWS CLI is installed and you have a configure file:

### MAC OS
* Ensure that you have an AWS Credentials file in your root directory
* If you have not done this, use the AWS CLI and run the command ```aws configure``` to configure an AWS Profile.
* After that, open the configure file via the command: ```nano ~/.aws/credentials.```. Make sure the code matches the below example and press ```CNTRL+O``` , ```ENTER``` , ```CNTRL+X ```
* Ensure that your AWS credentials file is in the correct format. The format is given below:
```
[default]
aws_access_key_id=<>
aws_secret_access_key=<>
```
* Verify with the command: ```aws configure list```

### WINDOWS
#Method 1
* * Ensure that you have an AWS Credentials file in your root directory
* If you have not done this, use the AWS CLI and run the command ```aws configure``` to configure an AWS Profile.
* Move into that directory via: ```cd %userprofile%\.aws ```
* After that, open the configure file via the command: ```nano credentials```. Make sure the code matches the below example and press ```CNTRL+O``` , ```ENTER``` , ```CNTRL+X ```
* Ensure that your AWS credentials file is in the correct format. The format is given below:
```
[default]
aws_access_key_id=<>
aws_secret_access_key=<>
```
* Verify with the command: ```aws configure list```


#Method 2 - Use the proceedure below if you don't have the AWS CLI installed Or a ```cd %userprofile%\.aws ``` directory and credentials file does not exist
* * Install the latest version of the AWS CLI for Windows from: https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html
* * Ensure that you have an AWS Credentials file in your root directory (%userprofile%/.aws/configure)
* If you do not have a configure file, use the AWS CLI from the command prompt via running the command ```aws configure``` to configure an AWS Profile.
* Press Enter to accept the default options for AWS Access Key ID, AWS Secret Access Key, Default region name, Default output format.
* Change directory into your user profile directory ```cd %userprofile% ```
* Make a directory called .aws via the following command: ```mkdir .aws ```
* Move into that directory via: ```cd .aws ```
* Create the 'configure' file (with no extension - ie: configure) using notepad, Visual Studio Code or another text editor. Make sure the code matches the below, save the file and close the text editor
```
[default]
aws_access_key_id=<>
aws_secret_access_key=<>
```
* Verify with the command: ```aws configure list```

### Deploy to ***Localhost***
### Deploy Neo_Dolfin to ***Localhost***
* Pull this repo and select this branch, if you are unconfident in your GIT bash skills, please download GitHub Desktop: https://desktop.github.com/
* Once you have the repo folder open in your IDE, do the following in the BELOW ORDER:
* Open a terminal window and move into the neo_dolfin directory via the terminal command: ```cd <path/to>/GitHub/dolfin_fe/neo_dolfin```
* Open a terminal window and move into the neo_dolfin directory via the terminal command: ```cd <path/to>/GitHub/NEO_Dolfin/neo_dolfin```
* (**NOTE: INSERT YOUR PATH AS REQUIRED, YOUR PATH MAY DIFFER**)
* Initiate a new *venv* env using the following terminal command: ```python -m venv venv```
* Activate the *venv* env using the following terminal command: ```venv\scripts\activate```
* Inside your IDE, create a new file inside your neo_dolfin folder called: ```.env``` (**MAKE SURE TO INCLUDE THE "." AT THE BEGINNING**)
* Ask one of the team leads for the credentials, that you must paste into the .env file and then save the file.
* Install the required libraries into the *venv* env using the following terminal command: ```pip install -r requirements.txt```
* To run the flask application, use the following terminal command: ```python app.py```
* Navigate to ```127.0.0.1``` in your web browser.
* Navigate to ```127.0.0.8000``` in your web browser.

### Deploy Dolfin_Analytica to ***Localhost***
* Pull this repo and select this branch, if you are unconfident in your GIT bash skills, please download GitHub Desktop: https://desktop.github.com/
* Once you have the repo folder open in your IDE, do the following in the BELOW ORDER:
* Open a terminal window and move into the neo_dolfin directory via the terminal command: ```cd <path/to>/GitHub/NEO_Dolfin/dolfin_analytica```
* (**NOTE: INSERT YOUR PATH AS REQUIRED, YOUR PATH MAY DIFFER**)
* Initiate a new *venv* env using the following terminal command: ```python -m venv venv2```
* Activate the *venv* env using the following terminal command: ```venv\scripts\activate```
* Install the required libraries into the *venv* env using the following terminal command: ```pip install -r requirements.txt```
* To run the flask application, use the following terminal command: ```python app.py```
* Navigate to ```127.0.0.5000``` in your web browser.


### {NEW} Testing
We have testing scripts enabled for this application.
Expand All @@ -139,5 +103,5 @@ We have testing scripts enabled for this application.
**PLEASE RUN THE PYTEST AND ATTACH THE LOG TEXT/SCREENSHOT TO YOUR PULL REQUEST**
***Warnings are OKAY, Fails will result in the PULL request not being reviewed.***

## EC2 Deployment
## GCP Deployment
***WORK IN PROGRESS***
21 changes: 21 additions & 0 deletions dolfin_analytica/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Ignore virtual environment
venv2\Lib\
venv2/

# Ignore .env file
.env

# Ignore the qr.png file
qr.png

# pycache
.pytest_cache
test/__pycache__
__pycache__
.DS_store

# my chages
test.html
changes.txt
snippets.txt
white_arrow.png
30 changes: 30 additions & 0 deletions dolfin_analytica/app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
from flask import Flask, render_template, request, redirect, url_for
import time

app = Flask(__name__)

@app.route('/', methods=['GET', 'POST'])
def landing():
if request.method == 'POST':
# Access form data using request.form
username = request.form['username']
password = request.form['password']

if username == 'dsuser':
if password == 'dolfin123':

# After processing the data, you can redirect to the /loading route
return redirect(url_for('loading'))

return render_template('landing.html')

@app.route('/loading')
def loading():
return render_template('loading.html')

@app.route('/main')
def main():
return render_template('main.html')

if __name__ == '__main__':
app.run(debug=True)
Binary file added dolfin_analytica/db/transactions_ut.db
Binary file not shown.
Binary file added dolfin_analytica/db/user_database.db
Binary file not shown.
7 changes: 7 additions & 0 deletions dolfin_analytica/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
blinker==1.7.0
click==8.1.7
Flask==3.0.0
itsdangerous==2.1.2
Jinja2==3.1.2
MarkupSafe==2.1.3
Werkzeug==3.0.1
File renamed without changes.
51 changes: 51 additions & 0 deletions dolfin_analytica/templates/landing.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Login Page</title>
<!-- Bootstrap CSS -->
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet">
<style>
body {
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
background-color: white;
}

.login-form {
max-width: 400px;
width: 100%;
padding: 15px;
margin: auto;
background-color: #fff;
border: 1px solid #ced4da;
border-radius: 4px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
}
</style>
</head>

<body>

<form method="POST">
<div class="form-group">
<input type="text" class="form-control text-center" id="username" name="username" placeholder="Enter your username" required>
</div>
<div class="form-group">
<input type="password" class="form-control text-center" id="password" name="password" placeholder="Enter your password" required>
</div>
<button type="submit" class="btn btn-primary btn-block">Login</button>
</form>


<!-- Bootstrap JS and Popper.js -->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
</body>

</html>
49 changes: 49 additions & 0 deletions dolfin_analytica/templates/loading.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Loading Page</title>
<!-- Bootstrap CSS -->
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet">
<style>
body {
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
background-color: #f8f9fa;
}

.loading-container {
text-align: center;
}

.spinner-border {
width: 3rem;
height: 3rem;
}
</style>
</head>

<body>
<div class="loading-container">
<div class="spinner-border text-primary" role="status">
<span class="sr-only">Loading...</span>
</div>
</div>

<script>
setTimeout(function () {
window.location.href = "/main"; // Replace with your desired route
}, 15000); // 15 seconds in milliseconds
</script>

<!-- Bootstrap JS and Popper.js -->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
</body>

</html>
61 changes: 61 additions & 0 deletions dolfin_analytica/templates/main.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Dashboard</title>
<!-- Bootstrap CSS -->
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet">
<style>
body {
font-family: 'Arial', sans-serif;
background-color: #f8f9fa;
}

#sidebar {
height: 100vh;
width: 110px;
position: fixed;
top: 0;
left: 0;
background-color: #343a40;
padding-top: 20px;
}

#content {
margin-left: 250px;
padding: 20px;
}
</style>
</head>

<body>

<div id="sidebar">
<ul class="nav flex-column">
<li class="nav-item">
<a class="nav-link text-white" href="#">Home</a>
</li>
<li class="nav-item">
<a class="nav-link text-white" href="#">Dashboard</a>
</li>
<li class="nav-item">
<a class="nav-link text-white" href="#">Reports</a>
</li>
<!-- Add more items as needed -->
</ul>
</div>

<div id="content">
<h2>Welcome to the Dashboard</h2>
<!-- Add your dashboard content here -->
</div>

<!-- Bootstrap JS and Popper.js -->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
</body>

</html>
6 changes: 5 additions & 1 deletion neo_dolfin/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ venv/

# Ignore .env file
.env
.idea

# Ignore the qr.png file
qr.png
Expand All @@ -18,4 +19,7 @@ __pycache__
test.html
changes.txt
snippets.txt
white_arrow.png
white_arrow.png
login copy.css
login copy.html
neo_dolfin/transactions_ut.db
Loading

0 comments on commit 191eb65

Please sign in to comment.