This repository contains everything needed to build and run the (WIP) remote access server for all Warp-Cargers and Tinkerforge ESP32-/ESP32-Ethernet-Bricks.
.
├── backend
├── db_connector
├── docker
├── frontend
└── wg-webclient
backend:
The http backend server and relay server between the charger and the users browser
db_connector:
A crate containing the types needed to interface with the database server
docker:
Files to run and build the docker containers
frontend:
Website that is served by the webserver
wg-webclient:
The Wireguard implementation containing also a network stack and Http and Websocket client.
Rust toolchain: https://www.rust-lang.org/tools/install
Node: https://nodejs.org/en
Wasm-pack: https://github.com/rustwasm/wasm-pack
docker: https://www.docker.com/get-started/
For the production build only docker is needed since everything is build in a container.
- Create a
certs
directory indocker/nginx
and place a X.509 certificate and key in pem format namedcert.pem
andkey.pem
inside. - Fill in the needed variables in the env variables. All needed variables are listed inside the .env.example files.
- build the wg-package by running
wasm-pack build
insidewg-webclient
. - build the website by running
npm install && npm run build
insideremote-access-page
. - start the webserver + database by running
docker compose -f docker-compose-dev.yml up --build
insidedocker
. - start the backend server by running
cargo run
insidebackend
.
- Ensure that the host is accessible via a Fully Qualified Domain Name, otherwise creating a Lets Encrypt Certificate will fail.
- Fill in the needed variables in the env file. All needed variables are listed inside the .env.example files.
- Start everything with
docker compose up
inside thedocker
directory.