A modern, full-featured frontend application built with Next.js 15, shadcn/ui, Tailwind CSS, Zustand, and Framer Motion.
- 🎨 Modern UI with shadcn/ui components
- 🌓 Light/Dark mode support
- 🔐 Role-based authentication (Dealer Staff, Manager, EVM Staff, Admin)
- 📱 Responsive design
- ⚡ Fast page transitions with Framer Motion
- 📊 Dashboard with charts and KPIs
- 🚗 Vehicle catalog and management
- 📋 Orders and Quotes management
- 👥 Customer management
- 📈 Reports and analytics
- Framework: Next.js 15 (App Router)
- Styling: Tailwind CSS
- UI Components: shadcn/ui
- State Management: Zustand
- Animations: Framer Motion
- Charts: Recharts
- HTTP Client: Axios
- Forms: React Hook Form
- Notifications: Sonner
- Node.js 18+
- npm or yarn
- Running SDN-BE backend server (default: http://localhost:5000)
- Install dependencies:
npm install- Create a
.env.localfile in the root directory:
NEXT_PUBLIC_API_BASE_URL=http://localhost:5000/api- Run the development server:
npm run dev- Open http://localhost:3000 in your browser.
npm run build
npm startSDN-FE/
├── app/ # Next.js app directory
│ ├── dashboard/ # Dashboard pages
│ ├── vehicles/ # Vehicle pages
│ ├── orders/ # Order pages
│ ├── quotes/ # Quote pages
│ ├── customers/ # Customer pages
│ ├── login/ # Login page
│ ├── settings/ # Settings page
│ ├── layout.tsx # Root layout
│ └── globals.css # Global styles
├── components/ # React components
│ ├── layout/ # Layout components (Navbar, Sidebar)
│ └── ui/ # shadcn/ui components
├── services/ # API services
├── stores/ # Zustand stores
├── lib/ # Utilities
└── types/ # TypeScript types
The application supports 4 user roles:
-
Dealer Staff - Sales personnel
- View vehicles, create quotes/orders
- Manage customers
- View personal reports
-
Dealer Manager - Dealership management
- Approve/reject orders
- Manage staff
- View dealer reports
- Manage promotions
-
EVM Staff - Manufacturer staff
- Manage vehicle catalog
- Handle inventory
- Process dealer requests
- View analytics
-
Admin - System administrator
- Manage users and dealers
- System-wide reports
- Full access
All API calls are handled through services in the services/ directory. The API base URL is configured in lib/api.ts and can be overridden via NEXT_PUBLIC_API_BASE_URL environment variable.
- Primary Color: Indigo-600
- Accent Color: Emerald-500
- Border Radius: rounded-2xl (1rem)
- Shadows: shadow-md
- Fonts: Inter (primary), Plus Jakarta Sans (fallback)
- Create a new page in
app/[route]/page.tsx - Use the
MainLayoutcomponent for authenticated pages - Add route to sidebar navigation in
components/layout/sidebar.tsx
- Create service file in
services/ - Define TypeScript interfaces for requests/responses
- Export service functions using the
apiinstance fromlib/api.ts
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
ISC