Self-service reservation system for lending libraries. Allows customers to browse items, add them to a cart, and create pickup reservations.
This app requires leih-lokal/leihbackend as the PocketBase backend.
For managing items and reservations, use leih-lokal/llka-verwaltung.
- Frontend: Next.js 16, React 19, TypeScript
- UI: Shadcn/ui + Tailwind CSS 4
- Forms: React Hook Form + Zod
- Backend: PocketBase (external)
- Node.js 20+ and npm
- PocketBase instance with
item_publicandreservationcollections
- Clone the repository
git clone <repository-url>
cd llka-resomaker- Install dependencies
npm install- Configure environment variables
cp .env.local .env.local.backupEdit .env.local and set your PocketBase URL:
NEXT_PUBLIC_API_BASE=http://localhost:8090See CONFIG.md for all available configuration options.
- Run the development server
npm run devOpen http://localhost:3000 in your browser.
The app is fully configurable through environment variables:
| Category | Examples |
|---|---|
| Branding | Name, tagline, logo, accent color |
| Features | Search, availability toggle, item IDs, detail pages |
| Limits | Cart size, pickup days, items per page |
| Display | Currency symbol, opening hours |
See CONFIG.md for complete documentation.
Build and run with Docker:
# Using docker-compose
docker-compose up --build
# Or build with custom config
docker build \
--build-arg NEXT_PUBLIC_API_BASE=https://api.example.com \
--build-arg NEXT_PUBLIC_BRAND_NAME="My Library" \
--build-arg NEXT_PUBLIC_BRAND_ACCENT="#2563eb" \
-t reservation-app .
docker run -p 3000:3000 reservation-appNote: Configuration is baked in at build time. Rebuild to change settings.
/app
/[iid] # Item detail pages
/checkout # Checkout flow
/success # Reservation confirmation
/api/proxy # CORS proxy for PocketBase
/components
/ui # Shadcn UI components
/layout # Header, footer
/catalog # Item grid, search, pagination
/cart # Cart sheet and items
/checkout # Reservation form, pickup selector
/item # Item detail view
/lib
/api # PocketBase API client
/config # Environment configuration
/constants # Opening hours
/types # TypeScript types
/utils # Utilities (calendar export)
/validation # Zod schemas
/context
/cart-context # Shopping cart state
/config-context # Configuration provider
npm run dev- Start development servernpm run build- Build for productionnpm start- Start production servernpm run lint- Run ESLint
- Item Catalog: Browse items with search, filtering, and pagination
- Availability Filter: Toggle between available and all items
- Shopping Cart: Add/remove items, persisted to localStorage
- Pickup Scheduling: Select date and time based on opening hours
- Reservation Form: Email and optional comments
- Calendar Export: Add pickup to Google, Apple, or Outlook calendar
- Responsive Design: Works on mobile and desktop
See leih-lokal/leihbackend for the required PocketBase schema. The app uses:
item_publiccollection (read-only view of items)reservationcollection (for creating reservations)
npm run build:standaloneThis builds the app and copies the required static assets into .next/standalone/. Deploy the .next/standalone directory and start with node .next/standalone/server.js.
To serve the app under a sub-path (e.g., https://example.com/reservierung), set:
NEXT_PUBLIC_BASE_PATH=/reservierungSee Docker section above.
If running behind a reverse proxy, ensure WebSocket support for development hot reload.
[Add license information]
