Skip to content

VuxDucGiang/LiteFlow

Repository files navigation

πŸš€ LiteFlow - Enterprise Resource Planning System

A comprehensive ERP solution for restaurant and hospitality management with advanced POS, inventory control, workforce management, AI-powered features, and intelligent alerting capabilities.


πŸ“˜ Overview

LiteFlow is a full-featured Enterprise Resource Planning (ERP) system specifically designed for the restaurant and hospitality industry. Built with modern Java technologies and enterprise-grade security, LiteFlow streamlines operations across multiple business domains including point-of-sale transactions, kitchen operations, inventory tracking, employee scheduling, procurement management, AI-powered chatbots, and intelligent alert systems.

The system addresses critical pain points in restaurant management by providing:

  • Real-time order processing with kitchen integration
  • Intelligent inventory tracking with automated stock alerts and AI-powered forecasting
  • Workforce management with attendance tracking, scheduling, and payroll calculation
  • Secure multi-role access control with 2FA authentication and OAuth2 integration
  • Procurement automation with supplier management, purchase orders, and invoice processing
  • AI-powered chatbot for intelligent business insights and automation
  • Smart alert system with multi-channel notifications (Email, Telegram, Slack, In-App)
  • Payment gateway integration with VNPay for secure online payments
  • Analytics and reporting with revenue tracking and demand forecasting

Key Concept: Unified platform that integrates front-of-house operations (POS, table management) with back-office functions (inventory, procurement, HR, analytics) and AI-powered features to optimize efficiency and reduce operational costs.


βš™οΈ Tech Stack

Backend

  • Language: Java 16
  • Framework: Jakarta EE 11 (Servlets, JSP, JSTL 3.0.1)
  • ORM: Hibernate 6.4.4 + JPA 3.1.0
  • Build Tool: Maven 3.6+
  • Application Server: Apache Tomcat 10+

Database & Caching

  • Primary Database: Microsoft SQL Server
  • JDBC Driver: MS SQL Server JDBC 12.6.1
  • Caching Layer: Redis (Jedis 5.1.0)

Security & Authentication

  • Password Hashing: BCrypt (jBCrypt 0.4)
  • JWT Authentication: JJWT 0.11.5
  • Two-Factor Authentication: TOTP (java-otp 0.4.0, totp 1.0)
  • OAuth2: Google Sign-In Integration (Google API Client 2.8.0)

AI & Machine Learning

  • AI Service: OpenAI GPT API (OkHttp 4.12.0)
  • Configuration: AI Agent Configuration with dynamic prompts
  • Features: Intelligent chatbot, demand forecasting, alert summarization

Payment Integration

  • Payment Gateway: VNPay integration
  • Payment Methods: Cash, Card, Transfer, Wallet, VNPay

Additional Libraries

  • Excel Processing: Apache POI 5.2.5
  • Email Service: Jakarta Mail 2.0.1
  • JSON Processing: Gson 2.10.1, Jackson Databind 2.17.2
  • HTTP Client: OkHttp 4.12.0
  • Scheduler: Quartz Scheduler 2.3.2
  • Environment Variables: Dotenv Java 3.0.0

Testing & Quality Assurance

  • Testing Framework: JUnit 5.10.0
  • Mocking: Mockito 5.5.0
  • Web Testing: Selenium WebDriver 4.15.0
  • Code Coverage: JaCoCo 0.8.10
  • In-Memory Database: H2 Database 2.2.224 (for testing)

🧠 Key Features

πŸ” Authentication & User Management

  • Multi-role access control (Admin, Manager, Cashier, Kitchen Staff, Employee)
  • Secure login with BCrypt password hashing
  • Two-Factor Authentication (2FA) with TOTP
  • Google OAuth2 integration
  • Password recovery via email OTP
  • Session management with JWT tokens
  • Audit logging for security tracking

πŸ’° Point of Sale (POS) System

  • Real-time table/room management with status tracking
  • Interactive menu browsing and order creation
  • Multiple invoice management per table
  • Split bill and payment processing
  • Order history and session tracking
  • Kitchen notification integration
  • Real-time stock validation
  • Discount and promotion management

🍳 Kitchen Management

  • Real-time order queue display
  • Order status workflow (Pending β†’ Preparing β†’ Ready β†’ Served)
  • Multi-station order distribution
  • Priority order handling
  • Kitchen notification system
  • Order modification support

