- Project Overview
- Features
- Technology Stack
- Folder Structure
- Installation
- Usage
- API Endpoints
- Database Scheme
- Contributing
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.
- 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.
- Frontend: React, Next.js
- Backend: Node.js
- Database: Vercel Postgres
- Deployment: Vercel
- Styling: CSS, Inline styles
/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
-
Clone the repository:
git clone https://github.com/harshrajdubey/godown.git
-
Navigate to the project directory:
cd godown -
Install the required dependencies:
npm install
-
Set up the database and environment variables as necessary.
-
Run the development server:
npm run dev
-
Access the application at http://localhost:3000/. Login Details test@test.com 123
-
For production build:
npm run build
-
Deploy to Vercel:
vercel deploy
GET /api/godowns: Fetches a list of all godowns.GET /api/items?search=term: Fetches items based on a search term.
The application utilizes three tables in the database:
| Column | Type |
|---|---|
| username | String |
| String | |
| password | String |
| Column | Type |
|---|---|
| id | String |
| name | String |
| parent_godown | String (nullable) |
| 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 |
Contributions are welcome! Please follow these steps to contribute:
- Fork the repository.
- Create a new branch:
git checkout -b feature-branch. - Make your changes and commit them:
git commit -m 'Add some feature'. - Push to the branch:
git push origin feature-branch. - Create a pull request.