A comprehensive full-stack web application for managing dairy product operations, including inventory management, order processing, delivery tracking, and supplier coordination.
- Framework: Next.js 14+ (React)
- Language: TypeScript
- Styling: Tailwind CSS
- UI Components: Custom UI components with Radix UI
- Authentication: NextAuth.js
- State Management: React Context API
- Database Client: Prisma
- Framework: Spring Boot (Java)
- Build Tool: Maven
- Database: (Configure in application.properties)
├── Backend/
│ └── hayoma/ # Spring Boot application
│ ├── src/
│ │ ├── main/ # Java source code and resources
│ │ └── test/ # Test files
│ └── pom.xml # Maven dependencies
│
├── Frontend/
│ ├── app/ # Next.js App Router pages
│ │ ├── dashboard/ # Dashboard for different user roles
│ │ ├── auth/ # Authentication pages
│ │ └── api/ # API routes
│ ├── components/ # Reusable React components
│ ├── contexts/ # React Context providers
│ ├── hooks/ # Custom React hooks
│ ├── lib/ # Utility functions and configurations
│ ├── prisma/ # Database schema
│ └── types/ # TypeScript type definitions
The system supports multiple user roles with distinct dashboards:
- Admin: Full system access, user management, analytics, and inventory control
- Driver: Delivery management and schedule tracking
- Shop: Order placement and inventory monitoring
- Supplier: Supply requests and delivery management
- User management
- Product and inventory management
- Order processing and tracking
- Delivery coordination
- Analytics and reporting
- Supplier management
- Shop management
- Driver assignment
- Delivery schedule
- Route management
- Delivery status updates
- Product ordering
- Inventory tracking
- Delivery status monitoring
- Order history
- Material request management
- Supply delivery tracking
- Request history
- Node.js: v18.x or higher
- Java: JDK 11 or higher
- Maven: 3.6+ (or use included Maven wrapper)
- npm or yarn: Latest version
- Navigate to the backend directory:
cd Backend/hayoma-
Configure the database in
src/main/resources/application.properties -
Build the project:
./mvnw clean installOr on Windows:
mvnw.cmd clean install- Run the Spring Boot application:
./mvnw spring-boot:runOr on Windows:
mvnw.cmd spring-boot:run- Navigate to the frontend directory:
cd Frontend- Install dependencies:
npm install- Set up environment variables:
Create a
.env.localfile in the Frontend directory:
DATABASE_URL="your_database_connection_string"
NEXTAUTH_URL="http://localhost:3000"
NEXTAUTH_SECRET="your_nextauth_secret"- Set up the database:
npx prisma generate
npx prisma db push- Run the development server:
npm run devThe application will be available at http://localhost:3000
- Start the backend server (from
Backend/hayoma):
./mvnw spring-boot:run- Start the frontend development server (from
Frontend):
npm run devcd Frontend
npm run build
npm startcd Backend/hayoma
./mvnw clean package
java -jar target/hayoma-*.jarnpm run dev- Start development servernpm run build- Build for productionnpm start- Start production servernpm run lint- Run ESLint
./mvnw spring-boot:run- Run the application./mvnw clean install- Build the project./mvnw test- Run tests