Prerequisites
Before you begin, ensure you have the following installed:Java Development Kit
JDK 21 is required for the Spring Boot backend
MySQL Database
MySQL 8.0.33 for data persistence
Node.js & npm
For building and running the Angular frontend
Docker
Optional but recommended for easy database setup
Maven is used for backend dependency management and will be automatically handled by the Spring Boot Maven wrapper.
Clone the Repository
Start by cloning the Trippins repository:Database Setup
You have two options for setting up the MySQL database:- Docker (Recommended)
- Local MySQL
The easiest way to set up MySQL is using Docker:This command:
- Creates a MySQL container with root password
1234 - Creates a database named
Trippins - Maps port 3307 on your host to port 3306 in the container
- Uses MySQL version 8.0.33
Backend Setup
The backend is built with Spring Boot and provides a RESTful API with JWT authentication.Install dependencies and build
Using Maven wrapper (no Maven installation required):
On Windows, use
mvnw.cmd instead of ./mvnwVerify Backend
Once running, the backend will automatically:- Create database tables based on JPA entities
- Initialize sample hotel data (15+ hotels)
- Create default tags (Beach, City, River)
- Set up JWT authentication
Frontend Setup
The frontend is an Angular 17 single-page application with Bootstrap 5 styling.Install dependencies
- Angular 17
- Bootstrap 5.3.5
- Font Awesome icons
- JWT authentication library
- SweetAlert2 for notifications
Access the Application
Frontend
Open your browser to http://localhost:4200
API Docs
View API documentation at https://localhost:8443/swagger-ui.html
Test Users
The application initializes with sample data. You can create new users or use the admin panel to manage reservations.Register a New User
- Navigate to http://localhost:4200
- Click “Register” or “Crear cuenta”
- Fill in the registration form:
- DNI (Spanish ID): 9 characters
- Name: Your username (unique)
- Phone number: 9 digits
- Email: Must be unique
- Password: Your password
Admin Access
To test admin features, you’ll need to manually set a user’sadmin field to true in the database, or register and modify via SQL:
- Approve or reject housing requests
- View and manage all reservations
- Access the admin panel at
/admin
Docker Compose (Full Stack)
For production-like deployment, use Docker Compose:Build and start all services
- MySQL database on port 3307
- Spring Boot backend with Angular frontend on HTTPS port 443
The Docker Compose setup includes both frontend and backend in a single container, exposed on port 443 for HTTPS access.
Next Steps
Architecture
Learn about the system architecture and how components interact
API Reference
Explore the complete REST API documentation
Authentication
Understand JWT authentication and authorization
Deployment
Deploy Trippins to production
Troubleshooting
Port Already in Use
If port 8443 or 4200 is already in use:Database Connection Failed
Ensure MySQL is running and accessible:Angular Build Errors
Clear npm cache and reinstall:SSL Certificate Warnings
The application uses a self-signed certificate (keystore.jks). For local development, you can safely ignore browser warnings. For production, replace with a valid SSL certificate.