Primap is a web-based survey platform for the Raffles' Banded Langur Working Group (RBLWG).
This project runs against a preconfigured shared Supabase backend.
Use the following Supabase values provided separately with the submission:
NEXT_PUBLIC_SUPABASE_URLNEXT_PUBLIC_SUPABASE_ANON_KEYSUPABASE_SERVICE_ROLE_KEY
Demo account credentials are also provided separately.
Node.js 20+npm- A
Mapboxaccess token - Optional:
ResendAPI key for email delivery
git clone https://github.com/seanlim/primap.git
cd primap
npm installCopy .env.example to .env.local, then fill in the values below.
Use the Supabase values provided with the submission for:
NEXT_PUBLIC_SUPABASE_URLNEXT_PUBLIC_SUPABASE_ANON_KEYSUPABASE_SERVICE_ROLE_KEY
Additional setup notes:
- Use your own Mapbox token unless one is also provided for evaluation.
- If email delivery is not being tested,
RESEND_API_KEYcan be left blank. - Set
NEXT_PUBLIC_APP_URLtohttp://localhost:3000. CRON_SECRETcan be any non-empty string unless the cron reminder route is being tested.
NEXT_PUBLIC_SUPABASE_URL=
NEXT_PUBLIC_SUPABASE_ANON_KEY=
SUPABASE_SERVICE_ROLE_KEY=
NEXT_PUBLIC_MAPBOX_TOKEN=
RESEND_API_KEY=
RESEND_FROM_EMAIL=Primap <no-reply@primap.org>
NEXT_PUBLIC_APP_URL=http://localhost:3000
CRON_SECRET=npm run devThen open http://localhost:3000.
Optional checks:
npm run lint
npm test
npm run test:coverageUse the provided demo credentials for the following accounts:
admin@primap.demoalice@primap.demobob@primap.demoemily@primap.demo
Account roles:
admin@primap.demois the administrator accountemily@primap.demois the pending-user account for the approval flow
These steps assume the shared backend and demo credentials provided with the submission.
- Open the login page (
/login). - Sign in as
alice@primap.demo. - Open the volunteer walk page (
/walk) and view the available walk slots. - Open the reporting page (
/report) and access the existing seeded report data for the demo account. - Edit a draft report, then save or submit it.
- Open a submitted group report and review the seeded sightings.
- Optionally create a new incident from the walk report page.
- Open the login page (
/login) and sign in asadmin@primap.demo. - Open the admin dashboard (
/admin). - Open the admin users page (
/admin/users) and verify thatemily@primap.demoappears asPENDING. - Open the admin reports page (
/admin/reports) to review the seeded submitted reports. - Open the admin incidents page (
/admin/incidents) to review the seeded incident. - Open the survey rounds page (
/admin/rounds) and walk management page (/admin/walks) to inspect the seeded schedule data. - Open the data management page (
/admin/data) to access export and import features.
- Open the login page (
/login) and sign in asemily@primap.demo. - Confirm that the application routes the user to the pending-access flow.
- While signed in as
admin@primap.demo, open the admin users page (/admin/users) and approveemily@primap.demo. - Sign in again as
emily@primap.demoand verify that access is granted after approval.
/loginfor authentication/walkfor volunteer walk sign-up/reportfor volunteer reporting/adminfor admin features/admin/usersfor user approval and role management/admin/roundsfor survey-round management/admin/walksfor walk-slot management/admin/reportsfor report review/admin/incidentsfor incident review/admin/datafor data export and import
After setup, use these quick checks to confirm that the project is working:
- Open
http://localhost:3000and confirm that the login page loads. - Sign in as
admin@primap.demoand confirm that the admin dashboard (/admin) is accessible. - Sign in as
alice@primap.demoand confirm that walk slots are visible on the volunteer walk page (/walk). - Open the reporting page (
/report) asalice@primap.demoand confirm that seeded report data is available. - Open the admin reports page (
/admin/reports) and confirm that the seeded submitted reports are visible. - Open the admin incidents page (
/admin/incidents) and confirm that the seeded incident is visible. - Open the admin users page (
/admin/users) and confirm thatemily@primap.demoappears as a pending user.
Optional additional checks:
- Edit and save or submit a volunteer draft report.
- Upload fresh media to verify media upload flows.
- Approve
emily@primap.demofrom/admin/usersand verify access after approval. - Run
npm run lint,npm test, ornpm run test:coverage.
- This project is intended to run against a pre-seeded shared Supabase backend.
- The required Supabase environment values and demo credentials are provided separately in the handoff note.
- The shared backend already contains the required schema, seeded data, and deployed backend functionality used by the application.
- The shared backend already includes report, incident, and media data. Fresh uploads may also be performed during testing if media upload flows are being evaluated directly.
- Map features require
NEXT_PUBLIC_MAPBOX_TOKEN. - Email features require
RESEND_API_KEYonly if email delivery itself is being evaluated.