HackGT / bolt

HexLabs' next generation hardware checkout system 🤖
https://hardware.hexlabs.org
MIT License
2 stars 0 forks source link
frontend hackathon hackgt hardware hardware-checkout node postgresql prisma react typescript

bolt

Simple and efficient hardware checkout system

Server setup

Required items:

Client setup

Note: the hardware desk page (/admin/desk) relies on a WebSocket connection to the server. The client assumes that you are running the server on port 3000. If this isn't right, then you'll need to update the port in

  1. The proxy property in the client's package.json file
  2. The local development WebSocket URL in client/index.tsx
  3. baseUrl in client/src/components/admin/AdminOverviewContainer.tsx

to use the correct server port. Make sure you don't commit the files with the changed port!

Required environment variables

Backend

Variable Description
secrets.adminKey Random string of letters and numbers
secrets.session Random string of letters and numbers used to secure sessions
secrets.groundTruth.url URL to Ground Truth authentication service
secrets.groundTruth.id Client ID provided by Ground Truth
secrets.groundTruth.secret Client secret provided by Ground Truth
secrets.admins.domains Email domains that will result in a user being automatically made an admin
secrets.admins.emails Email address that will result in a user being automatically made an admin
secrets.server.postgresURL URL to connect to the postgresql database. If you need to supply database connection credentials, this is the place to do it.
secrets.server.isProduction Boolean indicating whether to run the server in production mode.
secrets.server.defaultTimezone Default server timezone

Frontend

In /client, .env contains defaults for required variables. Create .env.local to override these environment variables, or define them as temporary environment variables in your shell.

Variable Description
REACT_APP_ENABLE_BUGSNAG "true" or "false" whether to enable the Bugsnag integration. Keep disabled for local development unless testing Bugsnag-specific features
REACT_APP_BUGSNAG_API_KEY Required if REACT_APP_ENABLE_BUGSNAG is enabled. Value should be the Notifier API Key for the Bugsnag project

Development

Code Style

Code style is enforced by eslint, prettier, and stylelint via config.