# Project export: Repo Rewind

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: OpenAI Build Week
- Tagline: Turn a feature's scattered Git history into a rewindable, evidence-backed story.
- Devpost: https://devpost.com/software/feature-saga
- GitHub: https://github.com/Trion129/RepoRewind
- Demo: https://github.com/Trion129/RepoRewind/releases/tag/v0.1.6
- Video: https://www.youtube.com/embed/q4VVP7rD70E?enablejsapi=1&hl=en_US&rel=0&start=&version=3&wmode=transparent
- Team: 0 GitHub contributor(s) — 

## Devpost submission (written by the team)

### Inspiration

The hardest part of changing unfamiliar code is reconstructing the decisions accumulated across commits: what changed, which entities interacted, and why the current shape exists. File trees and blame views expose fragments, but they do not tell the feature's story.

### What it does

RepoRewind is a desktop developer tool that builds a local timeline of a Git repository. Developers can search code entities, explore function interactions, inspect commits related to an entity, and rewind the map to earlier states.

### How we built it

We built RepoRewind collaboratively in Codex with GPT-5.6 Sol. Codex accelerated cross-cutting work like snapshot comparison, repository analytics, and the commit deepdive. It is made with Rust and Tauri with language server support to handle various languages. Challenges and accomplishments The difficult parts were building the timeline and history of repo. Firstly we wanted to make 3D visualizations but it wasn't panning out well and was very noisy. Finally we went with tabular formats. We are proud of the final features to rewind and forward to specific commits.

### What's next

Next we would deepen language-server coverage, improve the visual factor with 3D graphics and add macOS and Linux packaging.

## README (from the GitHub repository)

# RepoRewind

RepoRewind is a Windows desktop application that turns Dart and Kotlin Git history into a rewindable semantic graph. It analyzes repositories in a private cache, never checks out or modifies the selected working tree, and stores all indexes locally.

