# Project export: SlugsToGo

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: CruzHacks 2024
- Tagline: Tired of waiting in cafe lines before class? Now you don't have to!
- Devpost: https://devpost.com/software/slugstogo
- GitHub: https://github.com/akshitha-nagaraj/slugs2go
- Team: 3 GitHub contributor(s) — akshitha-nagaraj (5 commits), lipithat (3 commits), meghagl17 (3 commits)

## Devpost submission (written by the team)

No Devpost description available.

## README (from the GitHub repository)

<h1>SlugsToGo</h1>

<h3>Made For CruzHacks2024</h3>
Our website is designed to assist UCSC students in managing their hectic schedules. With our platform, students can effortlessly and efficiently order food in advance from their favorite on-campus cafes and restaurants. We offer a selection of 10 diverse restaurants, each with a user-friendly menu navigation system. The checkout process is seamless, allowing students to choose a convenient pickup time and utilize three friendly payment methods. This service is tailored to enhance the overall dining experience for UCSC students, making it easy for them to grab a quick bite between classes without having to wait in a line.


Credits to Youtube Channel "PedroTech" for teaching us how to do the shopping cart functionality.





## Detected evidence (automated analysis)

Indexed codebase: 23 recognized source files, 44 KB.
- CSS (language) — detected in the code
- HTML (language) — detected in the code
- JavaScript (language) — detected in the code
- React (technology) — detected in the code
- Node.js (technology) — claimed on Devpost, not found in the code

## Codebase structure (from repository index)

### Files (28 of 28)

```
.DS_Store
package.json
public/index.html
public/manifest.json
public/robots.txt
README.md
src/.DS_Store
src/App.css
src/App.js
src/App.test.js
src/context/bistro_context.jsx
src/index.css
src/index.js
src/pages/bistro_cart/bistro_cart_item.jsx
src/pages/bistro_cart/bistro_cart.css
src/pages/bistro_cart/bistro_cart.jsx
src/pages/bistro_order/bistro_order.css
src/pages/bistro_order/bistro_order.jsx
src/pages/bistro_order/product.jsx
src/pages/checkout/checkout_page.css
src/pages/checkout/checkout_page.jsx
src/pages/confirmation/confirmation.css
src/pages/confirmation/confirmation.jsx
src/pages/landing_page/landing_page.css
src/pages/landing_page/landing_page.jsx
src/products.js
src/reportWebVitals.js
src/setupTests.js
```

### Dependencies

- package.json: @testing-library/jest-dom@^5.17.0, @testing-library/react@^13.4.0, @testing-library/user-event@^13.5.0, phosphor-react@^1.4.1, react@^18.2.0, react-dom@^18.2.0, react-router-dom@^6.21.3, react-scripts@5.0.1, web-vitals@^2.1.4

### Recent commits (newest first)

- Update README.md
- Update README.md
- Final Edits to main functionality, added confirmation page, more edits to checkout page etc
- modified shopping cart
- modified checkout
- added css styling, checkout page setup
- added logo, fixed cart, fixed checkout
- Added images to landing_page
- updated the card
- Initial 3 static pages, with semi cart functionality
- Initial commit

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

### package.json

```
{
  "name": "slugstogo",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "@testing-library/jest-dom": "^5.17.0",
    "@testing-library/react": "^13.4.0",
    "@testing-library/user-event": "^13.5.0",
    "phosphor-react": "^1.4.1",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "react-router-dom": "^6.21.3",
    "react-scripts": "5.0.1",
    "web-vitals": "^2.1.4"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
  },
  "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"
    ]
  }
}

```

### src/index.js

```javascript
import React from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';

const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
  <React.StrictMode>
    <App />
  </React.StrictMode>
);

// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();

```

### src/App.js

```javascript
import React from "react"
import {BrowserRouter as Router, Routes, Route} from "react-router-dom"
import './App.css';
import { LandingPage } from "./pages/landing_page/landing_page"
import { BistroOrder } from "./pages/bistro_order/bistro_order"
import { Cart } from "./pages/bistro_cart/bistro_cart"
import { CheckoutPage } from "./pages/checkout/checkout_page"
import { Confirmation } from "./pages/confirmation/confirmation"
import { ShopContextProvider } from "./context/bistro_context";
function App() {
  return (
    <div className="App">
      <ShopContextProvider>
        <Router>
          <Routes>
            {/* landing page */}
            <Route path = "/"  element = {<LandingPage />} />
            {/* bistro order */}
            <Route path = "/bistro_order" element = {<BistroOrder />}/>
            {/* cart */}
            <Route path = "/bistro_cart" element = {<Cart />}/>
            {/* checkoutPage */}
            <Route path = "/checkout_page" element = {<CheckoutPage />}/>
            {/* confirmation page */}
            <Route path = "/confirmation" element = {<Confirmation />}/>
          </Routes>
        </Router>
      </ShopContextProvider>
    </div>
  );
}


export default App;

```

### src/setupTests.js

```javascript
// jest-dom adds custom jest matchers for asserting on DOM nodes.
// allows you to do things like:
// expect(element).toHaveTextContent(/react/i)
// learn more: https://github.com/testing-library/jest-dom
import '@testing-library/jest-dom';

```

### src/App.test.js

```javascript
import { render, screen } from '@testing-library/react';
import App from './App';

test('renders learn react link', () => {
  render(<App />);
  const linkElement = screen.getByText(/learn react/i);
  expect(linkElement).toBeInTheDocument();
});

```

### src/reportWebVitals.js

```javascript
const reportWebVitals = onPerfEntry => {
  if (onPerfEntry && onPerfEntry instanceof Function) {
    import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
      getCLS(onPerfEntry);
      getFID(onPerfEntry);
      getFCP(onPerfEntry);
      getLCP(onPerfEntry);
      getTTFB(onPerfEntry);
    });
  }
};

export default reportWebVitals;

```

