# Project export: Bay Area Safer Housing (B.A.S.H.)

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: B.A.S.H. is an online tool to assist low income individuals and families to make an informed decision as they seek affordable and safe housing in the Bay Area.
- Devpost: https://devpost.com/software/bay-area-safer-housing-b-a-s-h
- GitHub: https://github.com/matthewaol/b.a.s.h.
- Demo: https://www.canva.com/design/DAFynjUd4Os/Sg12rZBqkE432sMPwzxqEA/view
- Team: 3 GitHub contributor(s) — devalto (9 commits), jonnald (2 commits), matthew dacanay (1 commits)

## Devpost submission (written by the team)

### Inspiration

The inspiration initially stems from one member of our team, whose mother is currently searching for affordable housing options. We decided to pursue this project as it is widely applicable to many people we already know, and consider this tool to be of high importance for many locals of the Bay Area.

### What it does

B.A.S.H. searches for affordable housing options based on input from the user about their financial situation and provides a safety rating based on crime per city. Additionally, it offers information about public initiatives available to residents of the housing found in the search.

### How we built it

Our website's foundation was built on next.js using React and Tailwind CSS, implementing the Google Maps platform and their API. Using pandas and NumPy, we interact with our datasets of choice.

### Challenges we ran into

Our difficulties lay in our inexperience with a lot of the tools we need to use in order to fulfill our purpose. Most of it resulted in technical difficulties implementing our AI, which we ultimately felt shaky on and unsure of leaving in our project for current submission.

### Accomplishments we're proud of

Conceptually, we believe that our project is meaningful and sound in its usability and utility. This concept is close to home for us, as B.A.S.H. would be a tool we would all use in our own lives.

### What we learned

We've learned most importantly how to better approach a project such as B.A.S.H., as we pivoted our concept after finding our initial idea to be overly ambitious. Additionally, we've gotten much more familiar with our understanding of machine learning, and are continuing to learn about its implementation currently and beyond CalHacks.

### What's next

for B.A.S.H. We are serious in our project and are intent on continuing our progress. Our motivation behind B.A.S.H. leaves us confident and passionate about polishing this tool and we will be leaving CalHacks inspired to make the most out of our experience over this weekend. We primarily plan to fully polish our AI implementation, which we struggled to apply during the CalHacks time period. Aside from that, we would like to host this project and make it available publicly once it's ready for public use.

## README (from the GitHub repository)

## 🛟 BASH (Bay Area Safer Housing)
A web app that helps homebuyers understand the safety of neighborhood communities throughout the Bay Area.

🔗 https://devpost.com/software/bay-area-safer-housing-b-a-s-h

### 💫) Inspiration
The inspiration initially stems from one member of our team, whose mother is currently searching for affordable housing options. We decided to pursue this project as it is widely applicable to many people we already know, and consider this tool to be of high importance for many locals of the Bay Area.

### ❓) What it does
B.A.S.H. searches for affordable housing options based on input from the user about their financial situation and provides a safety rating based on crime per city. Additionally, it offers information about public initiatives available to residents of the housing found in the search.

### 🛠️) How we built it
Our website's foundation was built on next.js using React and Tailwind CSS, implementing the Google Maps platform and their API. Using pandas and NumPy, we interact with our datasets of choice.

### 💢) Challenges we ran into
Our difficulties lay in our inexperience with a lot of the tools we need to use in order to fulfill our purpose. Most of it resulted in technical difficulties implementing our AI, which we ultimately felt shaky on and unsure of leaving in our project for current submission.

### 🏆) Accomplishments that we're proud of
Conceptually, we believe that our project is meaningful and sound in its usability and utility. This concept is close to home for us.

### 🧠) What we learned
We've learned most importantly how to better approach a project such as B.A.S.H., as we pivoted our concept after finding our initial idea to be overly ambitious. Additionally, we've gotten much more familiar with our understanding of machine learning, and are continuing to learn about its implementation currently and beyond CalHacks.

### ⌛) What's next for B.A.S.H.
We are serious in our project and are intent on continuing our progress. Our motivation behind B.A.S.H. leaves us confident and passionate about polishing this tool and we will be leaving CalHacks inspired to make the most out of our experience over this weekend. Next steps for complexity include implementing a machine learning model to label and characterize neighborhoods and leveraging our existing implementation of CockroachDB to analyze more areas around the world; We primarily plan to fully polish our AI implementation, which we struggled to apply during the CalHacks time period. Aside from that, we would like to host this project and make it available publicly once it's ready for public use.

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).


## Detected evidence (automated analysis)

Indexed codebase: 7 recognized source files, 6 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
- Node.js (technology) — claimed on Devpost, not found in the code
- Python (language) — claimed on Devpost, not found in the code

