zixweb


Namezixweb JSON
Version 0.1.8 PyPI version JSON
download
home_pagehttps://github.com/anelendata/zix
Summaryzix - Create your SaaS app quickly by adding plugins!
upload_time2024-09-19 04:42:31
maintainerNone
docs_urlNone
authorDaigo Tanaka, Anelen Co., LLC
requires_pythonNone
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # zix

FastAPI based web app framework.

## Introduction

I wanted to build a web app with frontend, backend, database, login,
email services, and paywall very quickly.

Since those are common skeleton for most SaazS apps, I built a plugin
framework to build apps quickly.

## Prereqs

- Python 3.8 or later is installed

## Install

Make and activate a Python environment:

```
python -m venv venv
source ./venv/bin/activate
```

```
pip install -U pip
pip install zixweb
```

## Create an app

```
zix init -w myapp
cd myapp
pip install -r requirement.txt
pip install -r requirement_dev.txt
```

requirement.txt contains the modules required for running the app.
requirement_dev.txt contains the modules required for developing the app.

The rest of the document assumes your project is in `myapp` directory.

## Create tables

By default, it will run Sqlite and creates zix.db file in the project root directory.

```
alembic revision --autogenerate -m "initial models"
alembic upgrade head
```

## Set up env.yml file

From the project root, do:

```
mkdir .env
cp env.yml .env
```

Open .env/env.yml at the root project directory.

To use Auth0 login, sign up (should be free) at https://auth0.com

To try the test app,
1. Go to Applications from the left menu and select Default App.
2. Copy and Domain, Client ID and Client Secret and paste them into env.yml file into the corresponding fields.
3. Set Application Type to "Regular Web Application."
4. Enter "http://localhost:4000" to Allowed Callback URLs, Allowed Logout URLs, and Allowed Web Origins
5. Click Save

## Run app

Go to the project root directory and run:

```
zix -w . -p 4000 -e .env/env.yml serve
```

Point browser to `http://localhost:4000`

## Frontend and static files

Try modifying `myapp/static/compiled/index.html`
and run the server again.

Place frontend and static files under `myapp/static/compiled`
Anything under compiled folder is served under `/`
as long as the path is not taken by the API endpoints you define.


## Vanilla Bootstrap Studio project

Under the myapp directory, you'll find bstudio directory.
If you have an active license of Bootstrap Studio, you can
open this project.

Go to Export Settings on Bootstrap Studio and set the export path
to `myapp/static/compiled`. Then export.

Run the server again. Now you have an (empty) webapp UI.

## Add endpoints

Take a look at `myapp/plugins/core/routers.py` and `myapp/plugins/web/routers.py`.
You can add your service under plugins directory.

## Third-party services

In coming release of zix, I'm going to add the complete code to leverage these third-party services:

### Auth0 (login)

To be written

### Stripe (payment)

To be written

### SendGrid (email)

