Client is the frontend of the application. It is powered by React and Blockly.
Cms is the REST API and admin portal that powers the backend. It is powered by Node and Strapi.
Compile is an arduino compiler service. It is an unofficial fork of Chromeduino.
The project is divided into three conceptual environments.
The development environment is comprised of four servers managed by docker compose.
stem-c-client-dev
- localhost:3000stem-c-cms-dev
- localhost:1337stem-c-compile-dev
- localhost:8080stem-c-db-dev
- localhost:5432
stem-c-cms-dev
, stem-c-compile-dev
, and stem-c-db-dev
- Install docker
- Run
docker-compose up
stem-c-client-dev
- Run
cd client
- Run
yarn install
- Run
yarn start
The staging environment is deployed on Heroku. It is comprised of one app running a Heroku Postgres instance and a web container.
stem-c-staging
- stem-c-staging.herokuapp.com- The web container attached to this Heroku app runs
cms
and serves staticclient
build files - The Heroku Postgres instance is attached as an add-on
- The web container attached to this Heroku app runs
stem-c-staging
is automatically built from the latest commits to develop
. Heroku runs the container orchestration from there.
The production environment is deployed on Heroku. It is comprised of two apps. One is running a Heroku Postgres instance and a web container and the other is running just a web container.
stem-c
- stem-c.herokuapp.com- The web container attached to this Heroku app runs
cms
and serves staticclient
build files - The Heroku Postgres instance is attached as an add-on
- The web container attached to this Heroku app runs
stem-c-compile
- stem-c-compile.herokuapp.com- The web container attached to this Heroku app runs
compile
- The web container attached to this Heroku app runs
stem-c
is automatically built from the latest commits to master
. Heroku runs the container orchestration from there.
stem-c-compile
is manually deployed through the Heroku CLI.
- Download Heroku CLI
- Run the following commands sequentially
heroku login
heroku git:remote -a stem-c-compile
heroku container:login
heroku container:push web
heroku container:release web
Ideally, we want our flow to resemble this. Master and develop are locked for direct commits. All commits must be made to a non-protected branch and submitted via a pull request with one approving review.
master
- Production applicationrelease/<version>
- Staged versiondevelop
- Working version of the applicationfeature/<scaffold>-<feature-name>
- Based off of develop- ex.
feature/cms-strapi
- ex.
hotfix/<scaffold>-<fix-name>
- Based off of master- ex. hotfix/client-cors
Before submitting a pull request, merge the target branch into the working branch to resolve any merge conflicts. Include a description of the changes made.