Skip to content

opencodeiiita/SnapMap

Repository files navigation

πŸ“ SnapMap

A hyperlocal, map-based photo sharing app designed for college campuses.

SNAP-MAP allows students to instantly capture photos and share them on a live campus map. All photos are geo-tagged, stored securely, and shown as clusters/bubbles on a dynamic map. Students can explore events happening around them, view photos contributed by others, and participate in the campus community in real time.


πŸš€ Features

πŸ“Έ Camera & Upload

  • Capture photos directly using the in-app camera
  • Auto-attaches GPS coordinates
  • Uploads securely to Azure Blob Storage
  • Preview + retake option

πŸ—ΊοΈ Map-Based Discovery

  • Interactive map with user location
  • Bubbles indicate photos uploaded around campus
  • Clustered markers for multiple events or heavy hotspots
  • Tap a bubble β†’ see All Photos or Event-wise Photos

πŸŽ‰ Event Clustering

  • System auto-detects events based on photo density + proximity
  • Groups photos under event IDs
  • Shows β€œhotspot” visuals on the map

πŸ‘€ User Accounts (via Clerk)

  • College email login (domain restricted)
  • Secure sessions
  • View your uploaded photos
  • Manage profile + logout

πŸ“‚ Profile & Gallery

  • All uploads in a grid
  • Delete option
  • Event galleries with horizontal swipe viewer

🧱 Tech Stack

Frontend

  • React Native (Expo)
  • Expo Camera + Expo Location
  • Mapbox or react-native-maps
  • Axios for API calls
  • Clerk for authentication

Backend

  • Node.js + Express
  • Clerk server-side JWT verification
  • Mongoose + MongoDB Atlas
  • Azure Blob Storage (file storage only)

Database

  • MongoDB Atlas
    • Users
    • Photos
    • Events
    • Geospatial queries enabled

File Storage

  • Azure Blob Storage
    • All images compressed + uploaded here
    • URLs stored in MongoDB

API Endpoints

All endpoints are prefixed with /api/v1

Health Check

GET /health

  • Description: Server health check
  • Auth Required: No
  • Response:
    { "status": "ok" }

Authentication

POST /auth/login

  • Description: User login endpoint (placeholder)
  • Auth Required: No
  • Response: "Login call"

POST /auth/signup

  • Description: Register a new user with Clerk authentication
  • Auth Required: Yes (Clerk JWT)
  • Request Body:
    {
      "clerkId": "string",
      "email": "string",
      "rollNumber": "string"
    }

POST /auth/profile-update

  • Description: Update user profile information
  • Auth Required: Yes (Clerk JWT)
  • Content-Type: multipart/form-data
  • Form Data:
    • profileImg (file): Profile image (max 10MB)
    • Other user fields

Photos

GET /photos/ping

  • Description: Photo service health check
  • Auth Required: No
  • Response:
    { "pong": true }

POST /photos/upload-photo

  • Description: Upload a single photo with GPS coordinates
  • Auth Required: Yes (Clerk JWT)
  • Content-Type: multipart/form-data
  • Form Data:
    • photo (file): Image file (max 10MB)
    • latitude (number): GPS latitude
    • longitude (number): GPS longitude
  • Response: Photo object with Azure Blob URL

POST /photos/upload-photos

  • Description: Upload multiple photos (max 10) at once
  • Auth Required: Yes (Clerk JWT)
  • Content-Type: multipart/form-data
  • Form Data:
    • photos[] (files): Up to 10 image files
    • GPS coordinates for each photo
  • Response: Array of photo objects

POST /photos/test-upload

  • Description: Test photo upload endpoint (for debugging)
  • Auth Required: No
  • Content-Type: multipart/form-data
  • Form Data:
    • photo (file): Test image file

GET /photos/all-photos

  • Description: Retrieve all uploaded photos
  • Auth Required: No
  • Response: Array of all photo objects with URLs and metadata

Auth routes need Authorization: Bearer <clerk_token> header. Max image size is 10MB.

πŸ“‚ Project Structure

SnapMap/                         β†’ Project root
β”‚
β”‚   CONTRIBUTING.md               β†’ Contribution guidelines
β”‚   README.md                     β†’ Project overview
β”‚
β”œβ”€β”€ backend/                      β†’ Backend API
β”‚   β”‚   package-lock.json
β”‚   β”‚   package.json
β”‚   β”‚   server.js                 β†’ Server entry point
β”‚   β”‚   v1.js                     β†’ /api/v1 all routes are here
β”‚   β”‚
β”‚   β”œβ”€β”€ config/
β”‚   β”œβ”€β”€ controllers/              β†’ Request handlers
β”‚   β”œβ”€β”€ db/                       β†’ Database setup
β”‚   β”œβ”€β”€ middleware/               β†’ Request middleware
β”‚   β”œβ”€β”€ models/                   β†’ Database models
β”‚   β”œβ”€β”€ routes/                   β†’ API routes
β”‚   └── utils/                    β†’ Helper utilities
β”‚
β”œβ”€β”€ contributors/                 β†’ Contributor records
β”‚   └── <your_roll_no>.txt
β”‚
β”œβ”€β”€ frontend/                     β†’ Mobile frontend
β”‚   β”‚   .gitignore
β”‚   β”‚   app.config.ts             β†’ Expo app config
β”‚   β”‚   babel.config.js
β”‚   β”‚   index.js                  β†’ App entry point
β”‚   β”‚   package-lock.json
β”‚   β”‚   package.json
β”‚   β”‚
β”‚   β”œβ”€β”€ .expo/
β”‚   β”‚   β”‚   devices.json
β”‚   β”‚   β”‚   README.md
β”‚   β”‚   β”‚   settings.json
β”‚   β”‚
β”‚   └── src/
β”‚       β”‚   App.js                β†’ Root component
β”‚       β”‚
β”‚       β”œβ”€β”€ assets/               β†’ Images & fonts
β”‚       β”œβ”€β”€ components/           β†’ Reusable UI
β”‚       β”œβ”€β”€ context/
β”‚       β”œβ”€β”€ navigation/           β†’ App navigation
β”‚       β”œβ”€β”€ screens/              β†’ App screens
β”‚       └── services/             β†’ API services
β”‚
└── UI-UX/                        β†’ Design resources
    └── contributors/             β†’ UI/UX credits


🀝 Contributing


πŸ’¬ Contact

Reach out to me on Discord, ID: terrormanzero aka terror_quota

Our Server: https://bit.ly/OpencodeDiscord

About

A hyperlocal, map-based photo sharing app designed for college campuses.

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 89