NATS is a Next.js-based ERP system designed to handle various business functions ranging from accounting, inventory, sales, purchasing, POS, to payroll.
- Accounting: Automated general ledger, journals, and financial reports.
- Inventory: Management of stock, warehouses, and item movements.
- Sales & Purchasing: Complete workflow from orders to invoices.
- Point of Sale (POS): Responsive and user-friendly cashier interface.
- Payroll: Automated salary structure management and payslip generation.
- AI Integration: Smart features to assist in business data analysis.
Follow the steps below to run NATS in your local environment.
Before starting, ensure your system has the following components:
- Node.js: Version 20.x or later.
- NPM: Usually included with the Node.js installation.
- PostgreSQL: The main system database.
- Git: For source code management.
git clone <repository-url>
cd natsnpm installCopy the .env.example file to .env and adjust its values:
cp .env.example .envEnsure the DATABASE_URL variable correctly points to your PostgreSQL instance:
DATABASE_URL="postgresql://user:password@localhost:5432/nats"
Create a database in PostgreSQL:
psql -U postgres -c "CREATE DATABASE nats;"Perform database migration and schema creation:
npx prisma generate
npx prisma migrate dev --name initPopulate the database with initial data (roles, default users, etc.). Choose one of the following options:
Option A: Complete Seeding (Recommended for Testing) Includes sample products, transactions, and bulk data:
npm run prisma db seedOption B: Minimal Seeding (Clean Start) Includes only essential data: Company Profile, Chart of Accounts, and Default Roles/Users:
npm run prisma:seed:minimalDefault Credentials:
- Password:
password123(for all default users)
| Role | Name | |
|---|---|---|
| Super Admin | [email protected] |
Admin User |
| Accountant | [email protected] |
John Accountant |
| Cashier | [email protected] |
Jane Cashier |
| Manager | [email protected] |
Mike Manager |
| Merchant | [email protected] |
Sample Merchant |
| Customer | [email protected] |
Sample Customer |
Run the development server:
npm run devThe application can be accessed at http://localhost:3000.
If you want to run the application using Docker Compose:
docker-compose up -dAfter the containers are running, initialize the database:
docker-compose exec app npx prisma migrate deploy
# Run complete seed
docker-compose exec app npm run prisma db seed
# OR run minimal seed
docker-compose exec app npm run prisma:seed:minimalThis project is licensed under LICENSE.



