Skip to content

About

No description, website, or topics provided.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

36 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stellar Subscriptions API + Documentation

License: MIT Rust Next.js

Recurring payments on Stellar with bounded, revocable authorizations.

This repository contains:

  1. REST API — Rust/Axum service that indexes subscription activity from Stellar
  2. Documentation Site — Next.js/MDX comprehensive platform documentation

🔗 Related Repositories

🚀 Quick Start

API (Rust)

cd api
cargo build --release
cargo run

API runs on http://localhost:3001

Documentation Site (Next.js)

cd docs
npm install
npm run dev

Docs site runs on http://localhost:3000

📖 Documentation

Visit stellar-subscriptions.io/docs or run locally with npm run dev in the docs/ folder.

Key pages:

🏗️ Architecture

API Service

The API polls Horizon every 10 seconds for new transactions, parses contract events, and maintains an in-memory index of:

  • Plans (name, merchant, amount, interval, status)
  • Subscriptions (cap, charged amount, status, next charge ledger)
  • Platform statistics (total plans, subscriptions, charged volume)

Tech Stack:

  • Rust 1.75+
  • Axum web framework
  • Tokio async runtime
  • Reqwest for Horizon API calls
  • Serde for JSON serialization

Endpoints:

  • GET /plans — All active plans
  • GET /plans/:id — Plan details
  • GET /subscriptions — All subscriptions
  • GET /subscriptions/:id — Subscription details with next charge info
  • GET /merchants/:address/plans — Plans by merchant
  • GET /merchants/:address/subscriptions — Subscribers to a merchant
  • GET /stats — Platform statistics

Documentation Site

Next.js 14 app with:

  • MDX for content-rich documentation
  • Tailwind CSS for styling
  • Custom components (CalloutBox, CodeBlock, ApiEndpoint)
  • Sidebar navigation
  • Dark mode support

🛠️ Development

API Development

cd api
cargo watch -x run  # auto-reload on changes
cargo test          # run tests
cargo clippy        # linting

Docs Development

cd docs
npm run dev         # dev server with hot reload
npm run build       # production build
npm run lint        # ESLint

🧪 Testing

API Tests

cd api
cargo test --all

Docs Build Verification

cd docs
npm run build  # ensures all MDX compiles

📊 Project Status

  • ✅ API: Fully implemented, all endpoints functional
  • ✅ Docs: Complete documentation for all concepts, contracts, and API
  • ⚠️ Testnet only (mainnet contracts not yet deployed)
  • ⚠️ Unaudited (professional audit planned before mainnet)

🤝 Contributing

Important: Contributors should focus on documentation improvements only. The api/ folder is maintainer-managed, and PRs touching API code will be closed.

See CONTRIBUTING.md for guidelines on:

  • Improving documentation clarity
  • Adding code examples
  • Fixing typos and formatting
  • Translating docs (future)

📄 License

MIT License - see LICENSE for details

🔒 Security

For security concerns, please email security@stellar-subscriptions.io. Do not open public issues for vulnerabilities.

📞 Support

🙏 Acknowledgments

Built with:


Made with ❤️ for the Stellar ecosystem

About

No description, website, or topics provided.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages