Skip to content

Easy deployable system (API) for creating subscription based applications.

License

Notifications You must be signed in to change notification settings

kirillzhosul/subscriby

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔐 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

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)

About

Easy deployable system (API) for creating subscription based applications.

Topics

Resources

License

Stars

Watchers

Forks