Interesting choices. You have a refreshing approach to implementing different layers in fastAPI. I have some questions and suggestions for you:
- Have you considered using a src layout? I like your structure, but I think a src layout would make it clearer which directories are essential for the app. Right now, I have to guess from the names or check the dockerfile.
- Why do you use a decorator like rbac_access_checker instead of the dependency injection system from fastAPI? Maybe you could combine it with a starlette middleware.
- You could move the routings and exceptions in the app.py to a separate file if you add more endpoints in the future. This would make your code more modular and readable.
- You use @staticmethod a lot in your services. Is there a reason for that? I find it unusual to see only static methods in a service layer.
Overall, your code looks a bit complex for what it does. But this is just my impression, I haven’t studied your code in depth. Thumbs up for sharing your approach on how to structure a fasAPI project/app.