Публичная версия Portal
Go to file
2024-07-20 13:12:28 +03:00
.github Upgrade build system base versions 2024-07-19 22:38:43 +03:00
.vscode Implementing oss backend pt1 2024-07-19 19:29:27 +03:00
nginx Fix configs 2023-09-18 13:05:06 +03:00
postgresql Setup dev and prod configurations for docker 2023-08-29 00:34:56 +03:00
rsconcept Prepare merge into main 2024-07-20 13:12:28 +03:00
scripts Fix build system 2024-07-19 20:28:21 +03:00
.dockerignore Upgrade build system base versions 2024-07-19 22:38:43 +03:00
.gitignore Upgrade build system base versions 2024-07-19 22:38:43 +03:00
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md 2024-04-08 11:57:13 +03:00
docker-compose-dev.yml Add missing dependency 2024-03-15 14:40:47 +03:00
docker-compose-prod-local.yml Fix builds 2024-06-04 01:43:04 +03:00
docker-compose-prod.yml Fix builds 2024-06-04 01:43:04 +03:00
LICENSE Update LICENSE 2024-04-14 15:37:26 +03:00
README.md Update README.md 2024-07-19 11:20:53 +03:00
SECURITY.md Create SECURITY.md 2024-04-08 11:54:51 +03:00
TODO.txt Update TODO.txt 2024-06-26 19:57:29 +03:00



Backend CI Frontend CI

React + Django based web portal for editing RSForm schemas. This readme file is used mostly to document project dependencies

❤️ Contributing notes

  • feel free to open issues, discussion topics, contact maintainer directly
  • use Test config in VSCode to run tests before pushing commits / requests
  • use github actions to setup linter checks and test builds

Frontend [Vite + React + Typescript]

npm install
  - axios
  - clsx
  - react-icons
  - react-router-dom 
  - react-toastify
  - react-loader-spinner
  - react-tabs
  - react-intl
  - react-select
  - react-error-boundary
  - react-pdf
  - react-tooltip
  - js-file-download
  - use-debounce
  - framer-motion
  - reagraph
  - @tanstack/react-table
  - @uiw/react-codemirror
  - @uiw/codemirror-themes
  - @lezer/lr
  
npm install -D
  - tailwindcss
  - postcss
  - autoprefixer
  - eslint-plugin-simple-import-sort
  - eslint-plugin-tsdoc
  - jest
  - ts-jest
  - @types/jest
  - @lezer/generator
  
VS Code plugins
  - ESLint
  - Colorize
  - Code Spell Checker (eng + rus)
  - Backticks
  - Svg Preview
  - TODO Highlight v2
  - Prettier
  
Google fonts
  - Fira Code
  - Rubik
  - Alegreya Sans SC
  - Noto Sans Math
  

🗃️ Backend [Django + PostgreSQL/SQLite]

requirements
  - django
  - djangorestframework
  - django-cors-headers
  - django-filter
  - drf-spectacular
  - tzdata
  - gunicorn
  - coreapi
  - psycopg2-binary
  - cctext
  - pyconcept
  
requirements-dev
  - coverage
  - pylint
  - mypy
  - djangorestframework-stubs[compatible-mypy]
  
VS Code plugins
  - Pylance
  - Pylint
  - autopep8
  - isort
  - Django
  - SQLite
  

⚙️ DevOps

  • Docker compose
  • PowerShell
  • Certbot
  • Docker VSCode extension

Developer Notes

🖥️ Local build (Windows 10+)

This is the build for local Development

  • Install Python 3.12, 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 development
  • use 'npm run prepare' to regenerate frontend parsers (if you change grammar files)

🔭 Local docker 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: 'scripts/dev/PopulateDevData.ps1'

📦 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

This build is deployed on server.

  • provide secrets: 'secrets/db_password.txt', 'django_key.txt', 'email_host.txt', 'email_password.txt', 'email_user.txt'
  • check if you need to change SSL/TLS and PORT in 'rsconcept\backend.env.prod'
  • 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'
  • run via 'docker compose -f "docker-compose-prod.yml" up --build -d'
  • update via 'bash scripts/prod/UpdateProd.sh'