Giter VIP home page Giter VIP logo

invoicing-panda's Introduction

invoicing-panda

Image by catalyststuff on Freepik

Description

API that allows for invoices to be managed in a backend system

Preprequisites (installed once)

For Mac/Linux:

brew install docker

Install Docker Desktop: https://docs.docker.com/desktop/install/mac-install/

brew install nvm
nvm install 20.9.0
nvm use 20.9.0 && nvm alias default 20.9.0`
npm i -g yarn

Some database tool e.g. DBeaver, TablePlus etc. or some Postgres cli e.g. brew install pgcli

Some code editor e.g. VSCode.

For Windows: same prereq but installed with chocolatey or regular installers

Installation

$ yarn install

If you use different node version you can do yarn install --ignore-engines

Run the app locally

docker compose -f ./docker/postgresql.yml up -d
yarn typeorm migration:run -d ./db/typeorm.config.ts
yarn seed:db
yarn start:dev
docker compose -f ./docker/postgresql.yml down

After yarn start:dev you can open http://localhost:3000/graphql and call queries or mutations.

To run tests

docker compose -f ./docker/postgresql.yml up -d
yarn typeorm migration:run -d ./db/typeorm.config.ts
yarn seed:db
yarn test
docker compose -f ./docker/postgresql.yml down

Or simply run yarn test:script

*creation of data for tests could be integrated in before of tests and cleanup in after, but for simplicity we can create db and delete it after test run

Migrations commands for devs

Create or generate migration:

yarn typeorm migration:generate -d ./db/typeorm.config.ts ./db/migrations/init

yarn typeorm migration:create ./db/migrations/data

Run to test it:

yarn typeorm migration:run -d ./db/typeorm.config.ts

Revert if needed:

yarn typeorm migration:revert -d ./db/typeorm.config.ts

invoicing-panda's People

Contributors

stefania-santimbrean 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.