Code Monkey home page Code Monkey logo

catalog-ioet-test's Introduction

Backend Course

Entity Relationship Diagram

After understanding the business rules, one of the next steps for the design of a backend application is the design of the data structure that will contain the persistent information of the system. In this case it has been decided to use a relational database. You can see the Entity Relationship Diagram below.

ERD Diagram

You can also refer to the Hand-on Database ERD video, which explains the making of this diagram.

Hand-on Database ERD

App structure

📦backend
 ┣ 📂adapters
 ┃ ┣ 📂src
 ┃ ┗ 📂tests
 ┣ 📂api
 ┃ ┣ 📂src
 ┃ ┃ ┣ 📂dtos
 ┃ ┃ ┗ 📂routes
 ┃ ┗ 📂tests
 ┣ 📂app
 ┃ ┣ 📂src
 ┃ ┗ 📂tests
 ┣ 📂docs
 ┣ 📂factories
 ┃ ┣ 📂config
 ┃ ┣ 📂repositories
 ┃ ┗ 📂use_cases
 ┗ 📂infrastructure
   ┣ 📂docker
   ┗ 📂postgres-data

Branch Naming strategy

You must base your new branch with the main branch. The new branch should start with 'backend/' followed by your name, and finally a '-' (dash) adn the feature tat you worked on.

backend/MyName-the-new-feature

Example:

backend/JuanPerez-product-create-endpoint

How to Start

Requirements

  • Python 3.10.12 or newer
  • Docker

Environment variables

You must create a .env file, you can use the file .env.example as a reference to do that.

Then replace the values inside brackets ({} and the brackets) with the conection parameters for the Docker PostgreSQL database.

By default the following values are defined in the docker compose file.

user: root
password: toor
database: ioet_catalog_db

First steps

This project contains several make scripts located inside of the Makefile.

To initialize your environment you can run one of the following commands:

In case of using Mac or Linux:

make create_dev_env

In case of using Mac or Linux:

make win_create_dev_env

The next step is to create the docker instance for the PostgreSQL database.

make build

You must use the following two commands every time you run the code.

First you start the docker instance.

make up

And then use the following command to start the python code.

If you use mac or linux

make start

If you use windows

make win_start

Once the app ir running you can access the the self documented API endpoint in the next URL: http://localhost:8000/docs/

catalog-ioet-test's People

Contributors

christianscarpati avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.