[Download the Windows installer](https://github.com/Trion129/RepoRewind/releases/latest) · [OpenAI Build Week submission](https://devpost.com/software/feature-saga)

## MVP capabilities

- Native Git working-tree picker and explicit repository trust.
- Dart Analysis Server and checksum-pinned JetBrains Kotlin LSP runtime management.
- Current working-tree graph first, then cancellable newest-first HEAD ancestry indexing.
- Class-like entities connected by language-server call-hierarchy evidence.
- SQLite/WAL metadata with zstd checkpoints and semantic deltas.
- 3D mouse navigation, package clustering, filters, entity search, edge evidence, commit rewind, and paginated related commits.
- Windows x64 NSIS packaging through Tauri 2.

## Development

Prerequisites are Node.js, the Rust MSVC toolchain, Visual Studio C++ Build Tools, and WebView2. Dart/Flutter is required to analyze Dart repositories; Kotlin can be installed from the setup screen.

```powershell
npm install
npm test
npm run tauri build
```

Indexes and managed runtimes live under `%LOCALAPPDATA%\RepoRewind`. Dependency restore is permitted only after repository trust and only inside RepoRewind's materialized cache workspaces.

## Architecture

The React interface calls a narrow set of Tauri commands. Rust owns Git traversal/materialization, LSP sessions, runtime installation, semantic identity and deltas, checkpoints, SQLite persistence, pagination, and background job cancellation. Historical reconstruction starts from the nearest first-parent checkpoint and applies bounded deltas; incomplete analysis remains explicitly partial.

## Judge quick start

RepoRewind supports Windows x64. The fastest path is the prebuilt `RepoRewind_0.1.6_x64-setup.exe` attached to the GitHub release. Install it, select a local Dart or Kotlin repository with several commits, review the explicit trust prompt, start analysis, select an entity, inspect **What changed** and **Affected code**, and rewind from the commit timeline. No account or API key is required, and the selected working tree is not modified.

## How Codex and GPT-5.6 were used

RepoRewind was built collaboratively in Codex with GPT-5.6 Sol. Codex accelerated repository-wide work across React, Rust, Git, SQLite, tests, and Windows packaging: diagnosing stale completed indexes using working-tree fingerprints, replacing an unscalable layout with deterministic Barnes-Hut physics in a Web Worker, and tracing Git commit descriptions end-to-end into the story-first inspector.

Human direction set the product constraints: visible connections and readable labels, scalable layout instead of hand-tuned physics, and a clear story before dense technical evidence. See the [Codex/GPT-5.6 evidence plan](docs/submission/CODEX_GPT56_EVIDENCE.md).

## Build Week materials

- [Narrated demo script](docs/submission/DEMO_SCRIPT.md)
- [Prepared Devpost copy](docs/submission/DEVPOST_COPY.md)
- [Requirement checklist](docs/submission/SUBMISSION_CHECKLIST.md)

## License

RepoRewind is available under the [MIT License](LICENSE).


## Detected evidence (automated analysis)

Indexed codebase: 83 recognized source files, 746 KB.
- CSS (language) — detected in the code
- HTML (language) — detected in the code
- React (technology) — detected in the code
- Rust (language) — detected in the code
- TypeScript (language) — detected in the code
- AI coding agent: Codex — evidence: config files committed to the repository

## Codebase structure (from repository index)

### Files (95 of 95)

```
.gitignore
.vscode/extensions.json
AGENTS.md
docs/specs/author-analytics.SPEC.md
docs/specs/auto-index.SPEC.md
docs/specs/commit-descriptions.SPEC.md
docs/specs/commit-detail-view.SPEC.md
docs/specs/entity-browser-utils.SPEC.md
docs/specs/entity-browser.SPEC.md
docs/specs/export-share.SPEC.md
docs/specs/full-text-search.SPEC.md
docs/specs/inspector-scrolling.SPEC.md
docs/specs/package-heatmap.SPEC.md
docs/specs/snapshot-compare.SPEC.md
docs/specs/stats-dashboard.SPEC.md
docs/specs/time-travel-scrubber.SPEC.md
docs/specs/usage-frequency-view.SPEC.md
docs/submission/CODEX_GPT56_EVIDENCE.md
docs/submission/DEMO_SCRIPT.md
docs/submission/DEVPOST_COPY.md
docs/submission/SUBMISSION_CHECKLIST.md
index.html
LICENSE
package.json
README.md
src-tauri/.gitignore
src-tauri/build.rs
src-tauri/capabilities/default.json
src-tauri/Cargo.lock
src-tauri/Cargo.toml
src-tauri/icons/icon.icns
src-tauri/src/app_core.rs
src-tauri/src/commands.rs
src-tauri/src/dependency.rs
src-tauri/src/diagnostics.rs
src-tauri/src/domain.rs
src-tauri/src/indexer.rs
src-tauri/src/lib.rs
src-tauri/src/lsp.rs
src-tauri/src/main.rs
src-tauri/src/query.rs
src-tauri/src/repository.rs
src-tauri/src/runtime.rs
src-tauri/src/semantic.rs
src-tauri/src/source_adapter.rs
src-tauri/src/store.rs
src-tauri/tauri.conf.json
src-tauri/tests/application_core.rs
src-tauri/tests/dart_lsp.rs
src-tauri/tests/dependency_restore.rs
src-tauri/tests/domain.rs
src-tauri/tests/git_repository.rs
src-tauri/tests/graph_query.rs
src-tauri/tests/history_store.rs
src-tauri/tests/index_coordinator.rs
src-tauri/tests/lsp_symbols.rs
src-tauri/tests/lsp_workspace_analyzer.rs
src-tauri/tests/performance_acceptance.rs
src-tauri/tests/runtime_manager.rs
src-tauri/tests/semantic_model.rs
src-tauri/tests/snapshot_compare.rs
src-tauri/tests/source_adapter.rs
src/api.ts
src/App.css
src/App.test.tsx
src/App.tsx
src/components/AuthorFilter.test.tsx
src/components/AuthorFilter.tsx
src/components/CommitDetailView.test.tsx
src/components/CommitDetailView.tsx
src/components/CommitTimeline.test.tsx
src/components/CommitTimeline.tsx
src/components/ComparePanel.test.tsx
src/components/ComparePanel.tsx
src/components/EntityBrowser.test.tsx
src/components/EntityBrowser.tsx
src/components/Inspector.test.tsx
src/components/Inspector.tsx
src/components/StatsDashboard.test.tsx
src/components/StatsDashboard.tsx
src/components/TimeScrubber.css
src/components/TimeScrubber.tsx
src/components/UsageFrequencyView.test.tsx
src/components/UsageFrequencyView.tsx
src/components/Workspace.test.tsx
src/components/Workspace.tsx
src/entityBrowserUtils.test.ts
src/entityBrowserUtils.ts
src/main.tsx
src/setupTests.ts
src/types.ts
src/vite-env.d.ts
tsconfig.json
tsconfig.node.json
vite.config.ts
```

### Dependencies

- package.json: @tauri-apps/api@^2, @tauri-apps/cli@^2, @tauri-apps/plugin-dialog@^2.7.1, @tauri-apps/plugin-fs@^2.5.1, @tauri-apps/plugin-opener@^2, @testing-library/jest-dom@^6.9.1, @testing-library/react@^16.3.2, @testing-library/user-event@^14.6.1, @types/react@^19.1.8, @types/react-dom@^19.1.6, @types/three@^0.185.1, @vitejs/plugin-react@^4.6.0, d3-force-3d@^3.0.6, jsdom@^29.1.1, lucide-react@^1.24.0, ngraph.forcelayout@^3.3.1, ngraph.graph@^20.1.2, react@^19.1.0, react-dom@^19.1.0, react-force-graph-3d@^1.29.1, three@^0.185.1, typescript@~5.8.3, vite@^7.0.4, vitest@^4.1.10
- src-tauri/Cargo.toml: async-trait@0.1.89, base64@0.22.1, blake3@1.8.5, chrono@0.4.45, futures@0.3.32, git2@0.21.0, parking_lot@0.12.5, reqwest@0.13.4, rusqlite@0.40.1, serde@1, serde_json@1, sha2@0.11.0, tauri@2, tauri-build@2, tauri-plugin-dialog@2.7.1, tauri-plugin-opener@2, tempfile@3.27.0, thiserror@2.0.18, tokio@1.52.3, url@2.5.8, uuid@1.23.5, walkdir@2.5.0, zip@8.6.0, zstd@0.13.3

### Recent commits (newest first)

- Finalize Build Week readiness checklist
- Publish RepoRewind for OpenAI Build Week
- fix(graph): give 3D graph enough initial ticks to align edges with pinned nodes
- chore: checkpoint before graph connection investigation
- Use ngraph Barnes-Hut for scalable 3D layout
- Fix stale completed index dead end
- Add interactive 3D graph physics
- Restore full graph and preserve camera controls
- Redesign workspace and tame dense graphs
- Fix graph viewport framing and visual density

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

### AGENTS.md

```markdown
# RepoRewind — AGENTS.md

## Project overview

RepoRewind is a Windows desktop application that turns Git history into a rewindable semantic graph. It analyzes repositories in a private cache, never modifies the working tree, and stores all indexes locally.

**Stack:** React 19 + TypeScript frontend, Rust + Tauri 2 backend, SQLite/WAL with zstd delta checkpoints, WebGL 3D rendering via Three.js.

**Version:** 0.1.6

---

## Directory map

### `/` — Project root

| Path | Purpose |
|---|---|
| `package.json` | Node deps: React, Tauri API, d3-force-3d, react-force-graph-3d, ngraph, three, lucide-react |
| `vite.config.ts` | Vite + Vitest config, Tauri dev server (port 1420), jsdom test env |
| `tsconfig.json` | Strict TS, ES2020, JSX react-jsx, bundler resolution |
| `tsconfig.node.json` | TS config for node-side Vite config |
| `index.html` | SPA entry with `<div id="root">` |
| `README.md` | Dev setup, architecture summary |
| `.gitignore` | Ignores node_modules, dist, .vscode/* (except extensions.json), logs |
| `.vscode/extensions.json` | Recommends `tauri-apps.tauri-vscode` and `rust-lang.rust-analyzer` |

### `src/` — TypeScript frontend

| Path | Role |
|---|---|
| `main.tsx` | React root render |
| `App.tsx` | App shell: welcome screen, repo picker, trust flow, runtime setup, workspace dispatch |
| `App.css` | Full dark theme CSS (~227 lines) |
| `types.ts` | All shared TS types: `GraphNode`, `GraphEdge`, `GraphSnapshot`, `RepositorySummary`, `RuntimeStatus`, `IndexProgress`, `StateId`, etc. |
| `api.ts` | Tauri IPC bridge: wraps `invoke` calls + event `listen` for `index-progress` |
| `setupTests.ts` | Vitest setup |
| `vite-env.d.ts` | Vite type shim |
| `d3-force-3d.d.ts` | Type augmentation for d3-force-3d integration |

#### Graph engine (`src/graph*.ts`)

| Path | Role |
|---|---|
| `graphModel.ts` | `RenderNode`/`RenderLink` types, `createRenderableGraph()` with package clustering when nodes > 3000 |
| `graphFocus.ts` | `buildFocusNeighborhood()` — BFS around a selected node |
| `graphControls.ts` | Mouse/keyboard control configuration for the 3D scene |
| `graphPhysics.ts` | Physics settings (alpha decay, velocity), layout stability detection, bounds |
| `graphViewport.ts` | Dimension normalization, auto-fit logic |
| `graphVisuals.ts` | Color palettes, label dimensions, link width/thickness constants |
| `layout.ts` | Deterministic ngraph force layout — offloaded to web worker, deterministic seed from node ID hash |

#### Web worker

| Path | Role |
|---|---|
| `workers/layout.worker.ts` | Thin worker wrapper calling `computePhysicsLayout` from `layout.ts` |

#### Components (`src/components/`)

| Path | Role |
|---|---|
| `Workspace.tsx` | Main orchestrator: commit timeline, 3D graph, inspector — state management, filtering, search |
| `GraphExplorer3D.tsx` | `react-force-graph-3d` wrapper with WebGL canvas, node labels via canvas sprites, physics, resize/auto-fit |
| `Inspector.tsx` | Entity detail card + interaction evidence + r
[truncated — 5767 more characters]
```

### docs/submission/SUBMISSION_CHECKLIST.md

```markdown
# OpenAI Build Week submission checklist

Deadline: July 21, 2026 at 5:00 PM Pacific (July 22 at 5:30 AM India time).

| Requirement | Status | Action |
|---|---|---|
| Working project using Codex/GPT-5.6 | Ready | Verified installer, source, tests, and Codex evidence trail |
| Category | Ready | **Developer Tools** |
| Description | Ready | Published in the Devpost project |
| Public YouTube demo under 3 minutes | Missing | Record from `DEMO_SCRIPT.md` |
| Voiceover covers product, Codex, GPT-5.6 | Ready in script | Preserve 2:00–2:35 section |
| Repository URL | Ready | `https://github.com/Trion129/RepoRewind` |
| Public-repo license | Ready | MIT License |
| README setup and AI-use story | Ready | Published on GitHub |
| Developer-tool install/platform/test path | Ready | Installer attached to GitHub release |
| `/feedback` session evidence | Ready | Primary build task: `019f623e-4891-7092-a246-caf5ca2dcdc3` |
| Submitter type, country, team | Prepared | Individual, India, sole author |
| Final state | Waiting on video | Submit immediately after the public YouTube URL is available |

## Judge-criteria alignment

| Criterion | Best proof |
|---|---|
| Technological Implementation | Cross-stack implementation, stale-index fix, scalable layout, tests, session/commit trail |
| Design | Installer-first path, safe trust boundary, semantic map, rewind, story-first inspector |
| Potential Impact | Demonstrate one concrete entity story end-to-end |
| Quality of the Idea | Semantic structure plus history, not another static dependency graph or blame view |

## Final owner actions

1. Record the prepared demo and upload it publicly to YouTube.
2. Provide the YouTube URL so it can be attached and the submission finalized.

```

### package.json

```
{
  "name": "reporewind",
  "private": true,
  "version": "0.1.6",
  "type": "module",
  "scripts": {
    "dev": "vite",
    "build": "tsc && vite build",
    "test": "vitest run",
    "test:watch": "vitest",
    "preview": "vite preview",
    "tauri": "tauri"
  },
  "dependencies": {
    "@tauri-apps/api": "^2",
    "@tauri-apps/plugin-dialog": "^2.7.1",
    "@tauri-apps/plugin-fs": "^2.5.1",
    "@tauri-apps/plugin-opener": "^2",
    "d3-force-3d": "^3.0.6",
    "lucide-react": "^1.24.0",
    "ngraph.forcelayout": "^3.3.1",
    "ngraph.graph": "^20.1.2",
    "react": "^19.1.0",
    "react-dom": "^19.1.0",
    "react-force-graph-3d": "^1.29.1",
    "three": "^0.185.1"
  },
  "devDependencies": {
    "@tauri-apps/cli": "^2",
    "@testing-library/jest-dom": "^6.9.1",
    "@testing-library/react": "^16.3.2",
    "@testing-library/user-event": "^14.6.1",
    "@types/react": "^19.1.8",
    "@types/react-dom": "^19.1.6",
    "@types/three": "^0.185.1",
    "@vitejs/plugin-react": "^4.6.0",
    "jsdom": "^29.1.1",
    "typescript": "~5.8.3",
    "vite": "^7.0.4",
    "vitest": "^4.1.10"
  }
}

```

### src-tauri/Cargo.toml

```
[package]
name = "reporewind"
version = "0.1.6"
description = "Local semantic code-history explorer"
authors = ["RepoRewind contributors"]
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[lib]
# The `_lib` suffix may seem redundant but it is necessary
# to make the lib name unique and wouldn't conflict with the bin name.
# This seems to be only an issue on Windows, see https://github.com/rust-lang/cargo/issues/8519
name = "reporewind_lib"
crate-type = ["staticlib", "cdylib", "rlib"]

[build-dependencies]
tauri-build = { version = "2", features = [] }

[dependencies]
tauri = { version = "2", features = [] }
tauri-plugin-opener = "2"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
tauri-plugin-dialog = "2.7.1"
git2 = "0.21.0"
blake3 = "1.8.5"
thiserror = "2.0.18"
async-trait = "0.1.89"
walkdir = "2.5.0"
url = "2.5.8"
base64 = "0.22.1"
sha2 = "0.11.0"
parking_lot = "0.12.5"
futures = "0.3.32"
zip = "8.6.0"
rusqlite = { version = "0.40.1", features = ["bundled", "chrono"] }
uuid = { version = "1.23.5", features = ["serde", "v4"] }
chrono = { version = "0.4.45", features = ["serde"] }
tokio = { version = "1.52.3", features = ["process", "io-util", "sync", "fs", "time", "macros", "rt-multi-thread"] }
reqwest = { version = "0.13.4", default-features = false, features = ["json", "rustls", "stream"] }
zstd = "0.13.3"

[dev-dependencies]
tempfile = "3.27.0"

```

### src/main.tsx

```typescript
import React from "react";
import ReactDOM from "react-dom/client";
import App from "./App";

ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
  <React.StrictMode>
    <App />
  </React.StrictMode>,
);