## Codebase structure (from repository index)

### Files (13 of 13)

```
.eslintrc.json
.gitignore
jsconfig.json
next.config.js
package.json
postcss.config.js
README.md
sf_neighborhood_murder.ipynb
srcc/app/file
srcc/app/globals.css
srcc/app/layout.js
srcc/app/page.js
tailwind.config.js
```

### Dependencies

- package.json: autoprefixer@^10, eslint@^8, eslint-config-next@14.0.0, next@14.0.0, postcss@^8, react@^18, react-dom@^18, tailwindcss@^3

### Recent commits (newest first)

- Update README.md
- Update README.md
- Rename Lecture (10_26) Demo Hub - After.ipynb to sf_neighborhood_murder.ipynb
- Murder count in SF neighborhoods
- Update README.md
- Update README.md
- Add files via upload
- Create file
- Delete src directory
- Create yes
- Update README.md
- init commit 👋
- Update README.md
- Initial commit

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

### package.json

```
{
  "name": "calhacks",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start",
    "lint": "next lint"
  },
  "dependencies": {
    "react": "^18",
    "react-dom": "^18",
    "next": "14.0.0"
  },
  "devDependencies": {
    "autoprefixer": "^10",
    "postcss": "^8",
    "tailwindcss": "^3",
    "eslint": "^8",
    "eslint-config-next": "14.0.0"
  }
}

```

### srcc/app/layout.js

```javascript
import { Inter } from 'next/font/google'
import './globals.css'

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

export const metadata = {
  title: 'Joseon CalHacks 2023',
  description: 'A demo full-stack app that image recognizes facial skin care patterns.',
}

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

```

### srcc/app/page.js

```javascript
import Image from 'next/image'

async function onFileUpload(formData) {
  "use server"
  const file = formData.get("file")
  console.log(file.name.endsWith('.png'))
  if (!file.name.endsWith('.png')) {
    console.log("File is not a png!")
    return "File is not a png!"
  }
  console.log("File name:", file.name, "size:", file.size)
  return ("File name:", file.name, "size:", file.size)
}

export default function Main() {
  return (
    <main className="flex min-h-screen flex-col items-center justify-between p-24">
      <div className="z-10 max-w-5xl w-full items-center justify-between font-mono text-sm lg:flex">
        
        <p className="fixed left-0 top-0 flex w-full justify-center border-b border-gray-300 bg-gradient-to-b from-zinc-200 pb-6 pt-8 backdrop-blur-2xl dark:border-neutral-800 dark:bg-zinc-800/30 dark:from-inherit lg:static lg:w-auto  lg:rounded-xl lg:border lg:bg-gray-200 lg:p-4 lg:dark:bg-zinc-800/30">
          CalHacks 2023 Image Pattern Recognition Demo
          {/* <code className="font-mono font-bold">src/app/page.js</code> */}
        </p>

        <div className="fixed bottom-0 left-0 flex h-48 w-full items-end justify-center bg-gradient-to-t from-white via-white dark:border-neutral-800 dark:hg lg:static lg:h-auto lg:w-auto lg:bg-none">
          <a
            className="pointer-events-none flex place-items-center gap-2 p-8 lg:pointer-events-auto lg:p-0"
            href="https://vercel.com?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
            target="_blank"
            rel="noopener noreferrer"
          >
            Hacked by {'The Beauties of Joseon'}
          </a>
        </div>
      </div>


      <form action={onFileUpload}>
        <label htmlFor="file"></label>
        <input type="file" name="file" id="file"/>
        <button type="submit" id="upload">Upload Image</button>
0     </form>
    </main>
  )
}
```

### postcss.config.js

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

```

### next.config.js

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

module.exports = nextConfig

```

### tailwind.config.js

```javascript
/** @type {import('tailwindcss').Config} */
module.exports = {
  content: [
    './src/pages/**/*.{js,ts,jsx,tsx,mdx}',
    './src/components/**/*.{js,ts,jsx,tsx,mdx}',
    './src/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: [],
}

```

### srcc/app/globals.css

```css
@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
  --foreground-rgb: 0, 0, 0;
  --background-start-rgb: 214, 219, 220;
  --background-end-rgb: 255, 255, 255;
}

@media (prefers-color-scheme: dark) {
  :root {
    --foreground-rgb: 255, 255, 255;
    --background-start-rgb: 0, 0, 0;
    --background-end-rgb: 0, 0, 0;
  }
}

body {
  color: rgb(var(--foreground-rgb));
  background: linear-gradient(
      to bottom,
      transparent,
      rgb(var(--background-end-rgb))
    )
    rgb(var(--background-start-rgb));
}

```