+ ))}
+
+
+
+
+
+ Daily journal
+
+ One entry per day to reflect and help your pet grow.
+
+
+
+
+
+
+
+
+
+
+ );
+}
diff --git a/app/(app)/daily/quiz/page.tsx b/app/(app)/daily/quiz/page.tsx
new file mode 100644
index 0000000..b39be03
--- /dev/null
+++ b/app/(app)/daily/quiz/page.tsx
@@ -0,0 +1,56 @@
+import { AppShell } from "@/components/layout/app-shell";
+import { Badge } from "@/components/ui/badge";
+import { Button } from "@/components/ui/button";
+import {
+ Card,
+ CardContent,
+ CardDescription,
+ CardHeader,
+ CardTitle,
+} from "@/components/ui/card";
+
+const quizQuestion = {
+ prompt: "What is one small win you can celebrate today?",
+ options: [
+ "I showed up for myself",
+ "I rested when I needed to",
+ "I reached out to someone",
+ "I kept a promise to myself",
+ ],
+};
+
+export default function DailyQuizPage() {
+ return (
+
+
+
+ Today's prompt
+ Not completed
+
+
+
+
+ {quizQuestion.prompt}
+
+ Pick the answer that fits best. You can only submit once per day.
+
+
+
+ {quizQuestion.options.map((option) => (
+
+ ))}
+
+
+
+
+ );
+}
diff --git a/app/(app)/layout.tsx b/app/(app)/layout.tsx
new file mode 100644
index 0000000..0c936cc
--- /dev/null
+++ b/app/(app)/layout.tsx
@@ -0,0 +1,15 @@
+import { Suspense } from "react";
+
+import { AppAuthGate } from "@/components/layout/app-auth-gate";
+
+export default function AppLayout({
+ children,
+}: {
+ children: React.ReactNode;
+}) {
+ return (
+ }>
+ {children}
+
+ );
+}
diff --git a/app/(app)/profile/page.tsx b/app/(app)/profile/page.tsx
new file mode 100644
index 0000000..ec7fba2
--- /dev/null
+++ b/app/(app)/profile/page.tsx
@@ -0,0 +1,72 @@
+import { Suspense } from "react";
+
+import { AppShell } from "@/components/layout/app-shell";
+import { LogoutButton } from "@/components/logout-button";
+import { Badge } from "@/components/ui/badge";
+import { Button } from "@/components/ui/button";
+import {
+ Card,
+ CardContent,
+ CardDescription,
+ CardHeader,
+ CardTitle,
+} from "@/components/ui/card";
+import { Input } from "@/components/ui/input";
+import { Label } from "@/components/ui/label";
+import { getSessionUser } from "@/lib/auth-helpers";
+
+async function ProfileContent() {
+ const user = await getSessionUser();
+
+ return (
+
+
+
+ Account
+ Your sign-in details and session.
+
+
+
+
+
+
+
+ Onboarding
+ Complete
+
+
+
+
+
+
+
+ Preferences
+
+ Notification and reminder settings will live here.
+
+
+
+
+
+
+
+
+ );
+}
diff --git a/app/page.tsx b/app/page.tsx
index a1659d2..2f7d07d 100644
--- a/app/page.tsx
+++ b/app/page.tsx
@@ -1,58 +1,91 @@
-import { DeployButton } from "@/components/deploy-button";
-import { EnvVarWarning } from "@/components/env-var-warning";
-import { AuthButton } from "@/components/auth-button";
-import { Hero } from "@/components/hero";
-import { ThemeSwitcher } from "@/components/theme-switcher";
-import { ConnectSupabaseSteps } from "@/components/tutorial/connect-supabase-steps";
-import { SignUpUserSteps } from "@/components/tutorial/sign-up-user-steps";
-import { hasEnvVars } from "@/lib/utils";
import Link from "next/link";
import { Suspense } from "react";
+import { PixelAvatar } from "@/components/avatar/pixel-avatar";
+import { LoggedInRedirect } from "@/components/layout/logged-in-redirect";
+import { SiteFooter, SiteHeader } from "@/components/layout/site-header";
+import { Button } from "@/components/ui/button";
+import {
+ Card,
+ CardContent,
+ CardDescription,
+ CardHeader,
+ CardTitle,
+} from "@/components/ui/card";
+import { routes } from "@/lib/routes";
+
export default function Home() {
return (
-
-
-
-
-
-
-
Next steps
- {hasEnvVars ? : }
-
-
+
+
+
+
-
+
+
+
+
+
+
+ Calgary Hackathon MVP
+
+
+ Build habits. Care for your pixel pet.
+
+
+ Habit Pet turns daily check-ins, wellness sliders, and journaling
+ into a simple game. Keep streaks alive, take your once-per-day
+ quiz, and watch your pet change with you.
+
-
- This is a protected page that you can only see as an authenticated
- user
-
-
-
-
Your user details
-
-
-
-
-
-
-
-
Next steps
-
-
-
- );
+ redirect(routes.avatar);
}
diff --git a/components/auth-button.tsx b/components/auth-button.tsx
index 29f696c..f55cc89 100644
--- a/components/auth-button.tsx
+++ b/components/auth-button.tsx
@@ -1,28 +1,29 @@
import Link from "next/link";
+
import { Button } from "./ui/button";
import { createClient } from "@/lib/supabase/server";
import { LogoutButton } from "./logout-button";
+import { routes } from "@/lib/routes";
export async function AuthButton() {
const supabase = await createClient();
-
- // You can also use getUser() which will be slower.
const { data } = await supabase.auth.getClaims();
-
const user = data?.claims;
return user ? (
-
- ))}
-
-
-
-
-
- Daily journal
-
- One entry per day to reflect and help your pet grow.
-
-
-
-
-
-
-
-
+
+
+
);
diff --git a/app/(app)/daily/quiz/page.tsx b/app/(app)/daily/quiz/page.tsx
deleted file mode 100644
index b39be03..0000000
--- a/app/(app)/daily/quiz/page.tsx
+++ /dev/null
@@ -1,56 +0,0 @@
-import { AppShell } from "@/components/layout/app-shell";
-import { Badge } from "@/components/ui/badge";
-import { Button } from "@/components/ui/button";
-import {
- Card,
- CardContent,
- CardDescription,
- CardHeader,
- CardTitle,
-} from "@/components/ui/card";
-
-const quizQuestion = {
- prompt: "What is one small win you can celebrate today?",
- options: [
- "I showed up for myself",
- "I rested when I needed to",
- "I reached out to someone",
- "I kept a promise to myself",
- ],
-};
-
-export default function DailyQuizPage() {
- return (
-
-
-
- Today's prompt
- Not completed
-
-
-
-
- {quizQuestion.prompt}
-
- Pick the answer that fits best. You can only submit once per day.
-
-
-
- {quizQuestion.options.map((option) => (
-
- ))}
-
-
-
-
- );
-}
diff --git a/app/(app)/layout.tsx b/app/(app)/layout.tsx
index 0c936cc..ee5f790 100644
--- a/app/(app)/layout.tsx
+++ b/app/(app)/layout.tsx
@@ -8,7 +8,7 @@ export default function AppLayout({
children: React.ReactNode;
}) {
return (
- }>
+ }>
{children}
);
diff --git a/app/(app)/profile/page.tsx b/app/(app)/profile/page.tsx
index ec7fba2..a5aedab 100644
--- a/app/(app)/profile/page.tsx
+++ b/app/(app)/profile/page.tsx
@@ -1,70 +1,26 @@
import { Suspense } from "react";
+import { ProfilePreferencesForm } from "@/components/profile/profile-preferences-form";
import { AppShell } from "@/components/layout/app-shell";
-import { LogoutButton } from "@/components/logout-button";
-import { Badge } from "@/components/ui/badge";
-import { Button } from "@/components/ui/button";
-import {
- Card,
- CardContent,
- CardDescription,
- CardHeader,
- CardTitle,
-} from "@/components/ui/card";
-import { Input } from "@/components/ui/input";
-import { Label } from "@/components/ui/label";
import { getSessionUser } from "@/lib/auth-helpers";
async function ProfileContent() {
const user = await getSessionUser();
- return (
-
-
-
- Account
- Your sign-in details and session.
-
-
-
-
-
-
-
- Onboarding
- Complete
-
-
-
-
-
-
-
- Preferences
-
- Notification and reminder settings will live here.
-
-
-
-
-
-
-
-
- );
+ return ;
}
export default function ProfilePage() {
return (
- Loading profile...}>
+ Loading profile...
+ }
+ >
diff --git a/app/daily/quiz/page.tsx b/app/daily/quiz/page.tsx
new file mode 100644
index 0000000..8b3a684
--- /dev/null
+++ b/app/daily/quiz/page.tsx
@@ -0,0 +1,13 @@
+import { DailyQuizForm } from "@/components/daily-quiz/daily-quiz-form";
+import { AppShell } from "@/components/layout/app-shell";
+
+export default function DailyQuizPage() {
+ return (
+
+
+
+ );
+}
diff --git a/app/habits/page.tsx b/app/habits/page.tsx
new file mode 100644
index 0000000..b5a34e2
--- /dev/null
+++ b/app/habits/page.tsx
@@ -0,0 +1,13 @@
+import { HabitTracker } from "@/components/habits/habit-tracker";
+import { AppShell } from "@/components/layout/app-shell";
+
+export default function HabitsPage() {
+ return (
+
+
+
+ );
+}
diff --git a/app/layout.tsx b/app/layout.tsx
index a77eeff..916f99b 100644
--- a/app/layout.tsx
+++ b/app/layout.tsx
@@ -1,6 +1,8 @@
import type { Metadata } from "next";
import { Geist } from "next/font/google";
import { ThemeProvider } from "next-themes";
+
+import { GlobalBottomNav } from "@/components/layout/global-bottom-nav";
import "./globals.css";
const defaultUrl = process.env.VERCEL_URL
@@ -33,7 +35,8 @@ export default function RootLayout({
enableSystem
disableTransitionOnChange
>
- {children}
+