πŸ“¦ Inventory Management

  • Product catalog with variants (size, options)
  • Stock level tracking with low-stock alerts
  • Room/table-based inventory organization
  • Dynamic pricing management
  • Excel import/export functionality
  • Product category management
  • Stock movement tracking
  • Inventory alerts and notifications

πŸ‘₯ Employee & HR Management

  • Employee profile management
  • Attendance tracking system
  • Schedule management and shift planning
  • Payroll calculation (paysheet generation)
  • Employee compensation management (Fixed, Hourly, Per-Shift, Hybrid)
  • Role-based access assignment
  • Employee shift timesheet tracking
  • Leave request management
  • Forgot clock-in/out requests

πŸ›’ Procurement System

  • Supplier database management
  • Purchase Order (PO) creation and tracking
  • Automated PO creation from low-stock items
  • Goods receipt recording
  • Invoice matching and verification
  • Procurement dashboard with analytics
  • Supplier SLA tracking
  • PO status tracking and alerts

πŸ€– AI-Powered Features

  • Intelligent Chatbot: GPT-powered assistant for business insights
  • Demand Forecasting: AI-powered sales prediction and inventory planning
  • Alert Summarization: GPT-generated alert summaries
  • Intelligent Automation: Automated PO creation based on stock levels
  • Revenue Analytics: AI-powered revenue analysis and insights
  • Stock Alert Intelligence: Smart stock alerts with recommendations

πŸ”” Smart Alert System

  • Multi-Channel Notifications: Email, Telegram, Slack, In-App
  • Configurable Alerts: PO pending, low inventory, revenue drop, daily summary
  • AI-Enhanced Alerts: GPT-powered alert summarization
  • Scheduled Alerts: Cron-based periodic alerts
  • Alert History: Comprehensive alert tracking and management
  • User Preferences: Customizable alert preferences per user
  • Priority Management: Low, Medium, High, Critical priority levels

πŸ’³ Payment Processing

  • VNPay Integration: Secure online payment gateway
  • Multiple Payment Methods: Cash, Card, Transfer, Wallet, VNPay
  • Payment Transaction Tracking: Comprehensive payment history
  • Invoice Generation: Automated invoice creation
  • Payment Status Tracking: Pending, Processing, Completed, Failed, Refunded

πŸ“Š Dashboard & Analytics

  • Real-time business metrics
  • Sales performance tracking
  • Inventory status overview
  • Employee performance monitoring
  • Revenue reports with date range filtering
  • Category-based revenue analysis
  • Demand forecasting analytics
  • Low stock alerts and recommendations

πŸ“ Notice Board

  • Internal notice management
  • Notice creation and editing
  • Notice visibility control
  • Notice expiration management

πŸ“… Timesheet Management

  • Employee attendance tracking
  • Shift scheduling and assignment
  • Personal schedule management
  • Leave request processing
  • Forgot clock-in/out requests
  • Attendance flag recalculation

πŸ“ˆ Reporting

  • Revenue reports with detailed analytics
  • Sales invoice management
  • Daily, weekly, monthly reports
  • Category-based revenue analysis
  • Employee performance reports
  • Inventory reports

🧩 Project Structure

