# Project export: XLR8

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: TreeHacks 2024
- Tagline: A development suite to lower the barriers for high-performance hardware code. From the cloud - without complexity
- Devpost: https://devpost.com/software/xlr8
- GitHub: https://github.com/JasYi/cloud-fpga-frontend
- Demo: https://github.com/akhxl-sharma/cloud-fpga-backend
- Team: 2 GitHub contributor(s) — Jason Yi (12 commits), Connor Spackman (2 commits)

## Devpost submission (written by the team)

### Inspiration

The inherent complexity in Vivado's design tools identified an opportunity for a streamlined, intuitive interface for hardware design. This led to the development of XLR8, a platform designed to simplify the hardware development process and enhance accessibility for a broad spectrum of users.

### What it does

XLR8 enhances the hardware development workflow by providing real-time synthesis and simulation of Verilog code. It is engineered to reduce the development cycle time and improve productivity through an integrated suite of development tools that cater to the evolving needs of hardware developers.

### How we built it

XLR8 was developed by integrating Node.js for robust backend operations, Electron for cross-platform desktop application deployment, and React for a dynamic and responsive user interface. This combination of technologies ensures a scalable and efficient application that meets modern industry standards.

### Challenges we ran into

Documentational deficiencies in AWS EC2 F1 instances presented significant obstacles. However, the development team successfully navigated these challenges, successfully utilizing the platform's capabilities to provide a service to users.

### Accomplishments we're proud of

The Waveviewer feature within XLR8 stands as a significant achievement, providing users with clear and interpretable visualization of simulation outputs. This tool is a reflection of the platform's commitment to innovation and usability in hardware simulation.

### What we learned

The project reinforced the importance of collaborative teamwork and effective task delegation in overcoming technical challenges. This approach proved essential in the successful execution of a project with the complexity and scope of XLR8.

### What's next

The next phase for XLR8 involves securing investment to scale up operations and expand the platform's functionality. The aim is to continuously adapt and extend XLR8's offerings, positioning the platform as a leader in the space.

## README (from the GitHub repository)

# cloud-fpga-frontend

TreeHacks 24

# Getting Started with Create React App

This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).

## Available Scripts

In the project directory, you can run:

### `npm start`

Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in your browser.

The page will reload when you make changes.\
You may also see any lint errors in the console.

### `npm test`

Launches the test runner in the interactive watch mode.\
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.

### `npm run build`

Builds the app for production to the `build` folder.\
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.\
Your app is ready to be deployed!

See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.

### `npm run eject`

**Note: this is a one-way operation. Once you `eject`, you can't go back!**

If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own.

You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it.

## Learn More

You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).

To learn React, check out the [React documentation](https://reactjs.org/).

### Code Splitting

This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)

### Analyzing the Bundle Size

This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)

### Making a Progressive Web App

This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)

### Advanced Configuration

This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)

### Deployment

This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)

### `npm run build` fails to minify

This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)


## Detected evidence (automated analysis)

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

## Codebase structure (from repository index)

### Files (24 of 24)

```
.gitignore
.vscode/settings.json
package.json
public/index.html
public/main.js
public/manifest.json
public/preload.js
public/robots.txt
public/swerv1.vcd
README.md
src/App.css
src/App.js
src/App.test.js
src/components/CodeEditor.jsx
src/components/FilesViewer.jsx
src/components/UseMousePosition.jsx
src/components/Visualizer.jsx
src/components/WaveDrawing.jsx
src/index.css
src/index.js
src/reportWebVitals.js
src/scripts/vcd_parse.js
src/setupTests.js
tailwind.config.js
```

### Dependencies

- package.json: @codemirror/legacy-modes@^6.3.3, @electron/remote@^2.1.2, @testing-library/jest-dom@^5.17.0, @testing-library/react@^13.4.0, @testing-library/user-event@^13.5.0, @uiw/codemirror-theme-basic@^4.21.22, @uiw/react-codemirror@^4.21.22, @uiw/react-textarea-code-editor@^3.0.2, concurrently@^8.2.2, cross-env@^7.0.3, electron@^28.2.3, fs@^0.0.1-security, plotly@^1.0.6, react@^18.2.0, react-dom@^18.2.0, react-router-dom@^6.22.1, react-scripts@^5.0.1, react-use-promise@^0.5.0, require-polyfills@^1.0.1, tailwindcss@^3.4.1, vcd-parser@^1.0.1, wait-on@^7.2.0, web-vitals@^2.1.4

