https://github.com/mdsabbiralmamon/sqlite-inventory
A web application built with Next.js, React, and SQLite for user management. Admins can create, update, and delete users, with authentication handled by NextAuth.js and JWT. The app features role-based access and a responsive UI, making it ideal for managing user data in a simple inventory system.
https://github.com/mdsabbiralmamon/sqlite-inventory
bcrypt nextauth nextjs react-icons react-toastify sqlite3 usereducer zustand
Last synced: 2 months ago
JSON representation
A web application built with Next.js, React, and SQLite for user management. Admins can create, update, and delete users, with authentication handled by NextAuth.js and JWT. The app features role-based access and a responsive UI, making it ideal for managing user data in a simple inventory system.
- Host: GitHub
- URL: https://github.com/mdsabbiralmamon/sqlite-inventory
- Owner: mdsabbiralmamon
- Created: 2025-01-08T11:11:20.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-01-09T06:34:25.000Z (4 months ago)
- Last Synced: 2025-01-20T10:17:36.580Z (4 months ago)
- Topics: bcrypt, nextauth, nextjs, react-icons, react-toastify, sqlite3, usereducer, zustand
- Language: TypeScript
- Homepage: https://sqlite-inventory.vercel.app
- Size: 256 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SQLite Inventory Management System
## Project Overview
This project is an Inventory Management System built using SQLite. It allows users to manage and track inventory items effectively by providing features such as adding, updating, deleting, and viewing inventory items. After clean installation in databse there will be default admin email and password by default which are :
```bash
Email: [email protected]
Password: 12345
```NB: Remeber to delete and create your own admin account after successful installation.
## Features
- Items:
- Add new items to the inventory
- Update details of existing items
- Delete items from the inventory
- View all inventory items- Users:
- Create User
- Delete User
- Update User information- Routes:
- Public and Private Route
- Secured Route distribution via middleware- Authentication:
- Next Auth based Authentication
- Automatic Login for logged in users
- Role based authentication system## Technologies Used
- **Frontend**:
- React
- Next.js
- Tailwind CSS (for styling)
- React Toastify (for notifications)
- **Backend**:
- Node.js
- SQLite (for data storage)
- bcrypt (for hashing passwords)## Requirements
- Node.js (for backend)
- SQLite3 (for database management)## Installation
1. Clone the repository:
```bash
git clone https://github.com/mdsabbiralmamon/sqlite-inventory.git
```2. Install dependencies:
```bash
npm install
```
3. setup.env
file
make sure your env file contains these fields:
```bash
JWT_SECRET= "Your_JWT_Secret"
SESSION_SECRET="Your_Session_Secret"
NEXTAUTH_SECRET="Your_Auth_Secret"
NEXTAUTH_URL="Your_Localhost_Url"
```
3. Set up the SQLite database:
- Stay in project directory porobably looks like this:
```bash
/d/directory/name/sqlite-inventory
```
- Then run this command:
```bash
$ node src/database/setupDatabase.js
```
NB: Based on file directory you might face some errors, don't panic just correct the directory location and your databased will start working fine.
4. Run the application (dev mode):
```bash
$ npm run dev
```
5. Run the application (build mode):
```bash
$ npm run dev
```
5. Run the application (Production mode):
```bash
$ npm start
```## Usage
After installing running this app, this will normally run on localhost port 3000 unless that port is busy. Keep an eye on terminal when you use
npm run dev
it will drop the port and url it's runnig on. If the url is like this:```bash
localhost:3000
```
then:- Navigate to Home page:
```bash
http://localhost:3000
```
- Navigate to loginThis will redirect you to login page. Here you need to use default user and password which will be genarated while seeding databse. If you do not change the code these login information will be :
```bash
Email: [email protected]
Password: 12345
```
- Navigate to User ManagementNow use these information to login admin panel. After successful login you will redirect to dashboard. Makesure you delete the default login info and create your own. or change the password by clicking on update.
- Navigate to Dashboard
Now you can simply go to dashboard and start creating and managing inventory items from
Add Item
andView Item
.
For any inquiries, feel free to reach out to [[email protected]].