To be written

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/anelendata/zix",
    "name": "zixweb",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": null,
    "author": "Daigo Tanaka, Anelen Co., LLC",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/5c/a0/390e6c46b3c0bfbcc023f4e9bd557c83bd513c582ff0b718f69cb1c64bc6/zixweb-0.1.8.tar.gz",
    "platform": null,
    "description": "# zix\n\nFastAPI based web app framework.\n\n## Introduction\n\nI wanted to build a web app with frontend, backend, database, login,\nemail services, and paywall very quickly.\n\nSince those are common skeleton for most SaazS apps, I built a plugin\nframework to build apps quickly.\n\n## Prereqs\n\n- Python 3.8 or later is installed\n\n## Install\n\nMake and activate a Python environment:\n\n```\npython -m venv venv\nsource ./venv/bin/activate\n```\n\n```\npip install -U pip\npip install zixweb\n```\n\n## Create an app\n\n```\nzix init -w myapp\ncd myapp\npip install -r requirement.txt\npip install -r requirement_dev.txt\n```\n\nrequirement.txt contains the modules required for running the app.\nrequirement_dev.txt contains the modules required for developing the app.\n\nThe rest of the document assumes your project is in `myapp` directory.\n\n## Create tables\n\nBy default, it will run Sqlite and creates zix.db file in the project root directory.\n\n```\nalembic revision --autogenerate -m \"initial models\"\nalembic upgrade head\n```\n\n## Set up env.yml file\n\nFrom the project root, do:\n\n```\nmkdir .env\ncp env.yml .env\n```\n\nOpen .env/env.yml at the root project directory.\n\nTo use Auth0 login, sign up (should be free) at https://auth0.com\n\nTo try the test app,\n1. Go to Applications from the left menu and select Default App.\n2. Copy and Domain, Client ID and Client Secret and paste them into env.yml file into the corresponding fields.\n3. Set Application Type to \"Regular Web Application.\"\n4. Enter \"http://localhost:4000\" to Allowed Callback URLs, Allowed Logout URLs, and Allowed Web Origins\n5. Click Save\n\n## Run app\n\nGo to the project root directory and run:\n\n```\nzix -w . -p 4000 -e .env/env.yml serve\n```\n\nPoint browser to `http://localhost:4000`\n\n## Frontend and static files\n\nTry modifying `myapp/static/compiled/index.html`\nand run the server again.\n\nPlace frontend and static files under `myapp/static/compiled`\nAnything under compiled folder is served under `/`\nas long as the path is not taken by the API endpoints you define.\n\n\n## Vanilla Bootstrap Studio project\n\nUnder the myapp directory, you'll find bstudio directory.\nIf you have an active license of Bootstrap Studio, you can\nopen this project.\n\nGo to Export Settings on Bootstrap Studio and set the export path\nto `myapp/static/compiled`. Then export.\n\nRun the server again. Now you have an (empty) webapp UI.\n\n## Add endpoints\n\nTake a look at `myapp/plugins/core/routers.py` and `myapp/plugins/web/routers.py`.\nYou can add your service under plugins directory.\n\n## Third-party services\n\nIn coming release of zix, I'm going to add the complete code to leverage these third-party services:\n\n### Auth0 (login)\n\nTo be written\n\n### Stripe (payment)\n\nTo be written\n\n### SendGrid (email)\n\nTo be written\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "zix - Create your SaaS app quickly by adding plugins!",
    "version": "0.1.8",
    "project_urls": {
        "Homepage": "https://github.com/anelendata/zix"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2a767d8754031ae73f49f40a1db37a3ec4420e2b21029025f678973f783621b5",
                "md5": "2aa7318aefc0647bd5113019a3f78f5a",
                "sha256": "c12b07458662e709c8cbbc8f2d45cd3e51051c3b2d7a5fe3aba4d21c6846ac02"
            },
            "downloads": -1,
            "filename": "zixweb-0.1.8-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2aa7318aefc0647bd5113019a3f78f5a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 1983558,
            "upload_time": "2024-09-19T04:42:29",
            "upload_time_iso_8601": "2024-09-19T04:42:29.287562Z",
            "url": "https://files.pythonhosted.org/packages/2a/76/7d8754031ae73f49f40a1db37a3ec4420e2b21029025f678973f783621b5/zixweb-0.1.8-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5ca0390e6c46b3c0bfbcc023f4e9bd557c83bd513c582ff0b718f69cb1c64bc6",
                "md5": "97f7a4a0f24b11661ccefef59575ac60",
                "sha256": "b575eebcac49b7e57c462159210e53b396dee2e215d720e5af34821f715fab1b"
            },
            "downloads": -1,
            "filename": "zixweb-0.1.8.tar.gz",
            "has_sig": false,
            "md5_digest": "97f7a4a0f24b11661ccefef59575ac60",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 1962085,
            "upload_time": "2024-09-19T04:42:31",
            "upload_time_iso_8601": "2024-09-19T04:42:31.329568Z",
            "url": "https://files.pythonhosted.org/packages/5c/a0/390e6c46b3c0bfbcc023f4e9bd557c83bd513c582ff0b718f69cb1c64bc6/zixweb-0.1.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-19 04:42:31",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "anelendata",
    "github_project": "zix",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "zixweb"
}
        
Elapsed time: 1.37487s