Code Monkey home page Code Monkey logo

peachhub-provider's Introduction

peachhub-provider

travis

a hosted Scuttlebutt pub-as-a-service provider

DEMO ๐Ÿ‘€

table of contents

start

before you start, please

git clone [email protected]:peachcloud/peachhub-provider
cd peachhub-provider
npm install
npm run sql migrate:latest
npm run sql seed:run
npm run dev

design

ux

  • join
    • land
    • sign in
    • create pub
    • pay for pub
    • start pub service
  • monitor
    • land
    • sign in
    • view pub
    • see stats
  • command
    • land
    • sign in
    • view pub
    • run command

data models

  • users
    • id
    • name
    • email
  • pub
    • bots
      • id
      • userId
      • name
      • status (up, down, none)
    • stats
      • stream Docker stats
    • commands
      • relay commands to pub services
    • orchestrator
      • on schedule, check what pubs are up
      • have 1 pub per 1 GB memory, 1 hub per 15 GB memory
      • queue worker jobs to ensure correct swarm
  • payment
    • products
    • plans
    • customers
    • subscriptions

architecture

  • web server
  • swarm worker
    • manage hub machines
      • create hub
      • destroy hub
    • manage pub services
      • ensure pub service is up
      • ensure pub service is down
  • mailer worker
  • pub service(s)

stack

folder structure

we're following the dogstack folder structure convention, adapted for our stack.

available scripts

npm start

starts production server

npm start

npm run dev

starts development server

npm run dev

TODO npm test

runs ava tests

Can optionally take a glob

npm test -- './todos/**/*.test.js'

Default glob is ./**/*.test.js ignoring node_modules

npm run lint

checks for standard style

can optionally take a glob

npm run lint -- './todos/**/*.js'

default glob is ./**/*.js ignoring node_modules

npm run sql

runs knex command, with any arguments.

npm run sql migrate:latest
npm run sql seed:run

notes

After deploy: migrate on heroku!

heroku login
heroku run npm run sql migrate:latest --app=peachcloud-demo

Postgres DEV setup

use a ~/.pgpass file to automate your passwords!

echo "localhost:5432:*:postgres:password" > ~/.pgpass
chmod 600 ~/.pgpass

create your database with:

createdb peachhub_provider_development -h localhost -U postgres

drop your database with:

dropdb peachhub_provider_development -h localhost -U postgres

connect to your database with:

psql -h localhost -U postgres -d peachhub_provider_development

background image

https://pixabay.com/en/love-heart-set-seamless-pattern-3102033/

  • search terms
    • seamless
    • tile
    • repeating
    • geometric
    • abstract
    • mosaic
  • open source friendly websites
    • pixabay.com

emoji

increase file watch

if you get an ENOSPC error related to watching files in development:

echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

source

css selector chart

https://www.red-gate.com/simple-talk/wp-content/uploads/imported/1269-Locators_table_1_0_2.pdf?file=4937

The css selectors that look like :contains("text") dont work, i googled it, apparently that kind of selector is a jquery thing ๐Ÿคท

license

AGPL-3.0

attributions

peachhub-provider's People

Contributors

ahdinosaur avatar austinfrey avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.