Add comments
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
# Template for fastapi backend for aayutech projects
|
||||
|
||||
Fastapi doesn't ship with support for orm, authentication etc.
|
||||
This repo implements all the basic tools and their integrations
|
||||
so we can start from here
|
||||
|
||||
## Libraries used
|
||||
1. Fastapi
|
||||
2. Alembic
|
||||
@@ -8,10 +12,28 @@
|
||||
|
||||
## Features
|
||||
1. Base user and /login using Oauth2
|
||||
2. Api logging in audit table table
|
||||
3. Model base class including soft delete, created_at, updated_at
|
||||
4. Model auditing by default
|
||||
2. Api logging in audit table
|
||||
3. Model for base class including soft delete, created_at, updated_at
|
||||
4. Table auditing by default
|
||||
5. Static files routing
|
||||
6. Exception handling
|
||||
|
||||
|
||||
# Code structure
|
||||
## Utilities
|
||||
1. the exceptions.py file implmenets ExceptionHandlerRoute, All routes derive from this
|
||||
2. All routes are included in routes.py
|
||||
3. background.py includes a write log function that stores all the request response on a table
|
||||
4. middlewares.py implements a HTTP middleware, it calls background.py's log_api function
|
||||
|
||||
### db folder
|
||||
1. config.py file contains environment files declarations
|
||||
2. db.py contains database configuration and contains safe_commit function that handles exception while commiting to database
|
||||
|
||||
### alembic
|
||||
Alembic is configured to take the postgresql from .env file
|
||||
|
||||
|
||||
## TODO:
|
||||
5. Optional multitenant
|
||||
Optional multitenant
|
||||
Tests
|
||||
|
||||
Reference in New Issue
Block a user