GoUni is a Spring Boot application designed for StudentConnect, a startup that helps students find university opportunities. This project provides a management system for users, profiles, and roles, with role-based access control and MySQL database integration.
The goal of GoUni is to create an application that connects students with university opportunities by providing a management system for users, profiles, and roles.
- Profiles Management: Manage user profiles registered within the system.
- Roles and Security: Implement role-based access control, such as
ROLE_USERandROLE_DRIVER, and authentication using JWT. - MySQL Connection: Data persistence using MySQL as the relational database.
Follow these steps to set up the project locally:
git clone https://github.com/StudentConnect/GoUni.git
cd GoUni- Create a database named
gouni_db. - Ensure the credentials in
application.propertiesorapplication.ymlmatch your MySQL setup.
mvn clean installmvn spring-boot:runAccess the API documentation at http://localhost:8080/swagger-ui.html.
For security and flexibility, certain configurations should be set via environment variables:
- DB_USERNAME: The MySQL database username.
- DB_PASSWORD: The MySQL database password.
- JWT_SECRET: The secret key for JWT token generation.
- SPRING_PROFILES_ACTIVE: Set the active profile (e.g.,
dev,prod).
Ensure these are configured before running the application.
To avoid unnecessary inheritance in the project’s pom.xml, you can disable certain inherited configurations if necessary.
For example, if you wish to override certain elements like <license> and <developers>, you can add empty override blocks in your pom.xml as shown below:
<project>
<licenses></licenses>
<developers></developers>
</project>If you encounter any issues during setup or runtime, consider the following steps:
- Verify that your MySQL database is running and that the credentials in
application.propertiesorapplication.ymlare correct. - Ensure that the MySQL service is properly configured and accessible from your application.
- Check for the correct database URL format in your configuration file.
- Make sure all dependencies are correctly installed by running:
mvn clean install- Check the
pom.xmlfor any missing or conflicting dependencies.
- Review the Spring Boot logs for error messages to diagnose startup issues.
- Check if the active profile (
dev,prod, etc.) is properly set in your environment variables. - Confirm that your port (default: 8080) is not already in use by another service.
- Ensure that the JWT_SECRET environment variable is set and matches the key used during token generation.
- Verify that JWT tokens are correctly formatted and not expired.
- Ensure that the application is running on the correct port.
- Access Swagger UI at http://localhost:8080/swagger-ui.html.
- Verify the
springdoc-openapidependency is included in the project.
This project is licensed under the MIT License.