Skip to content
Open
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
5 changes: 2 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Google OAuth Web client ID. This is public configuration, not a client secret.
VITE_GOOGLE_CLIENT_ID=

# Supabase browser connection values. Use the publishable/anon key, never service_role.
VITE_SUPABASE_URL=
VITE_SUPABASE_PUBLISHABLE_KEY=
# Spring API base URL. Use the deployed API URL in production.
VITE_API_BASE_URL=http://localhost:8080/api
3 changes: 1 addition & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ jobs:
- run: npm run build
env:
VITE_GOOGLE_CLIENT_ID: ${{ secrets.VITE_GOOGLE_CLIENT_ID }}
VITE_SUPABASE_URL: ${{ secrets.VITE_SUPABASE_URL }}
VITE_SUPABASE_PUBLISHABLE_KEY: ${{ secrets.VITE_SUPABASE_PUBLISHABLE_KEY }}
VITE_API_BASE_URL: ${{ secrets.VITE_API_BASE_URL }}
- uses: actions/upload-pages-artifact@v3
with:
path: dist
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,15 @@ node_modules/
# Build output
dist/
build/
server/target/
server/build/
server/.gradle/

# Local environment files, including Google OAuth configuration
.env
.env.*
!.env.example
server/.env

# Local Supabase setup notes
SUPABASE_SETUP.md
Expand Down
15 changes: 15 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
services:
postgres:
image: postgres:16-alpine
container_name: when7meet-postgres
environment:
POSTGRES_DB: when7meet
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- "5432:5432"
volumes:
- when7meet-postgres-data:/var/lib/postgresql/data

volumes:
when7meet-postgres-data:
103 changes: 1 addition & 102 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"preview": "vite preview --host 0.0.0.0"
},
"dependencies": {
"@supabase/supabase-js": "^2.110.5",
"@vitejs/plugin-react": "^4.3.4",
"lucide-react": "^0.468.0",
"react": "^18.3.1",
Expand Down
19 changes: 19 additions & 0 deletions render.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
services:
- type: web
name: when7meet-api
runtime: docker
rootDir: server
healthCheckPath: /actuator/health
envVars:
- key: DATABASE_URL
sync: false
- key: DATABASE_USERNAME
sync: false
- key: DATABASE_PASSWORD
sync: false
- key: APP_ALLOWED_ORIGIN
sync: false
- key: DB_POOL_SIZE
value: "5"
- key: DB_MINIMUM_IDLE
value: "1"
9 changes: 9 additions & 0 deletions server/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Supabase Connect 화면의 JDBC 형식 연결 정보입니다.
# 예: jdbc:postgresql://aws-xxx.pooler.supabase.com:5432/postgres?sslmode=require
DATABASE_URL=jdbc:postgresql://localhost:5432/when7meet
DATABASE_USERNAME=postgres
DATABASE_PASSWORD=
DB_POOL_SIZE=5
DB_MINIMUM_IDLE=1
APP_ALLOWED_ORIGIN=http://localhost:5173
PORT=8080
13 changes: 13 additions & 0 deletions server/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM gradle:9.6-jdk21 AS builder

WORKDIR /app
COPY . .
RUN ./gradlew bootJar --no-daemon

FROM eclipse-temurin:21-jre

WORKDIR /app
COPY --from=builder /app/build/libs/*.jar app.jar

EXPOSE 8080
ENTRYPOINT ["java", "-jar", "app.jar"]
35 changes: 35 additions & 0 deletions server/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# when7meet API

Spring Boot API for meeting creation, participant authentication, and availability responses.

## Run locally

1. Start PostgreSQL from the project root: `docker compose up -d postgres`
2. Install Java 21 and Gradle 8.14+ (or use the generated Gradle wrapper).
3. Run: `./gradlew bootRun`

Flyway applies the database schema from `src/main/resources/db/migration` on startup.

## Supabase PostgreSQL

The production API uses Supabase as a managed PostgreSQL database. Set the `DATABASE_URL`,
`DATABASE_USERNAME`, and `DATABASE_PASSWORD` variables only in the server hosting provider.
Never add them to the Vite `.env.local` file or expose them to the browser.

For a persistent Spring server, use the Supabase direct connection when the hosting network
supports IPv6. Otherwise use the Supavisor session pooler connection. Add `?sslmode=require`
to the JDBC URL when required by the connection settings.

The repository includes `../render.yaml` and this directory's `Dockerfile` for Render deployment.
After deployment, set `APP_ALLOWED_ORIGIN` to the exact GitHub Pages origin and set the frontend's
`VITE_API_BASE_URL` to the deployed API URL ending in `/api`.

## API

- `POST /api/meetings`
- `GET /api/meetings/{meetingId}`
- `POST /api/meetings/{meetingId}/participants`
- `PUT /api/meetings/{meetingId}/participants/{participantId}/availability`
- `GET /actuator/health`

Participant passwords are stored as BCrypt hashes. The API never returns credentials.
35 changes: 35 additions & 0 deletions server/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
plugins {
id 'java'
id 'org.springframework.boot' version '4.1.0'
id 'io.spring.dependency-management' version '1.1.7'
}

group = 'com.when7meet'
version = '0.0.1-SNAPSHOT'

java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}

repositories {
mavenCentral()
}

dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-jdbc'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.security:spring-security-crypto'
implementation 'org.flywaydb:flyway-core'
implementation 'org.flywaydb:flyway-database-postgresql'
runtimeOnly 'org.postgresql:postgresql'

testImplementation 'org.springframework.boot:spring-boot-starter-test'
}

tasks.named('test') {
useJUnitPlatform()
}
Binary file added server/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
9 changes: 9 additions & 0 deletions server/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.0-bin.zip
networkTimeout=10000
retries=0
retryBackOffMs=500
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading