Sahana 4

Sahana Eden was developed as 'S3': Sahana 3
It was written using the technology choices available at the time.
Those technologies are still working, however they are falling out of maintenance and are being eclipsed by more modern technologies.

If we are to reimagine Sahana now, what would it look like?


I long imagined that a future Sahana would be developed using NodeJS...partly due to it's async, non-blocking design & also because it was the same language as the front-end: JavaScript.
However Python now sports great async options which can beat NodeJS performance and Python remains a nicer language to work in, with the great libraries available (& extensible via wrapped C/++ libraries).


  • Django with Django REST Framework & Channels
    • Django has widespread support & Channels is great for adding WebSockets support, but isn't designed for high level concurrency of the REST API
  • Flask
    • the Quart variant works fully async, but is very bare bones
  • FastAPI
    • the self-documenting OpenAPI , like in DRF, is fantastic
    • fully async via Starlette & Uvicorn
    • can easily add GraphQL API for versionless (Strawberry looks better than Ariadne here)

reactive javascript

jQuery has been great, however is fast going out of fashion to be replaced by reactive frameworks.


  • ReactJS
  • VueJS
    • use SFCs with Composition API

What do we need?


Extensions should be able to be plugged-in easily & flexibly in languages/frameworks of the extender's choice (or plain HTML/JavaScript!)

  • currently it is a big barrier for 3rd-party developers to have to learn our full-stack framework, rather thsan being able to use the tools they know & love

Separation of Concerns

The full-stack MVC where our base UI is all generated from Python is great for us core developers, but makes 3rd-party extensibility harder.
Separating into classic front-end & back-end makes development more scalable and flexible.


We want to retain the great hierarchical entity realms that we have in S3, but also make it easier to provide per-record sharing (Evac has some progress in this area).

Fully Typed

  • Core Python & JavaScript should all be fully Type Annotated.
  • Extensions don't need to follow this rule.

Fully Tested

  • Core Python & JavaScript should have 100% Test coverage.
  • Extensions don't need to follow this rule.


  • GitLab runners to run Lint (Pyre for Python Type checking, ESLint for JS) & Testing (PyTest for Python, Vitest for JS)
  • Options to update Deployed systems

Deployable via Docker

  • App, nginx, Database as separate Imagesorechestrated via Compose
Last modified 20 months ago Last modified on 02/14/22 16:29:03
Note: See TracWiki for help on using the wiki.