2023-07-15 17:55:28 +03:00
|
|
|
# ConceptPortal
|
2023-07-27 11:24:25 +03:00
|
|
|
React + Django based web portal for editing RSForm schemas.
|
|
|
|
This readme file is used mostly to document project dependencies
|
2023-07-15 17:55:28 +03:00
|
|
|
|
2023-08-11 12:44:30 +03:00
|
|
|
# Contributing notes
|
2023-08-29 00:34:56 +03:00
|
|
|
!BEFORE PUSHING INTO MAIN!
|
2023-08-11 12:44:30 +03:00
|
|
|
- use Test config in VSCode to run tests before pushing commits / requests
|
2023-08-29 00:34:56 +03:00
|
|
|
- cd rsconcept/frontend & npm run build
|
|
|
|
- docker compose -f docker-compose-prod.yml up
|
2023-08-11 12:44:30 +03:00
|
|
|
|
2023-07-29 21:26:02 +03:00
|
|
|
# Frontend stack & Tooling [Vite + React + Typescript]
|
2023-07-27 11:24:25 +03:00
|
|
|
<details>
|
|
|
|
<summary>npm install</summary>
|
|
|
|
<pre>
|
|
|
|
- axios
|
|
|
|
- react-router-dom
|
|
|
|
- react-toastify
|
|
|
|
- react-loader-spinner
|
|
|
|
- js-file-download
|
|
|
|
- react-tabs
|
|
|
|
- react-intl
|
|
|
|
- react-data-table-component
|
2023-07-30 15:49:30 +03:00
|
|
|
- react-dropdown-select
|
2023-07-27 11:24:25 +03:00
|
|
|
- react-error-boundary
|
2023-07-29 21:26:02 +03:00
|
|
|
- reagraph
|
2023-07-30 15:49:30 +03:00
|
|
|
- react-tooltip
|
2023-08-10 18:25:46 +03:00
|
|
|
- @uiw/react-codemirror
|
|
|
|
- @uiw/codemirror-themes
|
2023-08-12 20:52:11 +03:00
|
|
|
- @lezer/lr
|
2023-07-27 11:24:25 +03:00
|
|
|
</pre>
|
|
|
|
</details>
|
|
|
|
<details>
|
|
|
|
<summary>npm install -D</summary>
|
|
|
|
<pre>
|
|
|
|
- tailwindcss postcss autoprefixer
|
|
|
|
- eslint-plugin-simple-import-sort
|
2023-08-01 23:43:43 +03:00
|
|
|
- jest
|
|
|
|
- ts-jest
|
|
|
|
- @types/jest
|
2023-08-12 20:52:11 +03:00
|
|
|
- @lezer/generator
|
2023-07-27 11:24:25 +03:00
|
|
|
</pre>
|
|
|
|
</details>
|
|
|
|
<details>
|
|
|
|
<summary>VS Code plugins</summary>
|
|
|
|
<pre>
|
|
|
|
- ESLint
|
2023-08-27 00:19:19 +03:00
|
|
|
- Colorize
|
2023-07-27 11:24:25 +03:00
|
|
|
</pre>
|
|
|
|
</details>
|
2023-07-15 18:00:20 +03:00
|
|
|
|
2023-07-27 11:24:25 +03:00
|
|
|
# Backend stack & Tooling [Django + PostgreSQL/SQLite]
|
|
|
|
- [ConceptCore](https://github.com/IRBorisov/ConceptCore)
|
|
|
|
<details>
|
|
|
|
<summary>requirements</summary>
|
|
|
|
<pre>
|
|
|
|
- django
|
|
|
|
- djangorestframework
|
|
|
|
- django-cors-headers
|
|
|
|
- django-filter
|
2023-08-29 00:34:56 +03:00
|
|
|
- tzdata
|
2023-07-27 11:24:25 +03:00
|
|
|
- gunicorn
|
|
|
|
- coreapi
|
|
|
|
- psycopg2-binary
|
2023-08-20 13:59:46 +03:00
|
|
|
- pymorphy2
|
|
|
|
- razdel
|
2023-07-27 11:24:25 +03:00
|
|
|
</pre>
|
|
|
|
</details>
|
|
|
|
<details>
|
|
|
|
<summary>requirements_dev</summary>
|
|
|
|
<pre>
|
|
|
|
- coverage
|
2023-08-17 21:23:54 +03:00
|
|
|
- pylint
|
|
|
|
- mypy
|
|
|
|
- django-stubs[compatible-mypy]
|
|
|
|
- djangorestframework-stubs[compatible-mypy]
|
2023-07-27 11:24:25 +03:00
|
|
|
</pre>
|
|
|
|
</details>
|
|
|
|
<details>
|
|
|
|
<summary>VS Code plugins</summary>
|
|
|
|
<pre>
|
2023-08-17 15:43:39 +03:00
|
|
|
- Pylance
|
|
|
|
- Pylint
|
2023-08-20 13:59:46 +03:00
|
|
|
- Django
|
2023-07-27 11:24:25 +03:00
|
|
|
</pre>
|
|
|
|
</details>
|
2023-07-15 17:55:28 +03:00
|
|
|
|
2023-07-27 11:24:25 +03:00
|
|
|
# DevOps
|
|
|
|
- Docker compose
|
|
|
|
- PowerShell
|
2023-08-29 00:34:56 +03:00
|
|
|
- Certbot
|
|
|
|
- Docker VSCode extension
|
|
|
|
|
|
|
|
# Developer Notes
|
|
|
|
## Local build (Windows 10+)
|
|
|
|
- this is main developers build
|
|
|
|
- Install Python 3.9, NodeJS, VSCode, Docker Desktop
|
|
|
|
- copy import wheels from ConceptCore to rsconcept/backend/import
|
|
|
|
- run rsconcept/backend/LocalEnvSetup.ps1
|
|
|
|
- run 'npm install' in rsconcept/frontend
|
|
|
|
- use VSCode configs in root folder to start developement
|
|
|
|
|
|
|
|
## Developement build
|
|
|
|
- this build does not use HTTPS and nginx for networking
|
|
|
|
- backend and frontend debugging is supported
|
|
|
|
- hmr (hot updates) for frontend
|
|
|
|
- run via 'docker compose -f "docker-compose-dev.yml" up --build -d'
|
|
|
|
- populate initial data: rsconcept/PopulateDevData.ps1 dev-portal-backend
|
|
|
|
|
|
|
|
## Local production build
|
|
|
|
- this build is same as production except not using production secrets and working on localhost
|
|
|
|
- provide TLS certificate (can be self-signed) 'nginx/cert/local-cert.pem' and 'nginx/cert/local-key.pem'
|
|
|
|
- run via 'docker compose -f "docker-compose-prod-local.yml" up --build -d'
|
|
|
|
- populate initial data: rsconcept/PopulateDevData.ps1 local-portal-backend
|
|
|
|
|
|
|
|
## Production build
|
|
|
|
- create secrets secrets/db_password.txt and django_key.txt
|
|
|
|
- provide TLS certificate 'nginx/cert/front-cert.pem' and 'nginx/cert/front-key.pem'
|
|
|
|
- run via 'docker compose -f "docker-compose-prod.yml" up --build -d'
|