LiteFlow/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ main/
β”‚   β”‚   β”œβ”€β”€ java/com/liteflow/
β”‚   β”‚   β”‚   β”œβ”€β”€ controller/          # Servlets (CashierServlet, ProductServlet, etc.)
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ admin/          # Admin controllers
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ alert/          # Alert system controllers
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ api/            # API endpoints (ChatBot, DemandForecast, AIAgentConfig)
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ auth/           # Authentication controllers
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ cashier/        # Cashier/POS controllers
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ dashboard/      # Dashboard controllers
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ employee/       # Employee management controllers
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ inventory/      # Inventory controllers
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ notice/         # Notice board controllers
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ payment/        # Payment controllers
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ payroll/        # Payroll controllers
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ procurement/    # Procurement controllers
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ report/         # Report controllers
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ sales/          # Sales controllers
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ schedule/       # Schedule controllers
β”‚   β”‚   β”‚   β”‚   └── timesheet/      # Timesheet controllers
β”‚   β”‚   β”‚   β”œβ”€β”€ dao/                # Data Access Objects
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ai/             # AI configuration DAOs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ alert/          # Alert system DAOs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ analytics/      # Analytics DAOs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ employee/       # Employee DAOs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ inventory/      # Inventory DAOs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ notice/         # Notice DAOs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ payroll/        # Payroll DAOs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ procurement/    # Procurement DAOs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ report/         # Report DAOs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ sales/          # Sales DAOs
β”‚   β”‚   β”‚   β”‚   └── timesheet/      # Timesheet DAOs
β”‚   β”‚   β”‚   β”œβ”€β”€ model/              # Entity models
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ai/             # AI configuration models
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ alert/          # Alert system models
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ auth/           # Authentication models
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ external/       # External data models
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ inventory/      # Inventory models
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ notice/         # Notice models
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ payroll/        # Payroll models
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ procurement/    # Procurement models
β”‚   β”‚   β”‚   β”‚   └── timesheet/      # Timesheet models
β”‚   β”‚   β”‚   β”œβ”€β”€ service/            # Business logic layer
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ai/             # AI services (GPTService)
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ alert/          # Alert services
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ analytics/      # Analytics services
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ auth/           # Authentication services
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ employee/       # Employee services
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ inventory/      # Inventory services
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ notice/         # Notice services
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ payment/        # Payment services
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ payroll/        # Payroll services
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ procurement/    # Procurement services
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ report/         # Report services
β”‚   β”‚   β”‚   β”‚   └── timesheet/      # Timesheet services
β”‚   β”‚   β”‚   β”œβ”€β”€ filter/             # Authentication & authorization filters
β”‚   β”‚   β”‚   β”œβ”€β”€ security/           # Security utilities (JWT, TOTP)
β”‚   β”‚   β”‚   β”œβ”€β”€ util/               # Helper utilities
β”‚   β”‚   β”‚   β”œβ”€β”€ job/                # Scheduled jobs (Quartz)
β”‚   β”‚   β”‚   └── listener/           # Event listeners
β”‚   β”‚   β”œβ”€β”€ resources/
β”‚   β”‚   β”‚   └── META-INF/
β”‚   β”‚   β”‚       └── persistence.xml # JPA configuration
β”‚   β”‚   └── webapp/
β”‚   β”‚       β”œβ”€β”€ auth/               # Login, signup, OTP pages
β”‚   β”‚       β”œβ”€β”€ cart/               # Cashier/POS interface
β”‚   β”‚       β”œβ”€β”€ employee/           # Employee management pages
β”‚   β”‚       β”œβ”€β”€ inventory/          # Inventory management
β”‚   β”‚       β”œβ”€β”€ kitchen/            # Kitchen display system
β”‚   β”‚       β”œβ”€β”€ procurement/        # Procurement module
β”‚   β”‚       β”œβ”€β”€ reception/          # Reception interface
β”‚   β”‚       β”œβ”€β”€ sales/              # Sales invoice pages
β”‚   β”‚       β”œβ”€β”€ payment/            # Payment result pages
β”‚   β”‚       β”œβ”€β”€ alert/              # Alert dashboard
β”‚   β”‚       β”œβ”€β”€ css/                # Stylesheets
β”‚   β”‚       β”œβ”€β”€ js/                 # JavaScript files
β”‚   β”‚       β”œβ”€β”€ img/                # Images and logos
β”‚   β”‚       β”œβ”€β”€ uploads/            # Uploaded files
β”‚   β”‚       β”œβ”€β”€ includes/           # Header, footer components
β”‚   β”‚       └── WEB-INF/
β”‚   β”‚           β”œβ”€β”€ web.xml         # Servlet configuration
β”‚   β”‚           └── beans.xml       # CDI configuration
β”‚   └── test/
β”‚       β”œβ”€β”€ java/com/liteflow/      # Unit & integration tests
β”‚       β”‚   β”œβ”€β”€ unit/               # Unit tests
β”‚       β”‚   └── selenium/           # Selenium E2E tests
β”‚       └── resources/
β”‚           └── META-INF/
β”‚               └── persistence.xml # Test JPA configuration
β”œβ”€β”€ database/
β”‚   β”œβ”€β”€ liteflow_schema.sql         # Main database schema
β”‚   β”œβ”€β”€ liteflow_data.sql           # Sample data
β”‚   β”œβ”€β”€ procurement_schema.sql      # Procurement schema
β”‚   β”œβ”€β”€ procurement_data.sql        # Procurement data
β”‚   β”œβ”€β”€ alert_system_schema.sql     # Alert system schema
β”‚   β”œβ”€β”€ alert_system_data.sql       # Alert system data
β”‚   β”œβ”€β”€ ai_agent_config_schema.sql  # AI agent configuration schema
β”‚   β”œβ”€β”€ ai_agent_config_data.sql    # AI agent configuration data
β”‚   β”œβ”€β”€ po_alert_notification_schema.sql # PO alert notification schema
β”‚   β”œβ”€β”€ telegram_.sql               # Telegram configuration schema
β”‚   └── telegram_data.sql           # Telegram configuration data
β”œβ”€β”€ target/
β”‚   β”œβ”€β”€ LiteFlow.war                # Deployable WAR file
β”‚   └── site/jacoco/                # Code coverage reports
β”œβ”€β”€ prompts/                        # AI-assisted development logs
β”œβ”€β”€ pom.xml                         # Maven configuration
└── README.md                       # This file

