Skip to content

Монорепозиторий проекта Магнит "Опросный Лист"

License

Notifications You must be signed in to change notification settings

davidarny/magnit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Logo

Магнит "Опросный Лист"

Monorepo for internal Omega-R project Магнит "Опросный Лист"

View Demo · Report Bug · Request Feature

lerna Snyk Vulnerabilities for GitHub Repo TLOC GitHub code size in bytes GitHub last commit code style: prettier GitHub top language GitHub license David

Table of Contents

Requirements

  • Node.js - runtime for backend & tooling
  • Yarn - package management
  • Lerna - tool for managing projects with multiple packages

Technologies

  • TypeScript - main language
  • Node.js - runtime for backend & tooling
  • nest - Node.js REST framework
  • pino - super fast, all natural json logger
  • Swagger - OpenAPI documentation
  • compodoc - code documentation
  • React - a JavaScript library for building user interfaces
  • Material-UI - React UI framework
  • Yarn - package management
  • Lerna - tool for managing projects with multiple packages
  • Docker - container platform
  • nginx - reverse proxy for frontend
  • PostgreSQL - relational DB
  • Prettier - opinionated code formatter
  • Husky - git hooks management
  • webpack - package bundler
  • logrotate - tool for logs rotation

Project structure

This project consists of 2 main parts

Installation

$ yarn lerna bootstrap

This will install all packages using yarn install command

You can check all packages using

$ yarn workspaces info

It should give use something like this

$ yarn workspaces info
yarn workspaces v1.21.1
{
  "@magnit/components": {
    "location": "packages/components",
    "workspaceDependencies": [
      "@magnit/icons"
    ],
    "mismatchedWorkspaceDependencies": []
  },
  "@magnit/entities": {
    "location": "packages/entities",
    "workspaceDependencies": [],
    "mismatchedWorkspaceDependencies": []
  },
  "@magnit/icons": {
    "location": "packages/icons",
    "workspaceDependencies": [],
    "mismatchedWorkspaceDependencies": []
  },
  "@magnit/services": {
    "location": "packages/services",
    "workspaceDependencies": [],
    "mismatchedWorkspaceDependencies": []
  },
  "@magnit/task-editor": {
    "location": "packages/task-editor",
    "workspaceDependencies": [
      "@magnit/components",
      "@magnit/entities",
      "@magnit/icons",
      "@magnit/services"
    ],
    "mismatchedWorkspaceDependencies": []
  },
  "@magnit/template-editor": {
    "location": "packages/template-editor",
    "workspaceDependencies": [
      "@magnit/components",
      "@magnit/entities",
      "@magnit/icons",
      "@magnit/services"
    ],
    "mismatchedWorkspaceDependencies": []
  },
  "@magnit/frontend": {
    "location": "frontend",
    "workspaceDependencies": [
      "@magnit/components",
      "@magnit/entities",
      "@magnit/icons",
      "@magnit/services",
      "@magnit/task-editor",
      "@magnit/template-editor"
    ],
    "mismatchedWorkspaceDependencies": []
  }
}
Done in 0.14s.

More info about yarn workspaces can be found here

Running

Frontend

To start frontend just run this command

$ yarn start:frontend

Backend

To start backend just run this command

$ yarn start:backend

Libraries

It's recommended to build all libraries before starting project

$ yarn lerna run build:lib

Also if you're developing a library, provide a build:lib script, which will package and bundle your library

You can find examples in @magnit/template-editor package.json file

Testing

$ lerna run test

This will run tests in all packages that have test script in package.json

Documentation

All the necessary documentation for architecture can be found here

Backend documentation is available here (compodoc)

REST API documentations is available here (swagger)

Contributing

The recommended way to commit is using yarn commit command

This script is using commitizen, as well as commitlint as git post-commit hook

About

Монорепозиторий проекта Магнит "Опросный Лист"

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages