A modern, full-featured admin dashboard built with Next.js for managing business documents, employees, companies, invoices, and transactions. Designed to streamline business operations with a comprehensive suite of management tools.
ZAAD is an enterprise-level business management platform that provides organizations with centralized control over their operations. The system enables management of multiple companies, employee records, financial transactions, and critical business documents with advanced filtering, search, and reporting capabilities.
Version: 1.3.1
- Role-based access control (Partner, Employee)
- User authentication with JWT tokens
- Secure password management with bcryptjs
- User activity logging and audit trails
- User history tracking
- Comprehensive company profile management
- License and emirate tracking
- Document management for companies
- Platform credentials storage
- Multi-emirate support
- Mainland/Freezone classification
- Employee records with detailed information
- Employment status tracking
- Employee activity monitoring
- Bulk employee operations
- Invoice creation and management
- Transaction tracking
- Multiple payment method support
- Self-deposit functionality
- Self-service payment modal
- Expense and income tracking
- Financial reporting with charts
- Interactive charts and data visualization (ApexCharts)
- Last 12 months trends
- Last 7 days analytics
- Custom date range reporting
- Statistical dashboards
- Real-time data updates
- Document management and storage
- Search functionality across all records
- Confirmation modals for critical operations
- Print-to-PDF capabilities
- Dark mode support
- Real-time notifications (React Hot Toast)
- Responsive design with Tailwind CSS
- Framework: Next.js 14.2.3
- React: 18.x
- Language: TypeScript 5
- Styling: Tailwind CSS 3.4 + PostCSS
- State Management: React Query (TanStack Query 5.63)
- Charts: ApexCharts with React integration
- Notifications: React Hot Toast
- Print: React to Print
- Runtime: Node.js
- API: Next.js API Routes
- Authentication: JWT (jsonwebtoken)
- Password Security: bcryptjs
- Database: MongoDB (Mongoose ODM)
- Caching: Redis
- HTTP Client: Axios
- Type Checking: TypeScript
- Code Quality: ESLint
- Code Formatting: Prettier with Tailwind plugin
- Package Manager: PNPM
zaad/
βββ src/
β βββ app/ # Next.js App Router
β β βββ (logged)/ # Protected routes
β β β βββ accounts/ # Account management
β β β βββ company/ # Company management pages
β β β βββ employee/ # Employee management pages
β β β βββ settings/ # User settings
β β β βββ users/ # User management
β β βββ api/ # API endpoints
β β β βββ company/
β β β βββ employee/
β β β βββ invoice/
β β β βββ payment/
β β β βββ search/
β β β βββ users/
β β βββ login/ # Authentication page
β β βββ layout.tsx # Root layout
β β βββ middleware.ts # Route protection
β βββ components/ # Reusable React components
β β βββ Tables/ # Data tables
β β βββ Forms/ # Form components
β β βββ Charts/ # Chart components
β β βββ Modals/ # Modal dialogs
β β βββ Header/ # Navigation header
β β βββ Sidebar/ # Navigation sidebar
β β βββ common/ # Common utilities
β βββ models/ # Mongoose schemas
β β βββ users.ts
β β βββ companies.ts
β β βββ employees.ts
β β βββ invoice.ts
β β βββ records.ts
β β βββ userActivity.ts
β βββ helpers/ # Utility functions
β β βββ calculateLast12Months.ts
β β βββ getUserFromCookie.ts
β β βββ userActivityLogger.ts
β β βββ processDocuments.ts
β βββ hooks/ # Custom React hooks
β βββ contexts/ # React contexts
β βββ providers/ # Provider components
β βββ types/ # TypeScript type definitions
β βββ utils/ # General utilities
β βββ db/ # Database connections
β βββ css/ # Stylesheets
β βββ libs/ # Shared libraries
βββ public/ # Static assets
βββ Configuration files
βββ next.config.mjs
βββ tsconfig.json
βββ tailwind.config.ts
βββ postcss.config.js
βββ package.json
- Node.js 18+ or higher
- PNPM package manager
- MongoDB instance (local or cloud)
- Redis instance (for caching)
-
Clone the repository
git clone <repository-url> cd zaad
-
Install dependencies
pnpm install
-
Environment Configuration Create a
.env.localfile in the root directory:# MongoDB MONGODB_URI=mongodb://localhost:27017/zaad # Redis REDIS_URL=redis://localhost:6379 # JWT Secret JWT_SECRET=your_jwt_secret_key_here # API Configuration NEXT_PUBLIC_API_URL=http://localhost:3000
-
Run development server
pnpm dev
Open http://localhost:3000 in your browser.
-
Build for production
pnpm build pnpm start
| Command | Description |
|---|---|
pnpm dev |
Start development server with hot reload |
pnpm build |
Build application for production |
pnpm start |
Start production server |
pnpm lint |
Run ESLint to check code quality |
- Authentication: JWT-based token system with secure cookie storage
- Authorization: Role-based access control (RBAC)
- Password Security: bcryptjs encryption for password hashing
- Route Protection: Middleware-based route protection
- Soft Deletes:
deletedAttimestamp for data integrity - Activity Logging: Comprehensive user action logging
- Responsive Design: Mobile-first approach with Tailwind CSS
- Dark Mode: Built-in dark mode support
- Interactive Charts: Real-time data visualization
- Loading States: Skeleton loaders for better UX
- Toast Notifications: Non-intrusive alerts and confirmations
- Print Support: PDF export functionality for documents
- Accessibility: Semantic HTML and ARIA labels
- Username, Full Name, Password (hashed)
- Role (Partner/Employee)
- Status and soft delete support
- Timestamps (created, updated)
- Name, License Number, Company Type
- Contact Information (phones, email)
- Location (Emirates, Mainland/Freezone)
- Document Management (with expiry tracking)
- Platform Credentials Storage
- Timestamps
- Personal information
- Employment details
- Activity tracking
- Invoice details and line items
- Payment tracking
- Status management
- Transaction records
- Document records
- Status and metadata
POST /api/users/login- User loginPOST /api/users/logout- User logout
GET /api/company- List all companiesPOST /api/company- Create new companyGET /api/company/[id]- Get company detailsPUT /api/company/[id]- Update companyDELETE /api/company/[id]- Delete company
GET /api/employee- List all employeesPOST /api/employee- Create new employeeGET /api/employee/[id]- Get employee detailsPUT /api/employee/[id]- Update employee
GET /api/search- Global search across all records
Contributions are welcome! Please follow these guidelines:
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is private and proprietary.
This project demonstrates proficiency in:
β Full-Stack Development: Complete end-to-end application development β Modern React Architecture: Server components, hooks, context API, and state management β TypeScript: Strict type safety and advanced TypeScript patterns β API Design: RESTful API design with proper routing and middleware β Database Design: Schema design with MongoDB and Mongoose β Authentication & Security: JWT tokens, password hashing, role-based access β Performance Optimization: React Query for efficient data fetching and caching β UI/UX Development: Responsive design, dark mode, accessibility β Data Visualization: Complex charts and analytics β DevOps & Deployment: Production-ready build pipeline
For questions or support regarding this project, please contact the project owner.
Last Updated: February 2026 Maintained By: Development Team