# Project export: Wellness Dorm

This document was generated by HackStack to give an AI agent context about a hackathon project. Sections are labeled with their provenance; content marked as truncated was cut to keep this document small.

## Project metadata

- Hackathon: TreeHacks 2025
- Tagline: The Wellness Dorm aims to provide advice for college students struggling with their mental and physical well-being by storing data about their lifestyles and offering personalized recommendations.
- Devpost: https://devpost.com/software/wellness-dorm
- GitHub: https://github.com/mihir-putcha/treehacks2025
- Video: https://www.youtube.com/embed/6lpbdVLlZ0o?enablejsapi=1&hl=en_US&rel=0&start=&version=3&wmode=transparent
- Team: 1 GitHub contributor(s) — Mihir Putcha (1 commits)

## Devpost submission (written by the team)

### Inspiration

We were inspired by our lives as college students, and struggling with our physical health and sleep schedules. We also wanted to add a friend-feature to health, thinking that making it competitive would be a good incentive for high-achieving college-students to take care of themselves.

### What it does

The app incorporates a chatbot that answers questions and a UI built using Vercel, with our edits. We attempted to use Dain's Butterfly to build a wellness tool, but struggled to get it to work, though we worked somewhat with the code. We also hope to add a larger database using ChromaDB and integrate data from an app like Terra. Hopefully, we'll get it working in the future!

## README (from the GitHub repository)

No README available.

## Detected evidence (automated analysis)

Indexed codebase: 71 recognized source files, 194 KB.
- CSS (language) — detected in the code
- JavaScript (language) — detected in the code
- Next.js (technology) — detected in the code
- React (technology) — detected in the code
- Tailwind CSS (technology) — detected in the code
- TypeScript (language) — detected in the code
- OpenAI (technology) — claimed on Devpost, not found in the code
- Vercel (technology) — claimed on Devpost, not found in the code

## Codebase structure (from repository index)

### Files (77 of 77)

```
.gitignore
app/api/chat/route.ts
app/dashboard/page.tsx
app/diagnosis/page.tsx
app/friend-data/page.tsx
app/globals.css
app/health/page.tsx
app/layout.tsx
app/page.tsx
components.json
components/chatbot.tsx
components/health-metric.tsx
components/heart-animation.tsx
components/mode-toggle.tsx
components/rotating-heart.tsx
components/taurus-animation.tsx
components/theme-provider.tsx
components/ui/accordion.tsx
components/ui/alert-dialog.tsx
components/ui/alert.tsx
components/ui/aspect-ratio.tsx
components/ui/avatar.tsx
components/ui/badge.tsx
components/ui/breadcrumb.tsx
components/ui/button.tsx
components/ui/calendar.tsx
components/ui/card.tsx
components/ui/carousel.tsx
components/ui/chart.tsx
components/ui/checkbox.tsx
components/ui/collapsible.tsx
components/ui/command.tsx
components/ui/context-menu.tsx
components/ui/dialog.tsx
components/ui/drawer.tsx
components/ui/dropdown-menu.tsx
components/ui/form.tsx
components/ui/hover-card.tsx
components/ui/input-otp.tsx
components/ui/input.tsx
components/ui/label.tsx
components/ui/menubar.tsx
components/ui/navigation-menu.tsx
components/ui/pagination.tsx
components/ui/popover.tsx
components/ui/progress.tsx
components/ui/radio-group.tsx
components/ui/resizable.tsx
components/ui/scroll-area.tsx
components/ui/select.tsx
components/ui/separator.tsx
components/ui/sheet.tsx
components/ui/sidebar.tsx
components/ui/skeleton.tsx
components/ui/slider.tsx
components/ui/sonner.tsx
components/ui/switch.tsx
components/ui/table.tsx
components/ui/tabs.tsx
components/ui/textarea.tsx
components/ui/toast.tsx
components/ui/toaster.tsx
components/ui/toggle-group.tsx
components/ui/toggle.tsx
components/ui/tooltip.tsx
components/ui/use-mobile.tsx
components/ui/use-toast.ts
hooks/use-mobile.tsx
hooks/use-toast.ts
lib/utils.ts
lib/wellness-service.ts
next.config.mjs
package.json
postcss.config.mjs
styles/globals.css
tailwind.config.js
tsconfig.json
```

