This is an open source project management platform for distributed manufacturing, processing, and toolshops within an organization. It was specifically designed for the Saint Louis University Center for Additive Manufacturing, but can be adapted for other organizations.
See the Development documentation for more information and conventions on using and developing this codebase.
1. Install node.js
2. Install Postgres (or have access to a connection string) and start local server
npm install --global yarngit clone https://github.com/oss-slu/core_desk.gitDATABASE_URL="postgresql://USER:PASSWORD@localhost:5432/YOUR_DATABASE_NAME" (start a local postgres server and put that here)
JWT_SECRET=(random string)
BASE_URL=http://localhost:5173
SERVER_URL=(a globally accessible url, e.g. a tunnel. Ngrok, Bore, and Cloudflare Tunnels are good software options)
SENTRY_AUTH_TOKEN=(Sentry.io auth token)
AWS_REGION=nyc3
AWS_BUCKET=open-project
AWS_ENDPOINT=https://nyc3.digitaloceanspaces.com
PROJECT_NAME=dev-(your first name)
AWS_ACCESS_KEY_ID=(get api key from tech lead or provide your own)
AWS_SECRET_ACCESS_KEY=(get api key from tech lead or provide your own)
cd open-project
yarncd app
yarn && yarn buildcd api
yarncd api
yarn devcd app
yarn start10. To authenticate/log in, we typically use the SLU OKTA log in system, but that is a pain to connect in your local environment, so we have a workaround utility
In the /api folder, run
yarn oktaIf this is your first time logging in, allow it to create a new user for you. Once finished, it will give you a line of javascript. Copy/paste that into the browser's console, and that will log you in without having to go through the typical auth flow.
Install Prisma Client
yarn add @prisma/client
yarn add -D prismaGenerate Prisma Client
yarn prisma generateApply migrations
yarn prisma migrate devRun the following in your terminal (Command Prompt for Windows) to open the database
yarn prisma studioTo run the tests, docker and docker-compose are required.
Install Docker for Windows or Docker for Mac
-
Start Docker Desktop Open Docker Desktop and wait for the app to start completely.
-
Start database from ./api folder (Only run if on Windows computer using Command Prompt. This step is not necessary if on Mac.)
cd api
docker-compose up -d- Run the tests from ./api folder
Mac:
cd api
yarn testWindows:
yarn test- To clean up
docker-compose down -vNotes:
- Requires Docker and Docker Compose. The compose stack brings up Postgres, MinIO (S3), the API (serving the app), and a Cypress runner.
- Artifacts (videos/screenshots) are saved under
e2e/cypress/. - On Windows, run the following commands with Git Bash or WSL through VS Code.
On Windows from Git Bash in VS Code, you need to convert the /api-entrypoint.sh file to Unix line endings:
cd e2e/docker
dos2unix api-entrypoint.shIf you are not using VS Code, be sure to have dos2unix installed.
Quick, isolated runs use Docker (recommended) from the root folder:
- Run once:
npm run test:e2e - Watch mode:
npm run test:e2e:watch - Clean up:
npm run down:e2e
Local development runner (without Docker):
- Install
concurrentlyif not already installed withnpm i -D concurrently- Documentation - Start the stack in one terminal:
npm run dev:stack - In another terminal, open Cypress:
npm --workspace e2e run cy:open - Headless run locally:
npm --workspace e2e run cy:run
Tip: The Cypress base URL defaults to http://localhost:5173 but can be overridden via BASE_URL.