A comprehensive Java desktop application for retail store management with modern UI and complete business functionality
- Overview
- Features
- Screenshots
- Technology Stack
- Installation
- Usage
- Project Structure
- Database Schema
- Contributing
The Retail Management System is a full-featured desktop application designed for managing retail operations. Built with Java Swing and MySQL, it provides a modern, user-friendly interface for handling sales, inventory, customer management, and business analytics.
- π― Complete Business Solution: End-to-end retail management from inventory to analytics
- π¨ Modern UI: Professional interface with FlatLaf theme and responsive design
- π Real-time Analytics: Dashboard with charts, KPIs, and business intelligence
- π Role-based Access: Manager and employee roles with appropriate permissions
- πΎ Robust Database: MySQL backend with comprehensive data relationships
- π Scalable Architecture: Well-organized codebase with separation of concerns
- Real-time KPI monitoring (revenue, orders, profit margins)
- Interactive charts and statistical visualizations
- Multi-dimensional analytics (products, staff, customers)
- Time-based filtering and reporting
- Multi-order processing with shopping cart functionality
- Real-time inventory validation
- Customer lookup and creation
- Voucher/discount system integration
- Multiple payment methods (Cash, Bank Transfer)
- Order workflow automation
- Master product catalog with variants
- Product attributes (size, color, material, thickness)
- Supplier relationship management
- Inventory tracking and stock alerts
- Advanced search and filtering
- Comprehensive customer database
- Contact information and demographics
- Customer status tracking
- Phone-based lookup system
- Purchase history integration
- Complete transaction history
- Detailed invoice breakdown
- Customer and payment tracking
- Search and filtering capabilities
- Employee database with role assignments
- Login credential management
- Performance tracking
- Active/inactive status control
- Voucher creation and management
- Time-based promotional campaigns
- Usage limits and restrictions
- Discount type configuration
- Product return handling
- Automatic refund calculations
- Inventory adjustment automation
- Modern FlatLaf look and feel
- Responsive MigLayout system
- Custom Swing components
- Interactive data tables with cell editors
- Real-time form validation
- Keyboard shortcuts and mouse interactions
- JFreeChart integration for analytics
- Dynamic chart updates
- Color-coded performance metrics
- Statistical trend analysis
- Excel export using Apache POI
- PDF generation with iText
- Customizable report formats
Coming soon - Application screenshots showcasing the modern UI and key features
- Java 21 - Latest LTS version with modern language features
- Swing - Desktop GUI framework with custom components
- MySQL 8.0 - Relational database for data persistence
- Maven - Build automation and dependency management
- FlatLaf - Modern look and feel for Swing applications
- MigLayout - Flexible and powerful layout manager
- SwingX - Enhanced Swing components
- Custom Components - Purpose-built UI elements
- JDBC - Database connectivity and operations
- JFreeChart - Chart and graph generation
- Apache POI - Excel file manipulation
- iText - PDF document generation
- JCalendar - Date picker components
- TimingFramework - Animation support
- JNA - Native system integration
- Java Development Kit (JDK) 21 or higher
- MySQL Server 8.0 or higher
- Maven 3.6 or higher
-
Clone the Repository
git clone <repository-url> cd first-project
-
Database Setup
# Start MySQL service sudo systemctl start mysql # Linux # or brew services start mysql # macOS # Import database schema mysql -u root -p < DuAn_1.sql
-
Configure Database Connection
Update database credentials in
src/main/java/com/daipc/repo/JDBCHelper.java:private final String URL = "jdbc:mysql://localhost:3306/DuAn1_Final"; private final String USER = "your_username"; private final String PASSWORD = "your_password";
-
Build and Run
# Compile the project mvn compile # Run the application mvn exec:java
- Username:
nva - Password:
123
- Login: Use the default credentials or create new employee accounts
- Dashboard: View real-time business metrics and analytics
- Sales: Process orders by selecting products and customers
- Inventory: Manage products, suppliers, and stock levels
- Customers: Maintain customer database and relationships
- Reports: Generate business reports and analytics
- Navigate to Sales module
- Select or create customer
- Add products to cart (double-click or search)
- Apply vouchers/discounts if applicable
- Choose payment method
- Complete transaction
- Go to Products module
- Add new products with variants
- Set pricing and supplier information
- Monitor stock levels
- Update quantities as needed
- Access Dashboard or respective modules
- Select date ranges and filters
- View real-time analytics
- Export data to Excel/PDF
src/main/java/com/daipc/
βββ UI/ # Main application windows
β βββ Login.java # Authentication entry point
β βββ MainFrame.java # Main application window
β βββ Header.java # Application header
βββ form/ # Business feature forms
β βββ Form_Sell.java # Sales processing
β βββ Form_Products.java # Product management
β βββ Form_Customer.java # Customer management
β βββ Form_Bill.java # Invoice management
β βββ Form_Staffs.java # Staff management
β βββ Form_Home.java # Dashboard
βββ model/ # Data entities
β βββ SanPham.java # Product model
β βββ KhachHang.java # Customer model
β βββ HoaDon.java # Invoice model
βββ repo/ # Data access layer
β βββ JDBCHelper.java # Database connection
β βββ QuanLi*.java # Business logic classes
βββ swing/ # Custom UI components
βββ table/ # Custom table components
βββ chart/ # Chart components
- SanPham - Products and catalog
- KhachHang - Customer information
- NhanVien - Employee data
- HoaDon - Invoice transactions
- HoaDonCT - Invoice line items
- Voucher - Promotional codes
- NhaCungCap - Supplier management
- Products have multiple variants (size, color, material)
- Invoices contain multiple product line items
- Customers are linked to their purchase history
- Employees are associated with their sales transactions
- Follow Java coding conventions
- Write meaningful commit messages
- Add comments for complex business logic
- Test thoroughly before submitting
- Update documentation as needed
π§ For questions or support, please open an issue on GitHub
Made with β€οΈ using Java and Swing