Skip to content

PinSpace-Org/GistPin

Repository files navigation

GistPin β€” Location-Aware Micro-Messaging on Stellar

An open, decentralized platform for anonymous, hyperlocal communication. Post short, geotagged messages β€” "gists" β€” anchored to real-world coordinates, and discover crowd-sourced tips, alerts, and conversations happening around you.

GistPin bridges Web2 and Web3: a fast, familiar map-based UI on top of a geospatial indexing API, with each gist anchored immutably on the Stellar / Soroban blockchain for integrity, verifiability, and censorship resistance.


Project status

GistPin is an early-stage, actively developed open-source project. Here's an honest snapshot of where each layer stands:

Layer Status Notes
Smart contract (contracts/) βœ… MVP implemented & tested GistRegistry β€” post, get, and list gists by location cell. Anonymous posting supported.
Backend API (Backend/) βœ… Largely implemented NestJS + PostGIS geo queries, IPFS pinning, Soroban client (with dev mock mode), rate limiting, metrics, e2e tests.
Frontend (Frontend/) 🚧 UI prototype Map + posting UI built, but currently runs on mock data β€” not yet wired to the backend, no wallet integration yet.
End-to-end flow ❌ Not yet connected Frontend ↔ Backend ↔ Contract are each functional in isolation; connecting them is the current priority.

See the open issues for the concrete work items, and the Roadmap below for direction.


Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Frontend (Next.js)     β”‚   Map-based UI β€” browse & post gists
β”‚   React Β· Leaflet Β· TS   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
            β”‚ REST (/v1)
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Backend (NestJS)       β”‚   Geospatial indexer + API
β”‚   PostGIS Β· IPFS Β· TS    β”‚   β€’ Query gists by radius (ST_DWithin)
β”‚                          β”‚   β€’ Pin content to IPFS (Pinata)
β”‚                          β”‚   β€’ Submit + index Soroban events
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
            β”‚ Soroban RPC
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Contract (Soroban/Rust) β”‚   GistRegistry
β”‚  Stellar Network         β”‚   β€’ Anchors gist_id, location_cell,
β”‚                          β”‚     content_hash on-chain
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

How a gist flows through the system:

  1. User drops a gist on the map (text + coordinates).
  2. Backend sanitizes the input and pins the full content to IPFS, receiving a content hash (CID).
  3. Backend derives a coarse location cell (geohash) from the coordinates.
  4. Backend submits post_gist(author, location_cell, content_hash) to the Soroban GistRegistry contract.
  5. The record is persisted in Postgres + PostGIS for fast radius queries.
  6. Nearby users retrieve it via GET /v1/gists?lat=…&lon=…&radius=….

Repository layout

GistPin/
β”œβ”€β”€ Frontend/         # Next.js 15 + React 19 web client (map UI)
β”œβ”€β”€ Backend/          # NestJS API + Soroban indexer + PostGIS
β”œβ”€β”€ contracts/        # Soroban (Rust) smart contracts β€” GistRegistry
β”œβ”€β”€ analytics/        # Standalone analytics dashboard (separate app)
β”œβ”€β”€ infrastructure/   # Kubernetes, Terraform, CI, monitoring (DevOps)
└── docker-compose.yml

Each core module has its own README with deeper detail:


Quick start

The fastest way to get the API and database running is Docker Compose:

# Postgres + PostGIS and the backend API
docker compose up
# API:      http://localhost:3000
# Swagger:  http://localhost:3000/v1/docs

Run each layer manually

Backend (NestJS + PostGIS)
cd Backend
npm install
cp .env.example .env          # fill in DATABASE_* at minimum
npm run start:dev             # http://localhost:3000

Requires PostgreSQL 15+ with the PostGIS extension. Soroban and IPFS credentials are optional in dev β€” the backend falls back to mock mode when they're unset. See Backend/README.md for full setup.

Frontend (Next.js)
cd Frontend
npm install
npm run dev                   # http://localhost:3000
Contracts (Soroban / Rust)
cd contracts
rustup target add wasm32-unknown-unknown
cargo test
cargo build --target wasm32-unknown-unknown --release

See contracts/README.md for deploy instructions.


Tech stack

Layer Technologies
Frontend Next.js 15 (App Router), React 19, TypeScript, Leaflet / react-leaflet, Tailwind CSS v4
Backend NestJS 11, TypeScript, PostgreSQL + PostGIS, TypeORM, @stellar/stellar-sdk, IPFS (Pinata), Winston, Prometheus
Contract Rust, Soroban SDK, wasm32-unknown-unknown
Blockchain Stellar Network (Soroban smart contracts)

Why Stellar

  • High throughput, low fees β€” enabling scalable, near-free community interactions.
  • Soroban smart contracts β€” composable Rust logic for content anchoring and governance.
  • Fast finality β€” near-instant anchoring of posts.
  • Asset primitives β€” a foundation for future tipping, staking, and reputation systems.

Roadmap

Grouped by theme β€” see issues for the tracked work.

Make it real (connect the stack)

  • Wire the frontend to the backend API (replace mock gist data with live fetch/post).
  • Stellar wallet integration for optional cryptographic authorship.
  • Activate the on-chain indexer so gists posted directly on-chain appear in results.

Solidify (trust & safety)

  • Authorship verification via Stellar signatures.
  • Gist expiry / cooldown and spatial access rules.
  • Content moderation (reporting + on-chain moderation).

Grow (incentives & scale)

  • Tipping and micropayments between local contributors.
  • Staking / reputation for quality contributions.
  • Off-chain storage bridging (IPFS/Arweave) for larger payloads.

Contributing

Contributions are welcome. A good place to start is the good first issue label.

  • Discuss interface/API/contract changes in an issue before implementation.
  • Keep controllers thin and business logic in services (backend).
  • New behavior should ship with test coverage.

License

MIT

About

Building open, location-aware tools for local expression, banter, and real-time insightsβ€”starting with GistPin. GistPin empowers people to share hyperlocal, anonymous content pinned to real-world places. 🌍 GistPin lets anyone drop tips, alerts, or storiesβ€”blurring digital and physical boundaries.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages