# Project export: Park-Eazy

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: Park-Eazy is a user-friendly platform that allows users to rent out their unused parking spaces, providing affordable options for students and commuters while creating a income stream for lenders.
- Devpost: https://devpost.com/software/park-eazy
- GitHub: https://github.com/MrunalKakirwar/CalHacksBerkley
- Video: https://www.youtube.com/embed/5_mzMl2fd3A?enablejsapi=1&hl=en_US&rel=0&start=&version=3&wmode=transparent
- Team: 1 GitHub contributor(s) — Mrunal Anant Kakirwar (1 commits)

## Devpost submission (written by the team)

### Inspiration

The inspiration for Park-Eazy came from the frustration of finding parking in busy urban areas, especially among students and daily commuters. With parking prices soaring and availability dwindling, we sought to create a platform that not only connects drivers with available parking spots but also helps space owners monetize their unused spaces.

### What it does

Park-Eazy is an innovative platform designed to streamline the parking rental process. Users can easily browse available parking spaces in their vicinity, making it easier for them to secure affordable parking. The platform empowers space owners to list their unused spots, allowing them to earn extra income while helping drivers find convenient parking solutions.

### How we built it

We built the frontend of Park-Eazy using React, ensuring a smooth and engaging user experience. The backend is powered by Python, which handles the application logic and connects to the database. We utilized Fetch.ai to create intelligent agents that fetch and display available parking spots dynamically. Additionally, we integrated a VAPI voice bot for customer care, allowing users to get assistance through voice commands.

### Challenges we ran into

One of the primary challenges was ensuring seamless communication between the frontend and backend, particularly in managing API calls and responses. Integrating the AI functionalities from Fetch.ai required meticulous planning to ensure efficient performance. Moreover, building an intuitive and responsive user interface was crucial to enhance user engagement. Handling customer queries effectively through the VAPI voice bot added another layer of complexity.

### Accomplishments we're proud of

We are proud to have developed a functional prototype of Park-Eazy that successfully connects users with available parking spaces. The platform has undergone extensive testing and has received positive feedback, confirming its usability and effectiveness. Our integration of voice bot technology has also set us apart, making customer support more accessible.

### What we learned

Through the development of Park-Eazy, we gained a deeper understanding of full-stack application development, from designing user interfaces to managing backend processes. We learned how to integrate AI technologies effectively and the importance of user-centered design. Gathering and incorporating user feedback played a vital role in refining our platform and enhancing its features.

### What's next

Looking ahead, we plan to introduce advanced AI capabilities to provide personalized parking recommendations based on user behavior and preferences. We aim to expand our service to additional cities, addressing a broader audience. Additionally, we will work on improving the voice bot's capabilities, enhancing its interactivity and customer support functions. We are committed to creating a comprehensive solution that meets the evolving needs of urban parking.

## README (from the GitHub repository)

# CalHacksBerkley

## Detected evidence (automated analysis)

Indexed codebase: 39 recognized source files, 66 KB.
- CSS (language) — detected in the code
- Firebase (technology) — detected in the code
- HTML (language) — detected in the code
- JavaScript (language) — detected in the code
- Python (language) — detected in the code
- React (technology) — detected in the code
- MongoDB (technology) — claimed on Devpost, not found in the code

## Codebase structure (from repository index)

### Files (43 of 43)