### src/index.css

```css
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

code {
  font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
    monospace;

}

@font-face {
  font-family: 'CaviarDreams';
  src: local('CaviarDreams'), url(./fonts/CaviarDreams.ttf) format('truetype');}

```

### src/App.css

```css
.App {
  text-align: center;
}

.App-logo {
  height: 40vmin;
  pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
  .App-logo {
    animation: App-logo-spin infinite 20s linear;
  }
}

.App-header {
  background-color: #282c34;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: calc(10px + 2vmin);
  color: white;
}

.App-link {
  color: #61dafb;
}

@keyframes App-logo-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

```

### public/index.html

```html
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta name="theme-color" content="#000000" />
    <meta
      name="description"
      content="Web site created using create-react-app"
    />
    <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
    <!--
      manifest.json provides metadata used when your web app is installed on a
      user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
    -->
    <link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
    <!--
      Notice the use of %PUBLIC_URL% in the tags above.
      It will be replaced with the URL of the `public` folder during the build.
      Only files inside the `public` folder can be referenced from the HTML.

      Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
      work correctly both with client-side routing and a non-root public URL.
      Learn how to configure a non-root public URL by running `npm run build`.
    -->
    <title>SlugsTOGO</title>
  </head>
  <body>
    <noscript>You need to enable JavaScript to run this app.</noscript>
    <div id="root"></div>
    <!--
      This HTML file is a template.
      If you open it directly in the browser, you will see an empty page.

      You can add webfonts, meta tags, or analytics to this file.
      The build step will place the bundled scripts into the <body> tag.

      To begin the development, run `npm start` or `yarn start`.
      To create a production bundle, use `npm run build` or `yarn build`.
    -->
  </body>
</html>

```

### src/products.js

```javascript
import product1 from "./assets/food_assets/asian_salad.jpeg";
import product2 from "./assets/food_assets/house_salad.jpeg";
import product3 from "./assets/food_assets/caesar_salad.jpeg";
import product4 from "./assets/food_assets/birria_wontons.jpeg";
import product5 from "./assets/food_assets/mediterranean_platter.jpeg";
import product6 from "./assets/food_assets/fries.jpeg";
import product7 from "./assets/food_assets/chips.jpeg";
import product8 from "./assets/food_assets/chicken_sandwich.jpeg";
import product9 from "./assets/food_assets/hippie_sandwich.jpeg";
import product10 from "./assets/food_assets/gourmet_burger.jpeg";
import product11 from "./assets/food_assets/birria.jpeg";
import product12 from "./assets/food_assets/bbq.jpeg";
import product13 from "./assets/food_assets/salmon.jpeg";
import product14 from "./assets/food_assets/tofu.jpeg";
import product15 from "./assets/food_assets/tiramisu.jpeg";
import product16 from "./assets/food_assets/cheescake.jpeg";
import product17 from "./assets/food_assets/mocha.jpeg";
import product18 from "./assets/food_assets/tea.jpeg";
import product19 from "./assets/food_assets/coffee.jpeg";
import product20 from "./assets/food_assets/hot_chocolate.jpeg";

export const PRODUCTS = [
    // ID 1-3 are Salads
    {
        id: 1,
        productName: "Asian Salad",
        price: 14.0,
        productImage: product1,
    },
    {
        id: 2,
        productName: "House Salad",
        price: 11.0,
        productImage: product2,
    },
    {
        id: 3,
        productName: "Caesar Salad",
        price: 12.0,
        productImage: product3,
    },
    // ID 4-7 are Appetizers
    {
        id: 4,
        productName: "Birria Wontons",
        price: 9.0,
        productImage: product4,
    },
    {
        id: 5,
        productName: "Mediterranean Platter",
        price: 12.0,
        productImage: product5,
    },
    {
        id: 6,
        productName: "Fries",
        price: 7.0,
        productImage: product6,
    },
    {
        id: 7,
        productName: "House-Made Chips",
        price: 6.0,
        productImage: product7,
    },
    // ID 8-10 are Sandwiches
    {
        id: 8,
        productName: "Spicy Crispy Chicken",
        price: 17.0,
        productImage: product8,
    },
    {
        id: 9,
        productName: "Hippie",
        price: 14.0,
        productImage: product9,
    },
    {
        id: 10,
        productName: "Gourmet",
        price: 20.0,
        productImage: product10,
    },
    // ID 11-12 are Pizzas
    {
        id: 11,
        productName: "Birria",
        price: 17.0,
        productImage: product11,
    },
    {
        id: 12,
        productName: "BBQ Ranch",
        price: 17.0,
        productImage: product12,
    },
    // ID 13-14 are Entrees
    {
        id: 13,
        productName: "Salmon Muhammara",
        price: 17.0,
        productImage: product13,
    },
    {
        id: 14,
        productName: "Spicy Tofu",
        price: 14.0,
        productImage: product14,
    },
    // ID 15-16 are Desserts
    {
        id: 15,
        productName: "Tiramisu",
        price: 10.0,
        productImage: product15,
    },
    {
        id: 16,
        productName: "Seasonal Cheesecake",
        price: 9.0,
        productImage: product16,
    },
    // ID 17-20 are Drinks
    {
        id: 17,
        productName: "Mocha",
        price: 4.95,
        productImage: product17,
    },
    {
        id: 18,
        productName: "Iced Tea",
        price: 3.0,
        productImage: product18,
    },
    {
        id: 19,
        productName: "Coffee",
        price: 3.25,
        productImage: product19,
    },
    {
        id: 20,
        productName: "Hot Chocolate",
        price: 4.25,
        productImage: product20,
    },
    
];
```

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