#1 Communiy Bonding Period
Hola Amigo!
Welcome to my first blog post during the Google Summer of Code 2022.
Summary
I've managed to do a lot during the Community bonding period :). I had several discussions with my mentor on choosing the right framework and tools for the project.
In the end, we finalized on the following setup
- React + Tailwind CSS for frontend
- FastAPI for backend
- Nginx which acts as a reverse proxy and serves frontend build.
- Redis database to store server sessions.
The final product will be deployed with the help of docker.
Why we chose FastAPI and not Django?
Initially, I planned to use Django framework as backend as presented in my project proposal. Django is mostly known for its "batteries-included" nature where it takes care of most of the security features like user authentication and CSRF tokens for forms. It also has a very good ORM support and not to forget it is a battle-tested framework.
But like every other framework it has its cons - It is very opinionated framework and dosen't have good async support.
And when it comes to FastAPI, it has a very good async support and is very flexible (too flexible in fact). It has its own cons too - relatively new framework and requires the developer to configure most of the important functionalities like server-sessions and user authentication.
In the end, we chose FastAPI since we wont be needing ORM and default Admin page which Django provides as most of our data will be stored in the matrix servers as account data.
Since, this is a blank slate project the most important thing is to decide on the name of the project and the logo.
I came up with a list of names (some were crazy though XD) and me and my mentors decided to name our project matrix-cerberus. (Cerberus the greek hellhound which guards the gates of HELL!)
After that I finished creating the boilerplate code for the project and hosted it on https://cerberus.cadair.dev/ (do check it out :D)
#Week 2 of Community Bonding Period:
I use express-sessions a lot in my Node JS projects and I tried to find an exact implementation in FastAPI. Unfortunately, I couldn't find a proper one. So, I decided to make one myself (inserts thanos meme).
I spent major portion of this week trying to configure server-sessions by saving the current user session in a redis database. You can find the implementation here.
#Week 3 of Community Bonding Period:
During the last week, I was mostly trying to refine my project proposal and prepare a new action plan (timeline) for the upcoming Coding Period.
I am also pretty new to some of the tech stack (Docker, FastAPI). So, I mostly used this period to go over the Documentation and some reference implementations.
Comments
Post a Comment