diff --git a/.env.example b/.env.example
index edd62b2..ff6bf09 100644
--- a/.env.example
+++ b/.env.example
@@ -1,11 +1,10 @@
-DB_DRIVER=postgres
-POSTGRES_DB=surprise
-POSTGRES_USER=surprise
-POSTGRES_PASSWORD=surprise_dev_password
-POSTGRES_PORT=5432
-
-DATABASE_URL=postgres://surprise:surprise_dev_password@localhost:5432/surprise?sslmode=disable
+# ── SQLite (default for local dev) ──
+DB_DRIVER=sqlite
SQLITE_PATH=./data/surprise.db
+
+# ── Postgres (uncomment and set DB_DRIVER=postgres to use) ──
+# DATABASE_URL=postgres://surprise:surprise_dev_password@localhost:5432/surprise?sslmode=disable
+
PORT=8080
CORS_ORIGIN=http://localhost:5173,http://127.0.0.1:5173
SESSION_SECRET=local-development-session-secret-change-me
@@ -20,4 +19,4 @@ STORAGE_USE_SSL=false
MINIO_API_PORT=9000
MINIO_CONSOLE_PORT=9001
-VITE_API_BASE_URL=http://localhost:8080
+VITE_API_BASE_URL=http://localhost:8080
\ No newline at end of file
diff --git a/backend/.idea/.gitignore b/backend/.idea/.gitignore
new file mode 100644
index 0000000..30cf57e
--- /dev/null
+++ b/backend/.idea/.gitignore
@@ -0,0 +1,10 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Editor-based HTTP Client requests
+/httpRequests/
+# Ignored default folder with query files
+/queries/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml
diff --git a/backend/.idea/backend.iml b/backend/.idea/backend.iml
new file mode 100644
index 0000000..5e764c4
--- /dev/null
+++ b/backend/.idea/backend.iml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/backend/.idea/go.imports.xml b/backend/.idea/go.imports.xml
new file mode 100644
index 0000000..644cdf0
--- /dev/null
+++ b/backend/.idea/go.imports.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/backend/.idea/modules.xml b/backend/.idea/modules.xml
new file mode 100644
index 0000000..e066844
--- /dev/null
+++ b/backend/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/backend/.idea/vcs.xml b/backend/.idea/vcs.xml
new file mode 100644
index 0000000..6c0b863
--- /dev/null
+++ b/backend/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/backend/internal/config/config.go b/backend/internal/config/config.go
index beeec0a..7b899a8 100644
--- a/backend/internal/config/config.go
+++ b/backend/internal/config/config.go
@@ -33,10 +33,10 @@ func Load() Config {
}
return Config{
- DBDriver: envOrDefault("DB_DRIVER", "postgres"),
+ DBDriver: envOrDefault("DB_DRIVER", "sqlite"),
Port: envOrDefault("PORT", "8080"),
- DatabaseURL: envOrDefault("DATABASE_URL", "postgres://surprise:surprise_dev_password@localhost:5432/surprise?sslmode=disable"),
- SQLitePath: envOrDefault("SQLITE_PATH", "./data/surprise.db"),
+ DatabaseURL: envOrDefault("DATABASE_URL", ""),
+ SQLitePath: envOrDefault("SQLITE_PATH", ""),
CORSOrigin: envOrDefault("CORS_ORIGIN", "http://localhost:5173,http://127.0.0.1:5173"),
SessionSecret: envOrDefault("SESSION_SECRET", "local-development-session-secret-change-me"),
CookieSecure: parseBoolEnv("COOKIE_SECURE", false),
diff --git a/docker-compose.yml b/docker-compose.yml
index 3f64973..ec891ff 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -3,11 +3,11 @@ services:
image: postgres:16-alpine
restart: unless-stopped
environment:
- POSTGRES_DB: ${POSTGRES_DB:-surprise}
- POSTGRES_USER: ${POSTGRES_USER:-surprise}
- POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-surprise_dev_password}
+ POSTGRES_DB: surprise
+ POSTGRES_USER: surprise
+ POSTGRES_PASSWORD: surprise_dev_password
ports:
- - "${POSTGRES_PORT:-5432}:5432"
+ - "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./migrations:/migrations:ro