### Recent commits (newest first)

- log output and darker
- file explorer done
- file viewer displays files
- Merge branch 'main' of https://github.com/JasYi/cloud-fpga-frontend
- electron bridge
- finished wave viewer
- wave visualizer almsot done
- basic wave visualization done
- wave viewer done
- able to read vcd
- removing netlist folder
- initial commit for demo
- working on vcd parsing
- electron setup
- Initial commit

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

### package.json

```
{
  "name": "cloud-fpga-frontend",
  "version": "0.1.0",
  "private": true,
  "main": "public/main.js",
  "dependencies": {
    "@codemirror/legacy-modes": "^6.3.3",
    "@electron/remote": "^2.1.2",
    "@testing-library/jest-dom": "^5.17.0",
    "@testing-library/react": "^13.4.0",
    "@testing-library/user-event": "^13.5.0",
    "@uiw/codemirror-theme-basic": "^4.21.22",
    "@uiw/react-codemirror": "^4.21.22",
    "@uiw/react-textarea-code-editor": "^3.0.2",
    "concurrently": "^8.2.2",
    "cross-env": "^7.0.3",
    "electron": "^28.2.3",
    "fs": "^0.0.1-security",
    "plotly": "^1.0.6",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "react-router-dom": "^6.22.1",
    "react-scripts": "^5.0.1",
    "react-use-promise": "^0.5.0",
    "require-polyfills": "^1.0.1",
    "vcd-parser": "^1.0.1",
    "wait-on": "^7.2.0",
    "web-vitals": "^2.1.4"
  },
  "scripts": {
    "start": "BROWSER=none react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject",
    "electron-dev": "electron .",
    "electron:serve": "concurrently -k \"cross-env BROWSER=none npm start\" \"npm electron:start\"",
    "electron:build": "npm build && electron-builder -c.extraMetadata.main=build/main.js",
    "electron:start": "wait-on tcp:3001 && electron ."
  },
  "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": {
    "tailwindcss": "^3.4.1"
  }
}

```

### 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(<App />);

// 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 logo from "./logo.svg";
import "./App.css";
import { HashRouter as Router, Route, Routes, Link } from "react-router-dom";
import Visualizer from "./components/Visualizer";
import CodeEditor from "./components/CodeEditor";
import { React, useEffect, useMemo, useState } from "react";
import FilesViewer from "./components/FilesViewer";

function App() {
  return (
    <>
      <FilesViewer />
      <h1>file</h1>
      {/* <FilesViewer files={filteredFiles} onBack={onBack} onOpen={onOpen} />
   <CodeEditor /> */}
    </>
  );
}

export default App;

```

### public/main.js

```javascript
const { app, BrowserWindow } = require("electron");

function createWindow() {
  // Create the browser window.
  const win = new BrowserWindow({
    width: 800,
    height: 600,
    webPreferences: {
      nodeIntegration: true,
      preload: `${__dirname}/preload.js`,
    },
  });

  //load the index.html from a url
  win.loadURL("http://localhost:3000");

  // Open the DevTools.
  win.webContents.openDevTools();
}

// This method will be called when Electron has finished
// initialization and is ready to create browser windows.
// Some APIs can only be used after this event occurs.
app.whenReady().then(createWindow);

// Quit when all windows are closed, except on macOS. There, it's common
// for applications and their menu bar to stay active until the user quits
// explicitly with Cmd + Q.
app.on("window-all-closed", () => {
  if (process.platform !== "darwin") {
    app.quit();
  }
});

app.on("activate", () => {
  // On macOS it's common to re-create a window in the app when the
  // dock icon is clicked and there are no other windows open.

  if (BrowserWindow.getAllWindows().length === 0) {
    createWindow();
  }
});

// In this file you can include the rest of your app's specific main process
// code. You can also put them in separate files and require them here.

```

### tailwind.config.js

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

```

### 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
@tailwind base;
@tailwind components;
@tailwind utilities;

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;
}

```

### 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);
  }
}

```

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