# Project export: PredictAPulseAI

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: Cal Hacks 10.0
- Tagline: AI-backed health predictor to help you choose the most personalized insurance plan for you.
- Devpost: https://devpost.com/software/predict-a-pulse-ai
- GitHub: https://github.com/themeghamind/PredictAPulseAI
- Demo: https://predict-a-pulse-ai-rofr.vercel.app/
- Team: 3 GitHub contributor(s) — drkchn (50 commits), Megha Jain (16 commits), Adrian Bao (5 commits)

## Devpost submission (written by the team)

### Inspiration

The American Healthcare system is expensive and complicated. Everyone wants the best, most cost-effective insurance plan, but choosing one can feel like a daunting task. We were motivated to build a product that could deal with large benefits summaries containing opaque language and support our users' unique medical needs, all the while maintaining a high level of user personalization.

### What it does

PredictAPulseAI provides users with a health questionnaire, where the answers serve as input for an ML model for heart attack risk classification. Our ML model was trained using a dataset that has features for causes of heart attacks and predicts future heart attacks. Afterward, users upload summary benefits of insurance policies to PredictAPulseAI, and it combines all of this data to find the most cost-effective insurance policy given your risk for heart attacks.

### How we built it

Frontend: JS, React, Next.js, TypeScript, HTML/CSS, Material UI Backend: Python, Flask, MindsDB.api, Tesseract OCR, Open AI GPT (3.5) Database: SQL, CockroachDB Classification Model: Heart Attack Kaggle Dataset, MindsDB

### Challenges we ran into

Some of the challenges we ran into were dealing with the limitations of Intel Cloud, specifically its inability to connect to Cockroach DB and port-forward for our custom backend API.

### Accomplishments we're proud of

Successful implementations of functions. Replaced cookie usage. Bridged front-end to back-end, API integration, and database implementation.

### What we learned

Insurance comparisons and how it helps users based on their current health conditions. We expanded our knowledge of SQL with CockroachDB, ML prediction models with MindsDB, and Flask web server with our custom-written API endpoint.

### What's next

This project is not limited to predicting heart attacks and reducing the cost of treatment for our users. Other leading causes of death, such as cancer, can be effectively predicted to do the same pipeline. Most importantly, our project would save lives. We plan to adapt our project to an intuitive mobile application to increase accessibility. We also plan to effectively market our idea and utilize sponsorships from insurance companies to gain funding.

## README (from the GitHub repository)

# PredictAPulseAI

Personalized AI health outcome predictor and insurance selection guide

Deployed Website: https://predict-a-pulse-ai-rofr.vercel.app/

https://github.com/themeghamind/PredictAPulseAI/assets/57309755/eb6f003d-fac2-4944-8f2d-c92eda53162d

## Inspiration
The American Healthcare system is expensive and complicated. Everyone wants the best, most cost-effective insurance plan, but choosing one can feel like a daunting task. We were motivated to build a product that could deal with large benefits summaries containing opaque language and support our users' unique medical needs, all the while maintaining a high level of user personalization.

## What it does
PredictAPulseAI provides users with a health questionnaire, where the answers serve as input for an ML model for heart attack risk classification. Our ML model was trained using a dataset that has features for causes of heart attacks and predicts future heart attacks. Afterward, users upload summary benefits of insurance policies to PredictAPulseAI, and it combines all of this data to find the most cost-effective insurance policy given your risk for heart attacks.

## How we built it
Frontend: JS, React, Next.js, TypeScript, HTML/CSS, Material UI, Vercel  
Backend: Python, FastAPI, MindsDB.api, Tesseract OCR, OpenAI GPT 3.5  
Database: CockroachDB  
Classification Model: Heart Attack Kaggle Dataset, MindsDB Regression-Based Predictor

## Challenges we ran into
Some of the challenges we ran into were dealing with the limitations of Intel Cloud, specifically its inability to connect to Cockroach DB and port-forward for our custom backend API.

## Accomplishments that we're proud of
Successful implementations of functions. Replaced cookie usage.
Bridged front-end to back-end, API integration, and database implementation.

## What we learned
Insurance comparisons and how it helps users based on their current health conditions. We expanded our knowledge of SQL with CockroachDB, ML prediction models with MindsDB, and Flask web server with our custom-written API endpoint.

