A full-stack logistics management system built with Spring Boot and Vanilla JavaScript. Provides comprehensive order tracking, role-based authentication, and dashboard functionality for buyers, sellers, and couriers.
- JWT-based authentication with BCrypt password hashing
- Role-based access control (Buyer, Seller, Courier)
- Secure token management and session handling
- User registration
- Real-time order tracking with status timeline
- Public tracking interface (no login required)
- Interactive OpenStreetMap integration with Leaflet.js
- Route visualization between pickup and delivery locations
- Distance calculation and estimated delivery times
- Role-specific dashboards for each user type
- Order management and statistics
- Real-time data updates
- Responsive design for mobile and desktop
Backend
- Spring Boot 3.2.0 (Java 21)
- Spring Security with JWT
- MongoDB for data persistence
- Maven for dependency management
Frontend
- Vanilla JavaScript (ES6+)
- HTML5 & CSS3 with CSS Variables
- Leaflet.js for mapping
- Responsive design with Flexbox/Grid
Database
- MongoDB with collections for Users, Orders, and Roles
- Java 21 or higher
- Maven 3.6+
- MongoDB 4.4+ running on localhost:27017
- Git
- Clone the repository
git clone <your-repo-url>
cd logistics-management-system- Start MongoDB
# Windows
mongod --dbpath "C:\data\db"
# Linux/Mac
sudo systemctl start mongod- Configure application
Edit backend/src/main/resources/application.yml:
spring:
data:
mongodb:
uri: mongodb://localhost:27017/logistics_db
app:
jwtSecret: mySecretLogisticsKey2025ThisIsAVeryLongSecretKeyForJWTThatIs256BitsLongToEnsureSecurityAndCompliance
jwtExpirationMs: 86400000 # 24 hours- Build and run
cd backend
mvn clean package -DskipTests
java -jar target/logistics-management-system-1.0.0.jar- Access the application
- Homepage: http://localhost:8080
- Login: http://localhost:8080/login.html
- Demo tracking number: TRK-FTE12345
Seller Account
- Email: seller@example.com
- Password: password123
Buyer Account
- Email: buyer@example.com
- Password: password123
Courier Account
- Email: courier@example.com
- Password: password123
Authentication
curl -X POST http://localhost:8080/api/auth/signin \
-H "Content-Type: application/json" \
-d '{"email":"seller@example.com","password":"password123"}'Order Tracking
curl http://localhost:8080/api/tracking/public/TRK-FTE12345- Fork the repository
- Create feature branch:
git checkout -b feature/your-feature - Commit changes:
git commit -m "Add your feature" - Push to branch:
git push origin feature/your-feature - Create Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.