EcoStay Rewards is an open-source sustainability incentive platform that helps hospitality businesses reward environmentally responsible behavior.
Built on Stellar, EcoStay enables hotels, resorts, restaurants, and tourism operators to incentivize sustainable actions using blockchain-based reward tokens (ECOPT).
Hospitality businesses face increasing pressure to:
- Reduce carbon emissions
- Minimize food waste
- Lower energy consumption
- Improve ESG reporting
- Meet sustainability standards
Most sustainability initiatives fail because there are no direct incentives for guest participation.
EcoStay Rewards creates a tokenized sustainability ecosystem.
Guests earn points for actions such as:
- Skipping room cleaning
- Reusing towels
- Reducing food waste
- Using reusable bottles
- Choosing digital receipts
- Participating in recycling programs
- Using public transportation
- Using e-check-in
Points are stored in a guest wallet and redeemable for rewards (free breakfast, spa discounts, room upgrades, late checkout, and more). Each point issuance is backed by an on-chain ECOPT token on the Stellar network.
Hotels receive:
- Real-time sustainability analytics dashboard
- Campaign management tools
- Carbon impact reports
- ESG export (GRI, SASB, TCFD, CSV)
- Guest engagement metrics
ecostay-rewards/
├── apps/
│ ├── guest-app/ # Next.js 14 — guest-facing PWA (port 3000)
│ └── hotel-dashboard/ # Next.js 14 — hotel admin dashboard (port 3001)
├── services/
│ └── reward-engine/ # NestJS — core API + Stellar integration (port 3333)
├── docker-compose.yml
└── package.json # npm workspaces root
| Layer | Technology |
|---|---|
| Guest App | Next.js 14, React 18, Tailwind CSS, Zustand |
| Hotel Dashboard | Next.js 14, React 18, Tailwind CSS, Recharts |
| API / Backend | NestJS 10, TypeORM, PostgreSQL 16, Redis 7 |
| Blockchain | Stellar SDK v11, ECOPT token (Stellar asset) |
| Infrastructure | Docker, Docker Compose |
| State Management | Zustand (with localStorage persistence) |
Mobile-first PWA for hotel guests.
| Route | Description |
|---|---|
/ |
Home — entry point with wallet and earn CTAs |
/actions |
Eco actions catalogue — claim points per action |
/scan |
QR code scanner — log actions at hotel stations |
/wallet |
Points balance, transaction history, redeem link |
/redeem |
Rewards catalogue with category filter + confirmation |
/profile |
Sustainability level, badges, CO₂ impact summary |
Key components:
BottomNav— 5-tab sticky navigationHeader— reusable page header with optional back navigationPointsBadge— points display badgestore/walletStore.ts— Zustand store (points, transactions, claimed actions, persisted)lib/api.ts— axios client pointed at the reward engine
Admin interface for hotel sustainability managers.
| Route | Description |
|---|---|
/ |
Overview — KPI stats, top eco actions, quick links |
/analytics |
Bar, line, and pie charts for engagement + carbon data |
/campaigns |
List of reward campaigns with status |
/campaigns/new |
Campaign creation form (action, points, schedule, limits) |
/carbon-report |
CO₂ saved vs baseline chart + per-action impact table |
/esg-export |
ESG report generator (GRI / SASB / TCFD / CSV) |
/settings |
Hotel profile and Stellar integration config |
Key components:
Sidebar— persistent nav with active link highlightingStatCard— KPI card with optional trend indicator
NestJS REST API — the core backend service.
| Method | Path | Description |
|---|---|---|
POST |
/rewards/earn |
Award points for an eco action |
POST |
/rewards/redeem |
Redeem points for a reward |
GET |
/guests/:guestId/wallet |
Fetch wallet balance and history |
GET |
/eco-actions |
List all active eco actions |
- RewardsModule — earn/redeem logic, transaction recording
- GuestsModule — guest entity and wallet
- EcoActionsModule — action catalogue with auto-seeding on boot
- StellarModule — ECOPT token issuance via Stellar SDK
| Action | Points |
|---|---|
| Skip Room Cleaning | 50 |
| Public Transportation | 60 |
| Reduce Food Waste | 40 |
| Participate in Recycling | 35 |
| Reuse Towels | 30 |
| Use Reusable Bottle | 25 |
| E-Check-In | 20 |
| Digital Receipt | 10 |
- Node.js 20+
- Docker and Docker Compose
git clone https://github.com/your-org/ecostay-rewards.git
cd ecostay-rewards
npm installcp services/reward-engine/.env.example services/reward-engine/.env
# Edit .env — set DB credentials and STELLAR_ISSUER_SECRET# Start PostgreSQL and Redis
docker-compose up -d postgres redis# Reward engine (port 3333)
npm run dev:engine
# Guest app (port 3000)
npm run dev:guest
# Hotel dashboard (port 3001)
npm run dev:dashboarddocker-compose up --buildSee services/reward-engine/.env.example for the full list. Key variables:
| Variable | Description | Default |
|---|---|---|
DB_HOST |
PostgreSQL host | localhost |
DB_PORT |
PostgreSQL port | 5432 |
REDIS_HOST |
Redis host | localhost |
STELLAR_NETWORK |
testnet or mainnet |
testnet |
STELLAR_ISSUER_SECRET |
Stellar issuer secret key (S...) | — |
STELLAR_TOKEN_CODE |
Token asset code | ECOPT |
- Phase 1 (current): Reward engine, guest wallet, QR validation, hotel dashboard, carbon reporting, ESG export
- Phase 2: Kafka event streaming, ClickHouse analytics, sustainability marketplace, partner integrations
- Phase 3: Carbon credit marketplace, DAO governance, Soroban smart contracts, global deployment
MIT License