Skip to main content

Getting started

caution

This is my view of how application should be made. Some solutions may be incorrect, the code may have bugs. If you have suggestions, feel free to contact me (telegram @temarusanov) or create issue in github.

Workspace is a boilerplate and my work experience of making backend applications. Its contains best-practices of writing code I try to make conventions of code, to prevent your project being difficult to read and support This is a customized workspace using NestJS, orchestrator Nx with ready solutions like

  • Standards and conventions for NestJS modules. Create new modules using built-in schematics
  • Ready and configured commands for Prisma. Generate types, run migrations and other for particular library using built-in Prisma executors
  • Containerize your application in Docker using one command
  • Gateway application for your GraphQL services
  • Own NestJS library for communication between applications using NATS (full nats support)
  • ESLint rules and Prettier configured
  • Example for Gitlab CI/CD
  • Store your DevOps code with the entire code of application and manage it easily with Ansible and Terraform (terraform coming soon)
  • Configured metrics with Grafana and Prometheus
tip

Source code to dive into. Explore

How to master it?

Roadmap of what you need to know to navigate this project easily.

NestJS

Actually, all fundamentals knowledge of NestJS are necessary here, but here are most important.

Nx orchestrator

Nx is kinda hard to understand when you first see it. Nevertheless, it offers key ideas without which a monorepository is a useless piece of code.

Prisma

Prisma is just an amazing ORM for database management, it offers many advantages that make it much faster and easier to write code than using TypeORM.

Learn concepts

NATS

NATS is another cool instrument to build communication between services. Unfortunately, the module for working with the NATS built into the nest does not support all of its features.

info

If you don't want to use NATS you can skip this topic. These are just suggestions, not instructions on what to do. You can use different instruments like RabbitMQ or Kafka.

Learn NATS

Gitlab & Github CI/CD

Nx commands also work in CI/CD pipelines, that one of many key features of Nx. And that's why its important to learn how CI/CD works.

Learn Gitlab and Github CI/CD basics

Ansible

Ansible is must have instrument for any DevOps specialist. Nevertheless, if you don't use devops features you can skip this topic. But I think every software engineer must understand DevOps concepts. This workspace just use template of Ansible code. At work I use Ansible all the time

Learn Ansible

Techniques

Next step is to explore techniques of how this workspace works. Jump to the next topic, see ya