## What's next for PredictAPulseAI
This project is not limited to predicting heart attacks and reducing the cost of treatment for our users. Other leading causes of death, such as cancer, can be effectively predicted to do the same pipeline. Most importantly, our project would save lives.  
We plan to adapt our project to an intuitive mobile application to increase accessibility. We also plan to effectively market our idea and utilize sponsorships from insurance companies to gain funding.


## Detected evidence (automated analysis)

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

## Codebase structure (from repository index)

### Files (17 of 17)

```
.eslintrc.json
.gitignore
.vscode/settings.json
app/fileupload/page.tsx
app/globals.css
app/layout.tsx
app/page.tsx
app/questions/page.tsx
app/results/page.tsx
fastapi_backend.py
next.config.js
package.json
postcss.config.js
README.md
requirements.txt
tailwind.config.ts
tsconfig.json
```

### Dependencies

- package.json: @emotion/react@^11.11.1, @emotion/styled@^11.11.0, @fontsource/roboto@^5.0.8, @mui/icons-material@^5.14.15, @mui/material@^5.14.15, @types/node@20.8.3, @types/react@18.2.25, @types/react-dom@^18, autoprefixer@^10, axios@^1.7.2, cors@^2.8.5, encoding@^0.1.13, eslint@^8, eslint-config-next@13.5.4, next@^13.5.4, postcss@^8, react@^18, react-dom@^18, react-drag-drop-files@^2.3.10, tailwindcss@^3.3.5, tesseract.js@^5.1.0, typescript@5.2.2
- requirements.txt: charset-normalizer, fastapi, openai@==0.28, pandas, pillow, pydantic, python-dotenv, pytz, requests, six, sqlparse, tzdata, urllib3, uvicorn

### Recent commits (newest first)

- Merge pull request #25 from themeghamind/fix-readme-video
- Update README.md
- Merge pull request #24 from themeghamind/readme-update-1
- Update README.md
- Merge pull request #22 from themeghamind/clientside-storage
- implemented client-side localstorage of data and api calls
- implemented client-side localstorage of data and api calls
- Merge pull request #21 from themeghamind/BabyMochi-patch-1
- Update README.md
- Fixed apostrophe
- Made frontend cleaner
- Merge pull request #20 from themeghamind/drkchn-patch-2
- Update README.md
- Merge pull request #19 from themeghamind/drkchn-patch-1
- Update README.md
- Fixed up Results page [FINAL]
- Fixed up Results page
- Completed results page, bypassing CORS issue
- Merge pull request #17 from themeghamind/derek-megha-frontend
- Small edits

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

### requirements.txt

```
uvicorn
fastapi
openai==0.28
requests
urllib3
charset-normalizer
pytz
tzdata
sqlparse
six
python-dotenv
pandas
pillow
pydantic
```

### package.json

```
{
    "name": "nextjs",
    "version": "0.1.0",
    "private": true,
    "scripts": {
        "dev": "next dev",
        "build": "next build",
        "start": "next start",
        "lint": "next lint"
    },
    "dependencies": {
        "@emotion/react": "^11.11.1",
        "@emotion/styled": "^11.11.0",
        "@fontsource/roboto": "^5.0.8",
        "@mui/icons-material": "^5.14.15",
        "@mui/material": "^5.14.15",
        "axios": "^1.7.2",
        "cors": "^2.8.5",
        "encoding": "^0.1.13",
        "next": "^13.5.4",
        "react": "^18",
        "react-dom": "^18",
        "react-drag-drop-files": "^2.3.10",
        "tesseract.js": "^5.1.0"
    },
    "devDependencies": {
        "@types/node": "20.8.3",
        "@types/react": "18.2.25",
        "@types/react-dom": "^18",
        "autoprefixer": "^10",
        "eslint": "^8",
        "eslint-config-next": "13.5.4",
        "postcss": "^8",
        "tailwindcss": "^3.3.5",
        "typescript": "5.2.2"
    }
}

```

### app/layout.tsx

```typescript
import './globals.css'
import type { Metadata } from 'next'
import { Inter } from 'next/font/google'

const inter = Inter({ subsets: ['latin'] })

export const metadata: Metadata = {
  title: 'InsuraComp',
  description: 'Heart attack predictor and insurance policy guide powered by AI',
}

export default function RootLayout({
  children,
}: {
  children: React.ReactNode
}) {
  return (
    <html lang="en">
      <body className={inter.className}>{children}</body>
    </html>
  )
}

```

### app/page.tsx

