- Node.js 18+ and npm
- Rust and Cargo
- Stellar CLI (
cargo install soroban-cli) - PostgreSQL
- Freighter Wallet browser extension
Windows:
setup.batLinux/Mac:
chmod +x setup.sh
./setup.sh1. Install Dependencies
# Frontend
cd frontend
npm install
# Backend
cd ../backend
npm install
# Contracts
cd ../contract
cargo build --release --target wasm32-unknown-unknown2. Configure Environment
# Frontend
cd frontend
cp .env.local.example .env.local
# Edit .env.local
# Backend
cd ../backend
cp .env.example .env
# Edit .envcd contract
# Deploy subscription contract
soroban contract deploy \
--wasm target/wasm32-unknown-unknown/release/subscription.wasm \
--network testnet \
--source <YOUR_SECRET_KEY>
# Save the contract ID and update your .env filessoroban contract invoke \
--id <CONTRACT_ID> \
--network testnet \
--source <YOUR_SECRET_KEY> \
-- init \
--admin <ADMIN_ADDRESS> \
--fee_bps 500 \
--fee_recipient <FEE_ADDRESS> \
--token <TOKEN_ADDRESS> \
--price 10000000Terminal 1 - Database:
# Using Docker
docker run -d -p 5432:5432 \
-e POSTGRES_PASSWORD=postgres \
-e POSTGRES_DB=myfans \
postgres
# Or start your local PostgreSQLTerminal 2 - Backend:
cd backend
npm run start:dev
# Runs on http://localhost:3001Terminal 3 - Frontend:
cd frontend
npm run dev
# Runs on http://localhost:3000-
Install Freighter Wallet
- Chrome: https://chrome.google.com/webstore
- Firefox: https://addons.mozilla.org
-
Fund Testnet Account
- Visit: https://laboratory.stellar.org/#account-creator
- Create and fund a testnet account
-
Connect Wallet
- Open http://localhost:3000
- Click "Connect Wallet"
- Approve connection in Freighter
-
Create a Plan (as Creator)
- Go to Dashboard → Plans
- Create a subscription plan
- Set price and interval
-
Subscribe (as Fan)
- Browse creators
- Select a plan
- Complete checkout
- Sign transaction in Freighter
Check subscription status:
soroban contract invoke \
--id <CONTRACT_ID> \
--network testnet \
-- is_subscriber \
--fan <FAN_ADDRESS> \
--creator <CREATOR_ADDRESS>- Ensure you have testnet XLM
- Check your secret key is correct
- Verify soroban-cli is installed
- Check PostgreSQL is running
- Verify .env file exists and is configured
- Check port 3001 is available
- Verify Freighter is installed
- Check .env.local has correct contract ID
- Ensure backend is running
- Check wallet has sufficient balance
- Verify contract is initialized
- Check network (testnet vs mainnet)
-
Make contract changes:
cd contract cargo test cargo build --release --target wasm32-unknown-unknown # Redeploy if needed
-
Make backend changes:
cd backend npm run test # Server auto-reloads in dev mode
-
Make frontend changes:
cd frontend # Next.js auto-reloads
See DEPLOYMENT.md for production deployment guide.
Once backend is running, visit:
- Swagger UI: http://localhost:3001/api
- Health check: http://localhost:3001/health
- Email: [email protected]
- Issues: GitHub Issues
- Docs: See INTEGRATION.md for detailed integration guide