Tetra - A full stack component framework for Django using Alpine.js

Hi everyone!

I have been working on Tetra for the last few months and feel it’s now time to put it out there and get some feedback.

Please take a look. There are a few fully functional examples on the homepage: https://www.tetraframework.com

Tetra is a full stack component framework for Django built on top of Alpine.js. It is heavily inspired by frameworks such as Laravel Livewire and Phoenix Liveview, enabling you to create server rendered components that respond to user interactions reactively. However, it builds on the concept by allowing you to build “hybrid” components that also have full JavaScript capabilities thanks to using Alpine.js.

It also builds on the trend of bringing the different parts of a component (Python, HTML, CSS, JavaScript) into closer proximity, by keeping all related parts in the same file. It uses esbuild to bundle your JavaScript and CSS, whilst also creating source maps, making it possible to trace errors back to the original Python source files.

In terms of future plans, I’m aiming for a v1 release this summer - there is still quite a long to-do list! I have been working on this in my spare time so far, but hope to find the opportunity to work on it full time. I think there is a gap in the current Python framework ecosystem, and I believe, that what I have designed in Tetra plugs that gap. I hope to build this into a significant contribution to the community.

Finally, the docs are here: Tetra - Introduction

11 Likes

Cool to see some innovation in this space! Will keep an eye on this :slight_smile:

1 Like

This looks like something tailored exactly to my needs.

I have been using only jQuery and recently Alpine because I am hesitant to use “full” JS framework that is needlesly complicated for my needs.

Good luck with the development!

1 Like

Looks amazing.

I definitely like the philosophy of “close proximity of related concerns”.

Thanks for putting this together. I’ll give it a try and see if I can contribute further down the line.

1 Like

Yes, it plugs that gap perfectly. Congrats! Awesome job. Unfortunately I guess I don’t have enough developer skills to the task, but I believe there are other ways to contribute. I’ll be around, count on me.

It looks amazing bro

Hi there! Thanks for sharing Tetra with us. It looks like an interesting framework, especially for Django developers who want to build reactive server-rendered components. I like the idea of keeping all related parts of a component in the same file and using esbuild to bundle the code.

It’s great to hear that you’re planning to release a v1 this summer and have further plans to build Tetra into a significant contribution to the Python framework ecosystem. I wish you the best of luck with your development and hope to see more from Tetra in the future!

Hi, this looks great. How do you see it different than django-unicorn?

https://www.django-unicorn.com/

Nvm, I found the discussions.

It is amazing, thanks for sharing this here :v: