The Java Parcel Transportation System (JavaPTS) is a Java-based application designed to simplify and streamline parcel transportation management. It uses MySQL as the database backend for storing and managing data and integrates Java Mailer for sending email notifications. The system is robust, scalable, and user-friendly, providing a complete solution for handling parcel transportation workflows, tracking, and notifications.
- Parcel Management: Add, update, and delete parcel details.
- User Management: Manage users, including customers and admins.
- Real-Time Tracking: Track parcels in real-time.
- Email Notifications: Notify customers and admins via email for parcel updates using Java Mailer.
- Database Integration: Stores all data securely in a MySQL database.
- Reporting: Generate reports for parcel status, delivery, and user activity.
- Language: Java (100%)
- Database: MySQL
- Email API: Java Mailer
To run this system, ensure the following software is installed on your machine:
- Java (JDK 8 or later): To compile and run the application.
- MySQL: For database management.
- Java Mail Library: For handling email notifications.
- IDE: Any Java IDE (e.g., IntelliJ IDEA, Eclipse, NetBeans).
- Maven: For dependency management (optional but recommended).
Follow these steps to install and set up the JavaPTS application:
git clone https://github.com/karimshaban01/javapts.git
cd javapts-
Create a new database in MySQL:
CREATE DATABASE javapts_db;
-
Update the database credentials in the application's configuration file:
// Example: config/DatabaseConfig.java public static final String DB_URL = "jdbc:mysql://localhost:3306/javapts_db"; public static final String DB_USER = "your_username"; public static final String DB_PASSWORD = "your_password";
-
Import the database schema:
- Locate the
javapts_schema.sqlfile in the repository. - Execute the SQL script to set up the required tables:
mysql -u your_username -p javapts_db < javapts_schema.sql
- Locate the
-
Update email server settings in the configuration file:
// Example: config/EmailConfig.java public static final String SMTP_HOST = "smtp.example.com"; public static final String SMTP_PORT = "587"; public static final String EMAIL_USERNAME = "your_email@example.com"; public static final String EMAIL_PASSWORD = "your_password";
-
Ensure that the email account has SMTP access enabled (check your email provider's documentation for configuration).
- Compile the Java code:
javac -d bin src/*.java - Run the application:
java -cp bin Main
- Once the application is running, follow the on-screen instructions to interact with the system.
The repository is organized as follows:
javapts/
├── src/ # Source code
│ ├── Main.java # Entry point for the application
│ ├── config/ # Configuration files (database, email settings)
│ ├── models/ # Data models for parcels, users, etc.
│ ├── services/ # Business logic and application services
│ ├── utils/ # Utility classes (e.g., email sending, logging)
├── javapts_schema.sql # Database schema for MySQL
├── README.md # Documentation
└── LICENSE # License information
- Add new parcels with sender and receiver details.
- Update parcel status (e.g., in transit, delivered).
- Delete parcels from the system.
- Admins can add, update, or delete users.
- Customers can view their parcel tracking information.
- The system automatically sends email notifications for:
- Parcel shipment.
- Parcel delivery.
- Any status updates.
- Generate detailed reports for:
- Daily parcel movements.
- Delivery success rates.
- User activity logs.
We welcome contributions to improve this project. Please follow these steps to contribute:
- Fork the repository.
- Create a new branch for your feature or bug fix:
git checkout -b feature-name
- Commit your changes:
git commit -m "Add feature description" - Push your branch to your fork:
git push origin feature-name
- Open a pull request to the main repository.
This project is licensed under the MIT License.
If you encounter any issues or have suggestions for improvement, feel free to open an issue in the GitHub Issues section of the repository.