Skip to content

iamzehan/Game-Inventory-Manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

100 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Game Inventory manager with Express JS and PostgreSQL

Node.js Express EJS PostgreSQL

πŸ“¦ Getting Started

Follow these steps to run the project locally.

1️⃣ Clone the repository

git clone https://github.com/iamzehan/Project-Inventory-Mgt.git

2️⃣ Install dependencies

npm install

3️⃣ Run the development server

npm run dev

4️⃣ Open in browser

http://localhost:3000

5️⃣ Populate Database

node ./src/models/populatedb

6️⃣ Create Super User (v2.0.0 update)

node ./src/models/createUser

7️⃣ Create session table for session persist (v2.0.0 update)

node ./src/models/session

πŸ—‚ Project Structure

Express-APP-template/
β”œβ”€β”€ src
    β”œβ”€β”€ auth/               # Passport auth handler
    β”œβ”€β”€ controllers/        # Request handlers (business logic)
    β”œβ”€β”€ models/             # Database logic
    β”œβ”€β”€ routes/             # Application routes
    β”œβ”€β”€ views/              # EJS templates
    β”œβ”€β”€ public/             # Static assets (CSS, JS, images)
    β”œβ”€β”€ app.js              # App entry point
β”œβ”€β”€ package.json
β”œβ”€β”€ .env.example        # Environment variables example
└── README.md

βš™οΈ Available Scripts

Command Description
npm run dev Starts development server with live reload
npm start Starts production server

πŸ” Environment Variables

Create a .env file in the root directory:

PORT=3000
DATABASE_URL=postgresql://user:password@localhost:5432/dbname

Refer to .env.example for required variables.


🎯 Use Cases

  • CREATE, UPDATE, DELETE, READ
    • Games, Genres, Developers
  • Dashboard View Information

Log in Form (v2.0.0 feature)

dashboard dashboard

Dashboard (version 2.0.0 shows logged in user)

dashboard

Games Inventory Data View

games

Developers Inventory Data view

games

Genre Data View

games

Game Edit Form

games

Game Add Form

games

Add New Genre Form

games

Edit Genre Form

games

Delete View

games

Confirmation Popup Modals

Add

games games

Update

games

Dark mode (v2.1.0)

games

⭐ Support

If this repository helped you, consider giving the repo a ⭐ on GitHub β€” it really helps!