Working on projects is an everyday occurrence for every developer. Many of us work on projects that have been on the market for a long time and just smoothly continue their development. Some work on startups that haven't had the first release yet. Let's try to figure out what can help bring a new app into the real world. To do this, let's look at the list of tools that can improve the quality of development, keep it running and simplify the process.
1. Bug tracker. For error tracking we use sentry. This tool allows you to track errors both on the server side and on the client side. You can set up notifications to Slack and other messengers. It also allows you to control the solutions to the problems and assign the team members for that.
2. Heroku tools. It is important to set up the development process in such a way that any new or changed functionality. The important thing is to set up the development process in such a way that any new or changed functionality is checked to make sure it works. To accomplish this, Heroku allows you to create a review App related to the current PR in git (GitHub/GitLab ect.).
The configuration is described in detail in the Heroku documentation. You need to create an app.json file with all of your environment variables, scripts, and the Heroku applications you are using.
3. Heroku add-ons. There are a huge number of them for all sorts of purposes (for managing the database, sending email, tracking metrics on the server, etc.). Let's take a look at two of them:
3.1 For easier log tracking we use Papertrail. It provides a handy log listing, ability to search, graphing. The interface allows us to separate the actions/errors display, which makes it much easier to work with.
3.2 To track the performance of the application we use the Scout APM tool. It constantly database queries (N + 1), memory overflow sources, performance deviations and many more. Allows you to build performance graphs, track the situation dynamically.
4. The concept of continuous integration and delivery (CI/CD) is the basis of our testing. CI/CD is a concept, It is implemented as a conveyor, facilitating merging of the just-completed code into the main code base.
The concept allows us to run different types of tests at each stage (performing the integration aspect) and terminate it with the deployment of the commited code into the actual product seen by the end users (delivery execution).
We used CircleCi as a tool. It has ruby support, relatively easy integration with git, and a description of the necessary test suite. You need to create a .circleci/config.yml to describe the test script.
The docker images described in the configuration file are created to run the test script. For more reliability, in the GitHub settings, you can set the condition that the current PR is not possible when the tests crash.
5. Linters. They are needed to check the code correctness and absence of conflicts in it. There are linters for checking the back-end code, js-code, styles. To check the validity of styles we use Stylelint. The principle of operation is quite simple and straightforward - it checks existing style files for syntax compliance, correct nesting of styles, etc. Similarly, for checking .js files ESLint is used. Checks for correct syntax, code structure, use of variables (unused variables). It checks if there are no forgotten debuggers. To check the code we use the well-known Rubocop.
6. Useful Gems. To keep your code clean and tidy you can use Prettier which is used to check and improve code formatting. Brakeman is used as a security scanner and allows you to detect security vulnerabilities in your application. Bullet is installed for development env. It allows you to find problems in requests: N+1, unnecessary data loading, etc. It informs about problems by means of pop-up on page loading. You can also use Bundler-audit to check and maintain the current versions of installed gems.
7. Tests are an integral part of any application. Tests cover the logic of the server side as well as the js. To cover the logic of the server side we use the traditional combination of rspec + capybara, which allows us to describe the correct logic of the application quickly and intuitively enough. To cover the client side we use Jest. Its syntax is also quite simple and intuitive, which greatly speeds up the process of writing tests.
In this way we have considered the basic tools, using which you can release and maintain a fairly stable project. The quality and speed of development will improve many times over by preventing critical errors and accidental bugs.