This project is a sales inventory management system built with React for the frontend and Node.js with Express for the backend. It uses PostgreSQL as the database.
Before you begin, ensure you have met the following requirements:
- Node.js and npm installed on your machine.
- PostgreSQL installed and running.
- A PostgreSQL database created with the necessary tables.
-
Clone the repository:
git clone https://github.com/miigo-dev/react-sales-inventory.git cd react-sales-inventory
-
Install the backend dependencies:
cd server npm install
-
Install the frontend dependencies:
cd client npm install
- Create a
.env
file in theserver
directory and add your environment variables:PORT = 8080 SECRET = supersecret CLIENT_URL = http://localhost:3000 SERVER_URL = http://localhost:8080 DB_USER = user DB_HOST = host DB_DATABASE = db DB_PASSWORD = password DB_PORT = port SSL_MODE = require
-
Start the backend server:
cd server npm run dev
-
Start the frontend development server:
cd client npm start
-
Open your browser and navigate to
http://localhost:3000
.