A comprehensive, enterprise-grade cruise booking and management platform built with modern Java EE architecture, featuring advanced authentication, role-based access control, and a responsive React frontend.
Cruisely is a full-stack enterprise application designed for cruise line companies to manage their operations efficiently. The platform provides comprehensive booking management, customer relationship tools, and administrative dashboards with multi-language support and robust security features.
- Advanced Authentication: JWT-based security with role-based access control (RBAC)
- Multi-Role Architecture: Admin, Client, Business Worker, and Moderator interfaces
- Cruise Management: Complete CRUD operations for cruises, companies, and reservations
- Responsive Design: Modern React frontend with TypeScript support
- Internationalization: Multi-language support (English/Polish)
- Analytics Dashboard: Real-time business intelligence and reporting
- Email Integration: Automated notifications and verification system
- CI/CD Ready: Automated testing and deployment pipelines
com.cruisely/
├── 🏢 entities/
│ ├── common/ # Shared domain entities & wrappers
│ ├── auth/ # Authentication entities (Account, AccessLevel)
│ └── cruise/ # Business entities (Cruise, Company, Reservation)
├── common/ # Application-wide utilities & DTOs
├── auth/ # Authentication module (business logic)
├── cruise/ # Cruise management module (business logic)
├── controllers/ # REST API controllers
├── services/ # Application services layer
├── security/ # Security configuration & filters
├── config/ # Application configuration
├── exceptions/ # Custom exception handling
├── validators/ # Input validation logic
└── utils/ # Utility classes
src/main/ui/src/
├── components/ # Reusable UI components
├── pages/ # Route-based page components
├── layouts/ # Layout wrappers
├── Services/ # API service layer
├── redux/ # State management
├── interfaces/ # TypeScript interfaces
├── styles/ # CSS modules & styling
└── images/ # Static assets
| Layer | Technology | Version | Purpose |
|---|---|---|---|
| Backend | Java EE | 8+ | Enterprise application framework |
| Security | JWT + Custom Auth | - | Authentication & authorization |
| Database | JPA/Hibernate | 5.4+ | Object-relational mapping |
| Build Tool | Maven | 3.6+ | Dependency management & builds |
| Frontend | React + TypeScript | 18+ | Modern user interface |
| Styling | CSS Modules + MUI | - | Component styling |
| State | Redux Toolkit | - | Application state management |
| Server | Payara/GlassFish | 5+ | Java EE application server |
- Java 11+ (Oracle JDK or OpenJDK)
- Maven 3.6+
- Node.js 16+ & npm 8+
- Payara Server 5+ or GlassFish 5+
- PostgreSQL 12+ (or compatible database)
-
Clone the repository
git clone https://github.com/your-org/cruisely.git cd cruisely -
Backend Setup
# Install dependencies and compile mvn clean compile # Run tests mvn test # Package for deployment mvn clean package -Pprod
-
Frontend Setup
cd src/main/ui npm install npm run build -
Database Setup
# Execute database initialization scripts psql -h localhost -U username -d cruisely_db -f database/db_init.sql psql -h localhost -U username -d cruisely_db -f database/db_structure.sql
# Start development with live reload
mvn clean package -Pdev
# Frontend development server
cd src/main/ui && npm start
# Backend development server
# Deploy the generated WAR to your application server# Build production package
mvn clean package -Pprod
# Deploy to Payara/GlassFish
asadmin deploy target/cruisely.war| Method | Endpoint | Description | Role Required |
|---|---|---|---|
POST |
/api/auth/login |
User authentication | - |
POST |
/api/auth/register |
User registration | - |
POST |
/api/auth/refresh |
Token refresh | Authenticated |
POST |
/api/auth/logout |
User logout | Authenticated |
| Method | Endpoint | Description | Role Required |
|---|---|---|---|
GET |
/api/cruises |
List all cruises | Client+ |
POST |
/api/cruises |
Create new cruise | Business Worker+ |
PUT |
/api/cruises/{id} |
Update cruise | Business Worker+ |
DELETE |
/api/cruises/{id} |
Delete cruise | Admin |
GET |
/api/cruises/{id}/reservations |
Get cruise reservations | Business Worker+ |
| Method | Endpoint | Description | Role Required |
|---|---|---|---|
GET |
/api/accounts |
List user accounts | Moderator+ |
PUT |
/api/accounts/{id}/block |
Block user account | Moderator+ |
PUT |
/api/accounts/{id}/access-level |
Grant access level | Admin |
GET |
/api/accounts/profile |
Get user profile | Authenticated |
- JWT Token-based Authentication: Secure stateless authentication
- Role-based Access Control (RBAC): Fine-grained permissions system
- Account Verification: Email-based account activation
- Password Security: Bcrypt hashing with salt
- Session Management: Configurable token expiration
| Role | Permissions | Description |
|---|---|---|
| Admin | Full system access | System administration and user management |
| Moderator | User moderation | Account management and content moderation |
| Business Worker | Business operations | Cruise and reservation management |
| Client | Customer features | Booking and profile management |
- CORS Configuration: Cross-origin resource sharing
- Input Validation: Comprehensive data validation
- XSS Protection: Cross-site scripting prevention
- Rate Limiting: API request throttling
- Audit Logging: Security event tracking
# Run unit tests
mvn test
# Run integration tests
mvn verify
# Generate test coverage report
mvn jacoco:reportcd src/main/ui
# Run unit tests
npm test
# Run e2e tests
npm run test:e2e
# Generate coverage report
npm run test:coveragesrc/test/java/
├── unit/ # Unit tests
├── integration/ # Integration tests
├── fixtures/ # Test data fixtures
└── utils/ # Testing utilities
-- User Management
Account (id, login, email, password_hash, language_type, dark_mode, ...)
AccessLevel (id, account_id, level_type, enabled, ...)
Address (id, country, city, street, house_number, apartment_number, postal_code)
-- Cruise Management
Company (id, name, nip, phone_number, address_id, ...)
CruiseGroup (id, name, company_id, number_of_cruises, ...)
Cruise (id, cruise_group_id, name, start_date, end_date, price, ...)
Reservation (id, cruise_id, client_id, number_of_people, price, ...)
-- System
AlterType (id, type) -- Audit trail
TokenWrapper (id, token, used, account_id, ...)
Rating (id, cruise_id, client_id, rating, comment, ...)- Account → AccessLevel (One-to-Many)
- Company → CruiseGroup (One-to-Many)
- CruiseGroup → Cruise (One-to-Many)
- Cruise → Reservation (One-to-Many)
- Client → Rating (One-to-Many)
# Database Configuration
DB_URL=jdbc:postgresql://localhost:5432/cruisely_db
DB_USERNAME=cruisely_user
DB_PASSWORD=secure_password
# JWT Configuration
JWT_SECRET=your_jwt_secret_key
JWT_EXPIRATION=86400000
# Email Configuration
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
EMAIL_USERNAME=noreply@cruisely.com
EMAIL_PASSWORD=app_password
# Application Configuration
APP_BASE_URL=https://localhost:8181
FRONTEND_URL=http://localhost:3000dev: Development with UI builddev-without-ui: Development backend onlyprod: Production build with optimizations
- Application Health:
/health - Database Connection:
/health/db - External Services:
/health/external
- Application Metrics: Custom business metrics
- Performance Monitoring: Response time tracking
- Error Logging: Structured logging with levels
- Audit Trail: User action tracking
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Java: Google Java Style Guide
- TypeScript/React: ESLint + Prettier configuration
- Git: Conventional Commits specification
- Testing: Minimum 80% code coverage
- ✅ Complete package refactoring from academic to enterprise structure
- ✅ English documentation and internationalization
- ✅ Modern authentication with JWT
- ✅ Role-based access control system
- ✅ Responsive React frontend with TypeScript
- ✅ Comprehensive test coverage
- ✅ Production-ready deployment configuration
This project is licensed under the MIT License - see the LICENSE file for details.
Built with love for the cruise industry