Giter Club home page Giter Club logo

inventory-app's Introduction

Inventory app

This is an inventory app, made with nodejs, hono and remix. These are some of the features:

  • End to end authorization and authentication, the app is fully auth guarded so only logged in users can access. Login and register with ease.
  • Role based authorization of actions, there are 2 roles, admin and guest, and admin can create, read, update and delete an item while the guest can only read.
  • Search, sort and paginate inventory items.
  • Profile page to view user details.

Demo

Screen.Recording.2024-03-16.at.3.48.33.AM.mov

Visit the live demo here

Note

Your session might be revoked if there is another new active session with the same login. If you find data not showing, that might be the case. Fixing it is simply logout and login again(Yes, the other user will be logged off).

Getting up and running

Backend

  1. Go to backend directory cd backend
  2. Create your .env or rename the .env.development
  3. Start a local postgres db, replace the DATABASE_URL in the .env with your postgres url
  4. Run pnpm run setup and then run pnpm run dev:all
  5. Your server should be running on port 3000, visit http://localhost:3000/health_check and if it returns "ok", you are good to go!

Frontend

  1. Go to frontend directory cd frontend
  2. Create your .env or rename the .env.development
  3. Run pnpm install & pnpm run dev
  4. Your app should be running on port 5173, visit http://localhost:5173/login and if it returns the login page, you are good to go!

Seeding the db

  1. You can seed the db by running pnpm run seed from the backend directory.
  2. Upon seeding, you should have 2 users: khairul with guest role, and admin with admin role, the passwords are in /backend/scripts/seed.ts

Testing

  1. You can run the backend tests with pnpm run test from the backend directory

test screenshot

Deployment

Backend

  1. You can deploy at any service that supports docker. For me I used fly.io, and you can use the same configuration.
  2. Make sure you have installed fly cli with an account. Go to backend directory, run fly launch, then, run fly deploy.
  3. Your app is deployed ๐ŸŽ‰

Frontend

  1. Same method as frontend, the only difference is you run it from the frontend directory.

inventory-app's People

Contributors

k11q 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.