/Zensroom

Primary LanguageJavaScriptMIT LicenseMIT

ZensRoom

This is an open-source AirBnB-type app built using VulcanJS and developed as prototype for Zens, a Tokyo-based company.

Install

  1. Clone this repo
  2. Follow the VulcanJS install instructions.
  3. Run with npm start (or the equivalent meteor --settings settings.json).

Local Development

By default, the app will look for VulcanJS core packages (vulcan:core, vulcan:email, vulcan:forms, etc.) on Atmosphere, Meteor's package server.

For local development, it can be useful to have access to the VulcanJS codebase locally and be able to modify it if needed. You can do so by following these steps:

  1. Clone the main VulcanJS repo locally (for example, to ~/Vulcan).
  2. Inside the main repo, checkout the devel branch.
  3. Go back to the ZensRoom directory and launch your app with:
METEOR_PACKAGE_DIRS="~/Vulcan/packages" meteor --port 3000 --settings settings.json

Note that if you'd like, you can create an alias for that command in your .bash_profile file:

alias runvulcan='METEOR_PACKAGE_DIRS="~/Vulcan/packages" meteor --port 3000 --settings settings.json'

Settings

This project expects a few specific API keys, as defined in your project's settings.json (in addition to any other generic VulcanJS settings you might already have). Here's a sample file:

{
  "public": {
    "title": "Your Site Name",
    "tagline":"Your site tagline",

    "language": "en",
    "locale": "en",

    "cloudinary": {
      "cloudName": "123foo"
    },

    "stripe": {
      "publishableKeyTest": "pk_test_123foo"
    },

    "googlemaps": {
      "apiKey": "456foo"
    }
  },

  "stripe": {
    "secretKeyTest": "sk_test_123foo"
  },
  
  "defaultEmail": "hello@foo.com",
  "mailUrl": "smtp://username%40yourdomain.mailgun.org:yourpassword123@smtp.mailgun.org:587/",

  "oAuth": {
    "twitter": {
      "consumerKey": "foo",
      "secret": "bar"
    },
    "facebook": {
      "appId": "foo",
      "secret": "bar"
    }
  }
}

Dependencies

The ZensRoom app depends on the following VulcanJS packages:

  • vulcan:core: VulcanJS core features.
  • vulcan:forms: SmartForms component.
  • vulcan:forms-upload: Image upload form component (using Cloudinary).
  • vulcan:accounts: User accounts UI (log in/sign up/reset password/etc.).
  • vulcan:payments: Payments package using Stripe.
  • vulcan:admin: Admin dashboard.
  • vulcan:maps: Maps component.

Packages in the repo not mentioned above (vulcan:posts, vulcan:comments, etc.) are not currently used by this project but might be in the future.

See also package.json for a list of NPM dependencies.

Architecture

The code for the app is available in /packages/zensroom, split into the following directories:

  • client: contains the client entry point and any client-specific code.
  • server: contains the server entry point and any server-specific code.
  • components: contains all React components.
  • containers: contains all React containers.
  • modules: contains all other JavaScript modules.

Collections (Models)

The app uses the following collections:

  • Rooms
  • Bookings
  • Reviews
  • Users