### Dependencies

- package.json: @hookform/resolvers@^3.9.1, @radix-ui/react-accordion@^1.2.2, @radix-ui/react-alert-dialog@^1.1.4, @radix-ui/react-aspect-ratio@^1.1.1, @radix-ui/react-avatar@^1.1.2, @radix-ui/react-checkbox@^1.1.3, @radix-ui/react-collapsible@^1.1.2, @radix-ui/react-context-menu@^2.2.4, @radix-ui/react-dialog@^1.1.4, @radix-ui/react-dropdown-menu@^2.1.4, @radix-ui/react-hover-card@^1.1.4, @radix-ui/react-label@^2.1.1, @radix-ui/react-menubar@^1.1.4, @radix-ui/react-navigation-menu@^1.2.3, @radix-ui/react-popover@^1.1.4, @radix-ui/react-progress@^1.1.1, @radix-ui/react-radio-group@^1.2.2, @radix-ui/react-scroll-area@^1.2.2, @radix-ui/react-select@^2.1.4, @radix-ui/react-separator@^1.1.1, @radix-ui/react-slider@^1.2.2, @radix-ui/react-slot@^1.1.1, @radix-ui/react-switch@^1.1.2, @radix-ui/react-tabs@^1.1.2, @radix-ui/react-toast@^1.2.4, @radix-ui/react-toggle@^1.1.1, @radix-ui/react-toggle-group@^1.1.1, @radix-ui/react-tooltip@^1.1.6, @react-three/drei@latest, @react-three/fiber@latest, @types/node@^22, @types/react@^18, @types/react-dom@^18, autoprefixer@^10.4.20, class-variance-authority@^0.7.1, clsx@^2.1.1, cmdk@1.0.4, date-fns@4.1.0, embla-carousel-react@8.5.1, expo@latest, expo-asset@latest, expo-file-system@latest, expo-gl@latest, input-otp@1.4.1, lucide-react@^0.454.0, next@14.2.16, next-themes@latest, postcss@^8, react@^18, react-day-picker@8.10.1, react-dom@^18, react-hook-form@^7.54.1, react-native@latest, react-resizable-panels@^2.1.7, recharts@latest, sonner@^1.7.1, tailwind-merge@^2.5.5, tailwindcss@^3.4.17, tailwindcss-animate@^1.0.7, three@latest, typescript@^5, vaul@^0.9.6, zod@^3.24.1

### Recent commits (newest first)

- uploading site

## Key source files (fetched from GitHub, selected and truncated for size)

### package.json