```typescript
"use client"

import Image from 'next/image'
import Link from 'next/link'
import { useRouter } from "next/navigation"

export default function Home() {
  const router = useRouter()
  return (
    <div>
      <header style={{ paddingTop: '30px', paddingLeft: '80px' }}>
        <a
          className="pointer-events-none flex place-items-center gap-2 p-8 lg:pointer-events-auto lg:p-0"
          target="_blank"
          rel="noopener noreferrer"
        >
          <Image
            src="/pulse.png"
            alt="Pulse Logo"
            className="dark:invert"
            width={40}
            height={12}
            priority
          />
          <h1 className="text-3xl font-sans font-semibold text-red-700">InsuraComp</h1>
        </a>
      </header>
      <main className="flex min-h-screen flex-col items-center justify-center p-24 mt-8">
        <div className="relative flex place-items-center mt-[-8rem] before:absolute before:h-[600px] before:w-[680px] before:-translate-x-1/2 before:rounded-full before:bg-gradient-radial before:from-white before:to-transparent before:blur-2xl before:content-[''] after:absolute after:-z-20 after:w-[240px] after:translate-x-1/3 after:bg-gradient-conic after:from-sky-200 after:via-blue-200 after:blur-2xl after:content-[''] before:dark:bg-gradient-to-br before:dark:from-transparent before:dark:to-blue-700 before:dark:opacity-10 after:dark:from-sky-900 after:dark:via-[#0141ff] after:dark:opacity-40 z-[-1]">
          <h1 className="relative dark:drop-shadow-[0_0_0.3rem_#ffffff70] dark:invert text-7xl font-sans font-semibold text-center bg-gradient-to-r from-red-400 to-red-800 bg-clip-text text-transparent leading-tight">
             Choose a policy <br/>
             that&rsquo;s right for <i> you </i> 
          </h1>
        </div>
        <div className="mt-12 text-center">
          <h2 className="font-sans text-red-800 text-lg">
            We help you cut the crap from health insurance policies <br/>
            and choose something that suits your needs - not your employer&rsquo;s <br/>
            or your insurance company&rsquo;s, but your wallet&rsquo;s!
          </h2>
        </div>
        <div className="mt-16">
          <Link href="/questions">
            {/* <button onClick={() => {router.push("/questions")}} className="px-4 py-2 text-white bg-red-800 rounded hover:bg-red-600 focus:outline-none focus:ring"> */}
            <button className="px-4 py-2 text-white bg-red-800 rounded hover:bg-red-600 focus:outline-none focus:ring">
              Let&rsquo;s go
            </button>
          </Link>
        </div>
      </main>
    </div>
  )
}

```

### app/fileupload/page.tsx

