2
4 Comments

Opinionated backend/frontend stack

Hello Hackers,

This message is to anyone who is starting out to build their web apps and are looking for a backend/frontend stack. We have been working with a Python and JS based stack, which is opinionated but would make the start easy. Built on top of well recognized open source software, we have just been using them in the combination with light glue libraries.

Our eventual intention is to make a playbook with great docs and linking to all the software in the stack so it is easy to start and maintain. What's in the stack:

  • Python with Sanic, Marshmallow (JSON-API)

  • PostgreSQL with SQLAlchemy and SQLAlchemy Migrate

  • Workers with aioamqp and RabbitMQ

  • Tiny library on top of all this to make things easy (commands)

  • React, Redux, Router

  • Tiny set of glue code for data management, Fetch, etc.

  • [WIP] React Admin integrated

We have never release software code so there is a little hesitation and thus we are looking for a show of hands. Everything will be released with MIT or similar license, but initially we want a tiny group to show this to, including experienced technical folks.

on June 11, 2019
  1. 1

    How do you use SQLAlchemy on top of Sanic?

    Also, why Sanic?

    1. 1

      SQLAlchemy makes no expectations about what web framework you use. With difficulty you can even use it with a large framework like Django.

      The reason for Sanic was because we wanted a micro framework with a decent community. Sanic is built on asyncio, well suited for JSON based APIs. We do not render any HTML from backend.

      1. 1

        SQLAlchemy makes no expectations about what web framework you use.

        How do you do multiple asynchronous queries? Like when you have a given model and want to fetch a related model or many-to-many fields?

        The reason for Sanic was because we wanted a micro framework

        You can make single page documentation of the subset of aiohttp that is suitable.

        Also Flask API is no-go zone for me.

        with a decent community.

        Popularity is over-rated.

        initially we want a tiny group to show this to, including experienced technical folks.

        I am not sure this blends well with Open Source. Why not push the code on github first, then do an release when all is setup ready?

        Also, it is nice more people are using asyncio :)

        1. 1

          First of all to get async queries to DB, you will need an async connector, like asyncpg. I am not sure it is production ready but has good traction. Queries are then async, but how you pipeline them is your choice/design.

          A single page documentation is great, but a micro framework gets you started easily. I mentioned "opinionated" for a reason.

          I did not mention popularity but community, they are different. Again this is preference.

          We definitely intend to push the code, but wanted to see if there were folks looking for get started and we could build docs as we helped them directly.