A web-based tool for community network measurement coordination.
- Install Node.js and the npm package manager: https://docs.npmjs.com/downloading-and-installing-node-js-and-npm.
- From within the project directory, run
npm install. - Install Docker Desktop (or Docker and Docker Compose).
- Start a local Supabase instance with
npx supabase start. (You can stop it later withnpx supabase stop.) - Create a
.env.localfile using the API URL and anon key printed when starting Supabase and the Mapbox token:NEXT_PUBLIC_SUPABASE_URL=<api URL> # printed when starting supabase NEXT_PUBLIC_SUPABASE_ANON_KEY=<anon key> # printed when starting supabase NEXT_PUBLIC_MAPBOX_TOKEN=<mapbox token> # get from Mapbox ADMIN_ID=266b242a-8a65-458d-817a-6b00868ab275 # user id of the admin user in the seeded data - Run
npm run devto start the local development server; make sure it loads at http://localhost:3000.
In production, the coordination tool runs as a Docker container, built with the included Dockerfile.
To build a production image locally, run the build.sh script. It expects that all of the variables set in the .env.local file above be set as well. The easiest way to set them is by creating a .env.prod.local file with the correct values and then running ./build.sh --env .env.prod.local.
The following steps describe how to create a new user for the production deployment of the coordination tool.
- Go to the Supabase Authentication page at https://supabase.com/dashboard/project/xscyklpyjgkwjzjansnh/auth/users.
- Click
Add User>Create new user. - Enter an email and password, make sure that
Auto Confirm User?is checked, and clickCreate user. (The email currently isn't used for anything and therefore can be fake if needed.) - Click on the new user's
User UIDto copy it from the list. - Go to the Supabase SQL Editor at https://supabase.com/dashboard/project/xscyklpyjgkwjzjansnh/sql/new.
- Enter and run the following query, substituting
<user id>for the copied ID and<name>for the user's desired display name:insert into profiles (userid, name) values ('<user id>', '<name>');.