This repo is for the course vteam at BTH, made by group vteam-2. The repo contains serveral submodules that together builds a complete system to for renting and managing electric scooters/bikes.
This submodule contains all the code for the server and database. Link to repo
This submodule contains all the code for each bike, and can also be used to simulate multiple bikes using the system. Link to repo
This submodule contains all the code for the admin interface. Link to repo
This submodule contains all the code for website used by users. Link to repo
This submodule contains all the code for app used by users. Link to repo
To clone this repo together with all the submodules, run the command:
git clone --recursive https://github.com/p0ntan/vteam-root.git
# For SSH
# git clone --recursive git@github.com:p0ntan/vteam-root.git
See the .env.example for needed .env-variables in your own .env to run the system locally. Most of them arent really a secret, but some are and you need to get your own Maptiler-API-key. You'll also need some keys to be able to use OAuth for logging in, and if you don't have any or know how to get your own maybe some of the contributors can help you, just ask!
Once all .env-variables is in place you can then start the system in a development-mode, just run the command:
./setup.bash dev
This will start all the submodules in their own containers with all files added as volumes so you keep working with your local files in the editing software of your choice. If you want you can skip the admin/user-clients if they feel too slow in containers (or any other reason), and add the flag --local-clients:
./setup.bash dev --local-clients
This will start all services except the admin-web, user-web and user-app clients. You will then need to add some .env-files to those repos and run them locally, and you can read more about it in their own README.
With the system up and running you can then enter containers to run tests with the command:
docker exec -it <container-name> bash
The container for the bike-brain is a bit different, you can still enter it with the command above but it needs to be restarted when any changes is made. To make it easier when developing, just run:
./setup.bash bike
Which will restart the container and then keep you inside so you can execute the files and whatever you want.
Or if you feel that you've had enough of all that development. You can then run the system in smaller more production-like containers. For this some of the submodules needs needs their own .env file (see admin/user/user-app repos for more detail), but to make it easier the bashscript setup.bash will take care of it for you. There are two ways to set up all .env files, either by two commands:
# Set up .env-files
./setup.bash env
# Start system
./setup.bash prod
Or with one single command where you can just add the flag --env to the prod-command:
# Sets up .env-files and starts the system
./setup.bash prod --env
No matter how you run the system, our guess is that you want to see some of the clients in action? Well here are some links to find what you might be looking for when the system is run locally:
Locally the REST-API can be reached here:
Just use the following command to stop the system, shut down the docker-network and remove all images and volumes that was built during setup.
./setup.bash down