Local Development Setup
This guide will walk you through setting up Kin Conecta on your local machine for development purposes.Prerequisites
Before you begin, ensure you have the following installed:Required Software
Java Development Kit
Java JDK 21+The backend requires Java 21 or higher.Verify installation:
MySQL Server
MySQL 8.0+Required for the database layer.Verify installation:
Build Tool
Gradle (included via wrapper)The project uses Gradle for builds. The wrapper scripts are included.
Version Control
GitRequired to clone the repository.Verify installation:
Recommended Tools
- MySQL Workbench - GUI tool for database management
- Postman or Insomnia - For testing API endpoints
- Modern web browser - Chrome, Firefox, or Edge
- Code editor - VS Code, IntelliJ IDEA, or Eclipse
Database Setup
Set up the MySQL database before running the application.Create Database Schema
Run the database creation script located at This creates the
KinConecta/kinConnect.sql:kin_conecta schema with all required tables:users- User accounts (tourists and guides)tours- Tour offeringstour_categories- Tour category definitionsdestinations- Destination locationsreviews- User reviews and ratingstrip_bookings- Booking recordsguide_profiles- Extended guide informationtourist_profiles- Extended tourist information- And 30+ additional tables for complete functionality
Load Sample Data (Optional)
To populate the database with sample data for testing:Or for more comprehensive seed data:
Sample data includes example users, tours, destinations, and reviews for testing purposes.
Backend Setup
Configure and run the Spring Boot backend API.Build the Project
Build the backend using the Gradle wrapper:The build process will:
- Download dependencies
- Compile Java source code
- Run unit tests
- Create executable JAR file
Run the Backend Server
Start the Spring Boot application:You should see output indicating the server has started:
The API will be available at:
http://localhost:8080Running Tests
To run the backend test suite:Frontend Setup
Set up the frontend application to connect with the backend.Configure API Endpoint
Update the API base URL in the frontend configuration if needed.Edit
frontend/src/scripts/api/http-client.js to ensure it points to your backend:Access the Application
Open your web browser and navigate to:You should see the Kin Conecta homepage with:
- Navigation header
- Hero section
- Login and registration options
- Explore destinations section
Test User Flows
Test the complete user flows:Tourist Flow:
- Click “Registrarse” (Register)
- Select “Turista” role
- Complete registration form
- Login with credentials
- Explore tours and guides
- Register as “Guía”
- Complete guide profile
- Create a tour plan
- Set availability
- View dashboard statistics
API Endpoints Reference
The backend exposes 195 REST endpoints across 39 controllers. Here are some key endpoints:User Management
Tours & Destinations
Guide Profiles
For a complete list of all 195 endpoints, refer to the
ENDPOINTS.md file in the backendKC directory.Troubleshooting
Common Issues
Error: Unknown database 'kin_conecta'
Error: Unknown database 'kin_conecta'
Solution:
- Verify the database schema was created:
- Ensure the name matches in
application.properties:
- Re-run the database creation script if needed
Error: Access denied for user 'root'
Error: Access denied for user 'root'
Solution:
- Verify MySQL credentials are correct
- Update
application.propertieswith correct username/password:
- Test connection in MySQL Workbench first
Error: Port 8080 already in use
Error: Port 8080 already in use
Solution:Option 1: Stop the process using port 8080Option 2: Change the server port in
application.properties:Frontend can't connect to API
Frontend can't connect to API
Solution:
- Verify backend is running on port 8080
- Check for CORS issues in browser console
- Ensure API_BASE_URL in frontend points to correct backend
- Verify CORS configuration in
CorsConfiguration.java
Build fails with Java version error
Build fails with Java version error
Solution:
- Verify Java version is 21 or higher:
- Update JAVA_HOME environment variable if needed
- Check
build.gradletoolchain configuration:
Next Steps
Now that you have Kin Conecta running locally:Explore the API
Browse the complete API documentation
Database Setup
Learn about the database schema and setup
User Guides
Understand how to use the platform
Core Concepts
Learn how to contribute to the project
Development Tools
Useful Commands
API Testing
Use Postman or cURL to test endpoints. Example requests are provided in theINSTRUCTIONS.md file.
The backend includes Spring Security configuration. Some endpoints may require authentication tokens in production.