Web application to manage Leihladen, also known as Borrow Stores.
Important
This software is still in active development. It is being used in production for the Leihbar in Cologne, but might be lacking some (for you) critical features.
- 🏪 A webshop front-end showing borrowable products
- 🏙️ Manage multiple borrow locations
- 🏷️ Product category filtering
- 🧑🤝🧑 User sign-up/login
- 🎫 Product reservations
- 👷 A back-end to manage reservations
- Back-end and API using PocketBase
- Front-end with server-side rendering using NuxtJS
The repository contains fly.toml files to deploy the service as fly.io applications, but can be deployed to any server where Docker containers can run.
Requirements: Docker
$ docker compose build
$ docker compose up
After starting the service using the setup steps above. Enter some initial data to be able to use the application:
- Browse to http://localhost:8080/\_/ to visit the Pocketbase admin interface
- Create an admin account
- Create a location in the locations collection (make sure to set the location to as 'active')
- Create a product in the products collection (make sure to set the product to as 'active')
- Now you should be able to visit http://localhost:3000 to visit the front-end
When starting the service with docker-compose, a mailhog container starts as well. In Pocketbase (http://localhost:8080/\_/ > Settings > Mail settings) the following SMTP values can be configured:
- SMTP server host: mailhog
- Port: 1025
- Username: <empty>
- Password: <empty>
Any sent e-mail can then be viewed in the mailhog web interface at http://localhost:8025.
Tests are configured and run using Playwright.
$ cd tests
$ pnpm install
pnpm exec playwright install
pnpm run test
Using the following JSON format the e-mail addresses which should receives notifications of this location can be configured:
[
"[email protected]",
"[email protected]"
]
Using the following JSON format the opening hours of a location can be configured:
{
"days": {
"tuesday": [
{
"from": "18:00",
"to": "19:00"
},
],
"friday": [
{
"from": "17:00",
"to": "19:00"
}
],
},
"except": {
"dates": ["25-12-2024", "26-12-2024", "31-12-2024", "01-01-2025"]
}
}
In the config JSON field of a location are the following configurations available:
config.allow_same_day_reservations
- Allows a reservation to start on the same
day as that another reservation ends