Queering the Map is a community-based platform where individuals anonymously pin their queer experiences and stories to specific locations on a global map.
You have two options for setting up the project: a quick setup for frontend-only work or a full setup with Supabase.
This approach is quicker and allows you to work on the frontend without setting up Supabase. Note that popups will not show text if you choose this option.
- Install dependencies with
npm ci
. - Run the seed script to generate mock data:
npm run seed-data
. - Copy
.env.example
into.env
:cp .env.example .env
.
This approach is necessary if you want to work also work on the backend. It takes longer to set up but provides a complete development environment, aligned with what we use in production.
- Install dependencies with
npm install
. - Set up a Supabase (local) project with the official CLI.
- Set the environment variables.
- Copy the
.env.example
file to.env
(manually or withcp .env.example .env
). - Get your
SUPABASE_URL
andSUPABASE_ANON_KEY
from the output ofsupabase start
.
- Copy the
- Run the DB migrations locally with
supabase db reset
. - Fetch the data from Supabase:
npm run fetch-data
.
To start a development server:
npm run dev
For testing the database make sure that the pgTap
extension is enabled in postgres (more info). Afterwards, you can run: supabase test db
.
To use Supabase as a remote backend make sure to link your local development with your remote Supabase project:
- Make sure you have a Supabase acount and connect it to the supabase cli:
supabase login
- Link a specific remote project
supabase link --project-ref <project-ref>
(more info) - Run migrations on remote DB
supabase db push
(more info) - Make sure that the env vars
SUPABASE_URL
andSUPABASE_ANON_KEY
do point to the correct production project and not the local containers. You can grab them from inside your Supabase project's dashboard.
To create a production version of the app:
npm run build
For Captcha protection of the point submissions, we use Cloudflare Turnstile. Once you create a widget there, populate the correct values for the env variables:
PUBLIC_CLOUDFLARE_TURNSTILE_SITE_KEY
CLOUDFLARE_TURNSTILE_SECRET
For more info, see this guide: https://developers.cloudflare.com/turnstile/get-started/.