# Project export: Ordo

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: Sifting through 5000 emails? That’s not a hobby. Let’s fix it.
- Devpost: https://devpost.com/software/ordo
- GitHub: https://github.com/typhocannon/Ordo-Frontend
- Demo: https://github.com/nchowcode/ordo-backend
- Team: 2 GitHub contributor(s) — FustinCS (10 commits), Casey Tran (3 commits)

## Devpost submission (written by the team)

### Inspiration

One of the team members has 96% of their Google storage full. Where over 50% of that storage consists of just emails! This is solely due to one of our team members laziness of reading through an abundance of emails that are sent to her inbox daily where most of them are just spam and promotions. To amend this issue, we created a Google Chrome extension that uses the power of AI to analyze an email's content and user friendly interface to delete unwanted emails.

### What it does

Ordo is a Google Chrome extension that utilizes Google's ecosystem to organize user's emails and delete emails based on chosen filters. Users open a pop up and are able to choose between deleting and organizing emails. To delete emails, users can choose filters to specify what kind of email they want to delete. To organize emails, an AI analyzes groups of emails and finds similarity between them creating a label to organize them. Users are able to accept and decline the labels generated by the AI.

### How we built it

. Figma: Creating the Wireframe Mock Ups Firebase Functions: Creating HTTPs Requests / API Calls Firestore: Database to hold emails in the system and pending deleted/organized data Vite/React: Frontend Chakra UI: Frontend Components Groq: AI to analyze email content. Gmail API: API to handle changes to email.

### Challenges we ran into

. Understanding the Gmail API and coming up with an idea. Dependency issues due to manifest and crxjs from Vite being outdated. Issues with integration of both the backend and the frontend. Styling issues due to predefined chrome extension template behavior.

### Accomplishments we're proud of

. Casey: I am proud we showed up. Justin: I am proud I was able to develop a responsive and feasible front-end for a chrome extension.

### What we learned

. Learned how to make a google chrome extension. Learned to plan out the architecture and map out the workflow of the application. Learned to plan out components for frontend so individual files don't get too congested. Make better design decisions revolving around states to reduce the amount of states that need to be managed.

### What's next

. Scale up to have quicker processing for users with a large inbox. Add animations to UI to make user experience better and more responsive.

## README (from the GitHub repository)

# Ordo-Frontend

Chrome extension template taken from https://github.com/JohnBra/vite-web-extension

**Running Chrome Extension On Local Machine**
1. Run yarn dev or npm run dev
2. Load Extension in Chrome
3. Open - Chrome browser
4. Access - chrome://extensions
5. Tick - Developer mode
6. Find - Load unpacked extension
7. Select - dist folder in this project (after dev or build)
8. If you want to build for production, Just run yarn build or npm run build.

## Detected evidence (automated analysis)

