Skip to content

harshrajdubey/dev13-task

Repository files navigation

Godown Inventory Management System

Table of Contents

  1. Project Overview
  2. Features
  3. Technology Stack
  4. Folder Structure
  5. Installation
  6. Usage
  7. API Endpoints
  8. Database Scheme
  9. Contributing

Project Overview

The Godown Inventory Management System is a Tree View Application designed to manage and visualize the hierarchy of godowns (warehouses), sub-locations, and stored items. This application provides users with a dashboard to efficiently manage their inventory by displaying a sidebar with locations and a details panel for selected items.

Features

  • Login Page: Secure access to the dashboard.
  • Dashboard Page:
    • Sidebar: Displays the hierarchical structure of godowns and items.
    • Details Panel: Shows details of the selected item.
  • Search Functionality: Quickly find items by name.
  • Expandable Tree View: Visualize the relationships between godowns, sub-godowns, and items.

Technology Stack

  • Frontend: React, Next.js
  • Backend: Node.js
  • Database: Vercel Postgres
  • Deployment: Vercel
  • Styling: CSS, Inline styles

Folder Structure

/godown
├── /app
│   ├── /api
│   │   ├── godowns/route.ts        # API for fetching godowns
│   │   └── items/route.ts          # API for fetching items
│   ├── /lib
│   │   ├── actions.ts         # Sidebar component
│   │   └── definations.ts     # Prototypes
│   │   └── sidebar.tsx        # Item Details component
│   ├── /login
│   │   ├── page.tsx           # Dashboard page
│   ├── /ui
│   │   ├── login-form.tsx     # Form Component
│   ├── /dashboard
│   │   ├── page.tsx           # Dashboard page
│   └── /globals.css            #Global Styles
├── /public
│   └── /images                # Static Images (logo)
├── package.json
└── README.md

Installation

  1. Clone the repository:

    git clone https://github.com/harshrajdubey/godown.git
  2. Navigate to the project directory:

    cd godown
  3. Install the required dependencies:

    npm install
  4. Set up the database and environment variables as necessary.

Usage

  1. Run the development server:

    npm run dev
  2. Access the application at http://localhost:3000/. Login Details test@test.com 123

  3. For production build:

    npm run build
  4. Deploy to Vercel:

    vercel deploy

API Endpoints

  • GET /api/godowns: Fetches a list of all godowns.
  • GET /api/items?search=term: Fetches items based on a search term.

Database Schema

The application utilizes three tables in the database:

1. admin

Column Type
username String
email String
password String

2. godown

Column Type
id String
name String
parent_godown String (nullable)

3. items

Column Type
item_id Integer
name String
quantity Integer
category String
price Decimal
status String
godown_id Integer
brand String
attributes.type String
attributes.material String
attributes.warranty_years String
image_url String
attributes.size String
attributes.color String
attributes.age_range String
attributes.battery_required String
attributes.dimensions String
attributes.wattage Decimal
attributes.voltage Decimal

Contributing

Contributions are welcome! Please follow these steps to contribute:

  1. Fork the repository.
  2. Create a new branch: git checkout -b feature-branch.
  3. Make your changes and commit them: git commit -m 'Add some feature'.
  4. Push to the branch: git push origin feature-branch.
  5. Create a pull request.

About

Task for Inter IIT Tech 13.0 Dev Team

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors