Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
kiwijos authored Jan 28, 2024
1 parent 9b3ba54 commit 6a2c239
Showing 1 changed file with 42 additions and 18 deletions.
60 changes: 42 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,63 @@
## MapTiler API KEY
# E-Bike Renting System - Admin Web Client

The application uses MapLibre GL JS with tiles from MapTiler.
🚴‍♂️ Readers Beware: This is a school project 🚴‍♀️

### Adding a free key
Welcome to the administrative web client for our e-bike renting system – a school project that pedals its way into the world of big bike tech. This isn't just any admin panel; it's the central command station for managing a fleet of e-bikes that (hypothetically) rule the streets!

Create a `.env` file or simply copy and/or rename the `.env.example` file.
## Quick Links

Open the `.env` file, you will need to add/replace **PUBLIC_MAPTILER_API_KEY** with your own MapTiler API key.
### App Running Live

Your MapTiler account access key is on your MapTiler [Cloud](https://cloud.maptiler.com/account/keys/) account page.
Get a feel for the apps features, functionality, and user interface:

:information_source: If you don't have an API KEY, you can create it for free at https://www.maptiler.com/cloud/
- **Live Demo**: Visit [Lenticode](https://vteam-admin.lenticode.com/login) to see the application live.

## REST API
### Root Repository

The app uses a REST API. At the other end, there's a server with a database connection. The server is available [here](https://github.com/JuliaLind/vteam-server).
For a comprehensive view of all our related projects and to access the entire collection of repositories, please visit our root repository:

If you havn't already, create a `.env` file or copy the `.env.example` file.
- **VTeam Root Repository**: [p0ntan/vteam-root](https://github.com/p0ntan/vteam-root)

Make sure you have the **PUBLIC_REST_API_URL** set to the server's url.
This root repository serves as the central hub for our projects, providing links and information to all associated repositories.

The url is no secret. You'll find the exact url in the `.env.example` file.
Here you will find instructions on how to set up and run all repositories on your local machine.

## Developing
---
## Custom Setup Instructions

Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
While we recommend using our [root repository](https://github.com/p0ntan/vteam-root) 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.

### MapTiler API Key

This application utilizes MapLibre GL JS with tiles from MapTiler.

#### Adding Your Free Key
1. Create or rename a `.env` file based on the `.env.example`.
2. Add or update the `PUBLIC_MAPTILER_API_KEY` with your own key from MapTiler.
3. Your key can be found on your MapTiler [Cloud](https://cloud.maptiler.com/account/keys/) account page.
4. If you don't have an API key yet, sign up for a free one at [MapTiler Cloud](https://www.maptiler.com/cloud/).

### REST API Configuration

The app interfaces with a REST API connected to a backend server and database.

1. If not already done, create or copy the `.env.example` file to `.env`.
2. Set `PUBLIC_REST_API_URL` to the server's URL.
3. The server URL is no secret and is provided in the `.env.example` file.
4. Server code can be found at [JuliaLind/vteam-server](https://github.com/JuliaLind/vteam-server).

### Local Development

Once you've created a project and installed the dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:

```bash
npm run dev

# or start the server and open the app in a new browser tab
# Optionally, to open the app in a new browser tab:
npm run dev -- --open
```

## Building
### Building for Production

To create a production version of the app:

Expand All @@ -43,12 +67,12 @@ npm run build

You can preview the production build with `npm run preview`.

## Docker
## Docker Deployment

To build a production version of the app and run it inside a container:

```bash
docker compose up --build
```

> The app uses the node-adapter. You may need to install a different [adapter](https://kit.svelte.dev/docs/adapters) for your target environment and change the app settings accordingly.
> The app uses the node-adapter by default. You may need to install a different [adapter](https://kit.svelte.dev/docs/adapters) for your target environment and change the app settings accordingly.

0 comments on commit 6a2c239

Please sign in to comment.