Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ server/.idea/
server/target/
.idea/
target/
start_vpn.sh
54 changes: 54 additions & 0 deletions api_spec.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Meeting endpoint /meeting
## User Management is not supported yet

DB Migration -> Konsti

#Req-Body POST /meeting json

{
title: "string",
description: "string", # optional
links: "string", # optional
date_from: "string (dd-mm-yyyy:hh:mm)",
date_until: "string (dd-mm-yyyy:hh:mm)",
repeat: "enum (daily, weekly, monthly, never)", # std: never
place: "string" # optional
}

Return: CREATED, BAD_REQUEST

#Req-Body PUT /meeting URI Params : Optional
title: "string",
description: "string", # optional
links: "string", # optional
date_from: "string (dd-mm-yyyy:hh:mm)",
date_until: "string (dd-mm-yyyy:hh:mm)",
repeat: "enum (daily, weekly, monthly, never)", # std: never
place: "string"

Return: OK, BAD_REQUEST, NOT_FOUND

#GET /meeting URI Param: Optional
meeting-id
return: NOT_FOUND, JSON
JSON:
{
title: "string",
description: "string", # optional
links: "string", # optional
date_from: "string (dd-mm-yyyy:hh:mm)",
date_until: "string (dd-mm-yyyy:hh:mm)",
repeat: "enum (daily, weekly, monthly, never)", # std: never
place: "string" # optional
}

Meeting-Entity:
Long id,
String title,
String description,
String links,
LocalDate date_from,
LocalDate date_until,
Repeatable(enum) repeat,
String place,
Optionial<List<UserEntity>> users
8 changes: 6 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '3.8'

services:
postgres-db:
image: postgres:latest
Expand All @@ -10,3 +8,9 @@ services:
POSTGRES_DB: studbud
ports:
- "5432:5432"

backend:
image: panderu/study-buddies-backend:latest
container_name: backend
ports:
- "8080:8080"
8 changes: 8 additions & 0 deletions server/application.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
spring.jpa.show-sql=true

spring.datasource.url=jdbc:h2:mem:testdb;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
spring.datasource.driver-class-name=org.h2.Driver
spring.datasource.username=sa
spring.datasource.password=password
spring.h2.console.enabled=true
spring.jpa.hibernate.ddl-auto=create-drop
21 changes: 15 additions & 6 deletions server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,6 @@
<artifactId>spring-boot-starter-web</artifactId>
</dependency>

<!-- PostgreSQL driver for database interaction -->
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<scope>runtime</scope> <!-- Loaded only during runtime, not compile time -->
</dependency>

<!-- Lombok for reducing boilerplate code (e.g., getters, setters) -->
<dependency>
Expand All @@ -77,6 +71,14 @@
<scope>test</scope> <!-- Only used in testing phase -->
</dependency>


<!-- H2 (in memory) DB -->
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>runtime</scope>
</dependency>

<!-- MapStruct for mapping Java objects (DTOs to entities, etc.) -->
<dependency>
<groupId>org.mapstruct</groupId>
Expand All @@ -90,6 +92,13 @@
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
<version>2.5.0</version>
</dependency>

<!-- Bouncycastle for their Argon2 hashing implementation -->
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpkix-jdk18on</artifactId>
<version>1.78.1</version>
</dependency>
</dependencies>

<!-- Build section: Contains build-specific information such as plugins -->
Expand Down
Loading