Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OneStopUIU - University Management System

OneStopUIU is a comprehensive JavaFX-based management system designed for United International University (UIU). The system provides a unified platform for managing canteen operations with separate interfaces for customers, sellers, and administrators.

Quick Start

Option 1: IntelliJ IDEA (Recommended)

  1. Open project in IntelliJ IDEA 2025.1
  2. Run configuration: "OneStopUIU Application"
  3. Click Run

Option 2: Command Line

# Windows PowerShell
.\mvnw.cmd javafx:run

# Or use Maven exec plugin for ChatServer
mvn exec:java

Demo Accounts

Role Username Password Purpose
Admin admin admin123 System administration & management
Customer customer1 pass123 Food ordering & tracking
Student student1 student123 Regular student user
Seller seller1 seller123 Food item management

Key Features

Canteen Management

  • Real-time menu browsing with categories (breakfast, lunch, snacks)
  • Smart ordering system with stock validation
  • Order tracking (pending → completed → delivered)
  • Admin dashboard with sales analytics
  • Inventory management with low-stock alerts

User Management

  • Role-based access control (Customer/Seller/Admin)
  • Secure authentication with proper session management
  • User profile management with role-specific features

Chat System

  • Real-time messaging between customers and administrators
  • WhatsApp-style message interface with modern UI
  • Admin monitoring dashboard for all customer conversations
  • Socket-based ChatServer on port 8888

Analytics & Reporting

  • Real-time sales dashboard with daily/weekly views
  • Stock level monitoring with automatic alerts
  • Order history tracking with detailed reports
  • User activity analytics for business insights

Technical Architecture

Frontend

  • JavaFX 21.0.2 - Modern UI framework
  • FXML - Declarative UI layouts
  • CSS styling - Clean, minimal design

Backend

  • Java 21 - LTS version
  • Maven - Dependency management & build
  • JDBC - Database connectivity
  • MVC Pattern - Clean code architecture
  • Socket-based chat server

Database

  • MySQL 8.0 - Relational database
  • Connection pooling - Optimized performance
  • Transaction management - Data consistency
  • Schema: onestopuiu - Organized data structure

Project Structure

OneStopUIU/
├── src/main/java/com/example/onestopuiu/
│   ├── OneStopUIUApplication.java      # Main application entry
│   ├── controller/                      # UI Controllers (MVC)
│   │   ├── LoginController.java           # User authentication
│   │   ├── AdminDashboardController.java  # Admin interface
│   │   ├── CanteenViewController.java     # Food ordering
│   │   ├── ChatController.java            # Chat interface
│   │   └── MyOrdersController.java        # Order tracking
│   ├── model/                          # Data Models
│   │   ├── User.java                      # User entity
│   │   ├── FoodItem.java                  # Food item entity
│   │   └── FoodOrder.java                 # Order entity
│   ├── dao/                            # Data Access Layer
│   │   ├── UserDAO.java                   # User operations
│   │   ├── FoodItemDAO.java               # Food item operations
│   │   └── FoodOrderDAO.java              # Order operations
│   ├── server/                         # Chat Server
│   │   └── ChatServer.java                # Socket server implementation
│   └── util/                           # Utilities
│       ├── DatabaseConnection.java        # DB connection
│       └── ImageCache.java                # Image optimization
├── src/main/resources/                 # Resources
│   └── com/example/onestopuiu/
│       ├── *.fxml                         # UI layouts
│       ├── styles.css                     # Styling
│       └── images/                        # Application images
└── pom.xml                            # Maven configuration

Technical Setup

Prerequisites

  • Java 21 (JDK)
  • MySQL 8.0
  • Maven 3.8+
  • IntelliJ IDEA 2025.1 (recommended)

Database Setup

-- Create database
CREATE DATABASE onestopuiu;

Running the Application

  1. Start MySQL service
  2. Run ChatServer: mvn exec:java
  3. Run main application: mvn javafx:run

Project Highlights

Technical Excellence

  • Modern Java 21 with latest features
  • Clean MVC architecture for maintainability
  • Responsive JavaFX UI with FXML
  • Robust database design with proper relationships
  • Error handling & validation throughout
  • Resource management with automatic cleanup
  • Real-time chat system with socket communication

Design Excellence

  • Minimal, clean UI with consistent styling
  • Intuitive user experience for all roles
  • Professional color scheme
  • Responsive layouts that adapt to content
  • Clear navigation and user feedback

Performance Features

  • Efficient database queries with prepared statements
  • Image caching for better performance
  • Connection pooling for database optimization
  • Background processing for smooth UI
  • Memory management with proper resource cleanup

Support & Contact

Project Team: UIU Computer Science Students
Institution: United International University (UIU)


Features

Canteen Section

  • View and order from the canteen menu
  • Track food order history
  • Real-time order notifications
  • Daily sales reports
  • Menu management (Admin)
  • Order status tracking

General Features

  • User authentication (Customer/Admin/Seller roles)
  • Clean minimal design interface
  • Real-time inventory updates
  • Secure data management
  • Responsive JavaFX interface

Installation

  1. Clone the repository

    git clone [repository-url]
    cd OneStopUIU
  2. Database Setup

    • Install MySQL Server
    • Create a database named onestopuiu
    • Import the schema from src/main/resources/schema.sql
    • Example (MySQL CLI):
      CREATE DATABASE onestopuiu;
      USE onestopuiu;
      SOURCE path/to/schema.sql;
  3. Configure Database Connection

    • Edit the database connection settings in DatabaseConnection.java
    • Set your MySQL username, password, and database URL
  4. Build and Run

    mvn clean install
    mvn javafx:run

