ποΈ CommuneXR β Rebuilding Real Neighborhood Communities Through Technology
This is a submission for the DEV Weekend Challenge: Community
The Community
My neighborhood. My neighbors. The people on my street, in my building, at my local park.
I built this for the real, physical community I live in.
We live in the same place, but we rarely connect. Someone needs help fixing a bike, another person offers guitar lessons, someone else has tools to lend β but these needs and skills never meet.
CommuneXR transforms anonymous neighbors into a connected, supportive community.
What I Built
CommuneXR is a hyper-local platform that turns your neighborhood into a live map of mutual aid.
β¨ Key Features
| Feature | Description |
|---|---|
| π Interactive Map | Real geolocation with React-Leaflet. Green markers for offers π€, red for needs π |
| π¬ Exchange System | Structured lifecycle: proposed β accepted β completed with full accountability |
| π Gamification Engine | Points (+10 per exchange) and 4 unlockable badges via Rails callbacks |
| π Personal Dashboard | Track exchanges, view badges, monitor your community impact |
| π Smart Filters | Filter by type (offer/need) and category in real-time |
| π Exchange Management | Accept, decline, or complete exchanges with instant UI feedback |
π Badges System
| Badge | How to Earn |
|---|---|
| π First Helper | Complete your first exchange |
| π‘ Good Neighbor | Complete 5 exchanges |
| π¦Έ Community Hero | Complete 10 exchanges |
| π§ Skilled Helper | Help in 3 different categories |
Demo
βΆοΈ Watch the 2:49 demo: https://youtu.be/DE8ptjoFxhw
πΈ Screenshots
| Interactive Map | Create Service |
![]() |
![]() |
| Service Details | Dashboard |
![]() |
![]() |
Code
Frontend Repository
git clone https://github.com/joupify/communeXR_front.git
cd communeXR_front
npm install
npm start
π GitHub: https://github.com/joupify/communeXR_front
Backend Repository
bash
git clone https://github.com/joupify/communeXR.git
cd communeXR
bundle install
rails db:create db:migrate db:seed
rails s -p 3000
π GitHub: https://github.com/joupify/communeXR
Project Structure
text
communeXR/
βββ backend/ # Rails API
β βββ app/models/
β βββ app/controllers/
β βββ db/
βββ frontend/ # React app
βββ src/components/
βββ src/pages/
βββ public/
How I Built It
Tech Stack
Backend:
π₯ Ruby on Rails 7 (API mode)
π PostgreSQL for database
π Devise for authentication
π Geocoder for location services
π Render.com for deployment
Frontend:
βοΈ React 18 with Hooks
πΊοΈ React-Leaflet + OpenStreetMap
π¨ Bootstrap 5 for styling
π React Router for navigation
π‘ Fetch API for REST calls
π Render.com for deployment
Key Challenges Solved
πΊοΈ Custom Map Markers
javascript
const getServiceIcon = (type) => L.divIcon({
html: `<div style="
background-color: ${type === 'offer' ? '#22c55e' : '#ef4444'};
width: 40px; height: 40px; border-radius: 50%;
display: flex; align-items: center; justify-content: center;
font-size: 20px; border: 3px solid white;
">${type === 'offer' ? 'π€' : 'π'}</div>`,
iconSize: [40, 40],
iconAnchor: [20, 40], // π Key: anchor at bottom center
popupAnchor: [0, -40]
});
π Automatic Badge Attribution
ruby
# app/models/exchange.rb
after_update :check_badges, if: :completed?
def check_badges
# First exchange β "First Helper" badge
if helper.helped_exchanges.completed.count == 1
badge = Badge.find_by(name: "First Helper")
UserBadge.find_or_create_by(user: helper, badge: badge)
end
# 5 exchanges β "Good Neighbor" badge
if helper.helped_exchanges.completed.count == 5
badge = Badge.find_by(name: "Good Neighbor")
UserBadge.find_or_create_by(user: helper, badge: badge)
end
# +10 points per completed exchange
helper.increment!(:points, 10)
end
π Exchange Lifecycle Management
ruby
# app/models/exchange.rb
enum status: { proposed: 0, accepted: 1, completed: 2, rejected: 3 }
π Complex Nested JSON
ruby
# app/controllers/services_controller.rb
def show
@service = Service.includes(:user, exchanges: [:requester, :helper]).find(params[:id])
render json: @service.as_json(
include: {
user: {
only: [:id, :username, :points],
include: { badges: { only: [:id, :name, :icon] } }
},
exchanges: {
include: {
requester: { only: [:id, :username] },
helper: { only: [:id, :username] }
}
}
}
)
end
Deployment Architecture
- Frontend: React app hosted on Render.com π
- Backend: Rails API hosted on Render.com π
- Database: PostgreSQL hosted on Render.com π
All services are deployed on Render.com, with the frontend communicating with the backend via REST API calls.
Data Model
ruby
User
βββ has_many :services
βββ has_many :helped_exchanges (as helper)
βββ has_many :requested_exchanges (as requester)
βββ has_many :badges through: :user_badges
βββ points :integer
Service
βββ service_type :offer or :need
βββ status :open / :in_progress / :closed
βββ latitude & longitude
βββ belongs_to :User
Exchange
βββ belongs_to :service
βββ belongs_to :helper (User)
βββ belongs_to :requester (User)
βββ status :proposed / :accepted / :completed / :rejected
βββ message :text
π API Endpoints
Method Endpoint Description
GET /services List all services
GET /services/:id Get service details
POST /services Create a service
POST /exchanges Create an exchange
PATCH /exchanges/:id Update exchange status
GET /users/:id Get user profile
GET /users/:id/exchanges Get user exchanges
Why This Matters
In a world of digital connections, we've lost touch with our physical neighbors.
CommuneXR brings back what matters:
π€ Real help from real people
π± Stronger communities through sharing
ποΈ Safer neighborhoods when we know each other
This project is:
β
Full-stack and functional
β
Structured domain modeling with clean architecture
β
Real community problem solved
β
Gamified engagement engineered
β
Built in 48 hours
"Community is not a feature. It is infrastructure."
π What's Next
β‘ Real-time chat with Action Cable
π± Mobile app with React Native
β Trust & rating system for exchanges
π
Neighborhood event layer (meetups, garage sales...)
π Multi-language support (i18n)
π Production-ready multi-user authentication
Links
Resource Link
π Live App https://communexr-front.onrender.com
π₯ Demo Video https://youtu.be/DE8ptjoFxhw
π Frontend Repo https://github.com/joupify/communeXR_front
π Backend Repo https://github.com/joupify/communeXR
π Acknowledgments
π₯ The DEV community β for this amazing challenge
πΊοΈ Leaflet & OpenStreetMap β for the incredible mapping tools
ποΈ My neighbors β you know who you are!
Built in 48 hours with β€οΈ for my neighborhood




Top comments (0)