This repository holds most of the code for Raise.
Think any documentation is out of date, incomplete, misleading or otherwise could be improved? Open a pull request or get in touch with the national team's tech person.
Target audience: Raise volunteers who want to make small website content changes.
See the Editing your chapter's website doc.
Target audience: Raise volunteers and open-source contributors who have some coding experience, and want to make changes to any part of Raise.
These docs apply to everything across the repository. For more specific docs, see the README files inside the relevant folder.
You only need to do this once.
npm install
in the rootAWS_ACCESS_KEY_ID=AKIA... AWS_SECRET_ACCESS_KEY=... npm run config:aws --workspace @raise/server
Summary: start everything with npx turbo start
, and test with npx turbo test
Command | What it does |
---|---|
npm install |
Install and update dependencies |
npx turbo start |
Starts local server |
npx turbo test |
Run unit tests |
npx turbo test:watch |
Run unit tests in watch mode |
npx turbo lint |
Find lint issues |
npx turbo lint:fix |
Auto-fix lint issues |
npx turbo build |
Build and type-check. Output goes into dist . |
npx turbo deploy:dev |
Deploy to dev environment |
npx turbo deploy:prod |
Deploy to prod environment |
All commands are run from the root of the repository. Any of the turbo commands can be filtered with --filter <app>
, for example to start just web
run npx turbo start --filter web
These scripts are defined in the relevant package.json
files. We keep these scripts as simple to use as possible, so developers need to run very few commands. We also keep these scripts consistent so that they behave as expected across the repo, and we need less config overrides.
All packages should have their main content in a src
folder, and output built files to dist
.
To install external packages (choosing the appropriate workspace, and with the argument --save-dev
for dev dependencies):
npm install some-package-name --workspace @raise/server
And to uninstall:
npm uninstall some-package-name --workspace @raise/server
web
:
8000
: the websiteserver
:
8001
: the API8002
: serverless-offline websockets8003
: serverless-offline AWS Lambda API8004
: serverless-dynamodb instance of DynamoDB for serverless-offline8005
: serverless-dynamodb instance of DynamoDB for tests8006
: serverless-offline-ses-v2 instance of sesWe follow the GitHub flow model (aka: feature branches and pull/merge requests).
Try to make small, independent changes to make reviewing easy and minimize merge conflicts. Follow existing conventions and leave comments explaining why the code you've written exists/exists in the way it does.
To learn more about using Git, see the VS Code source control documentation or read the free Git book.
git checkout master && git pull
). Make sure you've also updated dependencies by running npm install
.git checkout -b my-new-feature
)npm test
to run them.