```
{
  "name": "my-v0-project",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start",
    "lint": "next lint"
  },
  "dependencies": {
    "@hookform/resolvers": "^3.9.1",
    "@radix-ui/react-accordion": "^1.2.2",
    "@radix-ui/react-alert-dialog": "^1.1.4",
    "@radix-ui/react-aspect-ratio": "^1.1.1",
    "@radix-ui/react-avatar": "^1.1.2",
    "@radix-ui/react-checkbox": "^1.1.3",
    "@radix-ui/react-collapsible": "^1.1.2",
    "@radix-ui/react-context-menu": "^2.2.4",
    "@radix-ui/react-dialog": "^1.1.4",
    "@radix-ui/react-dropdown-menu": "^2.1.4",
    "@radix-ui/react-hover-card": "^1.1.4",
    "@radix-ui/react-label": "^2.1.1",
    "@radix-ui/react-menubar": "^1.1.4",
    "@radix-ui/react-navigation-menu": "^1.2.3",
    "@radix-ui/react-popover": "^1.1.4",
    "@radix-ui/react-progress": "^1.1.1",
    "@radix-ui/react-radio-group": "^1.2.2",
    "@radix-ui/react-scroll-area": "^1.2.2",
    "@radix-ui/react-select": "^2.1.4",
    "@radix-ui/react-separator": "^1.1.1",
    "@radix-ui/react-slider": "^1.2.2",
    "@radix-ui/react-slot": "^1.1.1",
    "@radix-ui/react-switch": "^1.1.2",
    "@radix-ui/react-tabs": "^1.1.2",
    "@radix-ui/react-toast": "^1.2.4",
    "@radix-ui/react-toggle": "^1.1.1",
    "@radix-ui/react-toggle-group": "^1.1.1",
    "@radix-ui/react-tooltip": "^1.1.6",
    "autoprefixer": "^10.4.20",
    "class-variance-authority": "^0.7.1",
    "clsx": "^2.1.1",
    "cmdk": "1.0.4",
    "date-fns": "4.1.0",
    "embla-carousel-react": "8.5.1",
    "input-otp": "1.4.1",
    "lucide-react": "^0.454.0",
    "next": "14.2.16",
    "next-themes": "latest",
    "react": "^18",
    "react-day-picker": "8.10.1",
    "react-dom": "^18",
    "react-hook-form": "^7.54.1",
    "react-resizable-panels": "^2.1.7",
    "recharts": "latest",
    "sonner": "^1.7.1",
    "tailwind-merge": "^2.5.5",
    "tailwindcss-animate": "^1.0.7",
    "vaul": "^0.9.6",
    "zod": "^3.24.1",
    "expo": "latest",
    "three": "latest",
    "expo-gl": "latest",
    "expo-asset": "latest",
    "react-native": "latest",
    "expo-file-system": "latest",
    "@react-three/fiber": "latest",
    "@react-three/drei": "latest"
  },
  "devDependencies": {
    "@types/node": "^22",
    "@types/react": "^18",
    "@types/react-dom": "^18",
    "postcss": "^8",
    "tailwindcss": "^3.4.17",
    "typescript": "^5"
  }
}
```

### app/layout.tsx

```typescript
import type React from "react"
import type { Metadata } from "next"
import "./globals.css"
import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs"
import Link from "next/link"
import { Chatbot } from "@/components/chatbot"
import { ThemeProvider } from "@/components/theme-provider"
import { ModeToggle } from "@/components/mode-toggle"

export const metadata: Metadata = {
  title: "The Wellness Dorm",
  description: "A comprehensive wellness platform for students",
    generator: 'v0.dev'
}

export default function RootLayout({
  children,
}: {
  children: React.ReactNode
}) {
  return (
    <html lang="en">
      <head>
        <link rel="stylesheet" href="https://use.typekit.net/rxs4ryd.css" />
      </head>
      <body className="font-basic-sans font-normal">
        <ThemeProvider attribute="class" defaultTheme="system" enableSystem disableTransitionOnChange>
          <div className="relative">
            <nav className="fixed top-0 left-0 right-0 z-50 mb-8 flex justify-between items-center bg-transparent p-2">
              <Tabs defaultValue="home" className="w-full">
                <TabsList className="grid w-full grid-cols-5 rounded-lg bg-white/20 backdrop-blur-sm">
                  <TabsTrigger value="home" asChild>
                    <Link href="/">Home</Link>
                  </TabsTrigger>
                  <TabsTrigger value="dashboard" asChild>
                    <Link href="/dashboard">Dashboard</Link>
                  </TabsTrigger>
                  <TabsTrigger value="health" asChild>
                    <Link href="/health">Health</Link>
                  </TabsTrigger>
                  <TabsTrigger value="diagnosis" asChild>
                    <Link href="/diagnosis">Diagnosis</Link>
                  </TabsTrigger>
                  <TabsTrigger value="friend-data" asChild>
                    <Link href="/friend-data">Friend Data</Link>
                  </TabsTrigger>
                </TabsList>
              </Tabs>
              <ModeToggle />
            </nav>
            <main className="animate-fade-in pt-16">{children}</main>
            <Chatbot />
          </div>
        </ThemeProvider>
      </body>
    </html>
  )
}



import './globals.css'
```

