2.79.2 • Published 2 years ago

my-nutri v2.79.2

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

codecov-b

MyNutri

Nutrição nunca foi tão fácil

Getting Started

Setup

M1 machines

Hasura Configure

  • If needs to change default configuration for Hasura (ports, admin secret, etc..), duplicate .env.example file and rename it for .env.
  • Done, just change the configurations.

Run

  • yarn start: Start Hasura and serverless.
  • yarn hasura:up: Start Hasura Docker container.
  • yarn hasura:start: Start Hasura and apply metadata and migrations.
  • yarn hasura:stop: Stop Hasura.
  • yarn hasura:console: Open Hasura Console.
  • yarn backend:start: Start serverless functions.
  • yarn backend:deploy: Deploy serverless functions.

Cli

The commands will available only on serverless/users folder.

  • [ENV=stag] yarn console [command] [args]. Ex.: yarn console patients updateExtraData '2022-05-01' '2022-06-01'

Hasura

All config files, metadata and migrations created are in ./hasura folder. Current version is:

  • v2.2.0

Serverless

The serverless functions are in ./serverless folder separated by microservice:

  • users: for now, there are only microservice with all project functions.

Libs Folder

When has a big size 3-party library its added in ./libs folder with package.json configured for to be possible shared with serverless functions and also created a specific serverless layers for it.

Heroku

Manual Deploy

Uses when has a new Hasura version:

  • git push heroku master

Commit Messages

Git Commit Guidelines

Follow The seven rules of a great Git commit message (TL;DR)

  1. Separate subject from body with a blank line
  2. Limit the subject line to 50 characters
  3. Capitalize the subject line
  4. Do not end the subject line with a period
  5. Use the imperative mood in the subject line
  6. Wrap the body at 72 characters
  7. Use the body to explain what and why vs. how

Commit Types

As configured on .commitlintrc.yml, it must be one of the following:

  • feat: A new feature
  • fix: A bug fix
  • docs: Documentation only changes
  • ref: A code change that neither fixes a bug nor adds a feature
  • test: Adding missing tests or correcting existing tests
  • revert: A commit that reverts a previous commit
  • chore: Changes to the build process or auxiliary tools and libraries such as documentation generation
  • ci: Changes to our CI configuration files and scripts (example scopes: Circle, BrowserStack, SauceLabs)
  • build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
  • perf: A code change that improves performance
  • git: Changes on git files, such as .gitignore

Commit Best Practices

  • Commit often
  • Keep commits small and atomic
  • Write S.O.L.I.D. commits
  • Write meaningful titles targeting for non-technical readers
  • Write commits that would help the Code Review
  • Add any extra information that would help the Code Review
  • Reference the issue that originated the commit

References

  • Hasura - Get realtime GraphQL APIs instantly
  • Migrations - Migrations for a new database and Hasura instance
  • PostgreSQL - The World's Most Advanced Open Source Relational Database
  • NestJs - A progressive Node.js framework for building efficient, reliable and scalable server-side applications.
  • NestJs-Console - A ready to use service class for your modules that exposes methods to register commands and sub commands using commander
  • Serverless - Provide full serverless application lifecycle management.
  • Rollbar - Rollbar provides real-time exception reporting and continuous deployment monitoring for developers
  • Jest - Javascript Testing Framework with a focus on simplicity
  • Faker - Generate massive amounts of fake (but realistic) data for testing and development.
  • FactoryBot - A factory library for Node.js
2.79.2

2 years ago

2.79.1

2 years ago

2.79.0

2 years ago

2.78.2

2 years ago

2.78.1

2 years ago

2.78.0

2 years ago