I see a few problems/improvements I'd like to see resolved on the backend. I ordered them into two lists. Two lists, because they can be worked on in parallel (though ideally we'd work on the service layer list first, imo). The order of the projects is such that later projects build upon those preceding it.
## Service layer list:
1. Reduce our Django code; use database identifiers on the frontend;
2. Use only Postgres permissions for permissions;
3. Replace SQLAlchemy with Psycopg3;
4. SaaS version.
Rationale being that before we start our work on the SaaS version, we want scalability. We need to replace SA to get scalability. And, we want to get rid of our custom permission code and unnecessary django state to make it easier to replace SA.
1. Organise our SQL code into Mathesar's Postgres extension;
2. Try moving logic from backend to Postgres extension.
Rationale being that managing our custom SQL code (like Postgres functions and types) ad-hoc is unsustainable (upgrades), we want the Postgres extension tooling for that. Once we have that, we want to try moving logic from our db namespace to the Postgres extension. Logic that would be simpler and/or more efficient on Postgres than in Python (type inference, column moving, table splitting, etc.).
## What I want to work on
I like all of these, but feel like I have more to offer in the service layer tasks. To narrow it down, I'd like to work on reducing Django code (project 1) and replacing SQLAlchemy (project 3). Experience with one would provide insights with the other. Project 2 (using Postgres permissions) would also provide insights for project 3, but I have less experience thinking about permissions.
I think that in the past in situations like these we took the opportunity to split similar work between multiple people, significantly degrading efficiency and outcome of both. I hope we're more careful with that in the future.