### app/page.tsx

```typescript
"use client"

import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
import { Button } from "@/components/ui/button"
import Link from "next/link"
import { ArrowRight, Activity, Brain, Users, Heart } from "lucide-react"
import Image from "next/image"

export default function Home() {
  return (
    <div className="space-y-12">
      <section className="relative h-[600px] flex flex-col items-center justify-center overflow-hidden">
        <div className="absolute inset-0">
          <Image
            src="https://hebbkx1anhila5yf.public.blob.vercel-storage.com/dorm_landing_page2-Az8rlh7CaY4sDA4euSDgjqZ0uWYCjo.jpeg"
            alt="Modern dorm room"
            fill
            className="object-cover"
            priority
          />
          <div className="absolute inset-0 bg-black opacity-30"></div>
        </div>
        <div className="relative z-10 text-center space-y-6 p-8 max-w-3xl">
          <h1 className="text-6xl font-roca font-black text-white drop-shadow-lg">The Wellness Dorm!</h1>
          <p className="text-2xl font-basic-sans font-normal text-white max-w-2xl mx-auto drop-shadow-lg bg-white bg-opacity-50 p-4 rounded-lg">
            Empowering students to achieve optimal health and balance through innovative technology and personalized
            insights.
          </p>
          <Button
            asChild
            size="lg"
            className="animate-pulse-scale text-xl py-6 px-8 bg-[#FF000C] hover:bg-[#FF000C]/90 font-roca font-black"
          >
            <Link href="/dashboard">
              Explore Your Wellness <ArrowRight className="ml-2 h-6 w-6" />
            </Link>
          </Button>
        </div>
      </section>

      <div className="grid gap-6 md:grid-cols-2">
        <Card className="overflow-hidden">
          <CardHeader className="bg-[#FF6961] text-white">
            <CardTitle className="flex items-center text-2xl font-roca font-black">
              <Activity className="mr-2 h-8 w-8" />
              Track Your Activity
            </CardTitle>
          </CardHeader>
          <CardContent className="pt-6 h-[300px]">
            <p className="text-lg font-basic-sans font-normal mb-4">
              Monitor your daily steps, workouts, and more to stay on top of your fitness goals.
            </p>
            <div className="relative w-full h-[200px]">
              <Image
                src="https://images.unsplash.com/photo-1461896836934-ffe607ba8211?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1740&q=80"
                alt="Activity Tracking"
                fill
                className="rounded-md object-cover"
              />
            </div>
          </CardContent>
        </Card>
        <Card className="overflow-hidden">
          <CardHeader className="bg-[#FF6961] text-white">
            <CardTitle className="flex items-center text-2xl font-roca font-black">
              <Brain className="mr-2 h-8 w-8" />
              Mental Wellness
            </CardTitle>
          </CardHeader>
          <CardContent className="pt-6 h-[300px]">
            <p className="text-lg font-basic-sans font-normal mb-4">
              Access resources and tools to support your mental health and reduce stress.
            </p>
            <div className="relative w-full h-[200px]">
              <Image
                src="https://images.unsplash.com/photo-1506126613408-eca07ce68773?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1742&q=80"
                alt="Mental Wellness"
                fill
                className="rounded-md object-cover"
              />
            </div>
          </CardContent>
        </Card>
        <Card className="overflow-hidden">
          <CardHeader className="bg-[#FF6961] text-white">
            <CardTitle className="flex items-center text-2xl font-roca font-black">
              <Users className="mr-2 h-8 w-8" />
              Connect with Friends
            </CardTitle>
          </CardHeader>
          <CardContent className="pt-6 h-[300px]">
            <p className="text-lg font-basic-sans font-normal mb-4">
              Share your progress and motivate each other on your wellness journeys.
            </p>
            <div className="relative w-full h-[200px]">
              <Image
                src="https://images.unsplash.com/photo-1529156069898-49953e39b3ac?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1932&q=80"
                alt="Friend Connection"
                fill
                className="rounded-md object-cover"
              />
            </div>
          </CardContent>
        </Card>
        <Card className="overflow-hidden">
          <CardHeader className="bg-[#FF6961] text-white">
            <CardTitle className="flex items-center text-2xl font-roca font-black">
              <Heart className="mr-2 h-8 w-8" />
              Holistic Health
            </CardTitle>
          </CardHeader>
          <CardContent className="pt-6 h-[300px]">
            <p className="text-lg font-basic-sans font-normal mb-4">
              Get a comprehensive view of your health, including nutrition, sleep, and more.
            </p>
            <div className="relative w-full h-[200px]">
              <Image
                src="https://images.unsplash.com/photo-1490645935967-10de6ba17061?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1753&q=80"
                alt="Holistic Health"
                fill
                className="rounded-md object-cover"
              />
            </div>
          </CardContent>
        </Card>
      </div>
    </div>
  )
}


```

