Skip to content
/ carhov Public

Carhov is a modern carpooling application designed to bridge the gap between drivers and passengers, making commuting more efficient, cost-effective, and environmentally friendly. The platform allows users to create and join rides effortlessly by leveraging real-time geolocation, secure payment integration, and smart matching algorithms.

Notifications You must be signed in to change notification settings

bjfikky/carhov

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CarHov

CarHov is a modern carpooling application designed to bridge the gap between drivers and passengers, making commuting more efficient, cost-effective, and environmentally friendly. The platform allows users to create and join rides effortlessly by leveraging real-time geolocation, secure payment integration, and smart matching algorithms.

Whether you're a driver with empty seats or a passenger looking for a convenient ride, CarHov streamlines the process with an intuitive interface and powerful backend services built on Spring Boot. Users can easily search for rides based on their origin, destination, and timing preferences, making daily commuting or intercity travel a seamless experience.

This repository is strictly for CarHov backend api and services. The front-end can be found here... [link to be updated]

Steps to Run CarHov Locally

Step 1: Prerequisites

  1. Install Java Development Kit (JDK):

    • Ensure Java 21 is installed.
    • Verify by running:
      java -version
  2. Install a Build Tool:

    • Use either Maven or Gradle, depending on your project setup.
    • Verify installation with:
      mvn -v   # For Maven
      gradle -v  # For Gradle
  3. Set Up Your IDE:

    • Use IntelliJ IDEA or another Java IDE.
    • Install necessary plugins for Spring Boot (e.g., Spring Assistant).
  4. Database Setup (if required):

    • Ensure your database (e.g., MySQL, PostgreSQL) is installed and running.
    • Create a database for the application and note its connection details.

Step 2: Import the Project

  1. Download or Clone the Project:

    • If it's hosted on GitHub or another repository, clone it:
      git clone <repository-url>
      cd <project-folder>
  2. Open the Project in IntelliJ:

    • Select "Open or Import" and choose the project folder.
    • Wait for IntelliJ to index files and download dependencies (if using Maven/Gradle).

Step 3: Configure

application.properties

  1. Navigate to src/main/resources/application.properties or application.yml.
  2. Add or verify the following configurations:
    # Server settings
    server.port=8080
    
    # Database settings
    spring.datasource.url=jdbc:mysql://localhost:3306/<your-database>
    spring.datasource.username=<your-username>
    spring.datasource.password=<your-password>
    
    # Hibernate settings
    spring.jpa.hibernate.ddl-auto=update
    spring.jpa.show-sql=true
    

Step 4: Build the Application

Using Maven: Open a terminal in the project folder and run: mvn clean install

Fix any build errors before proceeding.


Step 5: Run the Application

Using IntelliJ: Locate the main class CarhovApplication.java. Right-click and select Run.

Using Command Line: Navigate to the project folder and run: Maven: mvn spring-boot:run


Step 6: Verify the Application

Open a browser or API testing tool (e.g., Postman). Access the version URL: http://localhost:8080/api/version

Response should look like:

{
    "application": "carhov",
    "version": "0.0.1-SNAPSHOT"
}

Reference Documentation

For further reference, please consider the following sections:

Guides

The following guides illustrate how to use some features concretely:

JTE

This project has been configured to use JTE precompiled templates.

However, to ease development, those are not enabled out of the box. For production deployments, you should remove

gg.jte.development-mode=true

from the application.properties file and set

gg.jte.use-precompiled-templates=true

instead. For more details, please take a look at the official documentation.

Testcontainers support

This project uses Testcontainers at development time.

Testcontainers has been configured to use the following Docker images:

Please review the tags of the used images and set them to the same as you're running in production.

Maven Parent overrides

Due to Maven's design, elements are inherited from the parent POM to the project POM. While most of the inheritance is fine, it also inherits unwanted elements like <license> and <developers> from the parent. To prevent this, the project POM contains empty overrides for these elements. If you manually switch to a different parent and actually want the inheritance, you need to remove those overrides.

About

Carhov is a modern carpooling application designed to bridge the gap between drivers and passengers, making commuting more efficient, cost-effective, and environmentally friendly. The platform allows users to create and join rides effortlessly by leveraging real-time geolocation, secure payment integration, and smart matching algorithms.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages