DealerHub is a modern B2B Dealer Management System designed to streamline operations between a central distributor (Admin) and its network of dealers (Stores). Built with the latest web technologies, it provides a seamless experience for managing products, orders, and financial tracking.
Key Capabilities:
- For Admins: Centralized control over all stores, products, and global reporting.
- For Dealers: A dedicated portal to place orders, track stock, and manage their own customers.
- Dashboard: Visualize total sales, collections, pending payments, and order statuses graphically.
- Store Management: Create, edit, and delete stores.
- Product Management: View and manage products across all stores.
- Order Management: View all orders, update statuses, and inspect details.
- Customer Management: List all customers.
- Admin Management: Create and authorize new admin users.
- Dashboard: Store-specific sales statistics and summary reports.
- Product Management: Track stock, manage prices, and add/edit products.
- Order Creation: Fast order creation for customers (Cart system).
- Order Tracking: Update order statuses (Preparing, Shipped, etc.).
- Customer Management: Create and manage a customer database.
- Settings: Customize sales contracts, default notes, and bank/IBAN information.
- Printing: Print order details and contracts.
- Framework: Next.js 16 (App Router)
- Language: TypeScript
- Database: SQLite (with Prisma ORM)
- Authentication: NextAuth.js v5 (Beta)
- Styling: Tailwind CSS
- UI Components: shadcn/ui & Radix UI
- Form Management: React Hook Form & Zod
Follow these steps to run the project locally:
-
Clone the Project:
git clone https://github.com/birhatmf/DealerHub.git cd bayi-app -
Install Dependencies:
npm install
-
Set Up Environment Variables: Create a
.envfile and add the following values:DATABASE_URL="file:./dev.db" AUTH_SECRET="your-secret-key-here" # Generate with `npx auth secret`
-
Prepare the Database:
npx prisma db push
-
Create Admin User:
npx tsx prisma/seed.ts
Default Admin:
admin/admin123 -
Start the Application:
npm run dev
Go to
http://localhost:3000in your browser.
- Username:
admin - Password:
admin123
After logging in, you can create new stores from the Admin panel and set usernames/passwords for them.
bayi-app/
├── app/
│ ├── (admin)/ # Admin panel pages
│ ├── (store)/ # Store panel pages
│ ├── actions/ # Server Actions (Database operations)
│ └── api/ # API routes (Auth, etc.)
├── components/ # Reusable UI components
├── lib/ # Utility functions and Prisma client
├── prisma/ # Database schema and seed files
└── public/ # Static files
This project is licensed under the MIT license.