```typescript
"use client";

import { useRouter } from 'next/navigation';
import React, { useState } from 'react';
import Tesseract from 'tesseract.js';
import Image from "next/image";

export default function Home() {
    const router = useRouter();

    const [isTranscribingA, setIsTranscribingA] = useState(false);
    const [isTranscribingB, setIsTranscribingB] = useState(false);
    const [planAFile, setPlanAFile] = useState<File | null>(null);
    const [planBFile, setPlanBFile] = useState<File | null>(null);
    const [planAText, setPlanAText] = useState('');
    const [planBText, setPlanBText] = useState('');

    const handlePlanADrop = (event: React.DragEvent<HTMLDivElement>) => {
        event.preventDefault();
        const file = event.dataTransfer.files[0];
        setPlanAFile(file);
        extractTextFromFile(file, setPlanAText, setIsTranscribingA);
    };

    const handlePlanBDrop = (event: React.DragEvent<HTMLDivElement>) => {
        event.preventDefault();
        const file = event.dataTransfer.files[0];
        setPlanBFile(file);
        extractTextFromFile(file, setPlanBText, setIsTranscribingB);
    };

    const extractTextFromFile = (
        file: File,
        setText: React.Dispatch<React.SetStateAction<string>>,
        setIsTranscribing: React.Dispatch<React.SetStateAction<boolean>>
    ) => {
        setIsTranscribing(true);
        const reader = new FileReader();
        reader.onload = (e) => {
            const target = e.target;
            if (target && target.result) {
                Tesseract.recognize(
                    target.result as string,
                    'eng',
                    {
                        logger: (m) => console.log(m),
                    }
                ).then(({ data: { text } }) => {
                    setText(text);
                    setIsTranscribing(false);
                }).catch((error) => {
                    setIsTranscribing(false);
                });
            } else {
                setIsTranscribing(false);
            }
        };
        reader.readAsDataURL(file);
    };

    const handleUpload = async () => {
        const plan_details = {
            plan_a_details: planAText,
            plan_b_details: planBText,
        };

        localStorage.setItem("plan_details", JSON.stringify(plan_details));

        router.push('/results');
    };

    return (
        <div>
            <header style={{paddingTop: '30px', paddingLeft: '80px'}}>
                <a
                    href="http://localhost:3000"
                    className="flex place-items-center gap-2 p-8 lg:pointer-events-auto lg:p-0"
                    rel="noopener noreferrer"
                >
                    <Image
                        src="/pulse.png"
                        alt="Pulse Logo"
                        className="dark:invert"
                        width={40}
                        height={12}
                        priority
                    />
                    <h1 className="text-3xl font-sans font-semibold text-red-700">InsuraComp</h1>
                </a>
            </header>
            <main className="flex min-h-screen flex-col items-center justify-center p-24 mt-8">
                <div className="flex flex-col items-center space-y-4">
                    <div className="flex space-x-4">
                        <div
                            className="drop-zone border-dashed border-2 border-gray-300 rounded-lg p-4"
                            onDrop={handlePlanADrop}
                            onDragOver={(e) => e.preventDefault()}
                        >
                            <h2 className="text-lg font-semibold mb-2">Drop Plan A File Here</h2>
                            {planAFile && <p>{planAFile.name}</p>}
                        </div>
                        <div
                            className="drop-zone border-dashed border-2 border-gray-300 rounded-lg p-4"
                            onDrop={handlePlanBDrop}
                            onDragOver={(e) => e.preventDefault()}
                        >
                            <h2 className="text-lg font-semibold mb-2">Drop Plan B File Here</h2>
                            {planBFile && <p>{planBFile.name}</p>}
                        </div>
                    </div>
                    <button
                        onClick={handleUpload}
                        className={`px-4 py-2 text-white bg-red-800 rounded hover:bg-red-600 focus:outline-none focus:ring ${isTranscribingA || isTranscribingB ? 'bg-gray-500 cursor-not-allowed' : 'bg-red-800 hover:bg-red-600'}`}
                        disabled={isTranscribingA || isTranscribingB}
                    >
                        Submit
                    </button>
                </div>
            </main>
        </div>
    );
}

```

### app/results/page.tsx

