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
|
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
|
2023-12-15 17:34:50 +03:00
|
|
|
- clsx
|
2023-12-16 19:20:26 +03:00
|
|
|
- react-icons
|
2023-07-27 11:24:25 +03:00
|
|
|
- react-router-dom
|
|
|
|
- react-toastify
|
|
|
|
- react-loader-spinner
|
|
|
|
- react-tabs
|
|
|
|
- react-intl
|
2023-09-08 02:15:20 +03:00
|
|
|
- react-select
|
2023-07-27 11:24:25 +03:00
|
|
|
- react-error-boundary
|
2023-12-07 23:08:49 +03:00
|
|
|
- react-pdf
|
2023-07-30 15:49:30 +03:00
|
|
|
- react-tooltip
|
2023-12-15 17:34:50 +03:00
|
|
|
- js-file-download
|
2023-12-25 16:53:27 +03:00
|
|
|
- framer-motion
|
2023-12-15 17:34:50 +03:00
|
|
|
- reagraph
|
2023-09-09 20:36:55 +03:00
|
|
|
- @tanstack/react-table
|
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-09-21 14:58:01 +03:00
|
|
|
- eslint-plugin-tsdoc
|
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-09-21 23:09:51 +03:00
|
|
|
- drf-spectacular
|
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
|
|
|
|
- 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
|
|
|
|
- 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'
|
2023-12-07 23:08:49 +03:00
|
|
|
- populate initial data: 'scripts/dev/PopulateDevData.ps1'
|
2023-08-29 00:34:56 +03:00
|
|
|
|
|
|
|
## 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'
|
|
|
|
|
|
|
|
## Production build
|
2023-12-07 23:08:49 +03:00
|
|
|
- provide secrets: 'secrets/db_password.txt' and 'django_key.txt'
|
|
|
|
- setup domain names for application and API in configs: 'frontend\env\.env.production', 'rsconcept\backend\.env.dev', 'nginx\production.conf'
|
|
|
|
- provide privacy policy document in PDF: 'frontend/public/privacy.pdf'
|
|
|
|
- use certbot to obtain certificates via 'docker compose -f "docker-compose-prod.yml" run --rm certbot certonly --webroot --webroot-path /var/www/certbot/ -d portal.acconcept.ru api.portal.acconcept.ru'
|
2023-08-29 00:34:56 +03:00
|
|
|
- run via 'docker compose -f "docker-compose-prod.yml" up --build -d'
|
2023-12-07 23:08:49 +03:00
|
|
|
- update via 'bash scripts/prod/UpdateProd.sh'
|