API for the Baby Food Introduction Application. Keep your baby's food introductions in check with this application and backtrack in case of allergies!

Overview

Baby food introduction API

This API is part of the Baby Food Introduction application, which aims to help technological parents keep track of the food introductions they make for their babies.

Motivation

I'm really forgetful, and food introduction in babies can be tricky. When you first start introducing food at around 6 months old, you need to do it in an orderly and spaced manner.

You need to introduce one food at one given week, and then in the next week you introduce another, and so on. The problem with food introduction arises when your babies have an allergy!

When an allergy happens, you need to backtrack the food introductions you have been doing one by one. You remove the latest one introduced and wait a week. If the baby is still not ok, you remove the previous one, and so on.

For this exact purpose, I created the Baby Food Introduction application, to help parents keep their babies food introductions in check and easily backtrackable in case of allergies!

Installation

$ yarn install

Running the app

⚠️ Important ⚠️

To first start with running the API, you need to copy .env.example to .env and fill in with correct values.

start, start:dev and start:debug start scripts will spin up a virtualized Postgres database before starting the API. In order to get the database going, you need to copy .env.docker-compose.example to .env.docker-compose with the path you want for the database volume to be stored in.

# development
$ yarn run start

# watch mode
$ yarn run start:dev

# debug mode
$ yarn run start:debug 

# production mode
$ yarn run start:prod

Documentation

There's a Postman collection in the repo that allows to consume all the endpoints created. If there are new additions to the controllers of the API, please add them to this postman collection, so that other devs have an easier life!

Production

We are using Heroku to deploy the API and to provision the corresponding database. There's a production API currently deployed at https://baby-food-intro-api.herokuapp.com/api/v1.

Contributing Guide

CONTRIBUTING.md.

COC

CODE_OF_CONDUCT.md.

Contributors

Tiago Sousa
Tiago Sousa

💻 📖 🤔 🔧 👀
Debasis Nayak
Debasis Nayak

📖 🔧
David Alecrim
David Alecrim

💻 📖 🤔 🚧 👀 🔧
Vitor Hugo Silva Fernandes
Vitor Hugo Silva Fernandes

💻

License

MIT licensed.

