Git Product home page Git Product logo

travel-buddy's Introduction

Travel Buddy

Ruff Test

UPDATE (25th June 2024): The application is no longer fully functional due to outdated code for scraping data from websites.

UPDATE (30th August 2022): The route analysis and related features such as location autocomplete are currently unavailable as our key for the Google Maps API has expired.

image

A travel companion to help plan your journey while saving both money and the planet by providing route analysis and a carpool marketplace.

Screenshots

image

image

image

image

Usage

Installing Dependencies

Run the following command from the project root directory:

poetry install

Running the Application

Run the following command from the project root directory:

poetry run app

Running Tests

Run the following command from the project root directory:

poetry run pytest

Demo Instructions

A demo database has been set up by default (db.sqlite3), with some sample user accounts to save the hassle of registration and make it easy to get started:

  • Username: johndoe | Password: P@ssword01
  • Username: janedoe | Password: P@ssword01

travel-buddy's People

Contributors

barnabasg avatar dependabot[bot] avatar isaaccheng9 avatar killereks avatar ryan-storey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

travel-buddy's Issues

Add support for fuel prices on a per-country basis

Problem Statement

  • Add support for different countries with a fuel price API.
    • Fuel prices vary per country, so the API must account for this.
    • Ensure that the fuel prices are displayed in the local currency of the origin country once this is implemented to avoid confusing the user.
  • Could support a fixed number of countries (UK, US, France, Germany, Canada) with separate APIs, or use one API that supports a wide range of countries.

Hide unnecessary details in route analysis

Problem Statement

  • Unnecessary details are currently shown in route analysis, such as ridiculous calorie counts and £0.00 fuel costs.
  • Add some checks so that only necessary details are displayed.
    • For example, calories may not be shown if the journey is >10km.

Fix map positioning

Problem Statement

  • In /routes, the map is misaligned vertically.
    • This could be fixed by adding a margin to the top of the side panels.
  • Change the layout to have the map in full-screen, with the panels as overlays on top of this.

Create page for viewing available carpools, and a carpool listing

Problem Statement

  • Users should be able to view available carpools at /carpools.
    • Carpools available (all)
    • Carpools joined
    • Carpools created
    • Carpools history (separated by joined/created?)
  • From this page, they should be able to view a carpool listing at /carpools/{journey_id}.
    • Can join the carpool if seats available > 0.
    • Can leave the carpool.

Create page for editing profile

Problem Statement

  • The user should have a page to edit their user profile details, including:
    • First and last name
    • Profile picture
    • Bio
    • Driver status

Note that the functionality is outside the scope of this issue - only the user interface is required here.

Allow users to save most frequently travelled routes

Users should be able to save most frequently travelled routes with a name so that they can be displayed on the route analysis page with their estimated fuel cost for that day.

Potentially, users can click the route to display it on the map.

Conduct market research

Breakdown

  • Research on existing products for CO2 emissions
  • Research on existing solutions for route alternative recommendations
  • Research on apis for data collection
  • Research on public opinions the issues at hand

Calculate stats for the global stats page

Problem Statement

  • Add a page for global stats at /stats
  • Add calculations for global stats based on the data of all users in the app. This may include:
    • Total distance travelled from carpooling
    • Total CO2 reduced from carpooling
    • Total fuel costs saved from carpooling
    • Total number of carpools

Create user account system.

Breakdown

  • Fields:
    • First Name
    • Surname
    • Email address
    • Password
  • Consider looking into potential built-in Django account system?

Change password requirements to be easier

Problem Statement

  • Password requirements are unnecessarily strict on the front-end.
    • I would suggest changing it to be a minimum of eight characters and one number to match the backend.
  • High priority as the mismatch of the backend is confusing and doesn't allow some passwords that should be allowed.

image

Create global stats page

Problem Statement

  • Create a page for global stats based on the data of all users in the app. This may include:
    • Total distance travelled from carpooling
    • Total CO2 reduced from carpooling
    • Total fuel costs saved from carpooling
    • Total number of carpools

Create user profile page after registration

Breakdown

  • After successful registration, a default user profile should be created in the database.
    • username
    • first_name
    • last_name
    • is_driver: 0 by default
    • bio: Empty by default
    • photo
  • The user should be forwarded to their profile page at /profile.
  • Viewing other users' profiles should be accessible via /profile/{username}.

Create user stats page

Breakdown

  • Sections to include are:
    • Monitor route statistics (CO2, average speed, time)
    • Recommendations for alternate methods (walking, cycling)
    • Time taken for each of these alternatives (you would need to leave x minutes earlier)
    • CO2 saving for this journey (plus saving over time)

Wrap text in carpool listings

Problem Statement

Text isn't currently being wrapped in carpool listings, which means long locations can go off the page (see screenshots below).

Desktop View

image

Mobile/Responsive View

image

Create user profile page functionality

Problem Statement

  • The user profile page needs some basic functions to display information about the user, which may include:
    • First and last name
    • Bio
    • Profile picture
    • Top three stats

Fix database path bug

Problem Statement

  • Some developers are having problems with the path of the database - could be caused by MacOS/Windows differences?
  • Create a file with environment variables, and point towards that in all files where the database path is required.

Add ability to change password

Problem Statement

  • Users should be able to change their password from the 'Edit Profile' page.
    • They must enter their current password, their new password, and their new password repeated (for confirmation).

Create user profile web page.

Breakdown

  • Profile picture
  • Bio
  • Top statistics (not all statistics - this should be on another page)
  • Driver or not (no by default)
    • Assume everyone's a passenger.

Create interface for users to interact with a carpool ride listing

Problem Statement

  • Users should be able to perform actions on a carpool page such as:
    • Viewing details about the carpool listing
    • Adding and removing themselves (if not created by user)
      • Number of seats should be decremented accordingly
    • Viewing passenger list for the carpool

Implement rate limiting for API calls

Problem Statement

  • Rate limiting would be useful for database calls, and especially API calls.
    • Google Maps API records the usage and charges once a certain limit is hit.
    • Database calls are computationally expensive, and mass requests will quickly cause a slowdown, especially before eventual migration from SQLite to PostgreSQL.

Add ability to interact with available carpools

Problem Statement

  • Users should be able to perform actions on a carpool page such as:
    • Updating information (if created by user)
    • Adding and removing themselves (if not created by user)
      • Number of seats should be decremented accordingly
    • Commenting

Add prices to carpool requests and rides

Problem Statement

  • We're currently missing prices for carpool requests and rides, which is a significant omission.
    • Passengers need to know how much they need to pay the driver, and drivers need to know what people are willing to pay.

Fix uploading avatars

Problem Statement

  • Uploading new avatars shows up immediately on the settings page, but it doesn't seem to save properly.
  • When you go to the profile page of the user, it doesn't show the image.

Add ability to block users

Problem Statement

  • Users should be able to block each other.
    • This means they can't view each others' profiles, carpools, etc.

Create the database structure.

Breakdown

  • Create an SQLite3 database structure with some tables for the key features.
    • Account system (user ID, first name, surname, email, password)
    • User profiles (user ID, driver or not)
    • Journeys (journey ID, driver ID, location from, location to)
    • Driver profile (user ID, driver rating)
    • Passenger profile (user ID, passenger rating)
  • Post the file on the Discord text channel database.

Estimate long-term costs of car ownership

Problem Statement

  • Take input from the user about their estimated travel distance per week/month, and make estimations for fuel costs (and possibly other things like insurance) over the span of:
    • 1 month
    • 3 months
    • 6 months
    • 12 months
  • Add suggestions based on electric vs petrol car ownership.
  • This could be part of a new page called 'Your Trends'.

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.