Giter VIP home page Giter VIP logo

tool-borrow-system's Introduction


Tools for borrow

(Developer: Bastiaan Milo)

Start screen

Introduction


Welcome to the Tools for borrow - system. This program aims to make life easier and cheaper for residents of an appartment building. Through registration the residents are provided with a system that will give insight in, and allow them to, borrow eachothers tools. This way the residents don't have to buy all new tools, and the tools in circulation get to be used more often instead of lying somewhere unused. This project was written mainly in Python language for educational purpose with Code Institue. For the purpose of this project I used Google spreadsheets to collect, manipulate and save data.

Here is a live link to the project Here is a link to the Google spreadsheet


Table of Contents

  1. Project Goals
  2. User Experience
  3. Technical Design
  4. Technologies Used
  5. Features
  6. Testing
  7. Bugs
  8. Deployment
  9. Credits
  10. Acknowledgements
  11. Features for the future

  1. Project Goals

    • The goal of this project is ultimately to create a more sustainable way of living.
    • This project will aim to create a more circular economy through the exchange of equipment / tools, within a set group of people.

    User Goals

    • Be able to register / log in to a safe enviroment.
    • Add tools to a list, for other residents to use.
    • Search for the tools that I need.

    Site Owner Goals

    • Create an application with clear purpose.
    • Create an application that is intuitive and easy to navigate.
    • Create an application that will support the users need for tools.

    Back to Table Of Contents


  1. User Experience

    Target Audience

    • The target audience is everyone who lives in an appartment building or small community and wants to have a cheaper more co-created way of living, through the sharing of equipment / tools.

    User Manual

    Click here to view instructions

    start menu

    After the welcome message in the start menu, the user is presented with two option. The first option will take the user into registration. The second option will take the user straight to log in. The user is aksed to choose either '1' or '2'.

    1. registration
    2. log in

    Registration

    With this option chosen, the user will enter a series of questions. The question are, first name, last name, phone number and unique password. Details on what to fill in will be stated in the moment. This input will all be registrated in a google sppreadsheet.

    Log in

    With this option chosen, the user will have to enter last name and unique password for authentication. This information is pulled from the google spreadsheet during registration first time visisting. After log in, the user will enter the main menu.

    Main menu

    When entering the main menu, the user will be presented with 3 options. From here the user can interact with the main function, that is, to either add a tool, for other neighbours to find and borrow, to search for a tool that the user would like to borrow, or to exit the system entirely.

    1. add tool
    2. search tool
    3. exit

    Add tool

    In this add function, the user will be asked again to enter their last name. This is to make sure the tools added, are added in the right place. Then the user can add the name of the tool. This will then be updated in the spreadsheet and the user will get an overview of the tools they have logged.

    Search tool

    In this section, the user will be asked to provide the name of the tool they are looking for. If the tool is found, the program will return a full name and number of the neighbour in possession of the tool. You will then be able to contact your neighbour, to ask for the tool. if not found, the user will be asked if they want to do another search or not. If chosen not, they will go back to the menu.

    Exit

    Exit will take you out of the system entirely.

    User Stories

    Resident user

    1. As a first time user I want to have a clear idea of the purpose of the application.
    2. As a first time user I want to be able to register for the application.
    3. As a user I want to be able to log in.
    4. As a user I want to be able to search for a tool.
    5. I want to be able to see where I can borrow the tool.
    6. As a user I want to get feedback if the tool is not available or present.
    7. As a user I want to be able to add a tool to a list for others to use.
    8. As a user I want nagivation to be clear and easy.

    Site owner

    1. As a site owner I want registration and log in to be easy for the user.
    2. As a site owner I want user names and other information to be saved to a Google Spreadsheet.
    3. As a site owner I want input to be validated where necessary.
    4. As a site owner I want the user to be able to add and find a tool.
    5. As a site owner I want the user to get feedback if a tool is not available or present.

    Scope

    • For the first release I want users to be able to register / log in, search and/or add tools, and be able to read where to borrow them or get feedback when not available or present.
    • For future releases I would like for users to be able to delete tools from the list, add unlimited tools, have multiple search result when more people are in possesion of the tool and add some more security.

    Back to Table Of Contents


  1. Technical Design

    Flowchart

    below you will find a flowchart which will show the flow and logic of this system. This chart was created with Lucidchart

    Flowchart

    Data Models

    I've chosen a more function oriented form of programming(FP), where I build function upon function in a very straightforward way to manipulate data in a google spreadsheet. Looking back, it would've been apropriate to use classes for example with a person/neighbour in the system, for they have a shared state, and shared actions.

    Back to Table Of Contents


  1. Technologies Used

    Languages

    • Python programming language is the main language used for this system.

    Frameworks and Tools

    • Gitpod - is used for version control to push the code to GitHub.
    • GitHub - is where I stored my code in a remote repository.
    • Lucidchart - is used to create the flowchart.
    • Google Sheets - is used to store data outside of this system.
    • Google Cloud Platform - is used for authentications and permissions to the google services, google auth and sheets etc.
    • Google Sheets is used to store user data like names, passwords, phone numbers and tools.
    • Heroku Platform is used to deploy this project into a live environment.
    • PEP8 is used to check if the written code was up to Python standard.

    Libraries

    Python Libraries

    • os - is used to clear terminal when needed. I also find that it creates a better overview of the important information.
    • time - is used to delay certain print statements in the terminal for smooth effect and better flow.

    Third Party Libraries

    • gspread - JUSTIFICATION: I used gspread to manipulate data (get, update and store information) in my Google spreadsheet
    • google.oauth2.service_account - JUSTIFICATION: This module is used for authentification that is needed to access the Google API and to connect my Service Account to the Credentials function. A creds.json file was added with all details the API needs.

    Back to Table Of Contents


  1. Features

    Input validation

    • Input validation is done throughout the system where needed.
    • Through a loop, most of the places with input will redirect to either ask again or provide options.
    Screenshot examples of asking again when input not valid

    Ask again example Ask again example

    Start menu

    • This provides the user with a welcome message.
    • It gives a short introduction to what to expect.
    • It provides the user with two options, to register(as a first time user) or to log in.
    • User stories covered: 1, 2, 3, 8
    Screenshot of Start menu feature

    Sart menu

    Registration

    • New users can register to the system.
    • One by one, a couple of questions are asked: names and phone number, to be saved in a spreadsheet.
    • After check if input is correct, unique password is asked to be created.
    • After this, the user will go directly to log in.
    • User stories covered: 2, 3, 9, 10, 11, 8
    Screenshots of input names and number and a screenshot of unique password features

    Registration input Unique password

    Log In

    • Gives an existing user the opportunity to log in without registering again.
    • Is done on the basis of the last name and the unique password givin.
    • Input info is searched in google spreadsheet for authentication.
    • User stories covered: 3, 8, 9, 11
    Screenshot of Log in feature

    Log in

    Main menu

    • It's and easy to understand menu with clear navigation.
    • It provides the user with 3 options on wehre to go next: add tool, search tool or exit.
    • User stories covered: 4, 7, 8, 11, 12
    Screenshot of Main menu feature

    Log in

    Add tool

    • This will give the user the option to add a tool.
    • After adding a tool, this will give the user an overview of the tools in his/her possesion.
    • The user can add up to 8 tools, which will be stored in the google spreadsheet.
    • After the overview there will be a option menu with further instruction, to go back or exit.
    • User stories covered: 7, 8, 10, 12
    Screenshots of the add tool feature

    Add tool After add tool

    Search tool

    • This will give the user the option to search for the tool he needs.
    • This is linked to google spreadsheet and will loop through all the data provided.
    • If not found, it will ask if another search is wanted.
    • If found, the user is provided with the name and number of the neighbour in possesion of the tool.
    • When ready, the user is provided with an option menu for easy navigation.
    • User stories covered: 4, 5, 6, 8, 12, 13
    Screenshots of the search tool feature

    Search tool After search tool

    Exit

    • Will take the user out of the system.
    • For easy navigation of the system.
    • User stories: 8

    Back to Table Of Contents


  1. Testing

    Python Validation

    PEP8 Validation was used to check the code for PEP8 requirements. All the code was pasted into the engine. Al the code passes with no errors and no warnings to show.

    Screenshot of pep8 test result

    Pep8 test result

    Testing user stories

    See user stories testing
    1. As a first time user I want to have a clear idea of the purpose of the application.
    Feature Action Expected Result Actual Result
    Start menu not needed yet User is presented with short introduction Works as expected
    Screenshot of Start menu feature

    Sart menu

    1. As a first time user I want to be able to register for the application.
    Feature Action Expected Result Actual Result
    registration input required User gets feedback Works as expected
    Unique password input unique password Confirmation. User is taken to log in Works as expected
    Screenshot of registration and unique password

    Registration Registration

    1. As a user I want to be able to log in.
    Feature Action Expected Result Actual Result
    log in Select option 2 User is presented with questions Works as expected
    Unique password provide unique password Confirmation. User is taken to log in Works as expected
    Screenshot of Log in

    Registration

    1. As a user I want to be able to search for a tool.
    Feature Action Expected Result Actual Result
    Search tool provide tool name user is expecting a response Works as expected
    Screenshot of Search tool

    Search tool

    1. I want to be able to see where I can borrow the tool.
    Feature Action Expected Result Actual Result
    Search tool provide tool name user is expecting a response Works as expected
    Screenshot of Search tool

    Search tool

    1. As a user I want to get feedback if the tool is not available or present.
    Feature Action Expected Result Actual Result
    Search tool provide tool name user is expecting a response Works as expected
    Screenshot of tool not found

    Tool not found

    1. As a user I want to be able to add a tool to a list for others to use.
    Feature Action Expected Result Actual Result
    Add tool provide tool name user is expecting tool to be added to list Works as expected
    Screenshot of adding tool

    Add tool

    1. As a user I want nagivation to be clear and easy.
    Feature Action Expected Result Actual Result
    Navigation make choices and give input user is expecting a clear and easy navigation Works as expected
    Screenshots of navigation

    Navigation Navigation Navigation

    1. As a site owner I want registration and log in to be easy for the user.

    For results and screenshots look at user stories testing 2 and 3

    1. As a site owner I want user names and other information to be saved to a Google Spreadsheet.
    Feature Action Expected Result Actual Result
    registration and add tool registration and tool name input site owner expects data to be saved Works as expected
    Screenshot of spreadsheet data

    Spreadsheet data

    1. As a site owner I want input to be validated where necessary.
    Feature Action Expected Result Actual Result
    Validation give input user is expecting validation Works as expected
    Screenshots of validation

    Validation Validation Validation

    1. As a site owner I want the user to be able to add and find a tool.

    For results and screenshots look at user stories testing 4, 5, 6 and 7

    1. As a site owner I want the user to get feedback if a tool is not available or present.
    Feature Action Expected Result Actual Result
    search tool tool name input user expects feedback Works as expected
    Screenshot of feedback

    Feedback

    Back to Table Of Contents


  1. Bugs

    Bug Fix
    spaces in a name will later on create dificulty updating the spreadsheet added a isalpha() function and a print statement to not use digits or spaces in the name
    while logging in, if the first time a wrong name is entered, the second time it throws the program I changed the loop with a menu if name not found and continue if chosen to try again, when name not found.
    more than 8 tools added will throw an error , for columns are not used I've added a statement for a max of 8 tools to be added. I've not fixed the error thrown
    tool add func throws error after wrong name, like with log in I created a while loop with a choice menu and if try again is chosen, continue
    Exit from main menu after search tool, results in question: what tool are you looking for? not fixed, it is not clear why it happens, and it doesn't seem to happen again. Hypotheses is it has to do with reach of columns. To try to avoid it from happpening again, I've upscaled the reach of columns to Z in the function.
    Keeps giving trailing white space It went through pep8 checker, took out all the trailing white space, but in gitpod, it keeps giving me warnings for trailing white space
    line 212, 255 and 369 have unreachable code I'm not sure why, but it does seem to work properly within the code it is now, so it's left unfixed, for now

    Back to Table Of Contents


  1. Deployment

    Heroku

    This application has been deployed in Heroku by following these steps:

    1. Create or log in to your account at heroku.com
    2. Create a new app, add a unique app name (this project is named "ci-pp3-connect4") and choose your region
    3. Click on create app
    4. Go to "Settings"
    5. Under Config Vars store any sensitive data you saved in .json file. Name 'Key' field, copy the .json file and paste it to 'Value' field. Also add a key 'PORT' and value '8000'.
    6. Add required buildpacks (further dependencies). For this project, I set up 'Python' and 'node.js' in that order.
    7. Go to "Deploy" and select "GitHub" in "Deployment method"
    8. To link up our Heroku app to our Github repository code enter your repository name, click 'Search' and then 'Connect' when it shows below
    9. Choose the branch you want to buid your app from
    10. If prefered, click on "Enable Automatic Deploys", which keeps the app up to date with your GitHub repository
    11. Wait for the app to build. Once ready you will see the “App was successfully deployed” message and a 'View' button to take you to your deployed link.

    Here is a live link to the project Here is a link to the Google spreadsheet

    Back to Table Of Contents


  1. Credits

    Code

    • Code Institute - for the git template IDE and heroku deployment instructions.
    • Code Institute for the "Love Sandwiches - Essentials Project" which inspired me to do a more data oriented project and helped me connect the Google Spreadsheet.
    • For the use of os: clear console.
    • For the use of letter input control I went to stackoverflow: only letters.
    • For password validation I looked on Geeks for Geeks: password validation and password validation.
    • For append method in google spreadsheet I looked at Learn Google Spreadsheets.
    • I used gspread documentation for a better understanding and use of google sheets.
    • I used Google sheet for developer for a better understanding and use of google sheets.
    • I used Aleksandra her github repository on pp3 as a reference to the scope and the layout of the readme file.
    • I used Danny his github repository on pp3 as a reference to the scope and the layout of the readme file.

    Back to Table Of Contents


  1. Acknowledgements

    • First of all, I want to thank my partner, who got my back, supported me and showed her trust in me throughout this project!
    • Second, I want to thank my friend Victor vd Linden, who sat by my side a couple of nights showing me sometimes the best way is too take a couple of steps back and go back to the basics.
    • Third, I want to thank my mentor Mo Shami, who incouraged me to push myself and to trust the proces.
    • Lastly, I want to thank the Code Institute Slack community, for support, loving words of encouragement and overall kindness. We're really in it together!

    Back to Table Of Contents


  1. Features for the future

    • security, no adding tools to other peoples list if you know their names.
    • Forgot password option.
    • Function for endless tool adding possibillity.
    • Multiple search results if more people have the same tool.
    • Take a tool out of the list.

    Back to Table Of Contents


tool-borrow-system's People

Contributors

bgmwebdev avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.