Running & Testing

  • Run the Chat Server First:
    mvn exec:java
  • Run Main Application:
    mvn javafx:run
  • Run via IDE: Right-click OneStopUIUApplication.java and select 'Run'

Detailed Project Structure

OneStopUIU/
│
├── pom.xml
├── README.md
├── mvnw / mvnw.cmd
├── src/
│   └── main/
│       ├── java/
│       │   └── com/
│       │       └── example/
│       │           └── onestopuiu/
│       │               │
│       │               ├── controller/      # JavaFX controllers for all UI screens
│       │               │   ├── AdminBaseController.java
│       │               │   ├── AdminCanteenOrdersController.java
│       │               │   ├── AdminDashboardController.java
│       │               │   ├── AdminGroceryOrdersController.java
│       │               │   ├── AdminSellerRequestsController.java
│       │               │   ├── CanteenViewController.java
│       │               │   ├── ChatController.java
│       │               │   ├── CustomerBaseController.java
│       │               │   ├── CustomerOrdersController.java
│       │               │   ├── EShoppingOrdersController.java
│       │               │   ├── EShoppingProductDetailsController.java
│       │               │   ├── EShoppingProductsManagerController.java
│       │               │   ├── EShoppingViewController.java
│       │               │   ├── FoodItemsManagerController.java
│       │               │   ├── GroceryItemsManagerController.java
│       │               │   ├── GroceryViewController.java
│       │               │   ├── ItemDetailsController.java
│       │               │   ├── LoginController.java
│       │               │   ├── MyOrdersController.java
│       │               │   ├── SectionSelectorController.java
│       │               │   ├── SellerBaseController.java
│       │               │   ├── SellerDashboardController.java
│       │               │   ├── SignupController.java
│       │               │
│       │               ├── dao/             # Data Access Objects for DB operations
│       │               │   ├── DAO.java
│       │               │   ├── EShoppingOrderDAO.java
│       │               │   ├── EShoppingProductDAO.java
│       │               │   ├── FoodItemDAO.java
│       │               │   ├── FoodOrderDAO.java
│       │               │   ├── GroceryItemDAO.java
│       │               │   ├── GroceryOrderDAO.java
│       │               │   ├── SellerRequestDAO.java
│       │               │   ├── UserDAO.java
│       │               │
│       │               ├── model/              # Data models/entities
│       │               │   ├── EShoppingOrder.java
│       │               │   ├── EShoppingProduct.java
│       │               │   ├── FoodItem.java
│       │               │   ├── FoodOrder.java
│       │               │   ├── FoodOrderItem.java
│       │               │   ├── GroceryItem.java
│       │               │   ├── GroceryOrder.java
│       │               │   ├── GroceryOrderItem.java
│       │               │   ├── SellerRequest.java
│       │               │   ├── User.java
│       │               │
│       │               ├── server/             # Chat server
│       │               │   ├── ChatServer.java
│       │               │
│       │               ├── util/               # Utility classes
│       │               │   ├── CartManager.java
│       │               │   ├── ChatLauncher.java
│       │               │   ├── DatabaseConnection.java
│       │               │   ├── ImageCache.java
│       │               │   ├── ImageUtils.java
│       │               │   ├── ImgBBUploader.java
│       │               │   ├── OrderSchedulerService.java
│       │               │
│       │               ├── OneStopUIUApplication.java   # Main entry point
│       │
│       ├── resources/
│       │   └── com/
│       │       └── example/
│       │           └── onestopuiu/
│       │               │
│       │               ├── FXML files for all screens
│       │               ├── styles.css
│       │               ├── images/             # UI and default images
│       │               ├── uploads/            # Uploaded product images
│       │
│       ├── module-info.java
│
├── target/                                   # Build output (generated) 

Module/Class Overview

  • controller/: Handles UI logic for each screen (login, orders, admin dashboard, chat interface)
  • model/: Contains data classes representing users, items, orders
  • dao/: Data Access Objects for CRUD operations with the database
  • server/: Socket-based chat server implementation
  • util/: Utility classes for image caching, database connections, scheduling
  • resources/: FXML files for UI layouts, images, and stylesheets
  • OneStopUIUApplication.java: Main entry point for the JavaFX application

User Roles

Customer

  • Place food orders
  • Purchase grocery items
  • Place eShopping orders and chat with the seller
  • View order history
  • Track order status
  • Access chat system for support

Seller

  • Add and manage eShopping products
  • View and process eShopping orders
  • Monitor product stock and receive low stock alerts
  • View sales reports

Admin

  • Manage food menu
  • Handle grocery inventory
  • View sales reports
  • Process orders
  • Monitor stock levels
  • Manage seller requests
  • Monitor chat conversations

Troubleshooting

Q: JavaFX not found or not launching?

  • Ensure JavaFX SDK is installed and configured in your IDE
  • Check your pom.xml for JavaFX dependencies

Q: Database connection errors?

  • Verify MySQL is running and credentials in DatabaseConnection.java are correct
  • This project uses MySQL on port 4306 instead of regular 3306 port
  • Ensure the schema is imported and tables exist

Q: Chat server not connecting?

  • Make sure ChatServer is running on port 8888
  • Run mvn exec:java to start the chat server
  • Check firewall settings

Q: How to reset the database?

  • Drop and recreate the onestopuiu database, then re-import the schema

Contributing

  1. Fork the repository
  2. Create your feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a Pull Request

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages