Skip to content

Commit 4eb3971

Browse files
author
juniorbutyeah
committed
Interstellar V7 - Initial release
Web proxy with multi-tab browser interface using Scramjet + Wisp transport. - Astro 5 + React 19 + Fastify backend - Tabbed browser with bookmarks, history navigation - 12 theme options, tab cloaking, panic key support - Build-time obfuscation for routes/assets/classes
0 parents  commit 4eb3971

481 files changed

Lines changed: 15706 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "npm"
4+
directory: "/"
5+
schedule:
6+
interval: "daily"

.github/workflows/biome.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Code quality
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
push:
8+
branches: [main]
9+
pull_request:
10+
branches: [main]
11+
12+
jobs:
13+
quality:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Setup Biome
20+
uses: biomejs/setup-biome@v2
21+
with:
22+
version: 1.9.4
23+
24+
- name: Run Biome
25+
run: biome ci .

.gitignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Deep Directories
2+
**/dist
3+
**/node_modules
4+
**/.vercel
5+
**/.astro
6+
7+
# Logs
8+
npm-debug.log*
9+
yarn-debug.log*
10+
yarn-error.log*
11+
pnpm-debug.log*
12+
13+
# Environment Variables
14+
.env

.obfuscation-map.json

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"routes": {
3+
"tabs": "dC_9N",
4+
"apps": "CYVlH",
5+
"games": "p2z_R",
6+
"settings": "ViprG",
7+
"scramjet": "tVhgg"
8+
},
9+
"assets": {
10+
"scramjet": "LltatD",
11+
"scramjet.all": "ONOGAV",
12+
"scramjet.sync": "HTTRAs",
13+
"scramjet.wasm": "u6fl30",
14+
"scramjet.bundle": "hxrdM-"
15+
},
16+
"code": {
17+
"browser-container": "XT",
18+
"tab-button": "PG",
19+
"address-bar": "i5",
20+
"iframe-container": "eX",
21+
"settings-card": "Gd",
22+
"settings-grid": "dp",
23+
"proxy-frame": "xy",
24+
"search-box": "xh",
25+
"search": "Dv",
26+
"main-content": "Om",
27+
"proxy-iframe": "JC",
28+
"browser-frame": "YH",
29+
"nav-menu": "ku",
30+
"menu-toggle": "Yg",
31+
"menu-icon": "td",
32+
"close-icon": "Fq",
33+
"data-page": "data-xf",
34+
"data-route": "data-Fz",
35+
"data-asset": "data-x5"
36+
},
37+
"version": "44276202a730a94f"
38+
}

.prettierignore

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Deep Directories
2+
**/dist
3+
**/node_modules
4+
**/.vercel
5+
**/.astro
6+
7+
# Files
8+
pnpm-lock.yaml
9+
10+
# Formatted by Biome
11+
**/*.json
12+
**/*.js
13+
**/*.ts
14+
**/*.tsx
15+
**/*.jsx
16+
**/*.mjs
17+
**/*.cjs
18+
**/*.css

.vscode/extensions.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"recommendations": ["astro-build.astro-vscode", "bradlc.vscode-tailwindcss", "esbenp.prettier-vscode"],
3+
"unwantedRecommendations": []
4+
}

.vscode/launch.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"command": "./node_modules/.bin/astro dev",
6+
"name": "Development server",
7+
"request": "launch",
8+
"type": "node-terminal"
9+
}
10+
]
11+
}

AGENTS.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Repository Guidelines
2+
3+
## Project Structure & Module Organization
4+
- `src/` holds Astro pages (`src/pages/*.astro`), layouts (`src/layouts/`), UI components (`src/components/`), and client utilities (`src/lib/`).
5+
- `public/` contains static assets and proxy bundles (e.g., `public/sw.js`, `public/assets/bundled/`).
6+
- `index.ts` is the Fastify production server entry; `config.ts` contains runtime configuration.
7+
- `docs/CODEBASE_MAP.md` is the canonical, full codebase map.
8+
9+
## Build, Test, and Development Commands
10+
- `pnpm dev`: start the Astro dev server with HMR for local development.
11+
- `pnpm start`: run the Fastify server via `tsx index.ts` (production-style runtime).
12+
- `pnpm build`: typecheck then build the Astro site (`astro check && astro build`).
13+
- `pnpm preview`: serve the built site locally using Astro preview.
14+
- `pnpm typecheck`: run `astro check` only.
15+
- `pnpm check`: format and lint (`prettier --write .` and `biome check --write .`).
16+
- `pnpm precommit`: full verification (`pnpm typecheck && pnpm check`).
17+
18+
## Coding Style & Naming Conventions
19+
- Language stack: TypeScript, Astro, React, Tailwind.
20+
- Formatting/linting: Prettier + Biome; use `pnpm check`.
21+
- Style defaults: 2-space indentation, LF line endings, TypeScript strict mode.
22+
- Path alias: `@/` maps to `./src/`.
23+
- Use file-based routing in `src/pages/` and PascalCase for components (e.g., `Browser.tsx`).
24+
- Keep client-only logic in `src/lib/` and guard SSR-sensitive code with `typeof window`.
25+
26+
## Testing Guidelines
27+
- No dedicated test framework is configured in this repo.
28+
- Use `pnpm typecheck` and `pnpm build` as baseline verification.
29+
- When adding tests, align with Astro/TypeScript defaults and document new commands here.
30+
31+
## Commit & Pull Request Guidelines
32+
- Recent history mixes short imperative messages (e.g., “Bump deps”) and Conventional Commits from automation (e.g., `chore(deps): ...`).
33+
- Prefer Conventional Commit style for clarity, especially for dependency updates.
34+
- PRs should include a brief description, linked issues where applicable, and screenshots for UI changes.
35+
36+
## Security & Configuration Notes
37+
- Review `SECURITY.md` for reporting guidelines.
38+
## Architecture & Proxy Notes
39+
- Frontend: Astro pages + React components with Tailwind.
40+
- Backend: Fastify server in `index.ts` handling Wisp WebSocket routing, compression, and optional auth.
41+
- Proxy flow: URL encoded in `src/lib/tabs.ts` → iframe load → service worker (`public/sw.js`) → UV + Wisp/Bare-Mux.
42+
43+
## Configuration Notes
44+
- Runtime settings live in `config.ts` (server port, obfuscation, compression, basic auth).
45+
- Build obfuscation uses `randomize.ts` and renames files under `src/components/`, `src/layouts/`, `src/lib/`, `src/pages/`.
46+
- Avoid hardcoding secrets in the repo.