Comments
  • feat(logging): add application logs

    feat(logging): add application logs

    Description

    • Implementation of a middleware to log HTTP requests
    • Creation of Nest Logger in each service to log service activity

    Related Issue

    Closes #12

    Motivation and Context

    Screenshots (if appropriate):

    Types of changes

    • [ ] Bug fix (non-breaking change which fixes an issue)
    • [x] New feature (non-breaking change which adds functionality)
    • [ ] Breaking change (fix or feature that would cause existing functionality to change)

    Checklist:

    • [x] My code follows the code style of this project.
    • [ ] My change requires a change to the documentation.
    • [ ] I have updated the documentation accordingly.
    hacktoberfest-accepted 
    opened by VitorFernandes2 3
  • chore(husky): add husky and conventional commits as standard

    chore(husky): add husky and conventional commits as standard

    Description

    • Add husky and commit-msg hook
    • Enforce conventional commits for the repo
    • Fix name for PR template in the repo

    Related Issue

    Closes #29

    Motivation and Context

    This change will improve commit consistency and improve readability when searching the commit history

    Screenshots (if appropriate):

    Types of changes

    • [ ] Bug fix (non-breaking change which fixes an issue)
    • [x] New feature (non-breaking change which adds functionality)
    • [ ] Breaking change (fix or feature that would cause existing functionality to change)

    Checklist:

    • [x] My code follows the code style of this project.
    • [ ] My change requires a change to the documentation.
    • [ ] I have updated the documentation accordingly.
    hacktoberfest hacktoberfest-accepted feature 
    opened by comoser 3
  • fix(cicd): workflow runner name

    fix(cicd): workflow runner name

    Description

    • workflow runner name

    Related Issue

    Closes #47

    Motivation and Context

    Screenshots (if appropriate):

    Types of changes

    • [x] Bug fix (non-breaking change which fixes an issue)
    • [ ] New feature (non-breaking change which adds functionality)
    • [ ] Breaking change (fix or feature that would cause existing functionality to change)

    Checklist:

    • [x] My code follows the code style of this project.
    • [ ] My change requires a change to the documentation.
    • [ ] I have updated the documentation accordingly.
    bug hacktoberfest patch 
    opened by tiagomichaelsousa 2
  • feat(cicd): add pr title validation

    feat(cicd): add pr title validation

    Description

    Add PR title validation to enforce conventional commits

    Related Issue

    Closes #38

    Motivation and Context

    Screenshots (if appropriate):

    Types of changes

    • [ ] Bug fix (non-breaking change which fixes an issue)
    • [x] New feature (non-breaking change which adds functionality)
    • [ ] Breaking change (fix or feature that would cause existing functionality to change)

    Checklist:

    • [x] My code follows the code style of this project.
    • [ ] My change requires a change to the documentation.
    • [ ] I have updated the documentation accordingly.
    good first issue hacktoberfest hacktoberfest-accepted feature 
    opened by tiagomichaelsousa 2
  • Setup logging and add relevant logs on main operations

    Setup logging and add relevant logs on main operations

    The API is currently feature-ready for MVP, BUT there's a very important piece missing. There's no logs!

    We need to implement logging in the application so that we can later monitor.

    This ticket also assumes we go through the main operations of the API and add logging there (there aren't many operations on the API, so it's doable in a single PR)

    enhancement good first issue hacktoberfest 
    opened by comoser 2
  • Feat/bump package json version2

    Feat/bump package json version2

    Description

    Related Issue

    Motivation and Context

    Screenshots (if appropriate):

    Types of changes

    • [ ] Bug fix (non-breaking change which fixes an issue)
    • [ ] New feature (non-breaking change which adds functionality)
    • [ ] Breaking change (fix or feature that would cause existing functionality to change)

    Checklist:

    • [ ] My code follows the code style of this project.
    • [ ] My change requires a change to the documentation.
    • [ ] I have updated the documentation accordingly.
    feature patch 
    opened by tiagomichaelsousa 1
  • [CICD] - workflows runner name

    [CICD] - workflows runner name

    Description

    • the workflows were configured to run with the self-hosted runner but instead they need to have the ubuntu-latest because we don't have self hosted runners (and we don't need them)

    Reproduction URL

    https://github.com/comoser/baby-food-intro-api/actions

    Reproduction steps

    1. Go to [one of the actions](https://github.com/comoser/baby-food-intro-api/actions/runs/3280340707/jobs/5400992547)
    2. See error: `Requested labels: self-hosted`
    

    Screenshots

    Screenshot 2022-10-19 at 14 43 15

    Logs

    Requested labels: self-hosted
    Job defined at: comoser/baby-food-intro-api/.github/workflows/release-drafter.yaml@refs/heads/main
    Waiting for a runner to pick up this job...
    

    Browsers

    No response

    OS

    No response

    bug good first issue hacktoberfest patch 
    opened by tiagomichaelsousa 0
  • feat(cicd): update changelog

    feat(cicd): update changelog

    Description

    • update changelog after publishing the release

    Related Issue

    Closes #44

    Motivation and Context

    Screenshots (if appropriate):

    Types of changes

    • [ ] Bug fix (non-breaking change which fixes an issue)
    • [x] New feature (non-breaking change which adds functionality)
    • [ ] Breaking change (fix or feature that would cause existing functionality to change)

    Checklist:

    • [x] My code follows the code style of this project.
    • [ ] My change requires a change to the documentation.
    • [ ] I have updated the documentation accordingly.
    hacktoberfest hacktoberfest-accepted feature 
    opened by tiagomichaelsousa 0
  •  [CICD] - update changelog.md after publishing release

    [CICD] - update changelog.md after publishing release

    Start Date

    No response

    Implementation PR

    No response

    Reference Issues

    No response

    Summary

    • Create .github/workflows/update-changelog.yml

    Basic Example

    https://github.com/stefanzweifel/changelog-updater-action

    Drawbacks

    N/A

    Unresolved questions

    No response

    question hacktoberfest feature 
    opened by tiagomichaelsousa 0
  • feat(cicd): add release drafter

    feat(cicd): add release drafter

    Description

    • add release drafter

    Related Issue

    Closes #42

    Motivation and Context

    Screenshots (if appropriate):

    Types of changes

    • [ ] Bug fix (non-breaking change which fixes an issue)
    • [x] New feature (non-breaking change which adds functionality)
    • [ ] Breaking change (fix or feature that would cause existing functionality to change)

    Checklist:

    • [x] My code follows the code style of this project.
    • [ ] My change requires a change to the documentation.
    • [ ] I have updated the documentation accordingly.
    hacktoberfest hacktoberfest-accepted feature 
    opened by tiagomichaelsousa 0
  •  [CICD] - add release drafter

    [CICD] - add release drafter

    Start Date

    No response

    Implementation PR

    No response

    Reference Issues

    No response

    Summary

    • Create .github/workflows/release-drafter.yaml

    Basic Example

    https://github.com/release-drafter/release-drafter

    Drawbacks

    N/A

    Unresolved questions

    No response

    question hacktoberfest feature 
    opened by tiagomichaelsousa 0
  • fix(cicd): update package.json version based on release drafter version

    fix(cicd): update package.json version based on release drafter version

    Description

    • update package.json version based on release drafter version

    Related Issue

    Closes #49

    Motivation and Context

    Screenshots (if appropriate):

    Types of changes

    • [x] Bug fix (non-breaking change which fixes an issue)
    • [ ] New feature (non-breaking change which adds functionality)
    • [ ] Breaking change (fix or feature that would cause existing functionality to change)

    Checklist:

    • [x] My code follows the code style of this project.
    • [ ] My change requires a change to the documentation.
    • [ ] I have updated the documentation accordingly.
    bug patch 
    opened by tiagomichaelsousa 0
  • [BUG] - package.json version needs to be bumped when action creates a new release draft

    [BUG] - package.json version needs to be bumped when action creates a new release draft

    Description

    When a new release is drafted and a new semver version is calculated based on the label, the package.json version should also be matching that same semver version.

    Reproduction URL

    https://github.com/comoser/baby-food-intro-api

    Reproduction steps

    1. Draft a release
    2. Check the draft
    3. Check the package.json
    4. Verify they don't match
    

    Screenshots

    ![DESCRIPTION](LINK.png)
    

    Logs

    No response

    Browsers

    No response

    OS

    No response

    bug hacktoberfest patch 
    opened by comoser 0
  • [REQUEST] - Setup husky to run eslint and fix linter errors on pre-commit

    [REQUEST] - Setup husky to run eslint and fix linter errors on pre-commit

    Start Date

    No response

    Implementation PR

    No response

    Reference Issues

    No response

    Summary

    We have a linter setup that should be run on the pre-commit hooks to automatically fix the issues or fail, if it can't.

    Let's use husky for this.

    Basic Example

    N/A

    Drawbacks

    N/A

    Unresolved questions

    No response

    good first issue hacktoberfest 
    opened by comoser 5
  • Add feature to send email to parent reminding to set the result of the food introduction

    Add feature to send email to parent reminding to set the result of the food introduction

    One of the main features in the API is to keep track of possible food alergies or unsuccessful introductions.

    For that purpose, we need to remind the parent to set the result and possible notes on the food introduction, after a week since he/she introduces the new food.

    This communication/reminder should be sent by email.

    This issue will require work in terms of background jobs running to trigger the email communication (https://docs.nestjs.com/techniques/task-scheduling this page helps on this issue).

    hacktoberfest 
    opened by comoser 0
  • Service level operations need double checking in terms of security

    Service level operations need double checking in terms of security

    Certain operations were left "open" to query. An example of this is getBaby, where you pass the id of a baby. It doesn't matter if it's your child or not, it will provide you with the result you want.

    This kind of behaviour needs to be fixed in all service level operations.

    enhancement hacktoberfest security 
    opened by comoser 0
  • Data source should be reviewed for the environments existing today

    Data source should be reviewed for the environments existing today

    Currently we manage dev and prod environments, and for that, the data-source of the database is configurable.

    But the way it is now, it's very redundant, so we should go and refactor that file to make it better.

    hacktoberfest 
    opened by comoser 0
Owner
David Alecrim
Software Engineer & Blogger / Open source contributor when possible.
David Alecrim
Check in, check the weather, Check out.

☀️ Just-Weather ??️ Hi, Welcome! Just Weather is a Web App designed for Fast Real-Time Weather queries in combination with well Thought Out Visual Des

Miguel Ángel 6 Aug 7, 2022
Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

Svante Jonsson IT-Högskolan 3 May 18, 2022
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
Food Delivery APP is a website designed to provide interactive user experience and increase user engagement when ordering food delivery.

Food-Delivery-APP Features Food Delivery APP is a website built with HTML/Tailwind CSS/JavaScript, React and enhanced with 3D design using Spline to p

Qian Xiang 3 Oct 6, 2022
This is food detection WebApp, which will tell users about the nutrients value of particular food image which they upload

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

Ankush Gupta 3 Sep 8, 2022
A mobile web application to check the data on the total covid19 confirmed cases and deaths, check data for all countries with recorded cases.

This is a mobile web application to check the data on the total covid19 confirmed cases and deaths, check data for all countries with recorded cases. It also has a details page to check for the statistics for each region/state if available.

Solomon Hagan 7 Jul 30, 2022
Keep a track of all the tasks you need to do and Check off ones you have completed - Created using HTML, SCSS, JavaScript and Webpack.

To Do List Keep a track of tasks you need to do. An Application where you can keep a track of the tasks you need to do and checkout the ones that have

Awais Amjed 19 Jul 28, 2022
Grayce Muthui 8 Jun 16, 2022
Get discord application's assets in case you don't have them on your PC

get-discord-app-assets Get discord application's assets in case you don't have them on your PC (this is also the reason why I made this script) I came

Narcis B. 7 Dec 25, 2022
A TypeScript namespace declaration for KeyboardEvent.key strings, just in case your code is allergic to enums.

ts-key-namespace A TypeScript namespace declaration for KeyboardEvent.key strings, just in case you prefer namespaces to enums. Largely based on ts-ke

Daniel Soohan Park 3 Apr 5, 2022
Elections in Russia, Saint Petersburg, 2021: results, turnout, and commission data. With image charts and brief introduction to election fraud methods used.

2021 Elections in Saint Petersburg, Russia ???? Переключиться на русский ?? Jump to charts ?? Telegram bot In Russia, Saint Petersburg from 17th to 19

Vyacheslav 11 Dec 26, 2022
📚 Study guide and introduction to the modern front end stack.

Grab Front End Guide Credits: Illustration by @yangheng This guide has been cross-posted on Free Code Camp. Grab is Southeast Asia (SEA)'s leading tra

Grab 14.7k Jan 3, 2023
Introduction to Metrics, Logs and Traces session companion code.

Introduction to Metrics, Logs and Traces in Grafana This is the companion repository to a series of presentations over the three pillars of observabil

Grafana Labs 35 Dec 24, 2022
For some realizations of the title and thinking of the book Introduction to Algorithms, if there is something wrong, please correct me.

Introduction-to-Algorithms Introduce Origin of this library Some implementations of the topics in Introduction to Algorithms and some reflections on t

biao 2 Jun 9, 2022
PLSC 21510/31510: Introduction to Text as Data for Social Science (Spring 2022)

PLSC 21510/31510: Introduction to Text as Data for Social Science Spring 2022 About Social scientists increasingly use large quantities of text-based

Rochelle Terman 16 Oct 17, 2022
Course material for a ~10 hours introductionary course for Julia. Topics: Introduction, Parallel Programming, Data Science

Development We use Franklin.jl to generate the lecture material. To do so, simply activate the environment, use Franklin and run the local server: act

GregorE 3 Dec 15, 2022
Introduction to R for Clinical Data for the R/Medicine 2022 Virtual Conference

This is the GitHub repository for the R/Medicine 2022 pre-conference workshop R/Medicine 101: Intro to R for Clinical Data. There is a course website

Stephan Kadauke 10 Sep 23, 2022
Introduction à la CI/CD

Introduction à la CI/CD Ce dépôt Git a pour objectif de servir d'introduction à la CI/CD (Intégration Continue / Déploiement Continue). Il est composé

Thibault 3 Sep 8, 2022