View Demo · Report Bug · Request Feature
- Node.js - runtime for backend & tooling
- Yarn - package management
- Lerna - tool for managing projects with multiple packages
- 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
This project consists of 2 main parts
- @magnit/backend - REST API server built on top of NestJS
- @magnit/frontend - SPA application build on top of React
$ 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
To start frontend just run this command
$ yarn start:frontend
To start backend just run this command
$ yarn start:backend
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
$ lerna run test
This will run tests in all packages that have test
script in package.json
All the necessary documentation for architecture can be found here
Backend documentation is available here (compodoc)
REST API documentations is available here (swagger)
The recommended way to commit is using yarn commit
command
This script is using commitizen, as well as commitlint as git post-commit
hook