-
Notifications
You must be signed in to change notification settings - Fork 0
jAmikA78/Mail-Order
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Β | Β | |||
Β | Β | |||
Β | Β | |||
Β | Β | |||
Β | Β | |||
Β | Β | |||
Β | Β | |||
Repository files navigation
# π¦ Mail Order Management System ## Overview A comprehensive **Java-based Mail Order Management System** with a professional GUI built using Swing. The system manages customers, employees, orders, and parts inventory with a SQL Server database backend. This is a complete CRUD application with role-based access control for customers, employees, and administrators. --- ## π― Key Objectives β **Customer Management** - Registration, authentication, and order tracking β **Employee Management** - Order processing and shipment management β **Admin Functions** - Complete system administration and inventory management β **Order Processing** - Full order lifecycle management with parts tracking β **Real-time Updates** - Instant data synchronization across the system --- ## π System Architecture & Diagrams ### Entity-Relationship Diagram (ERD) See `Diagrames/ERD.pdf` for the complete database schema and relationships between entities: - **Customer** β **Order** (One-to-Many) - **Employee** β **Order** (One-to-Many) - **Part** β **Part_of_order** (One-to-Many) - **Order** β **Part_of_order** (One-to-Many) ### Database Schema Diagram Refer to `Diagrames/SCHEMA.pdf` for visual representation of: - Table structures and relationships - Primary and foreign keys - Data types and constraints ### UML Class Diagram Check `Diagrames/uml.pdf` for the complete object-oriented design: - Class hierarchies and relationships - Method definitions and attributes - System components and interactions --- ## π₯ Development Team | Name | ID | Role | |------|-----|------| | Ahmed Ibrahim Abd ElGhany | C10 12300050 | Lead Developer | | Kerolos Fatouh Ibrahim | C10 12300055 | QA/Testing | | Ahmed Wael Farag | C10 12300100 | Backend Developer | | Remon Naser Mahrous | C10 12300148 | Database Developer | | Mohamed Tamer Mohamed | C10 12300026 | Frontend Developer | --- ## π Project Structure ``` MAil_order/ βββ MailOrderSystem/ # Main Java Application β βββ src/MailOrderSystem/ β β βββ project.java # Main application entry point β βββ build/ # Compiled classes β βββ dist/ # Deployable JAR β βββ nbproject/ # NetBeans configuration β βββ build.xml # Ant build file β βββ manifest.mf # JAR manifest βββ data_base/ # Database Scripts β βββ mail_order.sql # Production schema β βββ project.sql.txt # Documentation βββ Diagrames/ # System Architecture β βββ ERD.pdf # Entity-Relationship Diagram β βββ SCHEMA.pdf # Database Schema β βββ uml.pdf # UML Class Diagram βββ backgrounds/ # GUI Background Images βββ sqljdbc_4.2/ # SQL Server JDBC Driver βββ README.txt # This file ``` --- ## π οΈ System Requirements | Requirement | Version | |-------------|---------| | **Java** | 1.8 or higher | | **SQL Server** | 2012 or higher | | **IDE** | NetBeans (recommended) | | **JDBC Driver** | SQL Server JDBC 4.2 | | **OS** | Windows 10/11 | | **Drive** | D: partition (recommended) | --- ## π Installation & Setup ### Step 1: Database Configuration ```sql -- Execute the scripts from data_base/mail_order.sql -- Run on your SQL Server instance: -- 1. Create database: mail_order -- 2. Create all tables with provided schema -- 3. Insert initial admin credentials ``` ### Step 2: Project Setup 1. Clone or extract the project to `D:\projects\java\MAil_order` 2. Open NetBeans and load the `MailOrderSystem` project 3. Verify the JDBC driver path: `sqljdbc_4.2/sqljdbc_4.2.jar` ### Step 3: Database Connection Configuration **File**: `MailOrderSystem/src/MailOrderSystem/project.java` Update connection parameters: ```java String path = "jdbc:sqlserver://localhost;databaseName=mail_order"; String username = "123"; String password = "123"; ``` ### Step 4: Build & Deploy ```bash # Using NetBeans: 1. Right-click project β Clean and Build 2. Run β Run Project (F6) # Or execute JAR directly: java -jar dist/MailOrderSystem.jar ``` --- ## π€ User Roles & Permissions ### 1οΈβ£ Customer Role - Register new account with email validation - Login and manage profile - Browse available parts/products - Create and place new orders - View order status in real-time - Track shipment dates - View complete order history - Search past orders ### 2οΈβ£ Employee Role - Login with secure authentication - View assigned orders queue - Update order processing status - Record shipment dates - Manage order fulfillment - Access customer information - Generate order reports ### 3οΈβ£ Administrator Role - **User Management**: Add/remove employees and customers - **Order Monitoring**: View and manage all system orders - **Inventory Control**: Add, update, delete parts and prices - **System Analytics**: Generate reports and statistics - **Account Management**: Reset passwords, manage credentials - **Search & Filter**: Advanced queries across all data --- ## πΎ Database Schema ### Core Tables #### `Customer` | Column | Type | Description | |--------|------|-------------| | ID | INT (PK) | Customer identifier | | F_name | VARCHAR | First name | | L_name | VARCHAR | Last name | | E_ZIP | VARCHAR | Email/ZIP code | | pass_world | VARCHAR | Password hash | #### `Employee` | Column | Type | Description | |--------|------|-------------| | ID | INT (PK) | Employee identifier | | F_name | VARCHAR | First name | | L_name | VARCHAR | Last name | | E_ZIP | VARCHAR | Email/ZIP code | | pass_world | VARCHAR | Password hash | #### `Part` | Column | Type | Description | |--------|------|-------------| | Num | INT (PK) | Part number | | Name | VARCHAR | Part description | | Price | DECIMAL | Unit price | | Quantity_in_stock | INT | Current stock | #### `or_der` | Column | Type | Description | |--------|------|-------------| | Order_num | INT (PK) | Order identifier | | Date_of_receipt | DATE | Order received date | | Ship_date | DATE | Planned ship date | | Actual_ship_date | DATE | Actual ship date | | time_order | TIME | Order time | | customer_id | INT (FK) | Customer reference | | employee_id | INT (FK) | Employee reference | #### `Part_of_order` | Column | Type | Description | |--------|------|-------------| | Ord_ID | INT (FK) | Order reference | | Part_ID | INT (FK) | Part reference | | Quantity | INT | Items ordered | #### `Adminn` | Column | Type | Description | |--------|------|-------------| | username | VARCHAR (PK) | Admin login | | pass_world | VARCHAR | Password hash | --- ## π Authentication & Security ### Default Credentials (Development) ``` Database Server: localhost Database Name: mail_order Username: 123 Password: 123 ``` ### Security Features - User-level authentication and authorization - Role-based access control (RBAC) - Password storage (currently plaintext - upgrade recommended) - Session management - Input validation and SQL injection preventionβ οΈ **IMPORTANT**: For production deployment: - Use encrypted password storage - Implement environment variables for credentials - Enable SQL Server authentication - Use SSL/TLS for database connections - Implement audit logging --- ## π¨ GUI Features - **Professional Appearance**: Custom background images and themes - **Responsive Interface**: Dialog boxes and real-time notifications - **Data Tables**: JTable components for data display and editing - **Selection Controls**: ComboBox for parts and options - **Validation**: Real-time input validation with error messages - **Calculations**: Automatic price and total calculations - **Date/Time**: Integrated date and time picker components - **Search**: Advanced search functionality across all modules --- ## π§ Key Features Implemented β Multi-user authentication system with role separation β Complete CRUD operations (Create, Read, Update, Delete) β Order management with full lifecycle tracking β Inventory management and stock tracking β Real-time data updates and synchronization β Advanced search and filter functionality β Input validation and error handling β Professional GUI with user-friendly design β Comprehensive reporting capabilities β Database transaction management --- ## π¦ Dependencies & Libraries | Library | Version | Purpose | |---------|---------|---------| | sqljdbc | 4.2 | SQL Server database connectivity | | Java Swing | Built-in | GUI framework | | Java AWT | Built-in | Graphics and window toolkit | | JDBC | Built-in | Database abstraction layer | --- ##β οΈ Important Configuration Notes ### Path Requirements - Project must be stored on **D: partition** (as configured in code) - Database scripts should be executed on **SQL Server instance** - Background images are loaded from `D:\backgrounds\` ### Configuration Changes If relocating the project: 1. Update database path in `project.java` 2. Update background image paths 3. Update database connection string if using different server 4. Verify SQL Server JDBC driver is in classpath ### Development vs Production ``` DEVELOPMENT: - Hardcoded credentials - Local SQL Server - Debug mode enabled PRODUCTION: - Environment variables for credentials - Secured SQL Server with firewall - Encrypted connections - Audit logging enabled - Backup strategy implemented ``` --- ## π Documentation Files - **`Diagrames/ERD.pdf`** - Entity Relationship Diagram showing data model - **`Diagrames/SCHEMA.pdf`** - Database schema with visual table layouts - **`Diagrames/uml.pdf`** - UML class diagram for system architecture - **`data_base/mail_order.sql`** - SQL scripts for database creation - **`data_base/project.sql.txt`** - Additional SQL documentation --- ## π€ Support & Maintenance For issues or contributions: 1. Review the architecture diagrams in `Diagrames/` 2. Check database schema in `data_base/mail_order.sql` 3. Consult UML diagram for class relationships 4. Review source code in `MailOrderSystem/src/` --- ## π License & Attribution This is an academic project developed by the team listed above. For educational purposes. **Last Updated**: November 2025 **Project Status**: Complete
About
A simple mail_order application with java and microsoft sql
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published