Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kirillzhosul/subscriby
Easy deployable system (API) for creating subscription based applications.
https://github.com/kirillzhosul/subscriby
api docker docker-compose fastapi saas self-hosted subscription
Last synced: 20 days ago
JSON representation
Easy deployable system (API) for creating subscription based applications.
- Host: GitHub
- URL: https://github.com/kirillzhosul/subscriby
- Owner: kirillzhosul
- License: mit
- Created: 2023-08-24T21:09:54.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-23T11:45:51.000Z (about 1 year ago)
- Last Synced: 2024-11-30T11:50:12.317Z (25 days ago)
- Topics: api, docker, docker-compose, fastapi, saas, self-hosted, subscription
- Language: Python
- Homepage:
- Size: 115 KB
- Stars: 9
- Watchers: 1
- Forks: 3
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🔐 Subscriby
Easy deployable system (API) for creating subscription based applications
# Use case
- You have desktop or other application that requires subscription
- You want to use subscription-like tokens/keys# How to use
- Deploy API on the your server
- Query your subscription key from user inside your application (fetch API call)
- Create and manage new subscription for users (by hand, implementing own management tool, or use premade inside `frontends` directory)# Notice
Project does provide support for storing / analysing (KPI) of prices/revenue, but not the purchasing via any payment provider or etc, you can write own frontend for that or publishing subscriptions by own
# Authorization
`SUBSCRIBY_AUTH_METHOD` Auth methods to use
- `none`: No additional authorization
- `secret`: Require `secret` GET field or `Authorization` header (with or without `Bearer`) which should equals to `SUBSCRIBY_AUTH_SECRET`
- `custom`: Will call `plugins/custom_auth` plugin with your own code.# Frontends
- Telegram bot [`frontends/telegram`](frontends/telegram)
# Features
- Creating new subscriptions
- Checking subscription status
- Revoking subscriptions
- Analytics (KPI, even for your payload via plugin)
- Custom payload injected within subscriptions
- Auth for system methods (publish, revoke)
- Webhook notification for clients# Plugins
There is support for custom plugins for:
- Auth (Check own custom auth)
- Payload (Inject custom payload with or without validation)
- Analytics (Inject own KPI trackers)# Deployment
(How to deploy API)
- Do `git clone` on your server
- Edit `backend/.example.env` and copy to `.env`
- Run `docker compose up -d` inside `backend` directory# Built stack
- Python (FastAPI)
- PostgreSQL (SQLAlchemy)
- Docker
- Gunicorn with Uvicorn under the hood# Running behing a proxy
Should be same as default deployment but you have to declare proxy to the API (Like, for NGINX)