Skip to content

Aggregated Public Information

Note: This page is mirrored from the aggregated-public-information README. Please make edits there.

This project uses Strapi as a CMS backend. For most information about contributing to DA (e.g. our dev process and asking for help), please refer to the general DA contributing guide.

Terminal window
git clone git@github.com:distributeaid/aggregated-public-information.git
cd aggregated-public-information

Node.js 18.17 or later is required.

Node Version Manager (nvm) is used to manage Node.js versions:

To build dependencies, you should also have yarn installed on your system. If it is not yet installed, you can run:

Terminal window
npm install --global corepack
corepack enable
hash -r

Once you have a development environment, you can set up your local site!

Terminal window
./setup.bash
Terminal window
yarn install

In one terminal, run develop, this will live rebuild your application as you make changes:

Terminal window
yarn develop

If you want auto-reload disabled, you can just run build and then start:

Terminal window
yarn build
yarn start
Terminal window
yarn test

Note: This depends on your application being built! If you don’t run yarn develop then you must run yarn build after each change before running yarn test. We have provided yarn test:without-build as a convenience in this case.

If you are running locally, your site should be available in the output after you run yarn develop - you will see something like:

One more thing...
Create your first administrator by going to the administration panel at:
┌─────────────────────────────┐
│ http://localhost:1337/admin │
└─────────────────────────────┘

If you run into trouble, please check out:

Terminal window
npx strapi console
await strapi.query('admin::user').findMany()

Before creating a pull request, test a final time and check for errors:

Terminal window
yarn check:all

We provide a couple of scripts to automatically fix linting and formatting issues, where possible:

Terminal window
yarn lint:fix
yarn format:fix

We use Bruno to create and run API tests. See the Bruno test docs for setup and usage instructions.

  • Populate relations – Learn how to populate nested and relational data in Strapi API responses.

If you run into any issues, reach out to the team on the #tech channel on Slack!