Skip to content
arya-sianatiPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

ย 

History

42 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Gravity

A live social activity map for discovering what people are actually doing around you.

๐ŸŒ Live: https://gravity.college

Gravity was built for MuleHacks 2026 around the theme of Connections.

Social media shows you what people are posting. Gravity shows you what people are actually doing.

What is Gravity?

Gravity helps people discover real-world activity happening around them right now.

Instead of posts, feeds, and status updates, Gravity focuses on actual activity:

  • ๐Ÿ€ Basketball
  • ๐Ÿƒ Running
  • ๐Ÿ“š Studying
  • ๐Ÿ‹๏ธ Workout
  • โšฝ Soccer
  • ๐ŸŽฎ Gaming
  • and dynamically configurable activities such as Pickleball

Users can start an activity, discover nearby sessions, join other people, scan QR codes, compete with friends, earn XP, and explore historical and predicted activity patterns around an area.

Core Features

๐Ÿ—บ๏ธ Live Activity Map

Gravity uses MapLibre and PostGIS to visualize live activity as dynamic geographic heat.

Nearby sessions naturally combine visually while remaining separate sessions internally.

๐Ÿ“ก Pulse Now

Discover what is happening nearby right now based on:

  • distance
  • number of active participants
  • recency
  • activity type

๐Ÿ”ฎ Pulse Soon

Gravity analyzes recurring historical activity patterns to show activity that is likely to happen nearby soon.

Forecasting is deterministic and explainable rather than generated by a black-box AI model.

It considers:

  • recurring activity across weeks
  • weekday
  • time of day
  • participation volume
  • recency
  • geographic clustering

๐Ÿ›๏ธ Gravity History

Inspect any geographic area and see:

  • dominant activities
  • historical participation
  • busiest days
  • peak activity times
  • activity distribution

No manually defined venue or neighborhood objects are required.

๐Ÿค Friends

Gravity supports mutual friendships with live activity presence and configurable location privacy.

๐Ÿ† Friend Challenges

Friends can compete through challenges such as:

  • First to Target
  • Highest Metric by Deadline
  • Cooperative Combined Target

Metrics remain completely activity-configurable.

โšก Gravity Events

Platform events can temporarily provide:

  • XP multipliers
  • bonus XP
  • badges

๐Ÿฅ‡ Seasons & Leaderboards

Activity-specific seasonal competition using each activity's native metric.

Examples:

  • Running โ†’ Distance
  • Basketball โ†’ Points
  • Studying โ†’ Duration
  • Pickleball โ†’ Games Won

โญ XP, Levels, Badges & Streaks

Gravity includes universal personal progression independent of activity-specific leaderboards.

๐Ÿ“ฑ Progressive Web App

Gravity is an installable mobile-first PWA with:

  • offline/degraded-state handling
  • service worker
  • safe-area support
  • mobile navigation
  • route-level code splitting
  • app resume reconciliation

๐Ÿ“ท QR Joining

Every active session can generate a QR code that lets another user quickly open and join the activity.

๐Ÿ“ Auto-Stop

Stationary activities can automatically stop when a participant leaves the activity area.

Movement-based activities such as Running are configured differently so moving away from the starting point does not incorrectly stop the activity.

Privacy

Location privacy is built into Gravity's architecture.

Users can choose:

Hidden

Live location is not shown to other users.

Blurred

Other users see an approximate geographic area rather than the exact location.

Friends

Accepted friends may see the exact activity location while other users receive a blurred location.

Exact

Exact activity location is publicly visible.

Historical data and forecasts use aggregate geographic regions and minimum anonymity thresholds to prevent reconstruction of individual routines.

Technology

Frontend

  • React
  • TypeScript
  • Vite
  • Tailwind CSS
  • MapLibre GL JS
  • Progressive Web App / Workbox

Backend

  • Python
  • Django
  • Django REST Framework
  • GeoDjango
  • Django Channels
  • Daphne

Data & Realtime

  • PostgreSQL
  • PostGIS
  • Redis
  • WebSockets

Production

  • Debian / Linux VPS
  • Nginx
  • systemd
  • Let's Encrypt HTTPS

Architecture

                        gravity.college
                              โ”‚
                              โ–ผ
                            Nginx
                              โ”‚
              โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
              โ”‚               โ”‚               โ”‚
              โ–ผ               โ–ผ               โ–ผ
         React PWA        Django API      WebSockets
              โ”‚               โ”‚               โ”‚
              โ”‚               โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
              โ”‚                      โ–ผ
              โ”‚                 Daphne / ASGI
              โ”‚                      โ”‚
              โ”‚              โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
              โ”‚              โ–ผ               โ–ผ
              โ”‚         PostgreSQL          Redis
              โ”‚          + PostGIS
              โ”‚
              โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ MapLibre

Repository Structure

gravity/
โ”œโ”€โ”€ backend/
โ”‚   โ”œโ”€โ”€ accounts/
โ”‚   โ”œโ”€โ”€ activities/
โ”‚   โ”œโ”€โ”€ config/
โ”‚   โ””โ”€โ”€ manage.py
โ”œโ”€โ”€ frontend/
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ public/
โ”‚   โ””โ”€โ”€ vite.config.ts
โ”œโ”€โ”€ deploy/
โ”œโ”€โ”€ docs/
โ”œโ”€โ”€ scripts/
โ””โ”€โ”€ README.md

Local Development

Backend

Create a Python virtual environment and install the backend dependencies.

cd backend

python3 -m venv venv
source venv/bin/activate

pip install -r requirements.txt

Create your environment configuration based on the provided example.

Never commit the real .env file.

Run migrations:

python manage.py migrate

Start Django/ASGI using the development configuration documented in the project.

Frontend

cd frontend

npm install
npm run dev

Production

Gravity is currently deployed at:

https://gravity.college

Production uses:

Nginx
  โ†“
Daphne / Django ASGI
  โ†“
PostgreSQL + PostGIS
Redis

Deployment documentation is available under:

docs/GRAVITY_DEPLOYMENT.md

Demo Data

Gravity includes tooling for creating a controlled demo environment for development and hackathon demonstrations.

python manage.py seed_demo --reset

Demo credentials are intentionally not stored in this public repository.

Testing

Gravity includes backend tests covering the major systems including:

  • authentication
  • activity sessions
  • realtime updates
  • privacy
  • metrics
  • leaderboards
  • XP
  • badges and streaks
  • events
  • seasons
  • Pulse
  • friends
  • challenges
  • auto-stop
  • Gravity History
  • Pulse Soon

Run tests from the backend environment with:

python manage.py test

Security

Production secrets are stored outside Git.

The repository must never contain:

  • Django production secret keys
  • database passwords
  • .env files
  • private TLS keys
  • production database dumps
  • authentication cookies or tokens

MuleHacks 2026

Gravity was created for MuleHacks 2026 as a project centered around connecting people through real-world activity rather than traditional social-media content.

Status

Gravity V1

  • Feature complete
  • Production deployed
  • PWA enabled
  • Realtime enabled
  • Demo ready

๐ŸŒ https://gravity.college

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages