Before setting up the project, ensure you have the following installed:
To get started, clone the project repository from GitHub:
git clone <repository-url>
cd <repository-folder>Navigate to the project directory and use Maven to download the required dependencies:
mvn clean installIf using an IDE such as IntelliJ IDEA or Eclipse, ensure Maven is enabled and dependencies are loaded automatically.
For IntelliJ IDEA users:
- Open the project.
- Navigate to the
Maventool window. - Click
Load Maven Projectsto ensure all dependencies are properly downloaded.
Set up the database by following these steps:
- Open your PostgreSQL database client.
- Create a new database named
apollo:CREATE DATABASE apollo;
- Ensure that you have a user with the necessary permissions to access the database.
The application requires a .env file in the root directory to configure the database credentials. Follow these steps:
- In the root directory of the project, create a new file named
.env. - Add the following details with your database credentials:
DB_USERNAME=yourUsername DB_PASSWORD=yourPassword
Note: Ensure this file is not committed to version control by adding .env to .gitignore.
Add database URL to application.properties as "spring.datasource.url:URL"
Once the setup is complete, start the application using:
mvn spring-boot:runOr, if using an IDE, run the main method in the application’s entry point class.
To confirm everything is working correctly:
- Check logs for successful database connections.
- Open
http://localhost:8080/api/v1in your browser (or the configured port) to see the application running.
- Maven dependencies not loading? Run
mvn clean install -U. - Database connection errors? Double-check the
.envfile and ensure the database service is running. - Port conflicts? Modify
application.propertiesor.envto specify a different server port.
- For production deployments, configure security settings and environment variables properly.
- Regularly update dependencies by running
mvn versions:display-dependency-updates. - Follow best practices for storing sensitive information securely.
- The API documentation is available at
http://localhost:8080/api/v1/swagger-ui/index.htmlafter starting the application.
For further assistance, refer to the project documentation or reach out to the development team.