From 4ac521280a6a5bc7b32766bc3b49ad8c98008584 Mon Sep 17 00:00:00 2001 From: Pedan Date: Mon, 28 Jul 2025 20:23:02 +0200 Subject: [PATCH] Updated README --- README.md | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 69 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e65e635..47828bb 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,70 @@ -# freemoto +# FreeMoto Web +A web-based motorcycle route planner built with Go, Leaflet, Bootstrap, and Valhalla routing, ready for containerized deployment. + +## Features + +- Interactive map with OpenStreetMap tiles +- Route planning with options (avoid highways, tolls, ferries, unpaved, shortest route) +- Docker-ready and configurable via `.env` + +## Getting Started + +### Prerequisites + +- [Go](https://golang.org/) (1.22+ recommended) +- [Docker](https://www.docker.com/) (for container builds) +- [Valhalla](https://github.com/valhalla/valhalla) routing backend +- [Gitea](https://gitea.io/) (optional, for CI/CD and registry) + +### Configuration + +Create a `.env` file in the project root: + +``` +VALHALLA_URL=http://valhalla:8002/route +PORT=8080 +``` + +### Local Development + +```bash +cd app/web +go run main.go +``` + +Visit [http://localhost:8080](http://localhost:8080) in your browser. + +### Docker + +Build and run the container: + +```bash +docker build -t freemoto-web . +docker run --env-file .env -p 8080:8080 freemoto-web +``` + +### Docker Compose + +Example `docker-compose.yml`: + +```yaml +services: + freemoto-web: + build: . + ports: + - "8080:8080" + env_file: + - .env +``` + +## Customization + +- **Map UI:** Edit `static/index.html` and `static/main.js` +- **Routing logic:** Edit `static/route.js` +- **Geolocation/autocomplete:** Edit `static/geolocate.js` +- **Backend proxy:** Edit `main.go` + +## License + +MIT \ No newline at end of file