This is the Spring Boot backend of the Group Finder System — a RESTful API that helps university students create, join, and manage project groups with secure JWT authentication and role-based access (Member, Leader, Admin).
- Backend: Java Spring Boot
- Security: Spring Security, JWT
- Database: MySQL
- ORM: Hibernate (JPA)
- Build Tool: Maven
Group Finder API is designed to facilitate group formation and management for university students. The system implements:
- Secure user authentication using JWT
- Role-based authorization (Member, Leader, Admin)
- Project creation, joining and management functionalities
- RESTful API architecture
- Java JDK 11 or higher
- Maven
- MySQL
- Docker (optional, for containerized deployment)
- IDE (IntelliJ IDEA, Eclipse, or VS Code recommended)
-
Clone the repository:
git clone https://github.com/ModithaM/Group_Finder_API.git cd Group_Finder_API
-
Create your environment configuration:
cp sample.env .env
-
Open the
.env
file and configure the following:# DB Configuration DB_URL=jdbc:mysql://localhost:3306/your_database_name DB_USER=your_database_username DB_PASSWORD=your_database_password DB_DRIVER=com.mysql.cj.jdbc.Driver # JWT Configuration JWT_SECRET=your_secret_key_here JWT_EXPIRATION=86400000
Make sure to replace the placeholder values with your actual configuration.
- Import the project into your IDE as a Maven project
- Run
mvn clean install
to install dependencies - Run the application from your IDE (locate the main class and run it)
-
Build the project:
mvn clean package
-
Run the application:
java -jar target/group-finder-api.jar
-
Start the application with MySQL:
docker-compose up -d
-
To stop the application:
docker-compose down
The API uses JWT (JSON Web Tokens) for authentication. Include the JWT token in the Authorization header for protected endpoints:
Authorization: Bearer your_jwt_token
group-finder-api/
├── src/
│ ├── main/
│ │ ├── java/
│ │ │ └── com/groupfinder/
│ │ │ ├── config/ # Configuration classes
│ │ │ ├── controller/ # REST controllers
│ │ │ ├── dto/ # Data Transfer Objects
│ │ │ ├── exception/ # Custom exceptions
│ │ │ ├── model/ # Entity classes
│ │ │ ├── repository/ # JPA repositories
│ │ │ ├── security/ # Security configuration
│ │ │ ├── service/ # Business logic
│ │ │ └── util/ # Utility classes
│ │ └── resources/
│ │ └── application.properties
│ └── test/ # Unit and integration tests
├── .env # Environment variables
├── docker-compose.yml # Docker Compose configuration
├── Dockerfile # Docker configuration
└── pom.xml # Maven dependencies