Inspiration
What it does
How we built it
Challenges we ran into
Accomplishments that we're proud of
What we learned
What's next for Gravity
Inspiration
Social media is great at showing what people are posting, but it does not tell me what people around me are actually doing right now.
On a college campus, there might be people playing basketball, studying, running, working out, gaming, or looking for someone to join them, but there is no simple way to see that activity as it happens.
I built Gravity around one idea:
Social media shows you what people are posting. Gravity shows you what people are actually doing.
My goal is to make spontaneous real-world connections easier.
What it does
Gravity is a mobile-first live social activity map.
Users can open the map and immediately see activity happening around them as a live geographic heatmap.
They can:
- Discover nearby activities with Pulse Now
- See recurring activity patterns with Pulse Soon
- Start their own activity
- Join nearby sessions
- Join through QR codes
- Track activity-specific metrics
- Earn XP, levels, badges, and streaks
- Compete in seasonal leaderboards
- Add friends and create friend challenges
- Explore historical activity patterns with Gravity History
- Control location visibility through privacy settings
I designed Gravity so activity types can be configured dynamically, allowing different activities to use different metrics. For example, basketball can track points, running can track distance, and studying can track duration.
How I built it
I built Gravity as a full-stack Progressive Web App.
The frontend uses:
- React
- TypeScript
- Vite
- Tailwind CSS
- MapLibre GL
- OpenStreetMap
The backend uses:
- Python
- Django
- Django REST Framework
- GeoDjango
- Django Channels
The data layer uses:
- PostgreSQL
- PostGIS
- Redis
I use PostGIS for geographic queries such as nearby sessions, activity heat, privacy-safe location processing, and historical geographic analysis.
I use Django Channels and WebSockets to provide realtime updates whenever activity on the map changes.
I deployed the production application behind Nginx and Daphne with HTTPS at:
Challenges I ran into
One of the biggest challenges I faced was combining realtime social data with geographic privacy.
Gravity needs enough location information to help people find activity without exposing private or unnecessarily precise user locations. I built multiple privacy modes and use aggregated geographic data for historical activity and forecasting.
Mobile map rendering was another major challenge. MapLibre, browser viewport behavior, GPS acquisition, PWA standalone mode, and external basemap providers all behave differently across desktop and mobile environments. I ultimately created a more reliable map architecture using OpenStreetMap raster tiles with Gravity's own heat and forecast layers rendered on top.
I also had to design the activity system so different activities could use different metrics without hardcoding every sport or activity into the application.
Accomplishments that I'm proud of
Gravity grew from an idea into a complete production application.
I'm especially proud of building:
- A live geographic activity heatmap
- Realtime WebSocket updates
- Dynamic activity types and metrics
- QR-based activity joining
- Privacy-aware location sharing
- Pulse Now for current activity discovery
- Pulse Soon for recurring activity forecasting
- Gravity History for geographic activity patterns
- Friend challenges
- Seasonal leaderboards
- XP, levels, badges, and streaks
- A mobile-first installable PWA
- A complete production deployment with HTTPS
I'm also proud that Pulse Soon is deterministic and explainable rather than relying on a black-box AI prediction. I designed it to use historical recurrence, weekday, time, participation volume, recency, and geographic clustering to estimate what is likely to happen soon.
What I learned
Building Gravity showed me how much complexity exists at the intersection of realtime systems, geospatial data, mobile interfaces, and privacy.
I learned how to use PostGIS for spatial queries, MapLibre for layered geographic visualization, Django Channels for realtime communication, and PWA technologies for an app-like mobile experience.
Most importantly, I learned that location-based social software has to treat privacy as part of the architecture rather than something added afterward.
What's next for Gravity
My next goal is to expand Gravity from a campus prototype into a platform that can support entire universities and communities.
Future improvements could include:
- Native mobile applications
- Smarter activity recommendations
- Campus and university onboarding
- Better notification controls
- Larger-scale geographic clustering
- More social discovery tools
- Improved activity forecasting
- Community-specific events and competitions
Gravity's long-term goal is simple:
Make it easier to discover the people, activities, and opportunities already happening around you.
Built With
- daphne
- django-rest-framework
- geodjango
- maplibre-gl-js
- nginx
- postgis
- postgresql
- python
- react
- redis
- tailwind-css
- typescript
- vite
- websockets
Log in or sign up for Devpost to join the conversation.