```typescript
"use client";

import { useEffect, useState } from 'react';
import Image from 'next/image';
import axios from 'axios';

export default function Home() {
    const [status, setStatus] = useState('');
    const [riskStatement, setRiskStatement] = useState('');
    const [planDetails, setPlanDetails] = useState({
        plan_a_details: '',
        plan_b_details: ''
    });
    const [checkboxValues, setCheckboxValues] = useState({
        gender: false,
        age: false,
        chol: false,
        bp: false,
    });
    const [isLoaded, setIsLoaded] = useState(false);

    useEffect(() => {
        const storedCheckboxValues = localStorage.getItem('checkbox_values');
        if (storedCheckboxValues) {
            try {
                setCheckboxValues(JSON.parse(storedCheckboxValues));
            } catch (error) {
                console.error('Error parsing checkboxValues', error);
            }
        }

        const storedPlanDetails = localStorage.getItem('plan_details');
        if (storedPlanDetails) {
            try {
                setPlanDetails(JSON.parse(storedPlanDetails));
            } catch (error) {
                console.error('Error parsing planDetails', error);
            }
        }

        setIsLoaded(true);
    }, []);

    useEffect(() => {
        if (!isLoaded) return;

        const fetchRiskData = async () => {
            const data = {
                age: checkboxValues.age ? 1 : 0,
                sex: checkboxValues.gender ? 1 : 0,
                cholesterol: checkboxValues.chol ? 1 : 0,
                blood_pressure: checkboxValues.bp ? 1 : 0,
            };

            try {
                const response = await axios.post('http://127.0.0.1:8000/checkrisk', null, {
                    params: data
                });

                if (response.status === 200) {
                    console.log(response);
                    if (response.data.risk_score === '1') {
                        setRiskStatement("You have a high probability of suffering a heart attack in the near future.");
                    } else if (response.data.risk_score === '0') {
                        setRiskStatement("You have a low probability of suffering a heart attack in the near future.");
                    }
                } else {
                    console.error('Failed to send answers');
                }
            } catch (error) {
                console.error('Failed to send answers: ', error);
            }
        };

        fetchRiskData();
    }, [checkboxValues, isLoaded]);

    useEffect(() => {
        const updateRiskAndFetchRecommendations = async () => {
            if (riskStatement) {
                const recommendation_data = {
                    risk: riskStatement,
                    plan_a_details: planDetails.plan_a_details,
                    plan_b_details: planDetails.plan_b_details
                };

                console.log("Retrieving recommendations with", recommendation_data);

                try {
                    const response = await axios.post('http://127.0.0.1:8000/retrieverecs', null, {
                        params: recommendation_data
                    });
                    if (response.status === 200) {
                        setStatus(response.data.status);
                    } else {
                        console.error('Failed to retrieve recommendations');
                    }
                } catch (error) {
                    console.error('Error fetching data:', error);
                }
            }
        };

        updateRiskAndFetchRecommendations();
    }, [riskStatement, planDetails]);

    return (
        <div>
            <header style={{ paddingTop: '30px', paddingLeft: '80px' }}>
                <a
                    href="http://localhost:3000"
                    className="flex place-items-center gap-2 p-8 lg:pointer-events-auto lg:p-0"
                    rel="noopener noreferrer"
                >
                    <Image
                        src="/pulse.png"
                        alt="Pulse Logo"
                        className="dark:invert"
                        width={40}
                        height={12}
                        priority
                    />
                    <h1 className="text-3xl font-sans font-semibold text-red-700">InsuraComp</h1>
                </a>
            </header>
            <main className="flex min-h-screen flex-col items-center justify-center p-24 mt-8">
                <div
                    className="relative flex place-items-center mt-[-8rem] before:absolute before:h-[600px] before:w-[680px] before:-translate-x-1/2 before:rounded-full before:bg-gradient-radial before:from-white before:to-transparent before:blur-2xl before:content-[''] after:absolute after:-z-20 after:w-[240px] after:translate-x-1/3 after:bg-gradient-conic after:from-sky-200 after:via-blue-200 after:blur-2xl after:content-[''] before:dark:bg-gradient-to-br before:dark:from-transparent before:dark:to-blue-700 before:dark:opacity-10 after:dark:from-sky-900 after:dark:via-[#0141ff] after:dark:opacity-40 z-[-1]">
                    <h1 className="relative dark:drop-shadow-[0_0_0.3rem_#ffffff70] dark:invert text-7xl font-sans font-semibold text-center bg-gradient-to-r from-red-400 to-red-800 bg-clip-text text-transparent leading-tight">
                        Your Results <br/>
                    </h1>
                </div>
                <div className="flex flex-col items-center justify-center w-full max-w-6xl">
                    {status ? (
                        <><h3
                            className="relative dark:drop-shadow-[0_0_0.3rem_#ffffff70] dark:invert text-4xl font-sans font-semibold text-center bg-gradient-to-r from-red-400 to-red-800 bg-clip-text text-transparent leading-tight mt-4">
                            {riskStatement}
                        </h3>
                            <div
                         
[truncated — 576 more characters]
```

### app/questions/page.tsx

