Skip to content

StudentSuite/StudyMap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

185 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StudyMap

A crowdsourced map of student-important places across the Mumbai Metropolitan Region (Mumbai, Thane, Navi Mumbai). Open source, zero setup, free forever.

Live: studymapp.vercel.app


What it does

  • Places map: find exam centres, libraries, book shops, stationery, internet cafes, train stations, and airports across the MMR. Filter by type and city.
  • Contribute: add places or fix data via GitHub pull request. No account needed.
  • Legal: privacy policy, terms of service, and data disclaimer for the crowdsourced dataset.

Quick start

npm install
npm run dev

Open http://localhost:3000. No environment variables needed; the map reads place data via studymap.config.ts, which imports it from data/places/.

Data schema

Places live in data/places/<type>.json, one file per category:

File Type key
airport.json airport
train_station.json train_station
exam_centre.json exam_centre
library.json library
book_shop.json book_shop
stationery.json stationery
internet_cafe.json internet_cafe
imp_locations.json imp_locations
repair_shop.json repair_shop

Each record shape (src/lib/types.ts):

{
  id: string;          // kebab-case, unique across all types
  name: string;
  type: PlaceType;     // one of the 9 keys above
  city: string;         // free-form slug, e.g. "mumbai", "navi_mumbai" - any city worldwide
  lat: number;
  lng: number;
  address?: string;
  gmaps_link: string;  // must contain "maps.google.com"
  added_by: string;    // GitHub username of contributor
}

How to add a place

  1. Fork this repo
  2. Add your place to the correct data/places/<type>.json
  3. Verify lat/lng against Google Maps; lat 18–20, lng 72–73
  4. Set gmaps_link to the Google Maps link
  5. Open a pull request with a description of the place and a source

See CONTRIBUTING.md for full guidelines.

Architecture

studymap.config.ts     # region + dataset config - the one file a fork edits to retarget StudyMap
src/
  app/
    page.tsx            # homepage (hero + map preview)
    map/page.tsx        # full interactive map
    calendar/           # public exam calendar + signed-in personal events
    login/               # optional sign-in (Google OAuth, email)
    auth/callback/       # OAuth code exchange
    contribute/page.tsx # contribution guide
    legal/              # privacy, terms, disclaimer
    layout.tsx          # root layout (navbar, footer, theme)
  components/
    home/               # Hero, MapPreview
    map/                # PlacesMap, MapView, MapPanel, MyPlacesPanel, dialogs
    calendar/           # PersonalEventDialog
    pins/               # PinPopup
    layout/             # Navbar, Footer
  lib/
    places.ts           # getPlaces(), filterPlaces(), getCities() - reads from studymap.config.ts
    geo.ts              # distance calculation, LatLng type
    types.ts            # PlaceType, City, Place interface
    map.ts              # PLACE_TYPE_COLORS, directionsUrl
    share.ts            # URL state encode/decode for shareable links
    site.ts             # site metadata, navLinks
    user-places.ts       # saved places + home location (signed-in only)
    user-events.ts       # personal calendar events (signed-in only)
data/
  places/               # 9 JSON files, one per place type
supabase/
  migrations/            # SQL for the two optional, sign-in-gated tables (run once by hand)

See ARCHITECTURE.md for the full breakdown.

Tech stack

  • Next.js 16 (App Router)
  • Leaflet + react-leaflet (interactive map, marker clustering)
  • Supabase (optional sign-in, gates saved places + personal calendar events)
  • shadcn/ui + Tailwind v4 (UI components)
  • next-themes (dark/light mode)

Running your own fork

Want StudyMap for a different city? Click "Use this template" above, then follow SELF-HOSTING.md: set your region and dataset in one config file, optionally wire up your own Supabase project for sign-in, and deploy.

Contributing

See CONTRIBUTING.md.

Good first issues

New here? Start with an issue tagged good first issue or browse everything tagged help wanted. Adding a place from your own neighbourhood (#18) needs no coding at all.

Contributors

See CONTRIBUTORS.md.

License

MIT. See LICENSE.