### app/health/page.tsx

```typescript
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
import { BarChart, Bar, XAxis, YAxis, CartesianGrid, Tooltip, ResponsiveContainer } from "recharts"

const sleepData = [
  { day: "Mon", hours: 7 },
  { day: "Tue", hours: 6.5 },
  { day: "Wed", hours: 8 },
  { day: "Thu", hours: 7.5 },
  { day: "Fri", hours: 6 },
  { day: "Sat", hours: 9 },
  { day: "Sun", hours: 8.5 },
]

export default function Health() {
  return (
    <div className="grid gap-6 md:grid-cols-2 pt-16">
      <Card>
        <CardHeader>
          <CardTitle>Health Metrics</CardTitle>
        </CardHeader>
        <CardContent>
          <ul className="list-disc pl-5 space-y-2">
            <li>Heart Rate: 72 bpm</li>
            <li>Blood Pressure: 120/80 mmHg</li>
            <li>Body Temperature: 98.6°F</li>
            <li>Respiratory Rate: 14 breaths/min</li>
            <li>Oxygen Saturation: 98%</li>
          </ul>
        </CardContent>
      </Card>
      <Card>
        <CardHeader>
          <CardTitle>Wellness Tips</CardTitle>
        </CardHeader>
        <CardContent>
          <ul className="list-disc pl-5 space-y-2">
            <li>Stay hydrated by drinking at least 8 glasses of water daily</li>
            <li>Aim for 7-9 hours of sleep each night</li>
            <li>Take regular breaks during study sessions to reduce eye strain</li>
            <li>Practice deep breathing exercises to manage stress</li>
            <li>Incorporate fruits and vegetables into every meal</li>
          </ul>
        </CardContent>
      </Card>
      <Card className="md:col-span-2">
        <CardHeader>
          <CardTitle>Sleep Pattern (Last 7 Days)</CardTitle>
        </CardHeader>
        <CardContent>
          <ResponsiveContainer width="100%" height={300}>
            <BarChart data={sleepData}>
              <CartesianGrid strokeDasharray="3 3" />
              <XAxis dataKey="day" />
              <YAxis />
              <Tooltip />
              <Bar dataKey="hours" fill="#FF6961" />
            </BarChart>
          </ResponsiveContainer>
        </CardContent>
      </Card>
    </div>
  )
}


```

### app/diagnosis/page.tsx

