(introduction of the site)
The intended audience for this project is individuals ...
The intended type of users which this website is targeted for are ...
- As a user, I want to be able to ... so ...
-
- Master Wireframes - View
The database was designed using an online tool called DB Diagram. The tables where mapped depending on the field requirements.
Database Design - Mapping
The features that will be utilised in this project will be as follows:
- HTML5
- HTML5 was used to structure and present content on my website.
- CSS3
- CSS3 was used to provide my website with style.
- JavaScript
- JavaScript was used to make the site interactive.
- Python
- Python was used as the backend language to access and parse data.
- DB Diagram
- Online tool to design the database.
- Mongodb:
- Database which stores the data to be recalled onto the website.
- Bootstrap:
- Bootstrap was used to assist with the responsiveness and styling of the website.
- JQuery Core 3.6.0:
- JQuery library was implemented to use features within Materialize
- EmailJS
- Using emailJS service to send emails from the contact modal
- Google Fonts:
- Google fonts were used to import the font into the style.css file which is used on all pages throughout the project.
- Font Awesome 5.13.3:
- Font Awesome was used on all pages throughout the website to add icons for aesthetic and UX purposes.
- Hover 5.15.3
- Hover effects used for the animation on hovering over links and buttons.
- Google Chrome:
- Default browser used to visually display the build process as well as utilising Chrome Dev Tools to assist where needed.
- GitHub:
- GitHub is used to store the code of the project after being pushed from GitPod.
- GitPod:
- A cloud development environment that allows us to create the website.
- Visual Studio Code
- Code editing software was used to replace GitPod as the free license expired due to over 50 hours useage.
- GitHub Desktop:
- A tool that allows you to interact with GitHub from the desktop
- Grammerly:
- Online tool which assists with the English grammar.
- Balsamiq:
- Balsamiq was used to create the wireframes during the design process.
- RandomKeygen:
- A tool to randomly generate a password.
- Heroku:
- A platform as a service (PaaS) that enables me to deploy my website in the cloud.
- Github Template:
- A template which has the preinstalled tools that will get us started.
...
On code completion, I ensured my code was validated with no snytax errors. I used W3C Markup Validator for HTML5, W3C CSS Validator for CSS3 to ensure my code is W3C Compliant. I used JSHint to helps to detect errors and potential problems in your JavaScript code. I also used PEP8 Online to validate my python scripts
Page | Initial Errors | Resolved Errors | Error Notes |
---|---|---|---|
index.html | Initial Errors | Resolved Errors | ... |
or use this template
HTML - W3C Markup Validator
CSS - W3C CSS Validator - Results
Python - PEP8 Online - Results
User Stories Testing from User Experience (UX) Section - View Results
Functionality and Usability Testing - View Results
The project was deployed to Heroku and connected to GitHub pages using the following method:
- To direct Heroku which application and dependencies are required to run the app being developed,
create a requirements file.
- In the terminal, enter "pip3 freeze --local > requirements.txt"
- Install the Procfile file as that what Heroku looks for to know which files run the app and how to.
- In the terminal, enter echo web: python app.py>Procfile
- Note: In the Procfile, there could be a blank line automatically created, go into the file, remove the blank line and save it again.
- In Heroku Dashboard, click on 'New', then click on 'Create new app'.
- Providing it with a unique name and changing the region to 'Europe' (or whatever region you are in). Then click on 'Create app'.
- In 'Deployment method' click on 'GitHub', Ensuring your GitHub username is visible, either search for your repository or type in exactly how your repository is spelt in GitHub. When it finds your Repository, it will be visible and you would click on 'Connect'
- Scroll to the top of the page and click on 'Settings'.
- Scroll down till you are in 'Config Vars' section and since we hide the environment variables. It would need to be added into Heroku manually. You would need to add the following: IP, PORT, SECRET_KEY, MONGO_URI and MONGO_DBNAME, ensuring you putting the same values as you did in the env.py file
- Going back to the terminal within GitPod. Commit and push the files that were created.
- Once successfully pushed into GitHub, go back to Heroku and click on 'Enable Automatic Deployment' and then 'Deploy Branch'.
- Once completed, a 'View' button would appear meaning the app has been deployed and successfully connected to Github.
- As Heroku is now connected to Github, for the remaining for project, upload your files into GitHub and it would automatically sync with Heroku.
I had to get the SSH key from the repository which allowed me to clone the repository to my local hard drive. The method which I used to clone the project was via the terminal as well as Github Desktop. I was able to connect my Github repository and clone my files through this method.
- Open your IDE and open up the Terminal
- Inside your terminal type
git clone git@github.com:adnanmuhtadi/milestone-project-3.git
- This would clone what is in github to your computer and so now modification to the files can happen on your local machine
- Inside your terminal type
git status
- To see what changes have been made
- Type
git -a
- To add all the files that you have worked on to the stage
- Type
git commit -m "add notes here"
- To add a message to files you are about to push to the servers
- Type
git push
- To upload to the remote repository
- Open the repository that needs to be cloned.
- On the top-right side of the page, above the files, you will see a button 'Code' with an arrow point down.
- Once clicked, a drop-down would appear which would give me the option 'Open with GitHub Desktop' (as I had already pre-installed GitHub Desktop previously).
- Once clicked, it would automatically open the application and request where for it to be saved.
- Create a new file in the dictory called 'env.py'
- In the terminal type in
git touch env.py
- In the terminal type in
- Inside the env.py file you will need to add the following:
# Python env code to set all defaults
import os
os.environ.setdefault("IP", "0.0.0.0")
os.environ.setdefault("PORT", "5000")
os.environ.setdefault("SECRET_KEY", "yourkeyhere")
os.environ.setdefault("MONGO_URI", "yourmongouriaddress")
os.environ.setdefault("MONGO_DBNAME", "yourdatabasename")
- Need to install the project requirements from the requirements.txt file.
- In the terminal type in
pip3 install -r requirements.txt
- In the terminal type in
- log into MongoDB to create your database and the tables
- Mapping of database available Here
- Within the app.py file, scroll to the bottom of the page and change the code from
# This tells the application where and how to run.
if __name__ == "__main__":
app.run(host=os.environ.get("IP"),
port=int(os.environ.get("PORT")),
debug=False)
To
# This tells the application where and how to run.
if __name__ == "__main__":
app.run(host=os.environ.get("IP"),
port=int(os.environ.get("PORT")),
debug=True)
- In the terminal, type in
python3 app.py
to run the application.