diff --git a/.example.env b/.example.env
index b4017c06..a2718269 100644
--- a/.example.env
+++ b/.example.env
@@ -6,3 +6,11 @@ UPSTASH_REDIS_REST_TOKEN=
# Optional, if you're planning to use Upload.io (you need to if you have 100+ uploads)
NEXT_PUBLIC_UPLOAD_API_KEY=
+
+# Optional, if you want to add auth + DB
+NEXTAUTH_SECRET=
+GOOGLE_CLIENT_ID=
+GOOGLE_CLIENT_SECRET=
+DATABASE_URL=
+SHADOW_DATABASE_URL=
+NEXTAUTH_URL=
diff --git a/README.md b/README.md
index 8de2e656..9c2f905a 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,8 @@
+## Todos left for auth
+
+- test it on deployment URL, make sure reset time is real
+- roll it out to prod with instant rollback
+
# [roomGPT.io](https://roomGPT.io)
This project generates new designs of your room with AI.
@@ -42,6 +47,17 @@ Then, run the application in the command line and it will be available at `http:
npm run dev
```
+## Auth setup
+
+1. Use `openssl rand -base64 32` to generate NEXTAUTH_SECRET
+2. Add DB URL and SHADOW DB URL from Neon
+3. Create a new project in console.cloud.google.com
+4. Click configure consent screen in API credentials page and click external
+5. Add an app name, do not upload logo, add authorized domain
+6. Publish app
+7. Create credentials -> Oauth client ID
+8. Run npx prisma db push && prisma migrate dev && prisma generate
+
## One-Click Deploy
Deploy the example using [Vercel](https://vercel.com?utm_source=github&utm_medium=readme&utm_campaign=vercel-examples):
diff --git a/components/Header.tsx b/components/Header.tsx
index 328b9fed..178e2bcd 100644
--- a/components/Header.tsx
+++ b/components/Header.tsx
@@ -1,7 +1,7 @@
import Image from "next/image";
import Link from "next/link";
-export default function Header() {
+export default function Header({ photo }: { photo?: string }) {
return (
@@ -16,15 +16,25 @@ export default function Header() {
roomGPT.io
-
-
-
- Note: We're
- temporarily{" "}
-
- limiting generations to 3 per day
+ You have{" "}
+
+ {data.remainingGenerations} generations
{" "}
- because of high traffic.
+ left today. Your generation
+ {Number(data.remainingGenerations) > 1 ? "s" : ""} will renew in{" "}
+
+ {data.hours} hours and {data.minutes} minutes.
+
)}
- {!restoredImage && (
+ {restoredImage && (
+
+ Here's your remodeled {room.toLowerCase()} in the{" "}
+ {theme.toLowerCase()} theme!{" "}
+