A quick showcase on how to integrate Timekit with a booking centered web app.
You can play around with a hosted version here:
https://marketplace-demo.timekit.io
As a vendor, you are able to create spaces available for bookings and add simple availability rules to them. Visitors can then book these spaces and the creator of them can confirm/decline bookings.
The booking flow uses the Booking.js widget.
It uses Firebase for auth and DB, and integrates with Timekit through the JavaScript SDK
Feel free to contribute and comment.
- Clone repo
- Create a free account and app on Firebase.io
- Copy the contents of /firebase-rules.jsoninto your Firebase app rules
- Create a new user in "Auth" that you want to login with
- In "Database", create a new entity with the following structure:
users: { your-firebase-user-uid: { timekit: { api_token: "your-timekit-api-token", email: "your-timekit-email" } } }
- Edit /src/services/Settings.jsand to match your settings
- timekit-appshould be set to your app slug registered on Timekit
- timekit-api-urlshould be the API base URL (default will do in most cases)
- firebase-urlcan be found in your Firebase dashboard
- Run npm installandnpm run devto compile and start the dev server
- Open http://localhost:8080 in your browser
- Login with a valid Timekit user
There’s a few known bugs/features like:
- Not validating forms
- Not listing spaces by distance
- Not being able to save connecting existing Timekit user to app
The web app is build using Vue.js and Webpack, through vue-cli, and it uses Firebase for data storage.