Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/egguy/pubcrawl-optimizer
Optimizing pub crwal
https://github.com/egguy/pubcrawl-optimizer
docker drizzle leaflet learning openstreetmap routing svelte sveltekit
Last synced: 27 days ago
JSON representation
Optimizing pub crwal
- Host: GitHub
- URL: https://github.com/egguy/pubcrawl-optimizer
- Owner: egguy
- Created: 2024-10-10T15:51:46.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-11-28T04:38:22.000Z (28 days ago)
- Last Synced: 2024-11-28T05:25:10.744Z (28 days ago)
- Topics: docker, drizzle, leaflet, learning, openstreetmap, routing, svelte, sveltekit
- Language: Svelte
- Homepage:
- Size: 650 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Pub Crawl Optimizer
A proof of concept for a pub crawl optimizer. The user can input a list of pubs and the app will calculate the shortest path between all of them.
## Features
- Interactive map interface for visualizing routes
- Separate departure and arrival points configuration
- Optimal route calculation between multiple pubs
- Distance and estimated travel time calculation## Tech stack
- SvelteKit - Full-stack web application framework
- TailwindCSS - Utility-first CSS framework
- Leaflet - Interactive map visualization
- OSRM - High-performance routing engine
- Vroom - Vehicle routing optimization
- SQLite + Drizzle - Lightweight database with type-safe ORM## Configuration
The app is configured using environment variables. The following variables are available:
### Required Environment Variables
- `ORS_TOKEN`: OpenRouteService API token (Required)
- Obtain from: [OpenRouteService signup](https://openrouteservice.org/dev/#/signup)
- Format: String### Optional Environment Variables
- `DATABASE_URL`: SQLite database URL
- Default: `:memory:`
- Example: `file:./database.sqlite`### Example .env file
```env
DATABASE_URL=file:./database.sqlite
ORS_TOKEN=your_token_here
```## Developing
Once you've created a project and installed 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
npm run dev -- --open
```## Building
To create a production version of your app:
```bash
npm run build
```You can preview the production build with `npm run preview`.
> To deploy your app, you may need to install an
> [adapter](https://kit.svelte.dev/docs/adapters) for your target environment.### Building and running the project
#### Node.js
```bash
npm run build
node build
```#### Docker
You can use docker to build the project as well. The following command will build the project and run it in a container.
```bash
docker build -t pub-crawl-optimizer .
# Run the container and delete it when it stops
docker run --it -v ./local.db --env-file=.env.local -p 3000:3000 pub-crawl-optimizer
```