Skip to content

bglynch/project-tracker-flask

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project Tracker

Summary

Project Tracker is a simple, easy to use app for keeping track of small scale projects.
It allows the user the ability to create project tasks and give each task a genre.
Each task can be given a time upon completion which is saved to the database and used for dashboard analysis.

Demo

To view a demo of this project, please click HERE.

A user is required to have an account to access all features of the site. For the purposes of viewing/testing the site I have created the following dummy account, which make use of the site's features.

Email Password
[email protected] H3llowor!d

User Experience

Project Tracker was built with the following list of users and user stories in mind.
This allowed me to focus my design and development work on priority features that would be of value to those users:

User Sample user story
Structural Engineer (Domestic) I am an engineer working on domestic projects. These projects are small scale and have repetitive tasks. I would like to be able to create a list of tasks that I must do to complete the project. Also, I would like to track the time it takes to complete these tasks.

To help me refine the design and layout of my site, I drew a mock-up of the project tracker on a whiteboard. I used this mock-up as a guide when coding a 'walking skeleton' of the project tracker.
Images of the mockups are located in the docs folder here.

Features

The key features I developed to fulfil the user stories I created are:

  1. User can register an account and login / logout of this account
  2. User can reset their password if they forget or misplace it
  3. User can create a new project
  4. User can associate new projects with a client
  5. User can list the tasks associated with a project
  6. User can create, edit and delete tasks
  7. User can toggle the status of a task
  8. The status for a project is auto-updated to complete when all tasks are set to complete
  9. The status for a project is changed from complete to in progress if a task in that project is changed from complete to in progress
  10. User can capture the time taken to complete tasks
  11. User can view a personal dashboard summarising their projects

Features for Future Development

  1. Add additional chart to dashboard (e.g Project Profitability)
  2. Ability to assign multiple users to a project
  3. Further improve performance by taking remaining steps recommended by Lighthouse

Technologies Used

The languages, frameworks, libraries and tools that I used to create this portfolio site are:

  • HTML5 is used to apply a structure to the website.
  • CSS3 is used to style the website.
  • Materialize is a front-end framework which I used to improve the responsiveness of the website. Materialize also provides functionality to validate the form entries.
  • JavaScript is used to apply logic and interactivity to the website.
  • The project uses JQuery to simplify DOM manipulation.
  • Python 3.4 - backend language used to process the data for the project tracker.
  • Flask is a microframework I used to serve the project tracker. I also made use of this framework for routing, requests, redirects, rendering templates and static files.
  • Jinja2 was used for templating.

Testing

I have detailed below the different approaches and techniques I used to test the functionality of my website's features and to validate the source code for this project.

User scenarios

User testing was completed with the help of a few friends, who acted as testers. I asked the testers to first register and login to the app and then navigate around the site freely (without any instruction) and then to follow sample scenarios I had created based on my user stories.

A sample scenario I asked friends to test was to contact me using the contact form. This was based on the following user story:

  1. Log out of the app
    Upon trying to log back in, pretend you forget your password and try to reset it.
  1. Create a project and task with incorrect details.
    Now try and edit those details to fill in the correct ones
  1. Create several projects and use the dashboard to find out which client is your most important.

Navigation

Acting as a user, I tested the navigation of the site by using the navigation links in the navbar. I also tested all routes shown on the user flow diagram to make sure that navigation was intuitive so the user would not have to use the back button on their browser.

Code Formatting

I used pycodestyle to test and improve the formatting of my code in line with PEP8.

Defensive Design

Defensive design was tested manually using URL inputs. A method of how this was done can be found HERE

Responsiveness

I tested the responsiveness of my site by viewing the site on different devices and browsers. I also employed tools such as Chrome Developer Tools and Resizer to test responsive features.

Performance

I used Lighthouse which is a Chrome Dev Tool that helped me assess the performance and quality of the website.
Results for this testing can be found HERE

Code validation

I used the following validators to validate my code:

  1. W3C - HTML Validator
  2. W3C - CSS Validator

I resolved any HTML validation issues were I felt it made sense to resolve them.
There are some validation errors/warnings that are unresolved on the project page

  1. duplicate ids: this was due to an autogenerated csrf input tag
  2. article lacks header: I did not add a heading tag as it impacted on my UX design

Deployment

I used Heroku to deploy this project. Here is a list of steps I followed to deploy a production version of my app

  1. Created a Procfile, installed psycopg2-binary and updated my requirements.txt
  2. I created a new Heroku app in the Europe Region.
  3. I provisioned a database by going to the Resources tab and selecting the Heroku Postgres add-on
  4. I connected to the database locally using the DATABASE_URI and migrated my models to the database
  5. I was using a .bashrc file to store my local environment variables. For deployment, I added these environment variables to Heroku settings Config vars.
  6. I connected this app to my project-tracker Github repository.
  7. I triggered a manual build for the initial deployment of my Heroku app and tested this newly deployed version
  8. Finally, I enabled automatic deploys so that a new build would occur when a new change was pushed to Github

To run the code locally, please follow the instructions below. If you do not have python 3 installed, please install it:

  1. Git clone this repository to a local directory:
git clone https://github.com/bglynch/project-tracker-flask.git
  1. Navigate into the project-tracker-flask directory:
cd project-tracker-flask
  1. Create a virtual environment:
sudo pip install virtualenv
  1. Ensure that your virtual environment runs Python 3.4:
virtualenv -p /usr/bin/python3.4 venv
  1. Activate your virtual environment
source venv/bin/activate
  1. Install the packages required to run this project
pip install -r requirements.txt
  1. Create the migrations repository
flask db init
  1. Create the migration script
flask db migrate
  1. Run the migration script to apply changes to the database
flask db upgrade
  1. Run the project
python run_app.py
  1. Enjoy!

Please note that email reset will not run locally unless you provide your own Gmail setting in the config.py file. To do this export the following to your environment variables:

(venv) $ export MAIL_SERVER=smtp.googlemail.com
(venv) $ export MAIL_PORT=587
(venv) $ export MAIL_USE_TLS=1
(venv) $ export MAIL_USERNAME=<your-gmail-username>
(venv) $ export MAIL_PASSWORD=<your-gmail-password>

You may also have to update your Google account setting to allow 3rd party apps to use the mail service

Credits

Content

Acknowledgements

About

Simple Project Tracker using Flask Microframework

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published