Computation and Science Modeling through Making
Cloud-based programming interface
- Docker and Docker Compose installed
- Current working setup of
casmm-db-dev
- Pull the Latest PostgreSQL Image
Update the PostgreSQL image to the latest or desired version.
bash docker pull postgres:[tag]
casmm-db-dev:
image: postgres:[tag]
Replace [tag] with the specific version you wish to use.
-
Re-run Docker Compose Apply the changes by running:
docker-compose up -d
This will recreate the casmm-db-dev container with the updated PostgreSQL image. -
Verify Database Initialization Ensure that the init_db.sh script runs correctly with the new database container to seed the database as needed.
ALWAYS REMEMBER TO BACKUP BEFORE UPDATING.
More info can be found in the README in the scripts directory
- Revamped user interface for improved user experience.
- Optimized for better navigation and accessibility.
- Overhauled layout for easier program exploration.
- Streamlined design for enhanced user interaction
- New feature for easy program sharing among students.
- Facilitates collaborative learning and engagement.
- Centralized access to essential materials and announcements.
- Improved information dissemination and student engagement.
- Stregthened sign-in and sign-up verification for security.
- Enhanced authentication mechanisms for parents.
- https://docs.strapi.io/dev-docs/quick-start
- https://drive.google.com/file/d/1K007KsVYyB-ifSdOJ0q04jBgAbkL0ksB/view
- https://stackoverflow.com/
- https://react.dev/learn
- https://www.docker.com/101-tutorial/
client is the frontend of the application. It is powered by React and Blockly.
server is the web server and application server. 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 composed of five servers. The first one is run with the Create React App dev server. The later four are containerized with docker and run with docker compose.
-
casmm-client-dev
- localhost:3000 -
casmm-server-dev
- localhost:1337/admin -
casmm-compile-dev
-
casmm-db-dev
- localhost:5432The first time the db is started, the init_db.sh script will run and seed the database with an environment specific dump. Read about Postgres initialization scripts here. To see how to create this dump, look here.
-
casmm-compile_queue-dev
casmm-client-dev
- Follow the client setup
- Run
yarn start
from/client
casmm-server-dev
, casmm-compile-dev
, casmm-db-dev
, and casmm-compile_queue-dev
-
Install docker
-
Run
docker compose up
from/
Grant permission to the scripts and server directories if you are prompted
The staging environment is a Heroku app. It is composed of a web dyno, compile dyno, Heroku Postgres add-on, and Heroku Redis add-on.
casmm-staging
- casmm-staging.herokuapp.com- The web dyno runs
server
- The compile dyno runs
compile
- The web dyno runs
casmm-staging
is automatically built from the latest commits to branches matching release/v[0-9].[0-9]
. Heroku runs the container orchestration from there.
The production environment is a Heroku app. It is composed of a web dyno, compile dyno, Heroku Postgres add-on, and Heroku Redis add-on.
casmm
- www.casmm.org- The web dyno runs
server
- The compile dyno runs
compile
- The web dyno runs
casmm
is automatically built from the latest commits to master
. Heroku runs the container orchestration from there.
All three components of the application have their own dependencies managed in their respective package.json
files. Run npm outdated
in each folder to see what packages have new releases. Before updating a package (especially new major versions), ensure that there are no breaking changes. Avoid updating all of the packages at once by running npm update
because it could lead to breaking changes.
This is by far the largest and most important dependency we have. Staying up to date with its releases is important for bug/security fixes and new features. When it comes to actually upgrading Strapi make sure to follow the migration guides!
All of the deployments and releases are handled automatically with GitHub Actions. The workflows implement custom Actions that live in the auto repo.
We will follow this git flow for the most part — instead of individual release branches, we will have one to streamline staging deployment
Locked for direct commits — all commits must be made from a non-protected branch and submitted via a pull request with one approving review
- master - Production application
Commits can be made directly to the branch
- release - Staging application
- develop - Working version of the application
- feature/<
scaffold
>-<feature-name
> - Based off of develop- ex. feature/cms-strapi
- hotfix/<
scaffold
>-<fix-name
> - Based off of master- ex. hotfix/client-cors
Before submitting a pull request, rebase the feature branch into the target branch to resolve any merge conflicts.
- PRs to master should squash and merge
- PRs to all other branches should create a merge commit