Skip to content

aeecleclair/CalypSSO

Repository files navigation

CalypSSO

Node project build as a Python module for Hyperion. CalypSSO is composed of:

  • A small and static Next.js frontend for Hyperion

Next.js development

You can set Hyperion base url in a dotenv /web/.env

yarn install
yarn dev:web

Pages

The base url of this project is /calypsso.

You will find:

Maizzle emails template

Email templates are build using Maizzle.

To preview mails during development use:

yarn install
yarn dev:mail

Email contains escaped template strings:@{{ variable_name }} will be rendered by Maizzle as {{ variable_name }}. Then the Python module will process these expressions using Jinja2

Emails, layout and components are based on maizzle base template repository and design.

You can set the frontmatter preheader of a mail to customize the text preview of the email. See preview-text

Variable starting with an underscore (ex: _logo_url) will be set globally by CalypSSO Python module.

Build Python module

First you need to compile the Next.js project

yarn install
yarn build

The build pages will be located in the /out directory. The small Python package sources are located in /python.

You can install it locally in an other python project using

pip install "path/to/calypsso"

To use it, you need to mount CalypSSO at the subpath /calypsso

For exemple with FastAPI, you could do:

from fastapi import FastAPI

# Define your app
app = FastAPI(
    title="MyFastAPIApp",
)
# ...
# Mount CalypSSO app at the subpath /calypsso
calypsso = get_calypsso_app()
app.mount("/calypsso", calypsso)

Make a release on Pypi

You need to edit CalypSSO version in python/calypsso/__about__.py. Then make a release on GitHub and add a tag. The tag should match v*.*.*.

About

A small and static Next.js frontend for Hyperion's SSO

Topics

Resources

License

Stars

Watchers

Forks

Contributors 6