πŸš€ Getting Started

Prerequisites

Before running LiteFlow, ensure you have the following installed:

  • Java Development Kit (JDK) 16 or higher
  • Apache Maven 3.6+
  • Microsoft SQL Server 2019 or later (recommended)
  • Apache Tomcat 10+ (or compatible Jakarta EE server)
  • Redis Server (optional, for caching)
  • Git (for cloning the repository)

Step 1: Clone the Repository

git clone https://github.com/your-username/LiteFlow.git
cd LiteFlow

Step 2: Set Up the Database

2.1 Create Database

  1. Open SQL Server Management Studio (SSMS) or your preferred SQL client
  2. Execute the schema creation scripts in order:
-- Run main schema
USE master;
GO
CREATE DATABASE LiteFlowDBO;
GO
USE LiteFlowDBO;
GO

-- Run schema files
:r database/liteflow_schema.sql
:r database/procurement_schema.sql
:r database/alert_system_schema.sql
:r database/ai_agent_config_schema.sql
:r database/po_alert_notification_schema.sql
:r database/telegram_.sql

2.2 Load Sample Data

USE LiteFlowDBO;
GO

-- Load initial data
:r database/liteflow_data.sql
:r database/procurement_data.sql
:r database/alert_system_data.sql
:r database/ai_agent_config_data.sql
:r database/telegram_data.sql

2.3 Update Database Connection

Edit the file: src/main/resources/META-INF/persistence.xml

<property name="jakarta.persistence.jdbc.url" 
          value="jdbc:sqlserver://localhost:1433;databaseName=LiteFlowDBO;encrypt=true;trustServerCertificate=true;"/>
<property name="jakarta.persistence.jdbc.user" value="YOUR_USERNAME"/>
<property name="jakarta.persistence.jdbc.password" value="YOUR_PASSWORD"/>

Note: Replace YOUR_USERNAME and YOUR_PASSWORD with your SQL Server credentials.

Step 3: Configure Environment Variables

Create a .env file in the project root:

# OpenAI API Key (for AI chatbot and features)
OPENAI_API_KEY=your_openai_api_key_here

# VNPay Configuration
VNPAY_TMN_CODE=your_tmn_code
VNPAY_HASH_SECRET=your_hash_secret
VNPAY_URL=https://sandbox.vnpayment.vn/paymentv2/vpcpay.html

# Telegram Bot Token (for alerts)
TELEGRAM_BOT_TOKEN=your_telegram_bot_token

# Email Configuration
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=your_email@gmail.com
SMTP_PASSWORD=your_email_password

# Google OAuth2 (already configured in web.xml)
# Google Client ID and Secret are in web.xml

Step 4: Configure Redis (Optional)

If using Redis for caching:

  1. Install and start Redis server on default port 6379
  2. No additional configuration needed (Jedis client auto-connects to localhost:6379)

Step 5: Build the Project

# Clean and compile the project
mvn clean install

# Skip tests during build (optional)
mvn clean install -DskipTests

Expected output:

[INFO] BUILD SUCCESS
[INFO] Total time: 45.123 s

The WAR file will be generated at: target/LiteFlow.war

Step 6: Deploy to Tomcat

Option A: Manual Deployment

  1. Copy target/LiteFlow.war to Tomcat's webapps/ directory
  2. Start Tomcat:
# Windows
catalina.bat start

# Linux/Mac
./catalina.sh start

Option B: Maven Tomcat Plugin (Development)

Add this to your pom.xml (if not already present):

<plugin>
    <groupId>org.apache.tomcat.maven</groupId>
    <artifactId>tomcat7-maven-plugin</artifactId>
    <version>2.2</version>
    <configuration>
        <url>http://localhost:8080/manager/text</url>
        <server>TomcatServer</server>
        <path>/LiteFlow</path>
    </configuration>
