Публичная версия Portal
Go to file
2024-03-15 14:40:47 +03:00
.vscode Add Versioning help 2024-03-12 13:47:19 +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 Add vertical layout for constituent search 2024-03-15 14:35:06 +03:00
scripts Backend fixes 2023-11-01 14:48:06 +03:00
.dockerignore Implement text reference resolution for backend 2023-08-20 13:59:46 +03:00
.gitignore Refactoring: implement aliases and use client 2023-12-13 14:32:57 +03:00
docker-compose-dev.yml Add missing dependency 2024-03-15 14:40:47 +03:00
docker-compose-prod-local.yml Add missing dependency 2024-03-15 14:40:47 +03:00
docker-compose-prod.yml Add missing dependency 2024-03-15 14:40:47 +03:00
LICENSE Refactoring: spelling updates 2023-12-27 19:34:39 +03:00
README.md Refactoring: fix env variables usage + small fixes 2024-02-26 12:18:28 +03:00
TODO.txt Update TODO.txt 2024-03-09 16:40:13 +03:00

ConceptPortal

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

Contributing notes

!BEFORE PUSHING INTO MAIN!

  • use Test config in VSCode to run tests before pushing commits / requests
  • cd rsconcept/frontend & npm run build

Frontend stack & Tooling [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
  - 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
  
Google fonts
  - Rubik
  - Geologica
  - Noto Sans Math
  

Backend stack & Tooling [Django + PostgreSQL/SQLite]

requirements
  - django
  - djangorestframework
  - django-cors-headers
  - django-filter
  - drf-spectacular
  - tzdata
  - gunicorn
  - coreapi
  - psycopg2-binary
  - pymorphy2
  - razdel
  
requirements_dev
  - coverage
  - pylint
  - mypy
  - djangorestframework-stubs[compatible-mypy]
  
VS Code plugins
  - Pylance
  - Pylint
  - Django
  

DevOps

  • Docker compose
  • PowerShell
  • 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 development

Development 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

  • 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'