```typescript
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
import { Alert, AlertDescription } from "@/components/ui/alert"
import { Badge } from "@/components/ui/badge"

export default function Diagnosis() {
  return (
    <div className="space-y-6 pt-16">
      <Card>
        <CardHeader>
          <CardTitle>Symptom Checker</CardTitle>
        </CardHeader>
        <CardContent>
          <p className="mb-4">
            Use our AI-powered symptom checker to get preliminary health insights. Remember, this is not a substitute for
            professional medical advice.
          </p>
          {/* Add symptom checker component here */}
        </CardContent>
      </Card>

      <Card>
        <CardHeader>
          <CardTitle>Recent Diagnosis</CardTitle>
        </CardHeader>
        <CardContent>
          <Alert>
            <AlertDescription>
              <h4 className="font-semibold mb-2">Stress-Induced Insomnia</h4>
              Based on your reported symptoms of difficulty falling asleep, racing thoughts at night, and daytime fatigue,
              you may be experiencing stress-induced insomnia. This is common among college students, especially during
              exam periods.
            </AlertDescription>
          </Alert>
          <div className="mt-4">
            <h4 className="font-semibold mb-2">Recommended Actions:</h4>
            <ul className="list-disc pl-5 space-y-2">
              <li>Establish a consistent sleep schedule</li>
              <li>Practice relaxation techniques before bedtime (e.g., deep breathing, meditation)</li>
              <li>Limit caffeine intake, especially in the afternoon and evening</li>
              <li>Create a calm sleep environment (dark, quiet, cool)</li>
              <li>Consider talking to a counselor about stress management techniques</li>
            </ul>
          </div>
          <div className="mt-4">
            <h4 className="font-semibold mb-2">Severity:</h4>
            <Badge variant="outline">Mild to Moderate</Badge>
          </div>
          <p className="mt-4 text-sm text-muted-foreground">
            If symptoms persist or worsen, please consult with a healthcare professional or your campus health center.
          </p>
        </CardContent>
      </Card>
    </div>
  )
}


```

### app/friend-data/page.tsx

```typescript
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"
import { Badge } from "@/components/ui/badge"

const friends = [
  {
    name: "Alex Johnson",
    avatar:
      "https://images.unsplash.com/photo-1599566150163-29194dcaad36?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=774&q=80",
    initials: "AJ",
    streak: 5,
    lastActivity: "30 min run",
    goal: "Run 3 times a week",
  },
  {
    name: "Sam Lee",
    avatar:
      "https://images.unsplash.com/photo-1494790108377-be9c29b29330?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=774&q=80",
    initials: "SL",
    streak: 3,
    lastActivity: "Yoga session",
    goal: "Meditate daily",
  },
  {
    name: "Taylor Swift",
    avatar:
      "https://images.unsplash.com/photo-1438761681033-6461ffad8d80?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1740&q=80",
    initials: "TS",
    streak: 7,
    lastActivity: "8 hours sleep",
    goal: "Improve sleep schedule",
  },
  {
    name: "Jordan Patel",
    avatar:
      "https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=774&q=80",
    initials: "JP",
    streak: 2,
    lastActivity: "Healthy meal prep",
    goal: "Eat more vegetables",
  },
]

export default function FriendData() {
  return (
    <div className="space-y-6 pt-16">
      <Card>
        <CardHeader>
          <CardTitle>Friend Activity</CardTitle>
        </CardHeader>
        <CardContent>
          <div className="space-y-8">
            {friends.map((friend) => (
              <div key={friend.name} className="flex items-center space-x-4">
                <Avatar>
                  <AvatarImage src={friend.avatar} alt={friend.name} />
                  <AvatarFallback>{friend.initials}</AvatarFallback>
                </Avatar>
                <div className="flex-1 space-y-1">
                  <p className="text-sm font-medium leading-none">{friend.name}</p>
                  <p className="text-sm text-muted-foreground">{friend.lastActivity}</p>
                </div>
                <div className="flex items-center space-x-2">
                  <Badge variant="secondary">{friend.streak} day streak</Badge>
                  <Badge variant="outline">{friend.goal}</Badge>
                </div>
              </div>
            ))}
          </div>
        </CardContent>
      </Card>
      <Card>
        <CardHeader>
          <CardTitle>Wellness Challenges</CardTitle>
        </CardHeader>
        <CardContent>
          <ul className="list-disc pl-5 space-y-2">
            <li>30-Day Meditation Challenge: 12 friends participating</li>
            <li>10,000 Steps Daily: 8 friends participating</li>
            <li>Healthy Eating Week: 15 friends participating</li>
            <li>Sleep Improvement Month: 10 friends participating</li>
          </ul>
        </CardContent>
      </Card>
    </div>
  )
}


```

