Skip to content

Latest commit

 

History

History
82 lines (68 loc) · 3.77 KB

00-set-up.md

File metadata and controls

82 lines (68 loc) · 3.77 KB

Set up

Follow the instructions below to install, build, and run the Project Hoverboard locally in less than 15 minutes.

Or you may use Docker container for development

Install the Hoverboard and dependencies

  1. Fork repository and clone your fork locally
  2. Install Node.js (v10+)
  3. Install project dependencies: npm install or yarn
  4. Create Firebase account and login into Firebase CLI: npx firebase login
  5. Update Hoverboard config and Resources. More info can be found here
  6. Import initial data to the Firebase Database
    • Generate serviceAccount.json file
      • Go to console.firebase.google.com -> Project settings -> Service accounts
      • Ensure that Node.js is selected and press Generate new private key
      • Read the warning and press Generate key
      • Save the file as serviceAccount.json and to the root of your hoverboard directory (❗Do NOT commit this file to the public repository)
    • Enable Firestore in web console at console.firebase.google.com -> Database -> Cloud Firestore -> Create database. Select locked mode and press Enable
    • [Optional] You can edit docs/default-firebase-data.json) file using your own data
    • Run npm run firestore:init or yarn firestore:init

Directory structure

The diagram below is a brief summary of the directories within the project.

/
|---.temp/
|---appengine/
|---bower_components/
|---build/
|---config/
|---data/
|---docs/
|---functions/
|---gulp-tasks/
|---images/
|---internals/
|---node_modules/
|---scripts/
|---src/
|   |---effects/
|   |---elements/
|   |---mixins/
|   |---pages/
|
  • .temp/ temporary folder used save files after populating templates with data, before polymer build takes over them.
  • appengine/ contains App Engine application that runs CRON job to send scheduled push notifications.
  • bower_components/ is the place for project dependencies.
  • build/ is the directory to deploy to production.
  • config/ folder for core project setup.
  • data/ folder with all data for the template including rest of config and resources for pages.
  • docs/ documentation.
  • functions/ directory with Firebase cloud functions used for notifications, optimizations, saving data, etc.
  • gulp-tasks/ contains gulp tasks moved from gulpfile.js to make the file cleaner.
  • images/ is for static images.
  • internals/ contains scripts that helps user to work with the project and it's data (docs).
  • node_modules/ is the place of Node dependencies.
  • scripts/ is the place for JS scripts.
  • src/ is where you store all of your source code and do all of your development.
  • effects/ is where you keep your effects for instance transparent-scroll.html that helps to achieve transparent toolbar before the scroll.
  • elements/ is where you keep your custom elements.
  • pages/ is where you keep your pages' description.

Build and serve

  1. Run locally
    • npm start or yarn start
  2. Deploy
    • npm run deploy or yarn deploy

NOTE: By default command using configurations from /configs/development.json. To serve locally or deploy the production app use yarn start:prod and yarn deploy:prod respectively.

Next steps

Now that your Hoverboard is up and running, learn how to configure the app for your needs, or how to deploy the app to the web.