(Developer: Bastiaan Milo)
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
- Project Goals
- User Experience
- Technical Design
- Technologies Used
- Features
- Testing
- Bugs
- Deployment
- Credits
- Acknowledgements
- Features for the future
-
- 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.
- 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.
- 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.
-
- 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.
Click here to view instructions
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'.
- registration
- log in
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.
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.
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.
- add tool
- search tool
- exit
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.
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 will take you out of the system entirely.
- As a first time user I want to have a clear idea of the purpose of the application.
- As a first time user I want to be able to register for the application.
- As a user I want to be able to log in.
- As a user I want to be able to search for a tool.
- I want to be able to see where I can borrow the tool.
- As a user I want to get feedback if the tool is not available or present.
- As a user I want to be able to add a tool to a list for others to use.
- As a user I want nagivation to be clear and easy.
- As a site owner I want registration and log in to be easy for the user.
- As a site owner I want user names and other information to be saved to a Google Spreadsheet.
- As a site owner I want input to be validated where necessary.
- As a site owner I want the user to be able to add and find a tool.
- As a site owner I want the user to get feedback if a tool is not available or present.
- 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.
-
below you will find a flowchart which will show the flow and logic of this system. This chart was created with Lucidchart
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.
-
- Python programming language is the main language used for this system.
- 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.
- 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.
- 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.
-
- 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.
- 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
- 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
- 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
- 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
- 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
- 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
- Will take the user out of the system.
- For easy navigation of the system.
- User stories: 8
-
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.
See user stories testing
- 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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
- 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 - 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 - 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
- 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
-
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
-
This application has been deployed in Heroku by following these steps:
- Create or log in to your account at heroku.com
- Create a new app, add a unique app name (this project is named "ci-pp3-connect4") and choose your region
- Click on create app
- Go to "Settings"
- 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'.
- Add required buildpacks (further dependencies). For this project, I set up 'Python' and 'node.js' in that order.
- Go to "Deploy" and select "GitHub" in "Deployment method"
- To link up our Heroku app to our Github repository code enter your repository name, click 'Search' and then 'Connect' when it shows below
- Choose the branch you want to buid your app from
- If prefered, click on "Enable Automatic Deploys", which keeps the app up to date with your GitHub repository
- 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
-
- 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.
-
- 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!
-
- 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.