Historiesystem
Available here
There are three hive permissions:
adminprylispost
admin gives access to everything. prylis only gives access to managing patches and tags (including artefact tags 🙃). post can create events and edit their own events.
Damm uses the following systems:
Login2 - login with KTH-account Pls - to check admin priveleges of users Dfunkt - to get information about funktionärer and when they were elected (timeline) Zfinger - to fetch images of users (timeline)
- npm
- PostgreSQL
- Make changes
- Run
npx prisma migrate dev --name <name_of_migration> - Commit and push
When running locally you can mock login with nyckeln under dörrmattan and use an own AWS account to get an s3 bucket, in which case you should look at bucket configuration. There is also a bucket called dsekt-damm-dev that you may get access to from d-sys.
See server/common/configuration.ts
| Name | Default | Description |
|---|---|---|
| DATABASE_URL | - | Schema: postgresql://USER:PASSWORD@HOST:PORT/DB_NAME |
| PORT | 8080 | Server port |
| NODE_ENV | production | |
| AWS_REGION | eu-north-1 | |
| AWS_S3_BUCKET | dsekt-damm-dev | NEVER!!!!!!!!!!! use dsekt-damm-prod locally |
| AWS_ACCESS_KEY_ID | - | |
| AWS_SECRET_ACCESS_KEY | - | |
| LOGIN_API_URL | https://login.datasektionen.se | URL to login |
| LOGIN_API_KEY | - | Login key |
| HIVE_API_URL | https://hive.datasektionen.se/api/v1 | URL to hive api |
| HIVE_API_KEY | API key to check permissions in hive |
See server/client/src/common/configuration.ts
| Name | Default | Description |
|---|---|---|
| REACT_APP_API_ENDPOINT | http://localhost:8080 in development, https://damm.datasektionen.se in production |
Used to fetch the API |
| HOST | localhost in development |
|
| NODE_OPTIONS | --openssl-legacy-provider | Make webpack work on non-ancient node |
- Set up environment variables
- Run
npm installin root. Will install dependencies in both server and client. - Run
npx prisma migrate resetin server/ (yes, npx, not npm) - Run
npm run dev:serverin project root - In another terminal, run
npm run dev:clientin project root
Server and client will hot reload when changes occurs
Lint with npm run lint and fix (if possible) with npm run lint:fix. Make sure to lint before commiting (the CI will lint, but it won't fix any errors for you).