calcspace.com is a web application that lets you build multi-line calculations and instantly see the results. It supports units of measurement, so it's great for physics and engineering. Sharing mechanism makes it easy to collaborate with other people.
This repository contains both backend and frontend code.
Backend code sits in the /server
directory and frontend code in the /client
directory.
Here is a list of a few of the most important technologies used on this project:
- JavaScript (technically TypeScript but with a very forgiving configuration)
- ReactJS
- ExpressJS
- PostgreSQL + node-postgres
NodeJS version that is currently used in the project can be found in the .nvmrc
file. It should match the version specified in server/package.json > engines.node
(for Heroku) and in both Dockerfiles.
yarn run install:all
Start app by running:
docker-compose up -d
Stop app:
docker-compose down
Rebuild docker images:
docker-compose up -d --build --force-recreate --remove-orphans
See logs:
docker-compose logs -f
Database migrations are run on every start of the NodeJS server. They are specified in the setupDatabase.ts
file.
Calcspace uses a custom math parser. For more details check parseExpression docs and parsing analyzer tool on calcspace.com/analyzer.