Coder Social home page Coder Social logo

worf-dev / worf Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 943 KB

Worf is an open-source revenue framework for digital businesses. Accelerate development, orchestrate external tools, reduce risk and manage compliance.

Makefile 0.25% Python 85.45% CSS 6.57% HTML 7.68% JavaScript 0.04%
authentication authorization billing newsletter revenue saas subscriptions subscriptions-and-payments

worf's Introduction

Worf - User & Revenue Management Framework!

Worf (which is short for Web-based Open source Revenue Framework) is a user management and revenue framework that makes it easy to manage the entire user journey for your digital product, software solution or software-as-a-service (SaaS) business. Worf can manage all your user data and handles authentication, subscriptions, billing, role-based access management, among other things. It can be easily extended with additional functionality and provides a single source of truth about your users. Worf is security-focused and provides privacy-friendly solutions for the most common problems you face when managing a userbase. It can also work with external services for things like social logins or payments.

Please note that this is still a pre-alpha build of Worf, it's still a work in progress.

Installing

You can install Worf using pip:

pip install .

When developing Worf, you can install the package in development mode, which will not copy files but instead link them to your virtual environment so that you can edit them and see changes immediately:

pip install -e .

If you want to run tests, please also install test dependencies:

pip install -r requirements-test.txt --no-index --find-links wheels

Defining settings

Worf loads settings from the directory specified in the WORF_SETTINGS_D environment variable. You can specify multiple directories separated by a : character as well.

For development, you can point the variable to the settings directory in the Worf repository:

export WORF_SETTINGS_D=settings

Alterantively, you can use the .dev-setup file:

source .dev-setup

Setting Up The Database

Worf requires a Postgresql database. By default, it tries to access a worf_development or worf_test database for the development or tests, respectively. The default username and password is set as worf in the settings (don't use this in production!). To create the databases:

su postgres
psql
> CREATE DATABASE worf_development;
> CREATE DATABASE worf_test;
> CREATE USER worf WITH ENCRYPTED PASSWORD 'worf';
> GRANT ALL PRIVILEGES ON DATABASE worf_development TO worf;
> GRANT ALL PRIVILEGES ON DATABASE worf_test TO worf;

That's it! Now you can run tests and migrate the database for development.

Migrations

Worf runs on Postgres (but can support SQLite too). The database schema is managed using SQL migration files. To run the migrations simply execute

worf db migrate

To add a new migration, create a pair of files in the migrations directory and define your SQL commands for migrating up and down. Take a look at the existing files to get a feeling for the format.

Running Worf

To run Worf:

worf api run

To run the background worker:

worf worker run

Creating a superuser

When using Worf for the first time, you will need to create a superuser, which you can do with the following command:

worf user create admin --superuser

Upgrading packages

You can use the fabulous pur tool to upgrade packages in the requirements files:

make update

Building Wheels

We install all packages from local wheels if possible (for security reasons), to generate these wheels simply use the following commands:

make wheels

worf's People

Contributors

thmull avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.