2024-04-07 21:05:01 +03:00
|
|
|
<div align="center">
|
2024-04-07 21:09:13 +03:00
|
|
|
<a href="https://portal.acconcept.ru/" target="_blank">
|
2024-04-07 21:05:01 +03:00
|
|
|
<img width="650" src="rsconcept/frontend/public/logo_full.svg" />
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<br />
|
|
|
|
<br />
|
2023-12-30 14:46:43 +03:00
|
|
|
|
2024-04-20 18:36:46 +03:00
|
|
|
[](https://github.com/IRBorisov/ConceptPortal/actions/workflows/backend.yml)
|
|
|
|
[](https://github.com/IRBorisov/ConceptPortal/actions/workflows/frontend.yml)
|
2024-09-11 13:48:23 +03:00
|
|
|
[](https://portal.acconcept.ru)
|
2024-04-20 18:36:46 +03:00
|
|
|
|
2023-07-27 11:24:25 +03:00
|
|
|
React + Django based web portal for editing RSForm schemas.
|
2024-07-26 00:40:15 +03:00
|
|
|
This readme file is used mostly to document project dependencies and conventions.
|
2023-07-15 17:55:28 +03:00
|
|
|
|
2024-04-07 21:10:32 +03:00
|
|
|
## ❤️ Contributing notes
|
2023-12-30 14:46:43 +03:00
|
|
|
|
2024-05-02 17:14:20 +03:00
|
|
|
- feel free to open issues, discussion topics, contact maintainer directly
|
2023-08-11 12:44:30 +03:00
|
|
|
- use Test config in VSCode to run tests before pushing commits / requests
|
2024-05-02 17:14:20 +03:00
|
|
|
- use github actions to setup linter checks and test builds
|
2024-07-26 00:40:15 +03:00
|
|
|
- use conventional commits to describe changes
|
2023-08-11 12:44:30 +03:00
|
|
|
|
2024-04-07 21:10:32 +03:00
|
|
|
## ✨ Frontend [Vite + React + Typescript]
|
2023-12-30 14:46:43 +03:00
|
|
|
|
2024-07-21 15:19:57 +03:00
|
|
|
- to regenerate parsers use 'npm run generate' script
|
|
|
|
|
2023-07-27 11:24:25 +03:00
|
|
|
<details>
|
2023-12-30 20:10:19 +03:00
|
|
|
<summary>npm install</summary>
|
2023-07-27 11:24:25 +03:00
|
|
|
<pre>
|
|
|
|
- axios
|
2023-12-15 17:34:50 +03:00
|
|
|
- clsx
|
2023-12-16 19:20:26 +03:00
|
|
|
- react-icons
|
2024-11-25 19:53:20 +03:00
|
|
|
- react-router
|
2023-07-27 11:24:25 +03:00
|
|
|
- react-toastify
|
|
|
|
- react-tabs
|
|
|
|
- react-intl
|
|
|
|
- react-error-boundary
|
2023-07-30 15:49:30 +03:00
|
|
|
- react-tooltip
|
2024-07-28 13:07:22 +03:00
|
|
|
- react-zoom-pan-pinch
|
2025-01-31 21:05:04 +03:00
|
|
|
- react-hook-form
|
2025-02-20 14:45:52 +03:00
|
|
|
- react-scan
|
2024-07-21 15:19:57 +03:00
|
|
|
- reactflow
|
2023-12-15 17:34:50 +03:00
|
|
|
- js-file-download
|
2024-04-10 15:54:47 +03:00
|
|
|
- use-debounce
|
2024-12-18 12:35:48 +03:00
|
|
|
- qrcode.react
|
2025-01-14 21:58:16 +03:00
|
|
|
- zustand
|
2025-01-30 19:23:15 +03:00
|
|
|
- zod
|
2025-01-31 21:05:04 +03:00
|
|
|
- @hookform/resolvers
|
2023-09-09 20:36:55 +03:00
|
|
|
- @tanstack/react-table
|
2025-01-27 15:03:48 +03:00
|
|
|
- @tanstack/react-query
|
|
|
|
- @tanstack/react-query-devtools
|
2023-08-10 18:25:46 +03:00
|
|
|
- @uiw/react-codemirror
|
|
|
|
- @uiw/codemirror-themes
|
2023-08-12 20:52:11 +03:00
|
|
|
- @lezer/lr
|
2024-11-21 15:09:51 +03:00
|
|
|
- @dagrejs/dagre
|
2023-07-27 11:24:25 +03:00
|
|
|
</pre>
|
|
|
|
</details>
|
|
|
|
<details>
|
2023-12-30 20:10:19 +03:00
|
|
|
<summary>npm install -D</summary>
|
2023-07-27 11:24:25 +03:00
|
|
|
<pre>
|
2023-12-30 14:46:43 +03:00
|
|
|
- tailwindcss
|
2025-02-12 21:36:25 +03:00
|
|
|
- eslint-plugin-import
|
2024-12-12 21:36:46 +03:00
|
|
|
- eslint-plugin-react-compiler
|
2023-07-27 11:24:25 +03:00
|
|
|
- eslint-plugin-simple-import-sort
|
2024-10-23 16:21:08 +03:00
|
|
|
- eslint-plugin-react-hooks
|
2023-09-21 14:58:01 +03:00
|
|
|
- eslint-plugin-tsdoc
|
2025-03-02 19:42:19 +03:00
|
|
|
- eslint-plugin-playwright
|
2024-12-13 13:55:26 +03:00
|
|
|
- babel-plugin-react-compiler
|
2024-07-21 15:19:57 +03:00
|
|
|
- vite
|
2023-08-01 23:43:43 +03:00
|
|
|
- jest
|
2025-04-07 15:15:34 +03:00
|
|
|
- shadcn
|
2023-08-01 23:43:43 +03:00
|
|
|
- ts-jest
|
2025-03-19 15:12:02 +03:00
|
|
|
- stylelint
|
|
|
|
- stylelint-config-recommended
|
|
|
|
- stylelint-config-standard
|
|
|
|
- stylelint-config-tailwindcss
|
2025-02-21 21:15:05 +03:00
|
|
|
- @vitejs/plugin-react
|
2023-08-01 23:43:43 +03:00
|
|
|
- @types/jest
|
2023-08-12 20:52:11 +03:00
|
|
|
- @lezer/generator
|
2025-01-14 16:11:33 +03:00
|
|
|
- @playwright/test
|
2023-07-27 11:24:25 +03:00
|
|
|
</pre>
|
|
|
|
</details>
|
|
|
|
<details>
|
2023-12-30 20:11:54 +03:00
|
|
|
<summary>VS Code plugins</summary>
|
2023-07-27 11:24:25 +03:00
|
|
|
<pre>
|
|
|
|
- ESLint
|
2025-04-16 15:22:31 +03:00
|
|
|
- Oklch Color Preview
|
2024-07-21 15:19:57 +03:00
|
|
|
- Tailwind CSS IntelliSense
|
2023-12-26 14:23:51 +03:00
|
|
|
- Code Spell Checker (eng + rus)
|
|
|
|
- Backticks
|
2023-12-27 16:45:18 +03:00
|
|
|
- Svg Preview
|
|
|
|
- TODO Highlight v2
|
2024-07-19 11:20:53 +03:00
|
|
|
- Prettier
|
2024-07-24 11:29:19 +03:00
|
|
|
- PowerShell (for Windows dev env)
|
2023-07-27 11:24:25 +03:00
|
|
|
</pre>
|
|
|
|
</details>
|
2023-12-30 20:11:54 +03:00
|
|
|
<details>
|
|
|
|
<summary>Google fonts</summary>
|
|
|
|
<pre>
|
2024-04-03 21:08:45 +03:00
|
|
|
- Fira Code
|
2023-12-30 20:11:54 +03:00
|
|
|
- Rubik
|
2024-05-24 15:40:28 +03:00
|
|
|
- Alegreya Sans SC
|
2023-12-30 20:11:54 +03:00
|
|
|
- Noto Sans Math
|
2024-10-17 15:45:23 +03:00
|
|
|
- Noto Sans Symbol
|
|
|
|
- Noto Color Emoji
|
2023-12-30 20:11:54 +03:00
|
|
|
</pre>
|
|
|
|
</details>
|
2023-07-15 18:00:20 +03:00
|
|
|
|
2024-05-02 17:14:20 +03:00
|
|
|
## 🗃️ Backend [Django + PostgreSQL/SQLite]
|
2023-12-30 14:46:43 +03:00
|
|
|
|
2023-07-27 11:24:25 +03:00
|
|
|
- [ConceptCore](https://github.com/IRBorisov/ConceptCore)
|
|
|
|
<details>
|
2023-12-30 20:10:19 +03:00
|
|
|
<summary>requirements</summary>
|
2023-07-27 11:24:25 +03:00
|
|
|
<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
|
2024-04-12 13:43:34 +03:00
|
|
|
- cctext
|
2024-04-17 23:08:40 +03:00
|
|
|
- pyconcept
|
2023-07-27 11:24:25 +03:00
|
|
|
</pre>
|
|
|
|
</details>
|
|
|
|
<details>
|
2024-04-17 23:08:40 +03:00
|
|
|
<summary>requirements-dev</summary>
|
2023-07-27 11:24:25 +03:00
|
|
|
<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>
|
2023-12-30 20:10:19 +03:00
|
|
|
<summary>VS Code plugins</summary>
|
2023-07-27 11:24:25 +03:00
|
|
|
<pre>
|
2023-08-17 15:43:39 +03:00
|
|
|
- Pylance
|
|
|
|
- Pylint
|
2024-05-24 15:40:28 +03:00
|
|
|
- autopep8
|
2024-07-19 11:20:53 +03:00
|
|
|
- isort
|
|
|
|
- Django
|
2024-07-15 12:36:18 +03:00
|
|
|
- SQLite
|
2025-01-14 16:11:33 +03:00
|
|
|
- Playwright
|
2023-07-27 11:24:25 +03:00
|
|
|
</pre>
|
|
|
|
</details>
|
2023-07-15 17:55:28 +03:00
|
|
|
|
2024-05-02 17:14:20 +03:00
|
|
|
## ⚙️ DevOps
|
2023-12-30 14:46:43 +03:00
|
|
|
|
2023-07-27 11:24:25 +03:00
|
|
|
- Docker compose
|
|
|
|
- PowerShell
|
2023-08-29 00:34:56 +03:00
|
|
|
- Certbot
|
|
|
|
- Docker VSCode extension
|
|
|
|
|
|
|
|
# Developer Notes
|
2023-12-30 14:46:43 +03:00
|
|
|
|
2024-07-26 00:40:15 +03:00
|
|
|
## 📝 Commit conventions
|
|
|
|
|
|
|
|
- 🚀 F: major feature implementation
|
2024-07-27 22:49:49 +03:00
|
|
|
- 🔥 B: bug fix
|
|
|
|
- 🚑 M: Minor fixes
|
2024-07-26 00:40:15 +03:00
|
|
|
- 🔧 R: refactoring and code improvement
|
2024-09-12 16:42:02 +03:00
|
|
|
- 📝 D: documentation
|
2024-07-26 00:40:15 +03:00
|
|
|
|
2024-05-02 17:14:20 +03:00
|
|
|
## 🖥️ Local build (Windows 10+)
|
|
|
|
|
|
|
|
This is the build for local Development
|
2023-12-30 14:46:43 +03:00
|
|
|
|
2024-03-29 12:16:27 +03:00
|
|
|
- Install Python 3.12, NodeJS, VSCode, Docker Desktop
|
2023-08-29 00:34:56 +03:00
|
|
|
- copy import wheels from ConceptCore to rsconcept/backend/import
|
2024-10-14 12:41:19 +03:00
|
|
|
- run scripts/dev/LocalEnvSetup.ps1
|
2023-12-30 14:46:43 +03:00
|
|
|
- use VSCode configs in root folder to start development
|
2024-05-06 21:54:25 +03:00
|
|
|
- use 'npm run prepare' to regenerate frontend parsers (if you change grammar files)
|
2023-08-29 00:34:56 +03:00
|
|
|
|
2024-05-02 17:14:20 +03:00
|
|
|
## 🔭 Local docker build
|
|
|
|
|
|
|
|
This build does not use HTTPS and nginx for networking
|
2023-12-30 14:46:43 +03:00
|
|
|
|
2023-08-29 00:34:56 +03:00
|
|
|
- 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
|
|
|
|
2024-05-02 17:14:20 +03:00
|
|
|
## 📦 Local production build
|
|
|
|
|
|
|
|
This build is same as production except not using production secrets and working on localhost
|
2023-12-30 14:46:43 +03:00
|
|
|
|
2023-08-29 00:34:56 +03:00
|
|
|
- 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'
|
|
|
|
|
2024-05-02 17:14:20 +03:00
|
|
|
## 🔥 Production build
|
|
|
|
|
|
|
|
This build is deployed on server.
|
2023-12-30 14:46:43 +03:00
|
|
|
|
2024-02-25 21:07:30 +03:00
|
|
|
- provide secrets: 'secrets/db_password.txt', 'django_key.txt', 'email_host.txt', 'email_password.txt', 'email_user.txt'
|
2024-02-26 10:06:38 +03:00
|
|
|
- check if you need to change SSL/TLS and PORT in 'rsconcept\backend\.env.prod'
|
2023-12-07 23:08:49 +03:00
|
|
|
- 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'
|