</plugin>

Then deploy:

mvn tomcat7:deploy

Step 7: Access the Application

Once Tomcat is running, open your browser and navigate to:

http://localhost:8080/LiteFlow

Default Login Credentials

After loading sample data, use these accounts to test different roles:

Role Email Password
Admin admin@liteflow.com 1
Manager manager@liteflow.com Manager123!
Cashier cashier@liteflow.com Cashier123!
Kitchen kitchen@liteflow.com Kitchen123!

⚠️ Security Warning: Change default passwords immediately in production environments!

Step 8: Run Tests (Optional)

# Run all unit tests
mvn test

# Run Selenium E2E tests
mvn test -Dtest=*SystemTest

# Generate code coverage report
mvn jacoco:report

# View coverage report
open target/site/jacoco/index.html

Expected Coverage:

  • Line Coverage: β‰₯70%
  • Branch Coverage: β‰₯80%
  • Method Coverage: β‰₯90%

πŸ”§ Configuration

AI Chatbot Configuration

  1. Navigate to Settings > AI Agent Config
  2. Configure OpenAI API key and model settings
  3. Set up custom prompts for different use cases
  4. Enable/disable AI features

Alert System Configuration

  1. Navigate to Alert Dashboard
  2. Create alert configurations for different alert types
  3. Configure notification channels (Email, Telegram, Slack, In-App)
  4. Set up scheduled alerts with Cron expressions
  5. Configure AI-enhanced alert summarization

VNPay Payment Configuration

  1. Update VNPay credentials in .env file
  2. Configure return URL in VNPayUtil.java
  3. Test payment flow in sandbox mode
  4. Update to production credentials for live deployment

Email Configuration

  1. Update SMTP settings in .env file
  2. Configure email templates in MailUtil.java
  3. Test email sending functionality

πŸ› Troubleshooting

Issue: Database Connection Failed

Solution:

  • Verify SQL Server is running
  • Check credentials in persistence.xml
  • Ensure database LiteFlowDBO exists
  • Check SQL Server authentication mode (SQL Server Authentication or Windows Authentication)

Issue: Port 8080 Already in Use

Solution:

  • Change Tomcat port in conf/server.xml
  • Or kill the process using port 8080:
# Windows
netstat -ano | findstr :8080
taskkill /PID <PID> /F

# Linux/Mac
lsof -ti:8080 | xargs kill -9

Issue: 404 Error After Deployment

Solution:

  • Ensure WAR file is properly extracted in webapps/LiteFlow/ directory
  • Check Tomcat logs for deployment errors
  • Verify web.xml configuration

Issue: JWT Token Errors

Solution:

  • Check that JWT secret key is properly configured
  • Verify session management configuration
  • Check token expiration settings

Issue: OpenAI API Errors

Solution:

  • Verify OpenAI API key in .env file
  • Check API key permissions and quota
  • Verify network connectivity to OpenAI API

Issue: VNPay Payment Errors

Solution:

  • Verify VNPay credentials in .env file
  • Check IP address whitelist in VNPay dashboard
  • Verify return URL configuration
  • Check hash calculation in VNPayUtil.java

Issue: Email Not Sending

Solution:

  • Verify SMTP credentials in .env file
  • Check SMTP server settings
  • Verify email server firewall rules
  • Check spam folder for test emails

πŸ“– API Documentation

Authentication API

  • POST /auth/login - User login
  • POST /auth/signup - User registration
  • POST /auth/logout - User logout
  • POST /auth/send-otp - Send OTP for 2FA
  • POST /auth/verify-otp - Verify OTP
  • POST /auth/forgot-password - Request password reset
  • POST /auth/reset-password - Reset password

Cashier API

  • GET /api/cashier/tables - Get all tables
  • GET /api/cashier/menu - Get menu items
  • POST /api/cashier/order - Create order
  • PUT /api/cashier/order/{orderId} - Update order
  • POST /api/cashier/payment - Process payment

Inventory API

  • GET /products - Get all products
  • POST /products - Create product
  • PUT /products/{productId} - Update product
  • DELETE /products/{productId} - Delete product
  • POST /products/import - Import products from Excel
  • GET /products/export - Export products to Excel

Procurement API

  • GET /procurement/po - Get all purchase orders
  • POST /procurement/po - Create purchase order
  • PUT /procurement/po/{poId} - Update purchase order
  • POST /procurement/po/auto-create - Auto-create PO from low stock
  • GET /procurement/supplier - Get all suppliers
  • POST /procurement/supplier - Create supplier