CLAUDE.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# CLAUDE.md
2+
3+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4+
5+
## Project Overview
6+
7+
Interstellar V6 is a web proxy application built with Astro 5, React 19, and Fastify. It provides a multi-tab browser interface that proxies websites through Ultraviolet (UV) with Wisp/Bare-Mux transport layers.
8+
9+
## Commands
10+
11+
```bash
12+
pnpm dev # Dev server with hot reload
13+
pnpm build # Type check + production build (runs obfuscation if enabled)
14+
pnpm start # Run production Fastify server (port 8080)
15+
pnpm preview # Preview production build
16+
pnpm typecheck # Astro strict type checking
17+
pnpm check # Format (Prettier) + lint (Biome)
18+
pnpm precommit # Full check: typecheck + format + lint
19+
```
20+
21+
## Architecture
22+
23+
**Frontend:** Astro pages + React components with Tailwind CSS
24+
**Backend:** Fastify server (`index.ts`) handling Wisp WebSocket routing, compression, optional auth
25+
**Proxy:** Ultraviolet engine with service worker interception at `/sw.js`
26+
27+
### Key Paths
28+
29+
- `src/pages/` - Astro routes (index, tabs, apps, games, settings)
30+
- `src/components/Browser.tsx` - Main React tabbed browser UI
31+
- `src/lib/` - Client utilities (global.ts for theme/panic, tabs.ts for URL encoding)
32+
- `index.ts` - Production Fastify server entry
33+
- `config.ts` - Server port, obfuscation toggle, auth settings
34+
- `randomize.ts` - Build-time file/route name obfuscation
35+
36+
### Proxy Flow
37+
38+
1. User enters URL in Browser.tsx
39+
2. `encodeProxyUrl()` in `tabs.ts` encodes URL with UV prefix
40+
3. Iframe loads encoded URL through service worker
41+
4. UV service worker proxies the request via Wisp transport
42+
43+
### URL Encoding
44+
45+
```typescript
46+
// tabs.ts
47+
encodeProxyUrl(url) → UV prefix + xor-encoded URL
48+
decodeProxyUrl(path) → original URL from encoded path
49+
```
50+
51+
## Configuration
52+
53+
`config.ts` controls runtime behavior:
54+
55+
- `server.port` - HTTP port (default 8080)
56+
- `server.obfuscate` - Enable build-time file name randomization
57+
- `server.compress` - Enable Brotli/Gzip compression
58+
- `auth.challenge` - Enable basic HTTP auth
59+
- `auth.users` - Username/password pairs
60+
61+
## Code Style
62+
63+
- Biome for linting/formatting (replaces ESLint + Prettier)
64+
- 2-space indentation, LF line endings
65+
- Path alias: `@/` maps to `./src/`
66+
- TypeScript strict mode enabled
67+
68+
## Build Obfuscation
69+
70+
When `config.server.obfuscate` is true, `randomize.ts` renames files in `src/components/`, `src/layouts/`, `src/lib/`, `src/pages/` with randomized names during build.
71+
72+
## Detailed Architecture
73+
74+
For comprehensive module documentation, data flows, and navigation guides, see [docs/CODEBASE_MAP.md](docs/CODEBASE_MAP.md).

Dockerfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM node:bookworm-slim AS builder
2+
ENV NODE_ENV=production
3+
4+
WORKDIR /app
5+
6+
RUN npm install -g pnpm
7+
8+
COPY ["package.json", "pnpm-lock.yaml*", "./"]
9+
10+
RUN pnpm install
11+
12+
COPY . .
13+
14+
RUN pnpm build

0 commit comments

Comments
 (0)