diff --git a/src/main/java/ntnu/idatt2016/v233/SmartMat/repository/GroupRepository.java b/src/main/java/ntnu/idatt2016/v233/SmartMat/repository/GroupRepository.java
new file mode 100644
index 0000000000000000000000000000000000000000..a2ddf2f913796b8e478890f6cfdee05a813ad85f
--- /dev/null
+++ b/src/main/java/ntnu/idatt2016/v233/SmartMat/repository/GroupRepository.java
@@ -0,0 +1,26 @@
+package ntnu.idatt2016.v233.SmartMat.repository;
+
+import java.util.Optional;
+
+import org.springframework.data.jpa.repository.JpaRepository;
+
+import ntnu.idatt2016.v233.SmartMat.entity.Group;
+
+/**
+ * Repository for groups
+ * 
+ * @author Stian Lyng
+ * @version 1.0
+ * @since 04.04.2023
+ */
+public interface GroupRepository extends JpaRepository<Group, Long> {
+
+    /**
+     * Gets a group by name
+     *
+     * @param name the name of the group
+     * @return an optional containing the group if it exists
+     */
+    Optional<Group> findByName(String name);
+
+    }