Skip to content
Ben edited this page Jul 9, 2019 · 1 revision

App Store Wiki

This wiki contains additional development information and links to projects, apps and sites using @userappstore/app-store-application-server.

Introduction

The app store software is a website where front-end and full-stack developers may create and share web apps. Developers may use a Stripe Connect registration to publish their web applications for users to install with free or paid subscriptions. Users may install and import web apps for personal or shared use.

App store accounts, organizations, subscriptions and Connect integration are powered by Dashboard. The app store software includes a dashboard server, together they provide a single website.

Technical details

The app store software is written in NodeJS and uses local file system, PostgreSQL, Redis, or Amazon S3 for data storage.

Set up the dashboard server

After installing NodeJS (8.12.0+) you can start your own app store by creating a new NodeJS project and importing the software.

$ mkdir project-dashboard-server
$ cd project-dashboard-server
$ npm init
$ npm install @userappstore/app-store-dashboard-server
$ echo "require('@userappstore/app-store-dashboard-server').start(__dirname)" > main.js
$ NODE_ENV="development" \
  APPID="project" \
  APPLICATION_SERVER="http://localhost:8001" \
  APPLICATION_SERVER_TOKEN="shared secret" \
  DASHBOARD_SERVER="http://localhost:8000" \
  DASHBOARD_SESSION_KEY="a secret" \
  DOMAIN="localhost" \
  STRIPE_JS="3" \
  STRIPE_KEY="sk_test_" \
  STRIPE_PUBLISHABLE_KEY="pk_test_" \
  CONNECT_ENDPOINT_SECRET="whsec_" \
  SUBSCRIPTIONS_ENDPOINT_SECRET1="whsec_" \
  SUBSCRIPTIONS_ENDPOINT_SECRET2="whsec_" \
  node main.js

Set up the application server

$ mkdir project-application-server
$ cd project-application-server
$ npm init
$ npm install @userappstore/app-store-application-server
$ echo "require('@userappstore/app-store-application-server').start(__dirname)" > main.js
$ NODE_ENV=development \
  APPLICATION_SERVER="http://localhost:8001" \
  PORT=8001 \
  APPLICATION_SERVER_TOKEN="shared secret" \
  DASHBOARD_SERVER="http://localhost:8000" \
  STRIPE_PUBLISHABLE_KEY="pk_test_" \
  DOMAIN="localhost" \
  node main.js

Your app store software will now be running at http://localhost:8000 and if you open that URL in your web browser you can register, sign in to, administrate.