Skip to content

Commit 850daff

Browse files
committed
Adds gemini suppoirt
1 parent 159b36e commit 850daff

File tree

21 files changed

+1013
-304
lines changed

21 files changed

+1013
-304
lines changed

.env.example

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ ANTHROPIC_API_KEY=
2626
# OpenAI (DALL-E)
2727
OPENAI_API_KEY=
2828

29+
# Google Gemini (Imagen)
30+
GEMINI_API_KEY=
31+
2932
# Resend (production)
3033
RESEND_API_KEY=
3134
RESEND_FROM_EMAIL=No Context <noreply@nocontextbot.com>

dev/dump-db.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
set -euo pipefail
3+
4+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
5+
ROOT_DIR="$(dirname "$SCRIPT_DIR")"
6+
OUTPUT="$SCRIPT_DIR/local-db.sql"
7+
8+
# Load DATABASE_URL from .env
9+
DATABASE_URL=$(grep -E '^DATABASE_URL=' "$ROOT_DIR/.env" | head -1 | cut -d '=' -f2-)
10+
11+
if [ -z "$DATABASE_URL" ]; then
12+
echo "ERROR: DATABASE_URL not found in .env"
13+
exit 1
14+
fi
15+
16+
echo "Dumping database to $OUTPUT..."
17+
pg_dump "$DATABASE_URL" --no-owner --no-acl > "$OUTPUT"
18+
echo "Done. Saved to $OUTPUT ($(wc -c < "$OUTPUT" | xargs) bytes)"

dev/restore-db.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/bash
2+
set -euo pipefail
3+
4+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
5+
ROOT_DIR="$(dirname "$SCRIPT_DIR")"
6+
INPUT="$SCRIPT_DIR/local-db.sql"
7+
8+
# Load DATABASE_URL from .env
9+
DATABASE_URL=$(grep -E '^DATABASE_URL=' "$ROOT_DIR/.env" | head -1 | cut -d '=' -f2-)
10+
11+
if [ -z "$DATABASE_URL" ]; then
12+
echo "ERROR: DATABASE_URL not found in .env"
13+
exit 1
14+
fi
15+
16+
if [ ! -f "$INPUT" ]; then
17+
echo "ERROR: $INPUT not found. Run dump-db.sh first."
18+
exit 1
19+
fi
20+
21+
echo "Restoring database from $INPUT..."
22+
psql "$DATABASE_URL" < "$INPUT"
23+
echo "Done."

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"@dnd-kit/core": "^6.3.1",
3434
"@dnd-kit/sortable": "^10.0.0",
3535
"@dnd-kit/utilities": "^3.2.2",
36+
"@google/genai": "^1.46.0",
3637
"@prisma/adapter-pg": "^7.4.0",
3738
"@prisma/client": "^7.4.0",
3839
"@prisma/client-runtime-utils": "^7.4.0",

0 commit comments

Comments
 (0)