> For the complete documentation index, see [llms.txt](https://razortheory.gitbook.io/action-points-dashboard/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://razortheory.gitbook.io/action-points-dashboard/technical-documentation/backend-module-structure.md).

# Backend module structure

### Action Points module files structure <a href="#audit-module-files-structure" id="audit-module-files-structure"></a>

![](https://3627606224-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJT531BxmrgZ_gS1UJP%2F-LMmPzS178kgDeLwmWKp%2F-LMmQJphd782YaDGeam5%2FScreenshot%20from%202018-09-19%2018-22-40.png?alt=media\&token=b2e6f89c-81fa-43b6-9fa9-2f1547384e8c)

\- `categories` - nested global application to store list of available categories for action points\
\- `export` - everything that is related to csv & pdf exports\
&#x20;   \- `renderers.py` - csv renderers\
&#x20;   \- `serializers.py` - csv & pdf serializers\
\- `management` - specific management commands (in our case there is only one command for updating permissions)\
&#x20;-`migrations` - database migrations\
\- `notifications` - templates for email notifications\
\- `tests` - tests for models, views, serializers, transitions flow\
\- `transitions` - everything that is related to fsm transitions\
&#x20;   \- `conditions.py` - custom checks for transitions (for example in case of submitting report we need to be assured that report attachments exist)\
\- `admin.py` - admin site definitions for models\
\- `apps.py` - python app configuration\
\- `conditions.py` - conditions to perform FSM transitions, see more details [here](https://razortheory.gitbook.io/third-party-monitoring-module-documentation/technical-documentation/fsm-transitions-conditions)\
\- `filters.py` - rest framework views filters\
\- `metadata.py` - base metadata class to be used in viewsets. more in [API Metadata section](https://razortheory.gitbook.io/third-party-monitoring-module-documentation/technical-documentation/api-metadata)\
\- `models.py` -  country-related audit models\
\- `serializers`- rest framework serializers\
\- `signals.py` - app signals. custom logic for user deletion; sending notifications in case of assigning action points\
\- `urls.py` - app urls\
\- `views.py` - just set of views to work with models

### action\_points.categories app

![](https://3627606224-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJT531BxmrgZ_gS1UJP%2F-LMmPzS178kgDeLwmWKp%2F-LMmQZ6GRV2s8xv7zBJF%2FScreenshot%20from%202018-09-19%2018-23-31.png?alt=media\&token=24480a70-ced5-402e-b211-414a4d7f70b1)

To store action points categories which are global,  nested application named `categories` was implemented.\
Views and serializers are still placed in the parent application to keep consistant place for all module logic.

&#x20;The App consists of the following parts:\
\- `migrations` - database migrations\
\- `admin.py` - admin site config\
\- `apps.py` - python app config\
\- `models.py` - partner with their staff members\
\- `serializers.py` - rest framework category serializer