### app/dashboard/page.tsx

```typescript
import { HealthMetric } from "@/components/health-metric"
import { Activity, Heart, Moon, Utensils, Brain } from "lucide-react"
import { HeartAnimation } from "@/components/heart-animation"
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
import { Progress } from "@/components/ui/progress"

async function getTerraData() {
  // Simulating API call
  return {
    steps: 8234,
    sleepHours: 7.5,
    heartRate: 72,
    caloriesBurned: 2150,
    stressLevel: 3,
  }
}

export default async function Dashboard() {
  const terraData = await getTerraData()

  return (
    <div className="space-y-6 pt-16">
      <div className="relative min-h-[30vh]">
        <HeartAnimation />
      </div>
      <h1 className="text-4xl font-roca font-black text-primary">Your Wellness Dashboard</h1>
      <div className="grid gap-6 md:grid-cols-2 lg:grid-cols-3">
        <HealthMetric
          title="Daily Steps"
          value={terraData.steps}
          unit="steps"
          icon={<Activity className="w-8 h-8" />}
          gradient="from-[#FF6961] to-[#FF6961]"
        />
        <HealthMetric
          title="Sleep Duration"
          value={terraData.sleepHours}
          unit="hours"
          icon={<Moon className="w-8 h-8" />}
          gradient="from-[#FF6961] to-[#FF6961]"
        />
        <HealthMetric
          title="Heart Rate"
          value={terraData.heartRate}
          unit="bpm"
          icon={<Heart className="w-8 h-8" />}
          gradient="from-[#FF6961] to-[#FF6961]"
        />
        <HealthMetric
          title="Calories Burned"
          value={terraData.caloriesBurned}
          unit="kcal"
          icon={<Utensils className="w-8 h-8" />}
          gradient="from-[#FF6961] to-[#FF6961]"
        />
        <HealthMetric
          title="Stress Level"
          value={terraData.stressLevel}
          unit="/ 10"
          icon={<Brain className="w-8 h-8" />}
          gradient="from-[#FF6961] to-[#FF6961]"
        />
      </div>
      <Card>
        <CardHeader>
          <CardTitle>Weekly Goals Progress</CardTitle>
        </CardHeader>
        <CardContent>
          <div className="space-y-4">
            <div>
              <div className="flex justify-between mb-1">
                <span className="text-sm font-medium">Exercise (3 times/week)</span>
                <span className="text-sm font-medium">2/3</span>
              </div>
              <Progress value={66} />
            </div>
            <div>
              <div className="flex justify-between mb-1">
                <span className="text-sm font-medium">Meditation (10 minutes/day)</span>
                <span className="text-sm font-medium">5/7 days</span>
              </div>
              <Progress value={71} />
            </div>
            <div>
              <div className="flex justify-between mb-1">
                <span className="text-sm font-medium">Water Intake (8 glasses/day)</span>
                <span className="text-sm font-medium">6/8 glasses</span>
              </div>
              <Progress value={75} />
            </div>
          </div>
        </CardContent>
      </Card>
    </div>
  )
}


```

### app/api/chat/route.ts

