Skip to content
This repository has been archived by the owner on Jan 27, 2023. It is now read-only.

An online booking-based marketplace demo app running on the Timekit API

Notifications You must be signed in to change notification settings

timekit-io/marketplace-demo

Repository files navigation

Timekit Marketplace Demo

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

How it works

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.

Setup your own copy

  1. Clone repo
  2. Create a free account and app on Firebase.io
  • Copy the contents of /firebase-rules.json into 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"
        }
      }
    }
    
  1. Edit /src/services/Settings.js and to match your settings
  • timekit-app should be set to your app slug registered on Timekit
  • timekit-api-url should be the API base URL (default will do in most cases)
  • firebase-url can be found in your Firebase dashboard
  1. Run npm install and npm run dev to compile and start the dev server
  2. Open http://localhost:8080 in your browser
  3. Login with a valid Timekit user

Notes

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

Technical details

The web app is build using Vue.js and Webpack, through vue-cli, and it uses Firebase for data storage.