🚴♂️ Readers Beware: This is a school project 🚴♀️
Welcome to the mobile app for our e-bike renting system.
Key Features:
- Bike Rental & Return: Rent a bike with just a few taps and return it with equal ease.
- Renting History: Take a trip down memory lane with a detailed log of all your rentals.
- Payment History: Keep your finances on track by viewing all your past payments.
Get a feel for the apps features, functionality, and user interface (we recommend visiting the site on your phone):
- Live Demo: Visit Lenticode to see the application live.
For a comprehensive view of all our related projects and to access the entire collection of repositories, please visit our root repository:
- VTeam Root Repository: p0ntan/vteam-root
This root repository serves as the central hub for our projects, providing links and information to all associated repositories.
Here you will find instructions on how to set up and run all repositories on your local machine.
While we recommend using our root repository for a smoother ride, you may choose to set up this repository directly, especially if you're planning to adapt the code. So, if you're feeling adventurous and want to ditch the training wheels, follow the steps below.
This application utilizes MapLibre GL JS with tiles from MapTiler.
- Create or rename a
.env
file based on the.env.example
. - Add or update the
PUBLIC_MAPTILER_API_KEY
with your own key from MapTiler. - Your key can be found on your MapTiler Cloud account page.
- If you don't have an API key yet, sign up for a free one at MapTiler Cloud.
The app interfaces with a REST API connected to a backend server and database.
- If not already done, create or copy the
.env.example
file to.env
. - Set
PUBLIC_REST_API_URL
to the server's URL. - The server URL is no secret and is provided in the
.env.example
file. - Server code can be found at JuliaLind/vteam-server.
To test the app locally, you need to create your own GitHub OAuth App for authentication (unless you remove the auth check or come up with another solution):
- Go to your GitHub account settings, navigate to 'Developer settings' > 'OAuth Apps' and click 'New OAuth App'.
- In the 'Application name' field, enter a name for your app.
- Set the 'Homepage URL' to
http://localhost:5173
. - For 'Authorization callback URL', enter
http://localhost:5173/callback
. - Once created, note down the 'Client ID' and 'Client Secret'.
- Add these credentials to your
.env
file asPUBLIC_GITHUB_ID
andGITHUB_SECRET
.
For a more detailed guide on setting up the GitHub OAuth App, check out this tutorial by yours truly.
Once you've created a project and installed the dependencies with npm install
(or pnpm install
or yarn
), start a development server:
npm run dev
# Optionally, to open the app in a new browser tab:
npm run dev -- --open
To create a production version of the app:
npm run build
You can preview the production build with npm run preview
.
To build a production version of the app and run it inside a container:
docker compose up --build
The app uses the node-adapter by default. You may need to install a different adapter for your target environment and change the app settings accordingly.