Go to file
cyi1341 7f5398c49e update README 2024-04-30 22:24:29 +08:00
static second commit 2024-04-30 21:52:51 +08:00
templates second commit 2024-04-30 21:52:51 +08:00
README.md update README 2024-04-30 22:24:29 +08:00
app.py first commit 2024-04-30 21:51:45 +08:00
custom_fields.py first commit 2024-04-30 21:51:45 +08:00
groq.py first commit 2024-04-30 21:51:45 +08:00
import_data.py first commit 2024-04-30 21:51:45 +08:00
test.sh first commit 2024-04-30 21:51:45 +08:00

README.md

Installation Guide Clone this repository to your local machine using "git clone https://git.disroot.org/cyi1341/bike-rental-with-ai.git". Get your Groq API key from https://console.groq.com. You have three options to run the application: locally, using Docker, or on Fly.io. Choose the method that best suits your needs. Local Development: To run the application locally:

  1. Create a virtual environment using your preferred method (e.g., "python -m venv myenv").
  2. Set the GROQ_API_KEY environment variable to your Groq API key.
  3. Run "python import_data.py" to import data.
  4. Run "python app.py" to start the application. Docker: To run the application using Docker:
  5. Set the GROQ_API_KEY environment variable in your Docker configuration.
  6. Run the "Dockerfile" to build and start the container. Fly.io: To deploy the application on Fly.io:
  7. Create a Fly.io account: Sign up at https://fly.io/app/sign-up/.
  8. Install the Fly CLI: Follow the instructions at https://fly.io/docs/hands-on/install-flyctl/.
  9. Deploy the application: Inside the cloned repository, run "fly launch --ha=false" to deploy the application on a single machine.
  10. Follow the deployment process: Follow the instructions to complete the deployment process.
  11. Access your application: You will receive a link to access your application and a dashboard link.

User Guide The Bike Rental Application is a comprehensive platform that provides users with a seamless bike rental experience. The application offers a range of features and functionalities that cater to different user roles, including visitors, customers, and admins. This user guide provides an overview of the application's features and functionalities, categorized into seven parts.

Part 1: User Authentication and Management Registration: Users can register by providing a phone number, password, and optionally credit card details to become a member. (/register, Visitor) Login: Registered users can log in using their phone number and password. (/login, Visitor) Logout: Logged-in users can log out of their account. (/logout, Customer/Admin) My Account: Logged-in users can manage their account, including becoming a member, stopping membership, changing password, and deleting their account. (/my_account, Customer) Delete Account: Users can delete their account. (/delete_account, Customer)

Part 2: Bike Rental and Rental Management Rent a Bike: Logged-in users can rent a bike by selecting the bike type and scanning a QR code. (/rent/<bike_id>, Customer) Complete Rental: Admins can complete a rental by selecting the end station and returning the bike. (/rent/<bike_id>/<user_id>/complete, Admin) Rental History: Users can view their rental history, including details like bike type, start/end stations, rental duration, and total cost. (/rentals, Customer) Rental History Charts: Users can view charts representing their rental duration distribution and rental cost distribution. (/rental_history_charts, Customer) Estimate Rental Price: Users can estimate the rental price based on the bike type, start/end stations, duration, and membership status. (/estimate_rental_price, Visitor/Customer/Admin)

Part 3: Bike and Station Information Stations: Users can view a list of available bike stations. (/stations, Visitor/Customer/Admin) Station Bikes: Users can view the availability of different bike types at a specific station. (/station/<station_id>, Visitor/Customer/Admin)

Part 4: Admin Dashboard and Analytics Admin Dashboard: Admins can access the admin dashboard to view overall metrics like total rentals, total revenue, and member/non-member rental counts. (/admin, Admin) Admin Analytics: Admins can view analytical charts, including rental duration distribution, rental cost distribution, bike availability, and member vs. non-member rentals. (/admin/analytics, Admin)

Part 5: Bike Recommendation Bike Recommendation: Users can get bike recommendations based on their input prompts using a language model. (/bike_recommendation, Visitor/Customer/Admin)

Part 6: About and Membership Information About: Users can view information about the bike rental application. (/about, Visitor/Customer/Admin) Membership Information: Users can view details about the membership program. (/membership_info, Visitor/Customer/Admin)