Run StudyMap for your own city. Everything below works from a fork, no coding required beyond editing one config file and your place data.
- The interactive map, filters, search, and calendar for whatever
data/places/*.jsonyou provide. - Two optional, signed-in-only features (saved places, personal calendar events) if you set up your own Supabase project. Skip that section entirely and the app still works, just without those.
Click "Use this template" at the top of StudentSuite/StudyMap to create your own copy, then clone it:
git clone https://github.com/<your-account>/<your-fork>.git
cd <your-fork>
npm installEverything region- and data-specific lives in one file: studymap.config.ts at the repo root.
cp studymap.config.example.ts studymap.config.tsEdit it:
center:[lat, lng]for the initial map viewdefaultZoom: initial zoom level (11-13 works well for a metro area)cities: preferred display order for the city filter — a hint, not an exhaustive list (any city present in your data but missing here still shows, just sorted alphabetically after)places: swap the sample imports for your owndata/places/*.jsonfilescompetitions: swap thedata/competitions/*.jsonimports for your own, or set it to[]if you don't want a competitions catalog (the competitions pages then show an empty list). The record shape is indata/competitions/CONTRIBUTING.md
The dataset itself follows the schema in data/CONTRIBUTING.md: one JSON
file per place type, one object per place, with id, name, type, city, lat, lng,
gmaps_link, and added_by. data/places.sample/ has two minimal example entries if you want to
start from a clean skeleton instead of the Mumbai dataset that ships with the template.
Validate as you go:
npm run validatecp .env.example .env.localNEXT_PUBLIC_MAPTILER_KEYis required for the map basemap. Free tier, no credit card, at cloud.maptiler.com.- If the key is missing or empty, the map shows "Basemap unavailable" instead of loading tiles.
Add the key to
.env.local, then restart the development server or redeploy the site. - The Supabase variables are optional. Leave them blank and the map, filters, and calendar all work; you just won't get sign-in or the two private features below. See step 5 to fill them in.
npm run devOpen http://localhost:3000/map and confirm your places show up in the right spot.
These features (src/app/login, saved custom places, personal calendar events, saved
competitions, the first-run onboarding questionnaire, the saved-competitions calendar feed) need
a Supabase project:
- Create a free project at supabase.com.
- Copy its URL and anon key into
.env.local(NEXT_PUBLIC_SUPABASE_URL,NEXT_PUBLIC_SUPABASE_ANON_KEY). - In the Supabase SQL editor, run every file in
supabase/migrations/, in filename order. Each one creates its tables with row-level security already scoped toauth.uid(), so users can only ever read or write their own rows. This includesuser_places,user_home, anduser_events(the three original sign-in-gated tables), pluscompetition_savesandcompetition_statsfor the competitions vertical: saves are private per user, andcompetition_statsis a public save-count aggregate kept in sync by a trigger, readable by anyone but writable only by that trigger, never directly. It also includesuser_profiles, one row per user holding their answers to the first-run onboarding questionnaire (graduation year, board, field, country, referral source), all columns nullable since the questionnaire is skippable and resumable, and owner-only RLS so nobody but the user (or the dashboard's service-role SQL editor) can read their answers.user_profiles.calendar_token(a later migration) is the opaque bearer token behindGET /api/competitions/saved.ics?token=..., the saved-competitions calendar subscription feed: that route authenticates itself with the token via asecurity definerSQL function rather than a signed-in session, since a calendar app fetching the feed carries no cookies at all. - Enable whichever auth providers you want (email, Google, etc.) under Authentication > Providers.
Skip this whole section if you only want the public map and calendar.
Deploy like any standard Next.js app, for example on Vercel:
npx vercelor import the repo at vercel.com/new and set the same environment variables from step 3 in the project settings.
Static export (output: "export") is not supported. Sign-in needs a live server: the OAuth
callback route exchanges a code for a session server-side, and middleware refreshes that session
on every request. Both are incompatible with a static build. Deploy to a normal server/edge
runtime instead, that's the default for Vercel and most other Next.js hosts.
StudyMap doesn't push updates to forks automatically. To pull in upstream fixes, add the original repo as a remote and merge from it:
git remote add upstream https://github.com/StudentSuite/StudyMap.git
git fetch upstream
git merge upstream/mainYour studymap.config.ts, .env.local, and data/places/*.json are yours, upstream changes to
shared code (map, calendar, components) merge in without touching them, unless you've also edited
those files.