# Backend — Tech Stack

**Repository**<span style="white-space: pre-wrap;">: </span>`<span class="editor-theme-code">finmars-platform/finmars-core</span>`<span style="white-space: pre-wrap;"> and </span>`<span class="editor-theme-code">finmars-platform/finmars-workflow</span>`

## Overview

This document lists the technologies, libraries, and approaches used in the core and workflow backend.

## Language

- ****Python****<span style="white-space: pre-wrap;"> (primary language)</span>

## Frameworks &amp; Runtime

- ****Django****<span style="white-space: pre-wrap;"> (project structure with </span>`<span class="editor-theme-code">manage.py</span>`, templates)
- ****Django REST Framework (DRF)****<span style="white-space: pre-wrap;"> (API layer)</span>
- ****Gunicorn****<span style="white-space: pre-wrap;"> (WSGI/ASGI server for running Django in production)</span>

## Dependency Management

- ****Poetry****<span style="white-space: pre-wrap;"> (</span>`<span class="editor-theme-code">pyproject.toml</span>`<span style="white-space: pre-wrap;"> present)</span>
- ****pip/requirements****<span style="white-space: pre-wrap;"> files for environments: </span>`<span class="editor-theme-code">requirements.txt</span>`<span style="white-space: pre-wrap;">, </span>`<span class="editor-theme-code">requirements-dev.txt</span>`<span style="white-space: pre-wrap;">, </span>`<span class="editor-theme-code">requirements-test.txt</span>`

## Containerization &amp; Local Orchestration

- ****Docker****<span style="white-space: pre-wrap;"> (</span>`<span class="editor-theme-code">Dockerfile</span>`)
- ****Docker Compose****<span style="white-space: pre-wrap;"> (</span>`<span class="editor-theme-code">docker-compose.yml</span>`)
- ****Makefile****<span style="white-space: pre-wrap;"> for common dev ops (</span>`<span class="editor-theme-code">make migrate</span>`<span style="white-space: pre-wrap;">, </span>`<span class="editor-theme-code">make up</span>`, etc.)

## CI/CD

- ****GitHub Actions****<span style="white-space: pre-wrap;"> for build/test/deploy pipelines</span>
- <span style="white-space: pre-wrap;">Builds use the provided </span>****Dockerfile****

## Scripts &amp; Tooling

- <span style="white-space: pre-wrap;">Shell scripts for setup and maintenance: </span>`<span class="editor-theme-code">generate_env.sh</span>`<span style="white-space: pre-wrap;">, </span>`<span class="editor-theme-code">migrate.sh</span>`<span style="white-space: pre-wrap;">, </span>`<span class="editor-theme-code">import-sql.sh</span>`<span style="white-space: pre-wrap;">, </span>`<span class="editor-theme-code">graph.sh</span>`

## Configuration

- `<span class="editor-theme-code">.env.sample</span>`<span style="white-space: pre-wrap;"> for environment variables example</span>
- Standard Django settings (inside the project; details depend on env files)

## Database

- ****PostgreSQL 15****

## Storage (one of options)

- ****S3 / Minio/ Azure Storages****
- ****Local File Storage****
- ****NFS Storage****

## Caching

- ****Redis****<span style="white-space: pre-wrap;"> (used for caching)</span>

## Message Queue &amp; Background Tasks

- ****RabbitMQ****<span style="white-space: pre-wrap;"> (used for task queues)</span>
- ****Celery****<span style="white-space: pre-wrap;"> (used for background and scheduled tasks)</span>

## Authentication

- ****Keycloak****<span style="white-space: pre-wrap;"> (mandatory integration for authentication)</span>

## Testing

- <span style="white-space: pre-wrap;">Test requirements listed in </span>`<span class="editor-theme-code">requirements-test.txt</span>`<span style="white-space: pre-wrap;"> (exact test tools depend on that file, e.g., pytest)</span>

## Libraries

<span style="white-space: pre-wrap;">The full list of libraries is declared in </span>`<span class="editor-theme-code">requirements.txt</span>`<span style="white-space: pre-wrap;"> and </span>`<span class="editor-theme-code">pyproject.toml</span>`. These include (but are not limited to):