```
.DS_Store
.gitignore
park_eazy_flask_backend/__init__.py
park_eazy_flask_backend/app.py
park_eazy_flask_backend/controllers/consumer_controller.py
park_eazy_flask_backend/controllers/lenders.py
park_eazy_flask_backend/models/lenders.py
park_eazy_flask_backend/routes/__init__.py
park_eazy_flask_backend/routes/consumer_routes.py
park_eazy_flask_backend/routes/lender_routes.py
park_eazy_flask_backend/uagents/CentralAgent.py
park_eazy_flask_backend/uagents/ParkingAgent_Location2.py
park_eazy_flask_backend/uagents/ParkingAgent.py
park-eazy-frontend/package.json
park-eazy-frontend/public/index.html
park-eazy-frontend/src/App.js
park-eazy-frontend/src/appStore.js
park-eazy-frontend/src/assets/images
park-eazy-frontend/src/components/Checkout/Checkout.css
park-eazy-frontend/src/components/Checkout/Checkout.js
park-eazy-frontend/src/components/common/Footer.js
park-eazy-frontend/src/components/common/Navbar.js
park-eazy-frontend/src/components/HomePage/HomePage.css
park-eazy-frontend/src/components/HomePage/HomePage.js
park-eazy-frontend/src/components/LenderParkingCard/LenderParkingCard.js
park-eazy-frontend/src/components/LenderParkingCard/LenderParkingSearchForm.js
park-eazy-frontend/src/components/LenderParkingCard/LenderParkingSpotCard.js
park-eazy-frontend/src/components/ParkingCard/ParkingCard.js
park-eazy-frontend/src/components/ParkingCard/ParkingSearchForm.js
park-eazy-frontend/src/components/ParkingCard/ParkingSpotCard.js
park-eazy-frontend/src/components/payment/Payment.js
park-eazy-frontend/src/firebase.js
park-eazy-frontend/src/index.css
park-eazy-frontend/src/index.js
park-eazy-frontend/src/pages/Consumer.js
park-eazy-frontend/src/pages/Home.js
park-eazy-frontend/src/pages/Lender.js
park-eazy-frontend/src/pages/Login.js
park-eazy-frontend/src/pages/MyBookings.js
park-eazy-frontend/src/userSlice.js
park-eazy-frontend/src/validate.js
park-eazy-frontend/tailwind.config.js
README.md
```

### Dependencies

- park-eazy-frontend/package.json: @fortawesome/fontawesome-svg-core@^6.6.0, @fortawesome/free-solid-svg-icons@^6.6.0, @fortawesome/react-fontawesome@^0.2.2, @reduxjs/toolkit@^2.2.7, axios@^1.7.7, firebase@^10.14.0, react@^18.3.1, react-dom@^18.3.1, react-redux@^9.1.2, react-router-dom@^6.26.2, react-scripts@5.0.1, styled-components@^6.1.13, tailwind@^4.0.0, web-vitals@^2.1.4

### Recent commits (newest first)

- consumer part pushed
- resolving CORS
- ignoring node modules
- Airbnb of Parking Project
- Initial commit

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

### park-eazy-frontend/package.json

```
{
  "name": "park-eazy-frontend",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "@fortawesome/fontawesome-svg-core": "^6.6.0",
    "@fortawesome/free-solid-svg-icons": "^6.6.0",
    "@fortawesome/react-fontawesome": "^0.2.2",
    "axios": "^1.7.7",
    "firebase": "^10.14.0",
    "react": "^18.3.1",
    "react-dom": "^18.3.1",
    "react-redux": "^9.1.2",
    "react-router-dom": "^6.26.2",
    "react-scripts": "5.0.1",
    "styled-components": "^6.1.13",
    "web-vitals": "^2.1.4"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build"
  },
  "eslintConfig": {
    "extends": [
      "react-app",
      "react-app/jest"
    ]
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  },
  "devDependencies": {
    "@reduxjs/toolkit": "^2.2.7",
    "tailwind": "^4.0.0"
  }
}

```

### park_eazy_flask_backend/app.py

```python
from park_eazy_flask_backend import create_app

app = create_app()

if __name__ == '__main__':
    app.run(host='0.0.0.0', port=5000)
```

### park-eazy-frontend/src/index.js

```javascript
import React from "react";
import ReactDOM from "react-dom/client";
import App from "./App";
import { BrowserRouter } from "react-router-dom";
import { Provider } from "react-redux";
import appStore from "./appStore";

import "./index.css";

const root = ReactDOM.createRoot(document.getElementById("root"));
root.render(
  <Provider store={appStore}>
    <BrowserRouter>
      <App />
    </BrowserRouter>
  </Provider>
);

```

