Activist Database Project
The following dependencies are required to run this project and will be already installed if using the devcontainer:
- go
- node.js v16
- docker
Running this command is required to download all the go and node dependencies:
make deps
If you are not using the devcontainer, you can use our Docker Compose configuration to run MySQL locally:
( cd server/ && docker compose up -d )
make dev_db
If you are using the devcontainer, just run this command in the container:
make dev_db
This command will log you into the database if you run the comman in the same container as the database:
mysql -u adb_user -padbpassword -h 127.0.0.1
(Note the syntax of the above command is to accept the password after -p
without a space.)
After downloading the dependencies, start the server:
make run_all
Access the web app at http://localhost:8080.
Please run make fmt
and make test
before sending a pull request.
This project uses webpack to compile our frontend files. Frontend
files that need to be compiled are in frontend/
, and the compiled
outputs are in frontend/dist/
.
-
package.json: file with all frontend dependencies
-
webpack.config.js: configuration file for webpack, which builds the js
-
make watch
: watch the frontend folder for changes and automatically build the file if anything changes.
The most convenient workflow is to run make watch
in one terminal
and make run
in another one. Then your JS changes will automatically
be built as you edit them.
- ADB_URL_PATH: For example, "http://adb.domain.com"
- PORT: The port to run the webserver on
- MEMBERS_PORT: Port to run the Members webserver on
- DB_USER
- DB_PASSWORD
- DB_NAME
- DB_PROTOCOL: For example, "tcp([host]:[port])"
- PROD: [true or false]
- RUN_BACKGROUND_JOBS: [true or false] should only be true on at most one instance if load balancing
- COOKIE_SECRET: [a random string]
- CSRF_AUTH_KEY: [a random string]
For signing people up to DxE's main mailing list & chapter-specific mailing lists (please reach out to [email protected] to get an API key to sign people up)
- SIGNUP_ENDPOINT
- SIGNUP_KEY
- SYNC_MAILING_LISTS_CONFIG_FILE: relative path to client_secrets.json if syncing with google groups
- SYNC_MAILING_LISTS_OAUTH_SUBJECT: google account to use to sync
- SMTP_HOST
- SMTP_PORT
- SMTP_USER
- SMTP_PASSWORD
- SURVEY_FROM_EMAIL
- SURVEY_MISSING_EMAIL: Email to send survey errors to
- MEMBERS_CLIENT_ID
- MEMBERS_CLIENT_SECRET
ipgeolocation.io key for finding nearby upcoming events based on a user's IP address (used w/ public-facing API):
- IPGEOLOCATION_KEY
- DISCORD_SECRET
- DISCORD_BOT_BASE_URL
- DISCORD_FROM_EMAIL
- DISCORD_MODERATOR_EMAIL
- GOOGLE_PLACES_API_KEY