```typescript
import { getWellnessServiceResponse } from "@/lib/wellness-service"
import { NextResponse } from "next/server"

export async function POST(req: Request) {
  try {
    const { messages } = await req.json()

    if (!messages || !Array.isArray(messages) || messages.length === 0) {
      return NextResponse.json(
        {
          error: "Invalid request format",
          details: "Messages array is required",
        },
        { status: 400 },
      )
    }

    const latestMessage = messages[messages.length - 1].content

    if (!latestMessage) {
      return NextResponse.json(
        {
          error: "Invalid message format",
          details: "Message content is required",
        },
        { status: 400 },
      )
    }

    console.log("Processing chat request with message:", latestMessage)

    const responseText = await getWellnessServiceResponse(latestMessage)

    console.log("Chat response generated:", responseText)

    return NextResponse.json({ response: responseText })
  } catch (error) {
    console.error("Error in chat route:", error)
    return NextResponse.json(
      {
        error: "Internal Server Error",
        details: error instanceof Error ? error.message : "Unknown error occurred",
      },
      { status: 500 },
    )
  }
}


```

### tailwind.config.js

```javascript
/** @type {import('tailwindcss').Config} */
module.exports = {
  darkMode: ["class"],
  content: [
    "./pages/**/*.{ts,tsx}",
    "./components/**/*.{ts,tsx}",
    "./app/**/*.{ts,tsx}",
    "./src/**/*.{ts,tsx}",
    "*.{js,ts,jsx,tsx,mdx}",
  ],
  theme: {
    container: {
      center: true,
      padding: "2rem",
      screens: {
        "2xl": "1400px",
      },
    },
    extend: {
      fontFamily: {
        roca: ["roca", "sans-serif"],
        "basic-sans": ["basic-sans", "sans-serif"],
      },
      fontWeight: {
        thin: "100",
        extralight: "200",
        light: "300",
        normal: "400",
        medium: "500",
        semibold: "600",
        bold: "700",
        extrabold: "800",
        black: "900",
      },
      colors: {
        border: "hsl(var(--border))",
        input: "hsl(var(--input))",
        ring: "hsl(var(--ring))",
        background: "hsl(var(--background))",
        foreground: "hsl(var(--foreground))",
        primary: {
          DEFAULT: "hsl(var(--primary))",
          foreground: "hsl(var(--primary-foreground))",
        },
        secondary: {
          DEFAULT: "hsl(var(--secondary))",
          foreground: "hsl(var(--secondary-foreground))",
        },
        destructive: {
          DEFAULT: "hsl(var(--destructive))",
          foreground: "hsl(var(--destructive-foreground))",
        },
        muted: {
          DEFAULT: "hsl(var(--muted))",
          foreground: "hsl(var(--muted-foreground))",
        },
        accent: {
          DEFAULT: "hsl(var(--accent))",
          foreground: "hsl(var(--accent-foreground))",
        },
        popover: {
          DEFAULT: "hsl(var(--popover))",
          foreground: "hsl(var(--popover-foreground))",
        },
        card: {
          DEFAULT: "hsl(var(--card))",
          foreground: "hsl(var(--card-foreground))",
        },
      },
      borderRadius: {
        lg: "var(--radius)",
        md: "calc(var(--radius) - 2px)",
        sm: "calc(var(--radius) - 4px)",
      },
      keyframes: {
        "accordion-down": {
          from: { height: 0 },
          to: { height: "var(--radix-accordion-content-height)" },
        },
        "accordion-up": {
          from: { height: "var(--radix-accordion-content-height)" },
          to: { height: 0 },
        },
      },
      animation: {
        "accordion-down": "accordion-down 0.2s ease-out",
        "accordion-up": "accordion-up 0.2s ease-out",
      },
    },
  },
  plugins: [require("tailwindcss-animate")],
}


```

### lib/utils.ts

```typescript
import { clsx, type ClassValue } from "clsx"
import { twMerge } from "tailwind-merge"

export function cn(...inputs: ClassValue[]) {
  return twMerge(clsx(inputs))
}

```

[62 more indexed source files omitted to keep this export small. The full file list is in the Codebase structure section above.]