Indexed codebase: 36 recognized source files, 69 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
- Tailwind CSS (technology) — detected in the code
- TypeScript (language) — detected in the code
- Firebase (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 (47 of 47)

```
.gitignore
LICENSE
manifest.dev.json
manifest.json
nodemon.json
package.json
postcss.config.cjs
public/contentStyle.css
README.md
src/assets/styles/tailwind.css
src/global.d.ts
src/pages/background/index.ts
src/pages/devtools/index.html
src/pages/devtools/index.ts
src/pages/options/index.css
src/pages/options/index.html
src/pages/options/index.tsx
src/pages/options/Options.css
src/pages/options/Options.tsx
src/pages/panel/index.css
src/pages/panel/index.html
src/pages/panel/index.tsx
src/pages/panel/Panel.css
src/pages/panel/Panel.tsx
src/pages/popup/context/PageProvider.tsx
src/pages/popup/custom/ListItem.tsx
src/pages/popup/custom/ToggleButton.tsx
src/pages/popup/index.css
src/pages/popup/index.html
src/pages/popup/index.tsx
src/pages/popup/menu/ErrorPage.tsx
src/pages/popup/menu/HomePage.tsx
src/pages/popup/menu/Navbar.tsx
src/pages/popup/menu/OrganizePage.tsx
src/pages/popup/menu/TrashPage.tsx
src/pages/popup/Popup.tsx
src/pages/popup/theme.ts
src/vite-env.d.ts
tailwind.config.cjs
tsconfig.json
vite.config.ts
vite.config.ts.timestamp-1729363895116-f11d9b09b7c73.mjs
vite.config.ts.timestamp-1729365111075-c761b73f6b812.mjs
vite.config.ts.timestamp-1729376028966.js
vite.config.ts.timestamp-1729394887586.js
vite.config.ts.timestamp-1729407023925.js
vite.config.ts.timestamp-1729415190897.js
```

### Dependencies

- package.json: @chakra-ui/react@^2.10.3, @crxjs/vite-plugin@^1.0.14, @emotion/react@^11.13.3, @emotion/styled@^11.13.0, @fortawesome/fontawesome-svg-core@^6.6.0, @fortawesome/free-solid-svg-icons@^6.6.0, @fortawesome/react-fontawesome@^0.2.2, @types/chrome@^0.0.278, @types/node@^20.12.11, @types/react@^18.3.1, @types/react-dom@^18.3.0, @types/webextension-polyfill@^0.10.7, @typescript-eslint/eslint-plugin@^7.8.0, @typescript-eslint/parser@^7.8.0, @vitejs/plugin-react@^1.3.0, autoprefixer@^10.4.19, eslint@^8.57.0, eslint-config-prettier@^9.1.0, eslint-plugin-import@^2.29.1, eslint-plugin-jsx-a11y@^6.8.0, eslint-plugin-react@^7.34.1, eslint-plugin-react-hooks@^4.6.2, framer-motion@^11.11.9, fs-extra@^11.2.0, nodemon@^3.1.0, postcss@^8.4.38, react@^18.3.1, react-dom@^18.3.1, tailwindcss@^3.4.14, ts-node@^10.9.2, typescript@^5.6.3, vite@^2.9.15, webextension-polyfill@^0.12.0

### Recent commits (newest first)

- adding api response for fetch and store
- adding steps in readme how to run frontend
- Add dummy data
- Add API call templates
- Add transparent small icon for logo
- Add error handling for API calls and api call outline
- Add list styling to Delete and Organize lists
- Add basic UI layout
- Add Home and Delete Display
- Remove Newtab override
- Change name and description
- Import template files from https://github.com/JohnBra/vite-web-extension
- Initial commit

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

### package.json

```
{
  "name": "vite-web-extension",
  "version": "1.3.0",
  "description": "A simple chrome & firefox extension template with Vite, React, TypeScript and Tailwind CSS.",
  "license": "MIT",
  "repository": {
    "type": "git",
    "url": "https://github.com/JohnBra/web-extension.git"
  },
  "scripts": {
    "build": "vite build",
    "dev": "nodemon"
  },
  "type": "module",
  "dependencies": {
    "@chakra-ui/react": "^2.10.3",
    "@crxjs/vite-plugin": "^1.0.14",
    "@emotion/react": "^11.13.3",
    "@emotion/styled": "^11.13.0",
    "@fortawesome/fontawesome-svg-core": "^6.6.0",
    "@fortawesome/free-solid-svg-icons": "^6.6.0",
    "@fortawesome/react-fontawesome": "^0.2.2",
    "framer-motion": "^11.11.9",
    "react": "^18.3.1",
    "react-dom": "^18.3.1",
    "webextension-polyfill": "^0.12.0"
  },
  "devDependencies": {
    "@types/chrome": "^0.0.278",
    "@types/node": "^20.12.11",
    "@types/react": "^18.3.1",
    "@types/react-dom": "^18.3.0",
    "@types/webextension-polyfill": "^0.10.7",
    "@typescript-eslint/eslint-plugin": "^7.8.0",
    "@typescript-eslint/parser": "^7.8.0",
    "@vitejs/plugin-react": "^1.3.0",
    "autoprefixer": "^10.4.19",
    "eslint": "^8.57.0",
    "eslint-config-prettier": "^9.1.0",
    "eslint-plugin-import": "^2.29.1",
    "eslint-plugin-jsx-a11y": "^6.8.0",
    "eslint-plugin-react": "^7.34.1",
    "eslint-plugin-react-hooks": "^4.6.2",
    "fs-extra": "^11.2.0",
    "nodemon": "^3.1.0",
    "postcss": "^8.4.38",
    "tailwindcss": "^3.4.14",
    "ts-node": "^10.9.2",
    "typescript": "^5.6.3",
    "vite": "^2.9.15"
  }
}

```

### src/pages/background/index.ts

```typescript
console.log('background script loaded');

```

### src/pages/devtools/index.ts

```typescript
import Browser from 'webextension-polyfill';

Browser
  .devtools
  .panels
  .create('Dev Tools', 'icon-32.png', 'src/pages/panel/index.html')
  .catch(console.error);

```

### src/pages/options/index.tsx

```typescript
import React from 'react';
import { createRoot } from 'react-dom/client';
import Options from '@pages/options/Options';
import '@pages/options/index.css';

function init() {
  const rootContainer = document.querySelector("#__root");
  if (!rootContainer) throw new Error("Can't find Options root element");
  const root = createRoot(rootContainer);
  root.render(<Options />);
}

init();

```

### src/pages/panel/index.tsx

```typescript
import React from 'react';
import { createRoot } from 'react-dom/client';
import Panel from '@pages/panel/Panel';
import '@pages/panel/index.css';
import '@assets/styles/tailwind.css';

function init() {
  const rootContainer = document.querySelector("#__root");
  if (!rootContainer) throw new Error("Can't find Panel root element");
  const root = createRoot(rootContainer);
  root.render(<Panel />);
}

init();

```

### src/pages/popup/index.tsx

```typescript
import React from 'react';
import { createRoot } from 'react-dom/client';
import '@pages/popup/index.css';
import '@assets/styles/tailwind.css';
import Popup from '@pages/popup/Popup';
import { ChakraProvider } from '@chakra-ui/react';
import customTheme from "./theme";
import { PageProvider } from './context/PageProvider';

function init() {
  const rootContainer = document.querySelector("#__root");
  if (!rootContainer) throw new Error("Can't find Popup root element");
  const root = createRoot(rootContainer);
  root.render(
    <ChakraProvider theme={customTheme}>
      <PageProvider>
        <Popup />
      </PageProvider>
    </ChakraProvider>
  );
}

init();

```

### vite.config.ts

```typescript
import react from '@vitejs/plugin-react';
import { resolve } from 'path';
import fs from 'fs';
import { defineConfig } from 'vite';
import { crx, ManifestV3Export } from '@crxjs/vite-plugin';

import manifest from './manifest.json';
import devManifest from './manifest.dev.json';
import pkg from './package.json';

const root = resolve(__dirname, 'src');
const pagesDir = resolve(root, 'pages');
const assetsDir = resolve(root, 'assets');
const outDir = resolve(__dirname, 'dist');
const publicDir = resolve(__dirname, 'public');

const isDev = process.env.__DEV__ === 'true';

const extensionManifest = {
  ...manifest,
  ...(isDev ? devManifest : {} as ManifestV3Export),
  name: isDev ? `DEV: ${ manifest.name }` : manifest.name,
  version: pkg.version,
};

// plugin to remove dev icons from prod build
function stripDevIcons (isDev: boolean) {
  if (isDev) return null

  return {
    name: 'strip-dev-icons',
    resolveId (source: string) {
      return source === 'virtual-module' ? source : null
    },
    renderStart (outputOptions: any, inputOptions: any) {
      const outDir = outputOptions.dir
      fs.rm(resolve(outDir, 'dev-icon-32.png'), () => console.log(`Deleted dev-icon-32.png from prod build`))
      fs.rm(resolve(outDir, 'dev-icon-128.png'), () => console.log(`Deleted dev-icon-128.png from prod build`))
    }
  }
}

/*
* By default this vite config produces a dist for chrome
* To build for firefox change the "browser" prop in the crx config below to 'firefox'
* AND ALSO change the "background" config in the manifest.json to the following:
* 
{
  "manifest_version": 3,
  "name": "<name in manifest.json>",
  "description": "<description in manifest.json>",
  ...
  "background": 
    "scripts": [ "service-worker-loader.js" ]
  },
  ...
}
* NOTE: remove "type" prop and "service_worker" prop (string val) 
* then replace with "scripts" prop (array val)
*/

export default defineConfig({
  resolve: {
    alias: {
      '@src': root,
      '@assets': assetsDir,
      '@pages': pagesDir,
    },
  },
  plugins: [
    react(),
    crx({
      manifest: extensionManifest as ManifestV3Export,
      browser: 'chrome', // <-- change value to 'firefox' or 'chrome'
      contentScripts: {
        injectCss: true,
      }
    }),
    stripDevIcons(isDev)
  ],
  publicDir,
  build: {
    outDir,
    sourcemap: isDev,
    emptyOutDir: !isDev
  },
});

```

### vite.config.ts.timestamp-1729376028966.js

```javascript
// vite.config.ts
import react from "@vitejs/plugin-react";
import { resolve } from "path";
import fs from "fs";
import { defineConfig } from "vite";
import { crx } from "@crxjs/vite-plugin";

// manifest.json
var manifest_default = {
  manifest_version: 3,
  name: "Ordo",
  description: "Ordo Description",
  options_ui: {
    page: "src/pages/options/index.html"
  },
  background: {
    service_worker: "src/pages/background/index.ts",
    type: "module"
  },
  action: {
    default_popup: "src/pages/popup/index.html",
    default_icon: {
      "32": "icon-32.png"
    }
  },
  icons: {
    "128": "icon-128.png"
  },
  permissions: [
    "activeTab"
  ],
  content_scripts: [
    {
      matches: [
        "http://*/*",
        "https://*/*",
        "<all_urls>"
      ],
      js: [
        "src/pages/content/index.tsx"
      ],
      css: [
        "contentStyle.css"
      ]
    }
  ],
  devtools_page: "src/pages/devtools/index.html",
  web_accessible_resources: [
    {
      resources: [
        "contentStyle.css",
        "icon-128.png",
        "icon-32.png"
      ],
      matches: []
    }
  ]
};

// manifest.dev.json
var manifest_dev_default = {
  action: {
    default_icon: "public/dev-icon-32.png",
    default_popup: "src/pages/popup/index.html"
  },
  icons: {
    "128": "public/dev-icon-128.png"
  },
  web_accessible_resources: [
    {
      resources: [
        "contentStyle.css",
        "dev-icon-128.png",
        "dev-icon-32.png"
      ],
      matches: []
    }
  ]
};

// package.json
var package_default = {
  name: "vite-web-extension",
  version: "1.3.0",
  description: "A simple chrome & firefox extension template with Vite, React, TypeScript and Tailwind CSS.",
  license: "MIT",
  repository: {
    type: "git",
    url: "https://github.com/JohnBra/web-extension.git"
  },
  scripts: {
    build: "vite build",
    dev: "nodemon"
  },
  type: "module",
  dependencies: {
    "@chakra-ui/react": "^2.10.3",
    "@emotion/react": "^11.13.3",
    "@emotion/styled": "^11.13.0",
    "@fortawesome/fontawesome-svg-core": "^6.6.0",
    "@fortawesome/free-solid-svg-icons": "^6.6.0",
    "@fortawesome/react-fontawesome": "^0.2.2",
    "framer-motion": "^11.11.9",
    react: "^18.3.1",
    "react-dom": "^18.3.1",
    "webextension-polyfill": "^0.12.0"
  },
  devDependencies: {
    "@types/chrome": "^0.0.278",
    "@types/node": "^20.12.11",
    "@types/react": "^18.3.1",
    "@types/react-dom": "^18.3.0",
    "@types/webextension-polyfill": "^0.10.7",
    "@typescript-eslint/eslint-plugin": "^7.8.0",
    "@typescript-eslint/parser": "^7.8.0",
    "@vitejs/plugin-react": "^1.3.0",
    autoprefixer: "^10.4.19",
    eslint: "^8.57.0",
    "eslint-config-prettier": "^9.1.0",
    "eslint-plugin-import": "^2.29.1",
    "eslint-plugin-jsx-a11y": "^6.8.0",
    "eslint-plugin-react": "^7.34.1",
    "eslint-plugin-react-hooks": "^4.6.2",
    "fs-extra": "^11.2.0",
    nodemon: "^3.1.0",
    postcss: "^8.4.38",
    tailwindcss: "^3.4.14",
    "ts-node": "^10.9.2",
    typescript: "^5.6.3",
    vite: "^2.9.15"
  }
};

// vite.config.ts
var root = resolve("/Users/justin/Desktop/Ordo-Frontend", "src");
var pagesDir = resolve(root, "pages");
var assetsDir = resolve(root, "assets");
var outDir = resolve("/Users/justin/Desktop/Ordo-Frontend", "dist");
var publicDir = resolve("/Users/justin/Desktop/Ordo-Frontend", "public");
var isDev = process.env.__DEV__ === "true";
var extensionManifest = {
  ...manifest_default,
  ...isDev ? manifest_dev_default : {},
  name: isDev ? `DEV: ${manifest_default.name}` : manifest_default.name,
  version: package_default.version
};
function stripDevIcons(isDev2) {
  if (isDev2)
    return null;
  return {
    name: "strip-dev-icons",
    resolveId(source) {
      return source === "virtual-module" ? source : null;
    },
    renderStart(outputOptions, inputOptions) {
      const outDir2 = outputOptions.dir;
      fs.rm(resolve(outDir2, "dev-icon-32.png"), () => console.log(`Deleted dev-icon-32.png from prod build`));
      fs.rm(resolve(outDir2, "dev-icon-128.png"), () => console.log(`Deleted dev-icon-128.png from prod build`));
    }
  };
}
var vite_config_default = defineConfig({
  resolve: {
    alias: {
      "@src": root,
      "@assets": assetsDir,
      "@pages": pagesDir
    }
  },
  plugins: [
    react(),
    crx({
      manifest: extensionManifest,
      browser: "chrome",
      contentScripts: {
        injectCss: true
      }
    }),
    stripDevIcons(isDev)
  ],
  publicDir,
  build: {
    outDir,
    sourcemap: isDev,
    emptyOutDir: !isDev
  }
});
export {
  vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImltcG9ydCByZWFjdCBmcm9tICdAdml0ZWpzL3BsdWdpbi1yZWFjdCc7XG5pbXBvcnQgeyByZXNvbHZlIH0gZnJvbSAncGF0aCc7XG5pbXBvcnQgZnMgZnJvbSAnZnMnO1xuaW1wb3J0IHsgZGVmaW5lQ29uZmlnIH0gZnJvbSAndml0ZSc7XG5pbXBvcnQgeyBjcngsIE1hbmlmZXN0VjNFeHBvcnQgfSBmcm9tICdAY3J4anMvdml0ZS1wbHVnaW4nO1xuXG5pbXBvcnQgbWFuaWZlc3QgZnJvbSAnLi9tYW5pZmVzdC5qc29uJztcbmltcG9ydCBkZXZNYW5pZmVzdCBmcm9tICcuL21hbmlmZXN0LmRldi5qc29uJztcbmltcG9ydCBwa2cgZnJvbSAnLi9wYWNrYWdlLmpzb24nO1xuXG5jb25zdCByb290ID0gcmVzb2x2ZShcIi9Vc2Vycy9qdXN0aW4vRGVza3RvcC9PcmRvLUZyb250ZW5kXCIsICdzcmMnKTtcbmNvbnN0IHBhZ2VzRGlyID0gcmVzb2x2ZShyb290LCAncGFnZXMnKTtcbmNvbnN0IGFzc2V0c0RpciA9IHJlc29sdmUocm9vdCwgJ2Fzc2V0cycpO1xuY29uc3Qgb3V0RGlyID0gcmVzb2x2ZShcIi9Vc2Vycy9qdXN0aW4vRGVza3RvcC9PcmRvLUZyb250ZW5kXCIsICdkaXN0Jyk7XG5jb25zdCBwdWJsaWNEaXIgPSByZXNvbHZlKFwiL1VzZXJzL2p1c3Rpbi9EZXNrdG9wL09yZG8tRnJvbnRlbmRcIiwgJ3B1YmxpYycpO1xuXG5jb25zdCBpc0RldiA9IHByb2Nlc3MuZW52Ll9fREVWX18gPT09ICd0cnVlJztcblxuY29uc3QgZXh0ZW5zaW9uTWFuaWZlc3QgPSB7XG4gIC4uLm1hbmlmZXN0LFxuICAuLi4oaXNEZXYgPyBkZXZNYW5pZmVzdCA6IHt9IGFzIE1hbmlmZXN0VjNFeHBvcnQpLFxuICBuYW1lOiBpc0RldiA/IGBERVY6ICR7IG1hbmlmZXN0Lm5hbWUgfWAgOiBtYW5pZmVzdC5uYW1lLFxuICB2ZXJzaW9uOiBwa2cudmVyc2lvbixcbn07XG5cbi8vIHBsdWdpbiB0byByZW1vdmUgZGV2IGljb25zIGZyb20gcHJvZCBidWlsZFxuZnVuY3Rpb2
[truncated — 3939 more characters]
```

### vite.config.ts.timestamp-1729394887586.js

```javascript
// vite.config.ts
import react from "@vitejs/plugin-react";
import { resolve } from "path";
import fs from "fs";
import { defineConfig } from "vite";
import { crx } from "@crxjs/vite-plugin";

// manifest.json
var manifest_default = {
  manifest_version: 3,
  name: "Ordo",
  description: "Ordo Description",
  options_ui: {
    page: "src/pages/options/index.html"
  },
  background: {
    service_worker: "src/pages/background/index.ts",
    type: "module"
  },
  action: {
    default_popup: "src/pages/popup/index.html",
    default_icon: {
      "32": "icon-32.png"
    }
  },
  icons: {
    "128": "icon-128.png"
  },
  permissions: [
    "activeTab"
  ],
  content_scripts: [
    {
      matches: [
        "http://*/*",
        "https://*/*",
        "<all_urls>"
      ],
      js: [
        "src/pages/content/index.tsx"
      ],
      css: [
        "contentStyle.css"
      ]
    }
  ],
  devtools_page: "src/pages/devtools/index.html",
  web_accessible_resources: [
    {
      resources: [
        "contentStyle.css",
        "icon-128.png",
        "icon-32.png"
      ],
      matches: []
    }
  ]
};

// manifest.dev.json
var manifest_dev_default = {
  action: {
    default_icon: "public/dev-icon-32.png",
    default_popup: "src/pages/popup/index.html"
  },
  icons: {
    "128": "public/dev-icon-128.png"
  },
  web_accessible_resources: [
    {
      resources: [
        "contentStyle.css",
        "dev-icon-128.png",
        "dev-icon-32.png"
      ],
      matches: []
    }
  ]
};

// package.json
var package_default = {
  name: "vite-web-extension",
  version: "1.3.0",
  description: "A simple chrome & firefox extension template with Vite, React, TypeScript and Tailwind CSS.",
  license: "MIT",
  repository: {
    type: "git",
    url: "https://github.com/JohnBra/web-extension.git"
  },
  scripts: {
    build: "vite build",
    dev: "nodemon"
  },
  type: "module",
  dependencies: {
    "@chakra-ui/react": "^2.10.3",
    "@crxjs/vite-plugin": "^1.0.14",
    "@emotion/react": "^11.13.3",
    "@emotion/styled": "^11.13.0",
    "@fortawesome/fontawesome-svg-core": "^6.6.0",
    "@fortawesome/free-solid-svg-icons": "^6.6.0",
    "@fortawesome/react-fontawesome": "^0.2.2",
    "framer-motion": "^11.11.9",
    react: "^18.3.1",
    "react-dom": "^18.3.1",
    "webextension-polyfill": "^0.12.0"
  },
  devDependencies: {
    "@types/chrome": "^0.0.278",
    "@types/node": "^20.12.11",
    "@types/react": "^18.3.1",
    "@types/react-dom": "^18.3.0",
    "@types/webextension-polyfill": "^0.10.7",
    "@typescript-eslint/eslint-plugin": "^7.8.0",
    "@typescript-eslint/parser": "^7.8.0",
    "@vitejs/plugin-react": "^1.3.0",
    autoprefixer: "^10.4.19",
    eslint: "^8.57.0",
    "eslint-config-prettier": "^9.1.0",
    "eslint-plugin-import": "^2.29.1",
    "eslint-plugin-jsx-a11y": "^6.8.0",
    "eslint-plugin-react": "^7.34.1",
    "eslint-plugin-react-hooks": "^4.6.2",
    "fs-extra": "^11.2.0",
    nodemon: "^3.1.0",
    postcss: "^8.4.38",
    tailwindcss: "^3.4.14",
    "ts-node": "^10.9.2",
    typescript: "^5.6.3",
    vite: "^2.9.15"
  }
};

// vite.config.ts
var root = resolve("/Users/justin/Desktop/Ordo-Frontend", "src");
var pagesDir = resolve(root, "pages");
var assetsDir = resolve(root, "assets");
var outDir = resolve("/Users/justin/Desktop/Ordo-Frontend", "dist");
var publicDir = resolve("/Users/justin/Desktop/Ordo-Frontend", "public");
var isDev = process.env.__DEV__ === "true";
var extensionManifest = {
  ...manifest_default,
  ...isDev ? manifest_dev_default : {},
  name: isDev ? `DEV: ${manifest_default.name}` : manifest_default.name,
  version: package_default.version
};
function stripDevIcons(isDev2) {
  if (isDev2)
    return null;
  return {
    name: "strip-dev-icons",
    resolveId(source) {
      return source === "virtual-module" ? source : null;
    },
    renderStart(outputOptions, inputOptions) {
      const outDir2 = outputOptions.dir;
      fs.rm(resolve(outDir2, "dev-icon-32.png"), () => console.log(`Deleted dev-icon-32.png from prod build`));
      fs.rm(resolve(outDir2, "dev-icon-128.png"), () => console.log(`Deleted dev-icon-128.png from prod build`));
    }
  };
}
var vite_config_default = defineConfig({
  resolve: {
    alias: {
      "@src": root,
      "@assets": assetsDir,
      "@pages": pagesDir
    }
  },
  plugins: [
    react(),
    crx({
      manifest: extensionManifest,
      browser: "chrome",
      contentScripts: {
        injectCss: true
      }
    }),
    stripDevIcons(isDev)
  ],
  publicDir,
  build: {
    outDir,
    sourcemap: isDev,
    emptyOutDir: !isDev
  }
});
export {
  vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImltcG9ydCByZWFjdCBmcm9tICdAdml0ZWpzL3BsdWdpbi1yZWFjdCc7XG5pbXBvcnQgeyByZXNvbHZlIH0gZnJvbSAncGF0aCc7XG5pbXBvcnQgZnMgZnJvbSAnZnMnO1xuaW1wb3J0IHsgZGVmaW5lQ29uZmlnIH0gZnJvbSAndml0ZSc7XG5pbXBvcnQgeyBjcngsIE1hbmlmZXN0VjNFeHBvcnQgfSBmcm9tICdAY3J4anMvdml0ZS1wbHVnaW4nO1xuXG5pbXBvcnQgbWFuaWZlc3QgZnJvbSAnLi9tYW5pZmVzdC5qc29uJztcbmltcG9ydCBkZXZNYW5pZmVzdCBmcm9tICcuL21hbmlmZXN0LmRldi5qc29uJztcbmltcG9ydCBwa2cgZnJvbSAnLi9wYWNrYWdlLmpzb24nO1xuXG5jb25zdCByb290ID0gcmVzb2x2ZShcIi9Vc2Vycy9qdXN0aW4vRGVza3RvcC9PcmRvLUZyb250ZW5kXCIsICdzcmMnKTtcbmNvbnN0IHBhZ2VzRGlyID0gcmVzb2x2ZShyb290LCAncGFnZXMnKTtcbmNvbnN0IGFzc2V0c0RpciA9IHJlc29sdmUocm9vdCwgJ2Fzc2V0cycpO1xuY29uc3Qgb3V0RGlyID0gcmVzb2x2ZShcIi9Vc2Vycy9qdXN0aW4vRGVza3RvcC9PcmRvLUZyb250ZW5kXCIsICdkaXN0Jyk7XG5jb25zdCBwdWJsaWNEaXIgPSByZXNvbHZlKFwiL1VzZXJzL2p1c3Rpbi9EZXNrdG9wL09yZG8tRnJvbnRlbmRcIiwgJ3B1YmxpYycpO1xuXG5jb25zdCBpc0RldiA9IHByb2Nlc3MuZW52Ll9fREVWX18gPT09ICd0cnVlJztcblxuY29uc3QgZXh0ZW5zaW9uTWFuaWZlc3QgPSB7XG4gIC4uLm1hbmlmZXN0LFxuICAuLi4oaXNEZXYgPyBkZXZNYW5pZmVzdCA6IHt9IGFzIE1hbmlmZXN0VjNFeHBvcnQpLFxuICBuYW1lOiBpc0RldiA/IGBERVY6ICR7IG1hbmlmZXN0Lm5hbWUgfWAgOiBtYW5pZmVzdC5uYW1lLFxuICB2ZXJzaW9uOiBwa2cudmVyc2lvbixcbn07XG5cbi8vIHBsdWdpbiB0byByZW1vdmUgZGV2IGljb
[truncated — 3976 more characters]
```

### vite.config.ts.timestamp-1729407023925.js

```javascript
// vite.config.ts
import react from "@vitejs/plugin-react";
import { resolve } from "path";
import fs from "fs";
import { defineConfig } from "vite";
import { crx } from "@crxjs/vite-plugin";

// manifest.json
var manifest_default = {
  manifest_version: 3,
  name: "Ordo",
  description: "Ordo Description",
  options_ui: {
    page: "src/pages/options/index.html"
  },
  background: {
    service_worker: "src/pages/background/index.ts",
    type: "module"
  },
  action: {
    default_popup: "src/pages/popup/index.html",
    default_icon: {
      "32": "icon-32.png"
    }
  },
  icons: {
    "128": "icon-128.png"
  },
  permissions: [
    "activeTab"
  ],
  content_scripts: [
    {
      matches: [
        "http://*/*",
        "https://*/*",
        "<all_urls>"
      ],
      js: [
        "src/pages/content/index.tsx"
      ],
      css: [
        "contentStyle.css"
      ]
    }
  ],
  devtools_page: "src/pages/devtools/index.html",
  web_accessible_resources: [
    {
      resources: [
        "contentStyle.css",
        "icon-128.png",
        "icon-32.png"
      ],
      matches: []
    }
  ]
};

// manifest.dev.json
var manifest_dev_default = {
  action: {
    default_icon: "public/dev-icon-32.png",
    default_popup: "src/pages/popup/index.html"
  },
  icons: {
    "128": "public/dev-icon-128.png"
  },
  web_accessible_resources: [
    {
      resources: [
        "contentStyle.css",
        "dev-icon-128.png",
        "dev-icon-32.png"
      ],
      matches: []
    }
  ]
};

// package.json
var package_default = {
  name: "vite-web-extension",
  version: "1.3.0",
  description: "A simple chrome & firefox extension template with Vite, React, TypeScript and Tailwind CSS.",
  license: "MIT",
  repository: {
    type: "git",
    url: "https://github.com/JohnBra/web-extension.git"
  },
  scripts: {
    build: "vite build",
    dev: "nodemon"
  },
  type: "module",
  dependencies: {
    "@chakra-ui/react": "^2.10.3",
    "@crxjs/vite-plugin": "^1.0.14",
    "@emotion/react": "^11.13.3",
    "@emotion/styled": "^11.13.0",
    "@fortawesome/fontawesome-svg-core": "^6.6.0",
    "@fortawesome/free-solid-svg-icons": "^6.6.0",
    "@fortawesome/react-fontawesome": "^0.2.2",
    "framer-motion": "^11.11.9",
    react: "^18.3.1",
    "react-dom": "^18.3.1",
    "webextension-polyfill": "^0.12.0"
  },
  devDependencies: {
    "@types/chrome": "^0.0.278",
    "@types/node": "^20.12.11",
    "@types/react": "^18.3.1",
    "@types/react-dom": "^18.3.0",
    "@types/webextension-polyfill": "^0.10.7",
    "@typescript-eslint/eslint-plugin": "^7.8.0",
    "@typescript-eslint/parser": "^7.8.0",
    "@vitejs/plugin-react": "^1.3.0",
    autoprefixer: "^10.4.19",
    eslint: "^8.57.0",
    "eslint-config-prettier": "^9.1.0",
    "eslint-plugin-import": "^2.29.1",
    "eslint-plugin-jsx-a11y": "^6.8.0",
    "eslint-plugin-react": "^7.34.1",
    "eslint-plugin-react-hooks": "^4.6.2",
    "fs-extra": "^11.2.0",
    nodemon: "^3.1.0",
    postcss: "^8.4.38",
    tailwindcss: "^3.4.14",
    "ts-node": "^10.9.2",
    typescript: "^5.6.3",
    vite: "^2.9.15"
  }
};

// vite.config.ts
var root = resolve("/Users/justin/Desktop/Ordo-Frontend", "src");
var pagesDir = resolve(root, "pages");
var assetsDir = resolve(root, "assets");
var outDir = resolve("/Users/justin/Desktop/Ordo-Frontend", "dist");
var publicDir = resolve("/Users/justin/Desktop/Ordo-Frontend", "public");
var isDev = process.env.__DEV__ === "true";
var extensionManifest = {
  ...manifest_default,
  ...isDev ? manifest_dev_default : {},
  name: isDev ? `DEV: ${manifest_default.name}` : manifest_default.name,
  version: package_default.version
};
function stripDevIcons(isDev2) {
  if (isDev2)
    return null;
  return {
    name: "strip-dev-icons",
    resolveId(source) {
      return source === "virtual-module" ? source : null;
    },
    renderStart(outputOptions, inputOptions) {
      const outDir2 = outputOptions.dir;
      fs.rm(resolve(outDir2, "dev-icon-32.png"), () => console.log(`Deleted dev-icon-32.png from prod build`));
      fs.rm(resolve(outDir2, "dev-icon-128.png"), () => console.log(`Deleted dev-icon-128.png from prod build`));
    }
  };
}
var vite_config_default = defineConfig({
  resolve: {
    alias: {
      "@src": root,
      "@assets": assetsDir,
      "@pages": pagesDir
    }
  },
  plugins: [
    react(),
    crx({
      manifest: extensionManifest,
      browser: "chrome",
      contentScripts: {
        injectCss: true
      }
    }),
    stripDevIcons(isDev)
  ],
  publicDir,
  build: {
    outDir,
    sourcemap: isDev,
    emptyOutDir: !isDev
  }
});
export {
  vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImltcG9ydCByZWFjdCBmcm9tICdAdml0ZWpzL3BsdWdpbi1yZWFjdCc7XG5pbXBvcnQgeyByZXNvbHZlIH0gZnJvbSAncGF0aCc7XG5pbXBvcnQgZnMgZnJvbSAnZnMnO1xuaW1wb3J0IHsgZGVmaW5lQ29uZmlnIH0gZnJvbSAndml0ZSc7XG5pbXBvcnQgeyBjcngsIE1hbmlmZXN0VjNFeHBvcnQgfSBmcm9tICdAY3J4anMvdml0ZS1wbHVnaW4nO1xuXG5pbXBvcnQgbWFuaWZlc3QgZnJvbSAnLi9tYW5pZmVzdC5qc29uJztcbmltcG9ydCBkZXZNYW5pZmVzdCBmcm9tICcuL21hbmlmZXN0LmRldi5qc29uJztcbmltcG9ydCBwa2cgZnJvbSAnLi9wYWNrYWdlLmpzb24nO1xuXG5jb25zdCByb290ID0gcmVzb2x2ZShcIi9Vc2Vycy9qdXN0aW4vRGVza3RvcC9PcmRvLUZyb250ZW5kXCIsICdzcmMnKTtcbmNvbnN0IHBhZ2VzRGlyID0gcmVzb2x2ZShyb290LCAncGFnZXMnKTtcbmNvbnN0IGFzc2V0c0RpciA9IHJlc29sdmUocm9vdCwgJ2Fzc2V0cycpO1xuY29uc3Qgb3V0RGlyID0gcmVzb2x2ZShcIi9Vc2Vycy9qdXN0aW4vRGVza3RvcC9PcmRvLUZyb250ZW5kXCIsICdkaXN0Jyk7XG5jb25zdCBwdWJsaWNEaXIgPSByZXNvbHZlKFwiL1VzZXJzL2p1c3Rpbi9EZXNrdG9wL09yZG8tRnJvbnRlbmRcIiwgJ3B1YmxpYycpO1xuXG5jb25zdCBpc0RldiA9IHByb2Nlc3MuZW52Ll9fREVWX18gPT09ICd0cnVlJztcblxuY29uc3QgZXh0ZW5zaW9uTWFuaWZlc3QgPSB7XG4gIC4uLm1hbmlmZXN0LFxuICAuLi4oaXNEZXYgPyBkZXZNYW5pZmVzdCA6IHt9IGFzIE1hbmlmZXN0VjNFeHBvcnQpLFxuICBuYW1lOiBpc0RldiA/IGBERVY6ICR7IG1hbmlmZXN0Lm5hbWUgfWAgOiBtYW5pZmVzdC5uYW1lLFxuICB2ZXJzaW9uOiBwa2cudmVyc2lvbixcbn07XG5cbi8vIHBsdWdpbiB0byByZW1vdmUgZGV2IGljb
[truncated — 3976 more characters]
```

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