Profile
Back to NewsBack
Dev.to 3 min
Reader Mode
I Built a Social Network Where Posts Only Unlock When You Visit the Real Location

I Built a Social Network Where Posts Only Unlock When You Visit the Real Location

1 day ago

Most social media apps answer one question:

«"What's happening online?"»

I wanted to answer a different one:

«"What's happening where I'm standing?"»

That idea became Realm.

The Idea

Realm is a location-first social network where users create Drops—posts tied to real-world locations.

Unlike traditional social media, not every post is immediately visible. Some content stays locked until you physically travel close enough to the location where it was created.

Imagine someone leaving:

  • A hidden café recommendation.
  • A photo from a mountain peak.
  • A document with local event details.
  • A video only visible inside a university campus.
  • A message waiting for anyone who visits a specific place.

Instead of endless scrolling, Realm encourages exploration.


How It Works

Creating a Drop is simple:

  1. The user captures media (photo, video, or document).
  2. The app records the current GPS location.
  3. The creator chooses an unlock radius.
  4. The Drop is uploaded.

When another user approaches that location, the server verifies the distance before unlocking the content.

The important part is that unlocking is verified on the backend. The client never decides whether a Drop should be unlocked, which helps prevent location spoofing.


Features

Current implementation includes:

  • Email authentication
  • Nearby location-based feed
  • Locked and unlocked Drops
  • Photos, videos, and documents
  • Configurable unlock radius
  • Server-side distance verification
  • Comments and reactions
  • Real-time direct messaging
  • Profile statistics
  • Profile picture uploads
  • Offline caching
  • Data Saver mode with media compression
  • Compass that points toward the nearest locked Drop

Tech Stack

I built Realm using:

  • Flutter
  • Supabase
  • PostgreSQL
  • Supabase Storage
  • Realtime subscriptions
  • Geolocator
  • Image Picker
  • Video compression
  • Just Audio
  • FFmpeg
  • Cached Network Image

Flutter made it possible to keep a single codebase while still accessing device hardware such as GPS, sensors, camera, and local storage.

Supabase handled authentication, database management, storage, and realtime messaging without requiring a separate backend framework.


One Challenge

A major challenge was preventing users from cheating their location.

It would have been easy to trust the GPS coordinates sent by the app—but that isn't secure.

Instead, Realm sends the user's position to a PostgreSQL RPC function that recalculates the distance on the server before deciding whether the content can be unlocked.

That means location access is enforced by the backend rather than the client.


Performance Matters

Location-based apps can become bandwidth-heavy very quickly.

To reduce data usage:

  • Images are resized before upload.
  • Videos are compressed on-device.
  • Media is cached locally.
  • Users can enable a Data Saver mode for even more aggressive compression.

This keeps uploads smaller while improving performance for users on slower networks.


Why I Built It

Social media has become almost entirely virtual.

I wanted to create something that encourages people to actually move around and discover places.

Instead of asking:

«"What's trending?"»

Realm asks:

«"What's hidden nearby?"»

That small change completely changes how users interact with content.


What's Next

This version focuses on validating the core idea before expanding further.

Future possibilities include:

  • AR experiences
  • Collaborative world spaces
  • Local communities
  • Location-based events
  • Creator rewards
  • AI-assisted discovery

But first, I want to prove that location-first social networking creates experiences people genuinely enjoy.


Building Realm has been one of the most technically challenging projects I've worked on. Combining Flutter, realtime messaging, media processing, GPS, offline storage, and secure location verification pushed me to solve problems that don't usually appear in traditional CRUD apps.

It's still evolving, but it's exciting to imagine a social network where the world itself becomes part of the timeline.

Chat with me
Menu