# Project export: Athena

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 11.0
- Tagline: A better strategy for careers today
- Devpost: https://devpost.com/software/athena-m4fl83
- GitHub: https://github.com/sreyaraya/aceview
- Video: https://www.youtube.com/embed/NNlWU-mIURc?enablejsapi=1&hl=en_US&rel=0&start=&version=3&wmode=transparent
- Team: 3 GitHub contributor(s) — Aarnav Sanghvi (15 commits), sreyaraya (10 commits), arnavmishra75 (7 commits)

## Devpost submission (written by the team)

No Devpost description available.

## README (from the GitHub repository)

# Athena

## Overview
Athena is an AI-powered real-time interview assistant designed to provide students with the tools they need to excel in job interviews. It was inspired by the challenges faced by many students, especially those without access to professional networks or resources. The platform offers comprehensive support, including mock interviews and personalized feedback, helping users build confidence in their job search. Athena also analyzes sentiments and tone of voice during the interview to assess and improve confidence, ensuring a well-rounded preparation experience.

## Getting Started

### Prerequisites
To run Athena, you will need API keys for:
- [Hume.ai](https://hume.ai)
- [Firebase](https://firebase.google.com)
- Google OAuth

### Setup Instructions

1. Create Hume.ai Athena configuration: ```ec2c386a-9e3a-43fe-94b6-f3265e30cffb```

2. Create a `.env` file in the root directory and add your Hume.ai, Firebase, and Google Auth API keys.

3. Install development server:
   
```npm install```

5. Start development server:

```npm run dev```


## Detected evidence (automated analysis)

Indexed codebase: 62 recognized source files, 163 KB.
- CSS (language) — detected in the code
- Firebase (technology) — detected in the code
- JavaScript (language) — detected in the code
- LangChain (technology) — detected in the code
- Next.js (technology) — detected in the code
- OpenAI (technology) — detected in the code
- React (technology) — detected in the code
- SQL (language) — detected in the code
- Supabase (technology) — detected in the code
- Tailwind CSS (technology) — detected in the code
- TypeScript (language) — detected in the code

## Codebase structure (from repository index)

### Files (81 of 81)

```
.eslintrc.json
.firebaserc
.gitignore
.vscode/settings.json
app/addUser.js
app/auth/page.tsx
app/create/page.tsx
app/dashboard/page.tsx
app/firebase.js
app/firebaseAdmin.js
app/globals.css
app/head.tsx
app/interview/page.tsx
app/layout.tsx
app/overview/page.tsx
app/page.tsx
app/performance/page.tsx
app/resume/page.css
app/resume/page.tsx
app/test/page.tsx
components/Chat.tsx
components/Controls.tsx
components/Expressions.tsx
components/Input.tsx
components/Label.tsx
components/LineChart.tsx
components/Messages.tsx
components/MicFFT.tsx
components/Navbar.tsx
components/Popover.tsx
components/ProgressBar.tsx
components/RadioCard.tsx
components/Result.tsx
components/Select.tsx
components/StartCall.tsx
components/ui/button.tsx
components/ui/toggle.tsx
config.js
extra
firebase-debug.log
firebase.json
firestore-debug.log
firestore.indexes.json
firestore.rules
functions/.eslintrc.js
functions/.gitignore
functions/getQuestion.js
functions/index.js
functions/main.js
functions/package.json
index.js
lib/customProvider.ts
lib/supabase.ts
next.config.js
package.json
pages/api/auth/[...nextauth].js
pages/api/auth/google/test.js
pages/api/database.ts
pages/api/generate.ts
pages/api/get-token.ts
pages/api/hello.ts
pages/api/messages.ts
postcss.config.js
prisma/migrations/20230218222806_siteify/migration.sql
prisma/migrations/migration_lock.toml
prisma/schema.prisma
public/Cormorant_Garamond/OFL.txt
README copy.md
README.md
scrape.tsx
server.js
services/eleganceClient.ts
services/eleganceServerClient.ts
storage.rules
tailwind.config.js
tsconfig.json
ui-debug.log
utils/expressionColors.ts
utils/expressionLabels.ts
utils/index.ts
utils/OpenAIStream.ts
```

### Dependencies

- functions/package.json: eslint@^8.15.0, eslint-config-google@^0.14.0, firebase-admin@^12.6.0, firebase-functions@^6.0.1, firebase-functions-test@^3.1.0
- package.json: @djthoms/pretty-checkbox@^3.1.0, @emotion/react@^11.13.3, @emotion/styled@^11.13.0, @headlessui/react@^2.1.10, @headlessui/tailwindcss@^0.2.1, @humeai/voice-react@^0.1.16, @internationalized/date@^3.5.6, @mui/material@^6.1.4, @mui/x-charts@^7.21.0, @next-auth/prisma-adapter@^1.0.5, @next-auth/supabase-adapter@^0.2.1, @next/font@^13.1.6, @octokit/core@^4.2.0, @prisma/client@^4.10.1, @radix-ui/react-popover@^1.1.2, @radix-ui/react-slot@^1.1.0, @radix-ui/react-toggle@^1.1.0, @react-aria/datepicker@^3.11.4, @remixicon/react@^4.3.0, @supabase/auth-helpers-nextjs@^0.5.4, @supabase/supabase-js@^2.8.0, @swc/helpers@^0.5.13, @tailwindcss/forms@^0.5.9, @tremor/react@^3.18.3, @types/node@18.14.0, @types/react@18.0.28, @types/react-dom@18.0.11, autoprefixer@^10.4.13, bufferutil@^4.0.8, class-variance-authority@^0.7.0, cohere-ai@^5.0.2, encoding@^0.1.13, eslint@8.34.0, eslint-config-next@^13.5.7, eventsource-parser@^0.1.0, file-system@^2.2.2, firebase@^10.14.1, formik@^2.2.9, framer-motion@^11.11.9, fs@^0.0.1-security, langchain@^0.0.7, little-state-machine@^4.8.0, lucide-react@^0.453.0, mui@^0.0.1, next@^13.5.7, next-auth@^4.24.8, octokit@^2.0.14, openai@^3.1.0, postcss@^8.4.21, pretty-checkbox@^3.0.3, pretty-checkbox-react@^3.2.0, prisma@^4.10.1, prop-types@^15.8.1, react@^18.3.1, react-dom@^18.3.1, react-dropzone@^14.2.10, react-hook-form@^7.43.1, react-icons@^4.7.1, react-is@^18.3.1, react-loader-spinner@^5.3.4, remeda@^2.15.2, tailwind-variants@^0.2.1, tailwindcss@^3.4.14, typescript@4.9.5, yup@^1.0.0

### Recent commits (newest first)

- Update README.md
- Update README.md
- updated readme
- DONE
- FINAL
- stuff ending
- Merge branch 'main' of https://github.com/sreyaraya/aceview
- made speech part look pretty
- page name updates for clarity
- auth fix
- Merge branch 'main' of https://github.com/sreyaraya/aceview
- resume
- got data ish working
- dash working, needs formatting + real data
- Revert "more fb"
- more fb
- Merge branch 'main' of https://github.com/sreyaraya/aceview
- firebase setup
- dash again kinda?
- help

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

### README copy.md

```markdown
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).

## Getting Started

First, run the development server:

```bash
npm run dev
# or
yarn dev
# or
pnpm dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.

[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`.

The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.

This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.

## Learn More

To learn more about Next.js, take a look at the following resources:

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!

## Deploy on Vercel

The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.

Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.

```

### package.json

```
{
  "name": "siteify",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start",
    "lint": "next lint"
  },
  "dependencies": {
    "@djthoms/pretty-checkbox": "^3.1.0",
    "@emotion/react": "^11.13.3",
    "@emotion/styled": "^11.13.0",
    "@headlessui/react": "^2.1.10",
    "@headlessui/tailwindcss": "^0.2.1",
    "@humeai/voice-react": "^0.1.16",
    "@internationalized/date": "^3.5.6",
    "@mui/material": "^6.1.4",
    "@mui/x-charts": "^7.21.0",
    "@next-auth/prisma-adapter": "^1.0.5",
    "@next-auth/supabase-adapter": "^0.2.1",
    "@next/font": "^13.1.6",
    "@octokit/core": "^4.2.0",
    "@prisma/client": "^4.10.1",
    "@radix-ui/react-popover": "^1.1.2",
    "@radix-ui/react-slot": "^1.1.0",
    "@radix-ui/react-toggle": "^1.1.0",
    "@react-aria/datepicker": "^3.11.4",
    "@remixicon/react": "^4.3.0",
    "@supabase/auth-helpers-nextjs": "^0.5.4",
    "@supabase/supabase-js": "^2.8.0",
    "@swc/helpers": "^0.5.13",
    "@tremor/react": "^3.18.3",
    "@types/node": "18.14.0",
    "@types/react": "18.0.28",
    "@types/react-dom": "18.0.11",
    "bufferutil": "^4.0.8",
    "class-variance-authority": "^0.7.0",
    "cohere-ai": "^5.0.2",
    "encoding": "^0.1.13",
    "eslint": "8.34.0",
    "eslint-config-next": "^13.5.7",
    "eventsource-parser": "^0.1.0",
    "file-system": "^2.2.2",
    "firebase": "^10.14.1",
    "formik": "^2.2.9",
    "framer-motion": "^11.11.9",
    "fs": "^0.0.1-security",
    "langchain": "^0.0.7",
    "little-state-machine": "^4.8.0",
    "lucide-react": "^0.453.0",
    "mui": "^0.0.1",
    "next": "^13.5.7",
    "next-auth": "^4.24.8",
    "octokit": "^2.0.14",
    "openai": "^3.1.0",
    "pretty-checkbox": "^3.0.3",
    "pretty-checkbox-react": "^3.2.0",
    "prop-types": "^15.8.1",
    "react": "^18.3.1",
    "react-dom": "^18.3.1",
    "react-dropzone": "^14.2.10",
    "react-hook-form": "^7.43.1",
    "react-icons": "^4.7.1",
    "react-is": "^18.3.1",
    "react-loader-spinner": "^5.3.4",
    "remeda": "^2.15.2",
    "tailwind-variants": "^0.2.1",
    "typescript": "4.9.5",
    "yup": "^1.0.0"
  },
  "devDependencies": {
    "@tailwindcss/forms": "^0.5.9",
    "autoprefixer": "^10.4.13",
    "postcss": "^8.4.21",
    "prisma": "^4.10.1",
    "tailwindcss": "^3.4.14"
  }
}

```

### functions/package.json

```
{
  "name": "functions",
  "description": "Cloud Functions for Firebase",
  "scripts": {
    "lint": "eslint .",
    "serve": "firebase emulators:start --only functions",
    "shell": "firebase functions:shell",
    "start": "npm run shell",
    "deploy": "firebase deploy --only functions",
    "logs": "firebase functions:log"
  },
  "engines": {
    "node": "18"
  },
  "main": "index.js",
  "dependencies": {
    "firebase-admin": "^12.6.0",
    "firebase-functions": "^6.0.1"
  },
  "devDependencies": {
    "eslint": "^8.15.0",
    "eslint-config-google": "^0.14.0",
    "firebase-functions-test": "^3.1.0"
  },
  "private": true,
  "type": "module"
}

```

### server.js

```javascript
import express from "express";

var app = express();

app.set('views', __dirname + '/views');
app.set('view engine', 'ejs');

app.get('/', function(req, res) {
    //res.send("Hello world");
    res.render("index");
})

app.listen(8000, function() {
    console.log("listening on 8000")
})
```

### index.js

```javascript
import mysql from 'mysql2/promise';

//Modify the connection details to match the details specified while
//deploying the SingleStore workspace:
const HOST = 'svc-11e1642f-7df2-4df7-a5fd-314f70e6e071-dml.aws-oregon-3.svc.singlestore.com';
const USER = 'admin';
const PASSWORD = '5clJh7dsITRiDi6scX30j9E80EZqrhsN';
const DATABASE = 'UserDB';

// main is run at the end
async function main() {
    let singleStoreConnection;
    let id;
    try {
        singleStoreConnection = await mysql.createConnection({
        host: HOST,
        user: USER,
        password: PASSWORD,
        database: DATABASE
        }).then(
        console.log("You have successfully connected to SingleStore."),
        id = await create({singleStoreConnection, content: 'New message has been logged.'}),
        console.log(`Inserted row id is: ${id}`)
        )
        

  
    } catch (err) { 
        console.error('ERROR', err);
        process.exit(1);
    } finally {
        if (singleStoreConnection) {
            await singleStoreConnection.end();
        }
    }
}

async function create({conn, content}) {
    const [results] = await conn.execute(
        'INSERT INTO messages (content) VALUES (?)',
        [content]
    );
 	return results.insertId;
};

;

// async function readN({conn, id}) {
//     const [rows] = await conn.execute(
//         'SELECT id, content, createdate FROM messages WHERE id = ?',
//          [id]
//     );
//     return rows[0];
// };

// const msg = await readN({conn, id:1});
//     console.log('Read one row:');
//     if (msg == null) {
//         console.log('No message entry with this ID.');
//     } else {
//         console.log(`${msg.id}, ${msg.content}, ${msg.createdate}`);
// }

main();
```

### functions/main.js

```javascript
//  cors stuff goes in here?

```

### utils/index.ts

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

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

```

### app/layout.tsx

```typescript
'use client'

//import NavBar from '@/components/Navbar'
import './globals.css'
import { SessionProvider } from "next-auth/react"

export default function RootLayout({
  //@ts-expect-error
  children
}) {




  return (

    <html lang="en" className='bg-purple-900'>


      
      <head>
      <link rel="icon" href="/images/favicon.svg" type="image/svg+xml"/>
      
      {// eslint-disable-next-line @next/next/no-page-custom-font
}
      <link href="https://fonts.googleapis.com/css2?family=DM+Sans:wght@500&display=swap" rel="stylesheet"/>
        </head>
       
        
      <body>

      <SessionProvider >
      {/* <NavBar/> */}
      {children}
      </SessionProvider>
      
      
      
      </body>
    </html>
  )
}

```

### functions/index.js

```javascript
/**
 * Import function triggers from their respective submodules:
 *
 * const {onCall} = require("firebase-functions/v2/https");
 * const {onDocumentWritten} = require("firebase-functions/v2/firestore");
 *
 * See a full list of supported triggers at https://firebase.google.com/docs/functions
 */

const {onRequest} = require("firebase-functions/v2/https");
const logger = require("firebase-functions/logger");
import {getQuestion as _getQuestion } from "./getQuestion.js";
export const getQuestion = _getQuestion;

// Create and deploy your first functions
// https://firebase.google.com/docs/functions/get-started

// exports.helloWorld = onRequest((request, response) => {
//   logger.info("Hello logs!", {structuredData: true});
//   response.send("Hello from Firebase!");
// });

```

### app/page.tsx

```typescript
'use client'
import Link from "next/link";
import { useSession, signIn, signOut } from "next-auth/react"
import Image from "next/image";
import soundthingy from "../components/nounsound.svg"
import waves from "../components/waveswhite.png"
import speak from "../components/speak.svg"
import arrow from "../components/arrow.svg"
import bubble from "../components/bubble.svg"
import analytics from "../components/analytics.svg"


export default function Home() {
  const { data: session } = useSession()

  return (
    <div className="text-white font-f ">
      <div className="flex flex-col items-center gap-10 text-center">
          <div className="mt-12 text-8xl flex gap-6">
            <div>Athena</div>
            <div><Image src={soundthingy} alt={"just get better wifi dawg"} >

</Image></div>
          </div>
          
          <div className="scale-[1.3] opacity-80 -mt-14">
      <Image
        src={waves}
        alt="Waves"
        
      />
    </div>

          <div className="-mt-2 text-4xl">
            <div className="flex gap-4 flex-col min-w-max">

              <div className=" min-h-[50px] flex justify-start">
                    <span className=" animate-first text-transparent bg-clip-text bg-gradient-to-r from-gray-50 to-gray-100 text-5xl">Real-Time</span>
                    <span className="animate-second text-transparent bg-clip-text bg-gradient-to-r from-gray-50 to-gray-100 text-5xl"> Career-Tailored</span>
                    <span className="animate-third text-transparent bg-clip-text bg-gradient-to-r from-gray-50 to-gray-100 text-5xl">Uniquely-Detailed</span>

              </div>

              <div className="self-end -mt-4">
                AI Interview Assistant with Computed Prep Feedback
                </div>


            </div>
         
          

          <div className="mt-12 flex justify-start gap-10 text-lg ">
            <button onClick={() => signIn()} className="p-2 hover:bg-purple-400 text-white  rounded-sm duration-200 border border-white hover:scale-110 active:scale-90">
              <Link href={'/auth'}>
              Let's get started!
              </Link>
              
            </button>

           
          </div>
          
          </div>

          <div className="mb-52 text-2xl justify-items-stretch  flex gap-8 justify-center w-full pl-20 pr-20 mt-10  h-64">
          
            <div className="flex-1 flex-col flex items-center">
              <div className="">
              <Image width={"200"} src={speak} style={{ transform: 'scaleX(-1)' }}>

                </Image>
                </div>
                <div>
                  Tell Athena about your upcoming interview
                </div>
            </div>

            <Image className=" flex-1 -ml-8 -mr-8" width={"200"} src={arrow} style={{ transform: 'scale(0.5)' }}>

            </Image>

            <div className="flex-1 flex-col flex items-center">
              <div className="">
              <Image width={"200"} src={bubble} style={{ transform: 'scaleX(-1) scale(0.7)' }}>

                </Image>
                </div>
                <div>
                Athena will give you questions and listen critically to analyze your answers

                </div>
            </div>

            <Image className=" flex-1 -ml-8 -mr-8" width={"200"} src={arrow} style={{ transform: 'scale(0.5)' }}>

            </Image>
            <div className="flex-1 flex-col flex items-center">
              <div className="">
              <Image width={"200"} src={analytics} style={{ transform: 'scaleX(-1) scale(0.75)' }}>

                </Image>
                </div>
                <div>
                Get post-interview analysis with our unique FeedbackScore dashboard

                </div>
            </div>




          </div>
          

          
      </div>
    </div>
  )
}

```

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