### park-eazy-frontend/src/App.js

```javascript
import React from "react";
import Login from "./pages/Login";
import Consumer from "./pages/Consumer";
import { Route, Routes } from "react-router-dom";
import Navbar from "./components/common/Navbar";
import Footer from "./components/common/Footer";
import Checkout from "./components/Checkout/Checkout";
import Lender from "./pages/Lender";
import HomePage from "./pages/Home";
import MyBookings from "./pages/MyBookings";


function App() {
  return (
    <>
      <Navbar />
      <div
        style={{
          minHeight: "100vh",
          display: "flex",
          flexDirection: "column",
        }}
      >
        <div
          style={{
            flex: 1, // Ensures the content takes up the remaining space between the navbar and footer
            paddingTop: "70px", // Adjust this to match the height of your Navbar
            paddingBottom: "60px", // Adjust this to match the height of your Footer
          }}
        >
          <Routes>
            <Route path="/login" element={<Login />} />
            <Route path="/" element={<HomePage />} />
            <Route path="/consumer" element={<Consumer />} />
            <Route path="/checkout" element={<Checkout />} />
            <Route path="/lender" element={<Lender />} />
            <Route path="/consumer/my-bookings" element={<MyBookings />}/>
            {/* <Route path="/add-parking" element={<AddParking />} /> */}
            {/* Other routes can be added here for Listings, Contact, etc. */}
          </Routes>
        </div>
      </div>
      <Footer />
    </>
  );
}

export default App;

```

### park-eazy-frontend/tailwind.config.js

```javascript
/** @type {import('tailwindcss').Config} */
module.exports = {
  content: ["./src/**/*.{js,jsx,ts,tsx}"],
  theme: {
    extend: {},
  },
  plugins: [],
};

```

### park_eazy_flask_backend/__init__.py

```python
from flask import Flask
from flask_cors import CORS
from pymongo import MongoClient
from dotenv import load_dotenv
import os
from park_eazy_flask_backend.routes.lender_routes import lender_routes
from park_eazy_flask_backend.routes.consumer_routes import consumer_bp

def create_app():
    app = Flask(__name__)

    CORS(app, resources={r"/*": {"origins": "*"}})
    print("IN RUN")


    # Use the MongoDB Atlas connection string from the environment or directly
    mongo_url = os.getenv('MONGO_URL', 'mongodb+srv://kd81:Mongo123@cluster0.1c2rs.mongodb.net/?retryWrites=true&w=majority&appName=Cluster0')
    
    # Connect to MongoDB Atlas
    client = MongoClient(mongo_url)

    #client = MongoClient('mongodb://localhost:27017/')
    app.db = client['test'] 

    

    # app.register_blueprint(lender_routes)
    # app.register_blueprint(consumer_bp)

    app.register_blueprint(lender_routes, url_prefix='/lender')
    app.register_blueprint(consumer_bp, url_prefix='/consumer_bp')

    return app
```

### park-eazy-frontend/src/index.css

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

### park-eazy-frontend/src/appStore.js

```javascript
import { configureStore } from "@reduxjs/toolkit";
import userReducer from "./userSlice";

const appStore = configureStore({
  reducer: {
    user: userReducer,
  },
});

export default appStore;

```

### park_eazy_flask_backend/routes/consumer_routes.py

```python
from flask import Blueprint
from park_eazy_flask_backend.controllers.consumer_controller import search_parking_controller

consumer_bp = Blueprint('consumer_bp', __name__)

@consumer_bp.route("/search", methods=["POST"])
def search_parking_route():
    print("search came")
    return search_parking_controller()
```

### park-eazy-frontend/src/validate.js

```javascript
export const checkValidData = (email, password) => {
  const isEmailValid = /^([a-zA-Z0-9._%-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,})$/.test(
    email
  );
  const isPasswordValid =
    /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[a-zA-Z]).{8,}$/.test(password);

  if (!isEmailValid) return "Email ID is not valid";
  if (!isPasswordValid) return "Password is not valid";

  return null;
};

```

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