How oldmanumby/gitswapforged works
Purpose and Runtime
gitswapForged is a client-side GitHub URL transformation tool. A user supplies a repository URL, and the application presents alternate service URLs (for example, gitingest, github.dev, and bolt.new) plus clipboard-copy actions. It runs as a vanilla JavaScript single-page application built and served by Vite.
Core runtime files: src/main.js, index.html, vite.config.js.
Application Entry and Bootstrapping
index.html is the browser document and Vite entry surface. src/main.js is the primary application entry point, responsible for attaching UI behavior and rendering or updating the interactive URL-swap interface. Styling is loaded from the application stylesheet.
Boundaries: browser DOM/UI boundary at index.html; application initialization and event handling in src/main.js; presentation styling in src/style.css.
Repository URL Input Stage
The primary input flow begins with a pasted GitHub repository URL. Client-side logic must interpret that URL sufficiently to derive a repository-specific path or identifier used by each target service. This is an entirely local transformation stage; the repository does not indicate a backend API, database, or authentication layer.
Primary implementation location: src/main.js.
URL Swap Generation
The central domain function is mapping one GitHub repository URL into multiple destination-service URLs. Each generated result becomes a card or equivalent UI element representing a distinct “superpower,” such as opening the repository in a web editor, ingestion service, or AI-oriented tool.
The transformation logic and result rendering are expected to be co-located in src/main.js; generated UI is hosted by index.html and styled through src/style.css.
Interaction and Clipboard Boundary
Generated URL cards support one-click copy behavior. This creates a browser-platform boundary: application code invokes clipboard capabilities, while the browser controls permissions and availability. The UI should communicate generated values and copy outcomes without relying on server-side state.
Relevant paths: src/main.js, src/style.css.
Presentation and Static Assets
The interface is responsive and uses a glassmorphism-inspired visual design. src/style.css defines the visual system and responsive layout. Static browser-served resources belong under public, while source-managed visual assets are represented by src/assets.
Relevant paths: src/style.css, public, src/assets.
Build and Deployment Model
Vite provides development serving and production bundling. vite.config.js defines Vite-specific behavior, while package.json and package-lock.json define the Node dependency and script environment. Production output is static client assets suitable for hosting on any static web server; no material external infrastructure is identified beyond destination URL services and the browser Clipboard API.
Relevant paths: vite.config.js, package.json, package-lock.json.
Main entry points: index.html Browser document · main.js URL swap generator · style.css Visual system · public Static resources
Components 15
Browser SPA
- Browser document · Hosts the application UI.
index.html - Application controller · Initializes UI behavior and updates the interface.
src/main.js - Repository URL input · Accepts a pasted GitHub repository URL.
src/main.js - Repository identifier parser · Derives repository-specific path data locally.
src/main.js - URL swap generator · Maps a GitHub repository to destination-service URLs.
src/main.js - Generated URL cards · Presents one result per destination service.
src/main.js - Clipboard API · Browser-controlled copy capability and permissions boundary.
- Visual system · Defines responsive glassmorphism styling and copy feedback presentation.
src/style.css - Static resources · Browser-served static resources.
public - Source visual assets
src/assets
Build tooling
- Node scripts and dependencies
package.json - Vite configuration
vite.config.js - Vite build and dev server · Serves development and bundles static production assets.
Other components
- Destination services · Examples include gitingest, github.dev, and bolt.new.
- Static production assets · Suitable for any static web server.
Connections 14
- Browser document → Application controller: loads
- Application controller → Repository URL input: handles
- Repository URL input → Repository identifier parser: submits URL
- Repository identifier parser → URL swap generator: repository identifier
- URL swap generator → Generated URL cards: generated URLs
- Generated URL cards → Clipboard API: copy action
- URL swap generator → Destination services: produces links to
- Visual system → Browser document: styles
- Source visual assets → Application controller: used by
- Static resources → Browser document: served to
- Node scripts and dependencies → Vite build and dev server: runs and installs
- Vite configuration → Vite build and dev server: configures
- Vite build and dev server → Browser document: serves
- Vite build and dev server → Static production assets: bundles