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

Hacking on AppCenter Dashboard

Cassidy James Blaede edited this page Oct 9, 2017 · 1 revision

We'd love your help hacking on AppCenter Dashboard (codenamed "houston")! Getting a local development environment set up is easy, and we've prepared a short guide to walk you through step-by-step. Just follow along below, and if you have any issues, don't hesitate to ask for help.

Requirements

Firstly, you will need node.

Depending on your distribution of choice, you might need to download and compile node from the website. Keep in mind that Houston requires node version 5.0.0 or above.

Second, you will need mongodb as a database, and libssl as a dependency.

sudo apt-get install mongodb libssl-dev

And lastly you will need aptly for repo management.

Please direct your attention to the Aptly download page for details on installing and running.

Configuration

Houston

  1. You'll need to set up Houston's config file, config.js. Copy the config file template:

cp config.example.js config.js

  1. Then, create a GitHub OAuth application for testing AppCenter Dashboard: https://github.com/settings/applications/new.

Name the application something like "Houston Local", and set the homepage and callback URLs to your local machine, like this:

Homepage URL: http://localhost:3000

Authorization callback URL: http://localhost:3000/auth/github/callback

It should look something like this:

Screenshot

  1. Click 'Register application', and then copy and paste the newly created application's Client ID into config.js under github.clientID and copy the Client Secret under github.secret.

    Screenshot

    Your config.js should now include a section that looks something like this:

// https://github.com/settings/developers
export const github = {
  client: '1e9ec151a7728abaa304',
  secret: '9ccde02a1633b27232ee07662b7a688c43018b1f',

  // Post data to GitHub?
  post: false,

  // Enable GitHub hooks?
  hook: false
}

Aptly

The repository schema for AppCenter Dashbaord, while flexible, does make assumptions on your setup. First, you will need two repositories. By default they should be named 'review' and 'houston'.

On release of a new project, AppCenter Dashboard will automatically update your published repository with a newly created snapshot. This means that your stable repo will never be directly published, but instead, an easily manageable snapshot will. As such, you will need a blank snapshot for both repositories. After that you will want to publish the blank snapshots as a placeholder.

tl;dr: Run these commands on a local instance of Aptly after you get it setup and you should have be all setup for AppCenter Dashboard.

sudo aptly repo create review
sudo aptly repo create houston
sudo aptly snapshot create review empty
sudo aptly snapshot create houston empty
sudo aptly publish snapshot -architectures=amd64,armhf -distribution=xenial review
sudo aptly publish snapshot -architectures=amd64,armhf -distribution=xenial houston

Running

After configuration, running AppCenter Dashboard is straightforward, just run:

  1. npm install to fetch needed dependencies
  2. npm run build to build Houston
  3. npm run houston to start all the processes.

Accessing

Open up a browser and visit http://localhost:3000, and you should see the AppCenter Dashboard website. Congratulations!