```typescript
"use client"

import React, { useState, useEffect } from 'react';
import Image from 'next/image';
import ToggleButton from '@mui/material/ToggleButton';
import ToggleButtonGroup from '@mui/material/ToggleButtonGroup';
import { useRouter } from 'next/navigation';

export default function Questions() {
    const router = useRouter();
    const [checkboxValues, setCheckboxValues] = useState({
        gender: false,
        age: false,
        chol: false,
        bp: false,
    });

    const handleCheckboxChange = (event: React.MouseEvent<HTMLElement>, newValue: string[]) => {
        let updatedValues = {
            gender: false,
            age: false,
            chol: false,
            bp: false,
        };

        newValue.forEach(name => {
            updatedValues[name as keyof typeof updatedValues] = true;
        });

        setCheckboxValues(updatedValues);
        localStorage.setItem("checkbox_values", JSON.stringify(updatedValues));
    };

    const handleSubmit = async () => {
        router.push('/fileupload')
    };

    return (
        <div>
            <header style={{paddingTop: '30px', paddingLeft: '80px'}}>
                <a
                    href="http://localhost:3000"
                    className="flex place-items-center gap-2 p-8 lg:pointer-events-auto lg:p-0"
                    rel="noopener noreferrer"
                >
                    <Image
                        src="/pulse.png"
                        alt="Pulse Logo"
                        className="dark:invert"
                        width={40}
                        height={12}
                        priority
                    />
                    <h1 className="text-3xl font-sans font-semibold text-red-700">InsuraComp</h1>
                </a>
            </header>
            <main className="flex min-h-screen flex-col items-center justify-center p-24 mt-8">
                <div
                    className="relative flex place-items-center mt-[-8rem] before:absolute before:h-[600px] before:w-[680px] before:-translate-x-1/2 before:rounded-full before:bg-gradient-radial before:from-white before:to-transparent before:blur-2xl before:content-[''] after:absolute after:-z-20 after:w-[240px] after:translate-x-1/3 after:bg-gradient-conic after:from-sky-200 after:via-blue-200 after:blur-2xl after:content-[''] before:dark:bg-gradient-to-br before:dark:from-transparent before:dark:to-blue-700 before:dark:opacity-10 after:dark:from-sky-900 after:dark:via-[#0141ff] after:dark:opacity-40 z-[-1]">
                    <h1 className="relative dark:drop-shadow-[0_0_0.3rem_#ffffff70] dark:invert text-6xl font-sans font-semibold text-center bg-red-800 bg-clip-text text-transparent leading-tight">
                        Health Questionnaire
                    </h1>
                </div>
                <div>
                    <h2 className="relative dark:drop-shadow-[0_0_0.3rem_#ffffff70] dark:invert text-4xl font-sans text-center bg-red-800 bg-clip-text text-transparent leading-tight">
                        Select each question if it applies to you
                    </h2>
                </div>
                <div className="mt-10 w-3/6 flex flex-col items-center justify-center">
                    <ToggleButtonGroup
                        orientation="vertical"
                        value={Object.keys(checkboxValues).filter(key => {
                            return checkboxValues[key as keyof typeof checkboxValues];
                        })}
                        onChange={handleCheckboxChange}
                        aria-label="questionnaire"
                        sx={{
                            '& .MuiToggleButton-root': {
                                borderRadius: '0.5rem !important',
                                '&:first-of-type': {
                                    borderTop: 'none',
                                },
                            },
                            '& .MuiToggleButton-root:first-of-type': {
                                borderTopLeftRadius: '0.5rem !important',
                                borderTopRightRadius: '0.5rem !important',
                            },
                            '& .MuiToggleButton-root:last-child': {
                                borderBottomLeftRadius: '0.5rem !important',
                                borderBottomRightRadius: '0.5rem !important',
                            },

                        }}
                    >
                        <ToggleButton
                            value="gender"
                            name="gender"
                            aria-label="Are you male?"
                            sx={{
                                borderRadius: '0.5rem',
                                fontSize: '1.25rem',
                                textTransform: 'none',
                                margin: '1.8rem 0',
                                backgroundColor: 'white',
                                color: 'rgba(51, 51, 51, 1)',
                                '&.Mui-selected': {
                                    backgroundColor: 'rgba(204, 51, 0, 1)',
                                    color: 'rgba(255, 255, 255, 1)',
                                    '&:hover': {
                                        backgroundColor: 'rgba(183, 46, 0, 1)',
                                    }
                                },
                                '&:hover': {
                                    backgroundColor: 'rgba(255, 159, 159, 1)',
                                }
                            }}
                        >
                            Are you male?
                        </ToggleButton>
                        <ToggleButton
                            value="age"
                            name="age"
                            aria-label="Are you above 55 years old?"
                            sx={{
                              
[truncated — 4089 more characters]
```

### postcss.config.js

```javascript
module.exports = {
  plugins: {
    tailwindcss: {},
    autoprefixer: {},
  },
}

```

### next.config.js

```javascript
/** @type {import('next').NextConfig} */
const nextConfig = {}

module.exports = nextConfig

```

### tailwind.config.ts

```typescript
import type { Config } from 'tailwindcss'

const config: Config = {
  content: [
    './pages/**/*.{js,ts,jsx,tsx,mdx}',
    './components/**/*.{js,ts,jsx,tsx,mdx}',
    './app/**/*.{js,ts,jsx,tsx,mdx}',
  ],
  theme: {
    extend: {
      backgroundImage: {
        'gradient-radial': 'radial-gradient(var(--tw-gradient-stops))',
        'gradient-conic':
          'conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))',
      },
    },
  },
  plugins: [],
}
export default config

```

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