Payroll API

  • GET /api/payroll/list?month=X&year=Y - Get payroll list
  • POST /api/payroll/generate - Generate payroll
  • POST /api/payroll/mark-paid - Mark payroll as paid
  • POST /api/payroll/recalculate - Recalculate payroll

AI Chatbot API

  • POST /api/chatbot - Send message to chatbot
  • GET /api/ai-agent-config - Get AI agent configuration
  • PUT /api/ai-agent-config - Update AI agent configuration

Alert API

  • GET /alert/dashboard - Get alert dashboard
  • POST /alert/trigger - Trigger alert
  • GET /alert/history - Get alert history
  • PUT /alert/preferences - Update alert preferences

πŸ§‘β€πŸ’» Development

Code Style

  • Follow Java naming conventions
  • Use meaningful variable and method names
  • Add Javadoc comments for public methods
  • Keep methods focused and single-purpose

Database Migrations

  • Use SQL migration scripts in database/ directory
  • Always backup database before running migrations
  • Test migrations on development environment first

Testing

  • Write unit tests for all service classes
  • Write integration tests for API endpoints
  • Maintain test coverage above 70%
  • Use mocking for external dependencies

Git Workflow

  • Create feature branches for new features
  • Write descriptive commit messages
  • Create pull requests for code review
  • Merge to main only after approval

πŸ“š Additional Documentation


πŸ”„ Version History

Version Date Changes
1.0.0 October 2025 Initial release with core ERP modules
0.9.0 September 2025 Beta release with procurement module
0.8.0 August 2025 Alpha release with POS and inventory

🌟 Features Roadmap

βœ… Completed

  • User authentication with 2FA
  • POS system with table management
  • Kitchen display system
  • Basic inventory management
  • Employee management
  • Procurement module
  • AI-powered chatbot
  • Smart alert system
  • Payment gateway integration (VNPay)
  • Notice board
  • Timesheet management
  • Payroll calculation
  • Revenue reporting
  • Demand forecasting

🚧 In Progress

  • Advanced analytics dashboard
  • Mobile responsive design
  • REST API for mobile app integration
  • Multi-language support (English, Vietnamese)

πŸ“‹ Planned

  • Cloud deployment (AWS/Azure)
  • Mobile application (iOS/Android)
  • Advanced reporting with PDF export
  • Integration with additional payment gateways
  • Customer loyalty program
  • Advanced AI features (predictive analytics)
  • Real-time analytics dashboard
  • WebSocket support for real-time updates

πŸ§‘β€πŸ’» Contributors

Development Team - FPT University SWP391 Project (Fall 2025)

Member Student ID Role Responsibilities
[Vu Duc Giang] DE190556 Project Lead & Backend Developer System architecture, authentication, core servlets
[Huynh Quang Huy] SE123457 Frontend Developer UI/UX design, JSP pages, CSS styling
[Dang Dong Hoa] SE123458 Database Administrator Database design, SQL optimization, data migration
[Member 4] SE123459 QA Engineer Testing strategy, unit tests, coverage reports
[Member 5] SE123460 DevOps & Integration Deployment, CI/CD, documentation

Note: This is a university project developed as part of the Software Project (SWP391) course at FPT University.


πŸ“ž Contact & Support


🧾 License

Educational Use Only

This project is developed by students at FPT University as part of the SWP391 - Software Project course. All rights are owned by the development team.

Terms of Use

  • βœ… Free to use for educational and learning purposes
  • βœ… Can be modified and extended for academic projects
  • ❌ Not licensed for commercial use without permission
  • ❌ Not for redistribution as a standalone product

For commercial licensing inquiries, please contact the development team.


πŸ™ Acknowledgments

  • FPT University - For providing the learning environment and resources
  • Instructor Team - For guidance and support throughout the project
  • Open Source Community - For the amazing libraries and tools used in this project
  • Stack Overflow & GitHub - For countless solutions and inspirations
  • OpenAI - For providing GPT API for AI features
  • VNPay - For providing payment gateway integration

Made with ❀️ by the LiteFlow Team

⭐ Star this repository if you find it helpful!

Report Bug Β· Request Feature Β· Documentation


Β© 2025 LiteFlow Development Team - FPT University

About

LITEFLOW - ENTERPRISE RESOURCE PLANNING SYSTEM - SWP391 - FPTU

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors