Giter Club home page Giter Club logo

inventory's Introduction

Inventory tracking app

  • CRUD for Inventory Items
  • CRUD for Shipments
  • Add/remove items to/from shipments

Tech Stack

  • Monorepo build system using Nx

I chose a monorepo architecture because it allows for great modularity, code sharing, and easy extensibility, since all core functionality is split betwen libraries


  • Typescript for the entire stack
  • GraphQL API in Node.js using NestJS
  • PostgreSQL database accessed with Prisma, an ORM for first-class Typescript support

Using GraphQL and NestJS together allows for easy extensibility because of a decorator-heavy syntax, so data can be easily annotated to create GQL schemas, Authentication/Authorization can be made available using concepts like guards, and server side data validation is accomplished by simply using annotated DTOs and Validation Pipelines


  • React App with Next.js
  • ChakraUI for pre built react components
  • GraphQL code generator for react hooks

I chose GraphQL since I have full control over both the API and the frontend, and therefore GraphQL will allow for better DX as the modern toolchain guarantees end-to-end type safety and a faster development experience

Run locally

Requirements for local setup:

  1. Install dependencies npm install
  2. Create a .env file with the DATABASE_URL, PORT, and NODE_ENV. Here's a sample one:
NODE_ENV=development
PORT=5000
DATABASE_URL="postgresql://postgres:postgres@localhost:5432/inventory"
  1. Run API server npm run start
  2. Run React dev server npm run start webapp
  3. Run DB migrations using npm run migrate:dev and seed initial data into the database using npm run seed:dev

Misc

  • The main backend app is in apps/api/src and all libraries are in libs/
  • All the UI code is in apps/webapp but this would usually be in a UI library in the libs/ directory
  • Frontend data access code (GraphQL queries/mutations) is in libs/data-access

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.