```

### src/App.tsx

```typescript
import { lazy, Suspense, useCallback, useEffect, useState } from "react";
import { FolderGit2, GitBranch, LockKeyhole, ShieldCheck, Sparkles } from "lucide-react";
import * as api from "./api";
import type { IndexProgress, RepositorySummary, RuntimeStatus, StateId } from "./types";
import "./App.css";

const Workspace = lazy(() => import("./components/Workspace").then((module) => ({ default: module.Workspace })));

const BUILT_IN_LANGUAGE_GROUPS = [
  { label: "TypeScript / JavaScript", detail: "TS, TSX, JS, JSX, MJS, and CJS source adapters" },
  { label: "Python", detail: "Python source adapter" },
  { label: "Go", detail: "Go source adapter" },
  { label: "C / C++ / C#", detail: "C, C++, headers, and C# source adapters" },
  { label: "Java / Swift / Rust", detail: "Java, Swift, and Rust source adapters" },
] as const;

function App() {
  const [repository, setRepository] = useState<RepositorySummary | null>(null);
  const [runtimes, setRuntimes] = useState<RuntimeStatus | null>(null);
  const [progress, setProgress] = useState<IndexProgress | null>(null);
  const [busy, setBusy] = useState(false);
  const [error, setError] = useState<string | null>(null);
  const [workspaceAvailable, setWorkspaceAvailable] = useState(false);

  useEffect(() => {
    let unlisten: (() => void) | undefined;
    api.listenIndexProgress(setProgress).then((dispose) => {
      unlisten = dispose;
    });
    return () => unlisten?.();
  }, []);

  const openRepository = useCallback(async () => {
    setBusy(true);
    setError(null);
    try {
      const opened = await api.openRepositoryPicker();
      if (!opened) return;
      setWorkspaceAvailable(false);
      setRepository(opened);
      setRuntimes(await api.runtimeStatus(opened.id));
      const previousProgress = await api.getIndexStatus(opened.id);
      const staleCompletedIndex = previousProgress?.phase === "complete"
        && (!previousProgress.currentState || !sameState(previousProgress.currentState, opened.workingTreeState));
      setProgress(staleCompletedIndex ? null : previousProgress);
    } catch (cause) {
      setError(String(cause));
    } finally {
      setBusy(false);
    }
  }, []);

  useEffect(() => {
    if (!repository || !progress || progress.repoId !== repository.id) return;
    const graphReady = progress.phase === "complete"
      || (progress.phase === "current" && progress.message === "Working graph ready");
    const workingGraphReady = graphReady
      && progress.currentState
      && sameState(progress.currentState, repository.workingTreeState);
    if (workingGraphReady) setWorkspaceAvailable(true);
  }, [progress, repository]);

  const updateTrust = useCallback(
    async (trusted: boolean) => {
      if (!repository) return;
      setBusy(true);
      setError(null);
      try {
        setRepository(await api.setRepositoryTrust(repository.id, trusted));
      } catch (cause) {
        setError(String(cause));
      } finally {
        setBusy(false);
      }
    },
    [repository],
  );

  if (!repository) {
    return (
      <main className="welcome-shell">
        <section className="welcome-card">
          <div className="brand-mark" aria-hidden="true"><Sparkles size={22} /></div>
        <p className="eyebrow">RepoRewind · Local code archaeology</p>
          <h1>Follow the life of your code.</h1>
          <p className="welcome-copy">
            Turn a Git repository into a semantic map you can explore, question, and rewind.
            Your source and history stay on this machine.
          </p>
          <button className="primary-action" onClick={openRepository} disabled={busy}>
            <FolderGit2 size={19} />
            {busy ? "Opening…" : "Open Git repository"}
          </button>
          <div className="welcome-footnote"><LockKeyhole size={14} /> Read-only source access</div>
          {error && <p className="error-banner" role="alert">{error}</p>}
        </section>
      </main>
    );
  }

  if (workspaceAvailable) {
    return <Suspense fallback={<main className="workspace-loading">Loading graph workspace…</main>}><Workspace repository={repository} progress={progress} onChangeRepository={openRepository} /></Suspense>;
  }

  return (
    <main className="setup-shell">
      <header className="setup-header">
        <div className="wordmark"><span className="wordmark-glyph">RR</span> RepoRewind</div>
        <button className="quiet-button" onClick={openRepository}>Change repository</button>
      </header>
      <section className="repository-summary">
        <div className="repo-icon"><FolderGit2 size={24} /></div>
        <div>
          <p className="eyebrow">Selected repository</p>
          <h2>{repository.name}</h2>
          <p className="repo-path">{repository.path}</p>
        </div>
        <div className="repo-facts">
          <span><GitBranch size={14} /> {repository.branch ?? "detached HEAD"}</span>
          {repository.dirty && <span className="dirty-pill">Working tree changes</span>}
        </div>
      </section>

      {!repository.trustDecided ? (
        <section className="trust-panel">
          <div className="section-icon"><ShieldCheck size={22} /></div>
          <p className="step-label">Step 1 of 2</p>
          <h1>Trust this repository?</h1>
          <p>
            Trusted repositories may restore Flutter dependencies and import Gradle projects only
              inside RepoRewind’s private cache. The selected working tree remains untouched.
          </p>
          <div className="trust-actions">
            <button className="primary-action" onClick={() => updateTrust(true)} disabled={busy}>
              Trust repository
            </button>
            <button className="secondary-action" onClick={() => updateTrust(false)} disabled={busy}>
              Continue without restore
            </button>
          </div>
        </section>
      ) : (
        <RuntimeSetup repository={repository} runtimes={runtimes} progress={progress} />
      )}

[truncated — 4826 more characters]
```

### src-tauri/src/main.rs

```rust
// Prevents additional console window on Windows in release, DO NOT REMOVE!!
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]

fn main() {
    reporewind_lib::run()
}

```

### index.html

```html
<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <link rel="icon" type="image/svg+xml" href="/vite.svg" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>RepoRewind</title>
  </head>

  <body>
    <div id="root"></div>
    <script type="module" src="/src/main.tsx"></script>
  </body>
</html>

```

### vite.config.ts

```typescript
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";

// @ts-expect-error process is a nodejs global
const host = process.env.TAURI_DEV_HOST;

// https://vite.dev/config/
export default defineConfig(async () => ({
  plugins: [react()],
  test: {
    environment: "jsdom",
    setupFiles: ["./src/setupTests.ts"],
    css: true,
  },

  // Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build`
  //
  // 1. prevent Vite from obscuring rust errors
  clearScreen: false,
  // 2. tauri expects a fixed port, fail if that port is not available
  server: {
    port: 1420,
    strictPort: true,
    host: host || false,
    hmr: host
      ? {
          protocol: "ws",
          host,
          port: 1421,
        }
      : undefined,
    watch: {
      // 3. tell Vite to ignore watching `src-tauri`
      ignored: ["**/src-tauri/**"],
    },
  },
}));

```

### src/vite-env.d.ts

```typescript
/// <reference types="vite/client" />

```

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