```
aiohappyeyeballs==2.6.1
aiohttp==3.11.18
aiosignal==1.3.2
alabaster==1.0.0
amqp==5.3.1
asgiref==3.8.1
async-timeout==5.0.1
attrs==25.3.0
azure-core==1.31.0
azure-storage-blob==12.14.1
babel==2.17.0
bcrypt==4.3.0
beautifulsoup4==4.13.3
billiard==4.2.1
boto3==1.37.17
botocore==1.37.38
celery==5.4.0
certifi==2025.1.31
cffi==1.17.1
charset-normalizer==3.4.1
click==8.1.8
click-didyoumean==0.3.1
click-plugins==1.1.1
click-repl==0.3.0
coreapi==2.3.3
coreschema==0.0.4
cron-descriptor==1.4.5
croniter==6.0.0
cryptography==44.0.2
deepdiff==8.4.2
Django==4.2.22
django-celery-beat==2.7.0
django-celery-results==2.5.1
django-cors-headers==3.14.0
django-cprofile-middleware==1.0.5
django-crispy-forms==1.14.0
django-cuser==2017.3.16
django-filter==21.1
django-js-asset==2.2.0
django-modeltranslation==0.18.11
django-mptt==0.16.0
django-redis==5.4.0
django-rest-swagger==2.2.0
django-storages==1.14.5
django-timezone-field==7.1
django-tinymce==4.1.0
django_debug_toolbar==3.8.1
djangorestframework==3.15.2
djangorestframework-simplejwt==5.5.0
docutils==0.21.2
drf-yasg==1.21.10
ecdsa==0.19.1
et_xmlfile==2.0.0
factory_boy==3.3.3
Faker==37.1.0
filtration==2.3.0
flower==2.0.1
frozenlist==1.6.0
geoip2==5.0.1
gunicorn==23.0.0
humanize==4.12.2
idna==3.10
imagesize==1.4.1
inflection==0.5.1
ipcalc==1.99.0
isodate==0.7.2
itypes==1.2.0
Jinja2==3.1.6
jmespath==1.0.1
kombu==5.5.3
MarkupSafe==3.0.2
maxminddb==2.6.3
memory-profiler==0.61.0
msrest==0.7.1
multidict==6.4.3
numpy==2.2.4
oauthlib==3.2.2
openapi-codec==1.3.2
openpyxl==3.0.10
orderly-set==5.4.0
packaging==25.0
pandas==2.2.3
paramiko==3.5.1
pbr==6.1.1
pexpect==4.8.0
pillow==11.3.0
pprintpp==0.4.0
prometheus_client==0.21.1
prompt_toolkit==3.0.51
propcache==0.3.1
psutil==7.0.0
psycopg2-binary==2.9.10
ptyprocess==0.7.0
pyasn1==0.4.8
pycparser==2.22
pycryptodome==3.19.1
Pygments==2.19.1
PyJWT==2.6.0
Pympler==1.1
PyNaCl==1.5.0
pyOpenSSL==25.0.0
pyotp==2.7.0
pyparsing==3.0.9
python-crontab==3.2.0
python-dateutil==2.8.2
python-jose==3.4.0
pytz==2025.1
PyYAML==6.0.2
QuantLib==1.37
redis==5.2.1
requests==2.32.4
requests-oauthlib==2.0.0
rsa==4.9.1
ruff==0.11.6
s3transfer==0.11.5
sentry-sdk==2.26.1
simplejson==3.20.1
six==1.17.0
snowballstemmer==2.2.0
soupsieve==2.7
Sphinx==8.1.3
sphinxcontrib-apidoc==0.5.0
sphinxcontrib-applehelp==2.0.0
sphinxcontrib-devhelp==2.0.0
sphinxcontrib-django==2.5
sphinxcontrib-htmlhelp==2.1.0
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==2.0.0
sphinxcontrib-serializinghtml==2.0.0
sqlparse==0.5.3
suds==1.2.0
tomli==2.2.1
tornado==6.5.0
typing_extensions==4.13.2
tzdata==2025.2
uritemplate==4.1.1
urllib3==2.5.0
vine==5.1.0
wcwidth==0.2.13
whitenoise==6.9.0
yarl==1.20.0
```

## License

- ****EUPL-1.2****<span style="white-space: pre-wrap;"> (repository license)</span>

---