Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
378f9d6
chore(views): require VIEWS_IP_SALT in production, document in .env.e…
filiksyos Apr 12, 2026
dfc40b1
Merge pull request #35 from filiksyos/simpler-homepage
filiksyos Apr 12, 2026
3c70ed4
whatever
filiksyos Apr 13, 2026
e7b6d42
Merge pull request #36 from filiksyos/home-example-repo-exclusion
filiksyos Apr 13, 2026
88b8107
removed cache ttl
filiksyos Apr 13, 2026
d9ce7d3
Merge pull request #37 from filiksyos/no-cache-ttl
filiksyos Apr 13, 2026
ea0c8c0
whatever
filiksyos Apr 13, 2026
c4b8f19
Merge pull request #38 from filiksyos/smple
filiksyos Apr 13, 2026
ca1a783
custom reverse
filiksyos Apr 14, 2026
acfccb2
custom reverse beta
filiksyos Apr 15, 2026
110e75d
Merge pull request #39 from filiksyos/beta-invite-only
filiksyos Apr 15, 2026
598e8a9
redirect for now
filiksyos Apr 20, 2026
e1a5477
Merge pull request #40 from filiksyos/subfolder-redirect
filiksyos Apr 20, 2026
08357c6
customr reverse
filiksyos Apr 21, 2026
19e9c8b
Merge pull request #41 from filiksyos/custom-reverse-v1
filiksyos Apr 21, 2026
3631f09
renamed to manual control
filiksyos Apr 22, 2026
d83f186
Merge pull request #42 from filiksyos/manual-control
filiksyos Apr 22, 2026
9506c9a
..
filiksyos Apr 22, 2026
5e07b1b
Merge pull request #43 from filiksyos/manual-control
filiksyos Apr 22, 2026
dddf6b3
whatever
filiksyos Apr 24, 2026
d2694e7
reverse engineered prompt
filiksyos Apr 24, 2026
590fd35
Merge pull request #44 from filiksyos/deep-reverse
filiksyos Apr 24, 2026
5d20037
prompt caching for deep reverse
filiksyos Apr 24, 2026
0d14c10
Merge pull request #45 from filiksyos/deep-caching
filiksyos Apr 24, 2026
3a6acf1
sse progress
filiksyos Apr 24, 2026
bc449db
build fix
filiksyos Apr 24, 2026
c07a162
Merge pull request #46 from filiksyos/progress-message
filiksyos Apr 24, 2026
3f2d408
separate urls for deep and manual + history improvement
filiksyos Apr 25, 2026
c4d97e2
refactor history handling in HistoryPage and remove unused localStora…
filiksyos Apr 25, 2026
6b512ee
Merge pull request #47 from filiksyos/history,-deep-and-manual-urls
filiksyos Apr 25, 2026
641ef9c
Update README.md with Turkish translation
mehmetdemir-tr Apr 26, 2026
1673ce3
README.md Güncellemesi
mehmetdemir-tr Apr 26, 2026
4ebb916
Updated
mehmetdemir-tr Apr 26, 2026
7e403fd
Translate Next.js agent rules to Turkish
mehmetdemir-tr Apr 26, 2026
ad65d00
Translate .gitignore comments to Turkish
mehmetdemir-tr Apr 26, 2026
9aa1ab4
Update instructions in .env.example to Turkish
mehmetdemir-tr Apr 26, 2026
5105e7c
Translate comment to Turkish in file-tree-formatter
mehmetdemir-tr Apr 26, 2026
cb090dc
Translate comments in focus-fingerprint.ts to Turkish
mehmetdemir-tr Apr 26, 2026
fdfcd59
Update comment language in GitHub API client
mehmetdemir-tr Apr 26, 2026
52a009a
Translate comment to Turkish in home-example-repos.ts
mehmetdemir-tr Apr 26, 2026
681f787
Translate comments to Turkish
mehmetdemir-tr Apr 26, 2026
9d961f6
Translate Supabase client comment to Turkish
mehmetdemir-tr Apr 26, 2026
a2bf3a7
Translate system prompt to Turkish
mehmetdemir-tr Apr 26, 2026
7998656
Translate history page text to Turkish
mehmetdemir-tr Apr 26, 2026
4425078
Translate text to Turkish in library-page.tsx
mehmetdemir-tr Apr 26, 2026
0aaf5dc
Translate error messages and UI text to Turkish
mehmetdemir-tr Apr 26, 2026
a510008
Update description in metadata to Turkish
mehmetdemir-tr Apr 26, 2026
e3a3579
Update title and description to Turkish
mehmetdemir-tr Apr 26, 2026
923bc08
Translate metadata titles and descriptions to Turkish
mehmetdemir-tr Apr 26, 2026
8c112b4
Translate error message to Turkish
mehmetdemir-tr Apr 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copy to .env.local and fill in values. See README for provider setup.
# .env.local'a kopyalayın ve değerleri doldurun. Daha Fazlası için README dosyasını okuyun..

# --- Supabase (optional: response caching is off if these are empty) ---
SUPABASE_URL=
Expand All @@ -18,9 +18,10 @@ OPENROUTER_API_KEY=
# OPENROUTER_HTTP_REFERER=https://yoursite.example
# OPENROUTER_APP_TITLE=gitreverse

# Cache TTL for reverse-prompt results in Supabase (hours; default 24)
# CACHE_TTL_HOURS=24

# REQUIRED in production — generate with: openssl rand -hex 32 (or PowerShell random hex)
# Without this, the app will refuse to start in production.
VIEWS_IP_SALT=

# --- Custom reverse (optional) ---
# Backend base URL for Custom reverse (local or your own deployment).
# CUSTOM_REVERSE_SERVICE_URL=http://localhost:3001
14 changes: 7 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# Dosyaları yok sayma hakkında daha fazla bilgi için https://help.github.com/articles/ignoring-files/ adresini ziyaret edin.

# dependencies
# dependencies / bağımlılıklar
/node_modules
/.pnp
.pnp.*
Expand All @@ -10,27 +10,27 @@
!.yarn/releases
!.yarn/versions

# testing
# testing / Testler
/coverage

# next.js
/.next/
/out/

# production
# production / Yayınlama
/build

# misc
# misc / diğerleri
.DS_Store
*.pem

# debug
# debug / hata ayıklama
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# env files (can opt-in for committing if needed)
# env files (can opt-in for committing if needed) / env dosyaları (gerekirse commit işlemine dahil edilebilir)
.env*
!.env.example

Expand Down
4 changes: 2 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- BEGIN:nextjs-agent-rules -->
# This is NOT the Next.js you know
# Bu Next.js DEĞİL, Biliyorsun.

This version has breaking changesAPIs, conventions, and file structure may all differ from your training data. Read the relevant guide in `node_modules/next/dist/docs/` before writing any code. Heed deprecation notices.
Bu Sürümde uyumsuz değişiklikler bulunmaktadırAPI'ler, kurallar ve dosya yapısı, eğitim verilerinizden farklı olabilir. Herhangi bir kod yazmadan önce `node_modules/next/dist/docs/` ilgili kılavuzu **okuyun.** Kullanımdan kaldırılacak özelliklere ilişkin uyarıları dikkate alın.
<!-- END:nextjs-agent-rules -->
56 changes: 40 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,58 @@
# GitReverse
# GitReverse Turkish (Translated by mehmetdemir-tr)

https://github.com/user-attachments/assets/f0cdb7b2-c6f0-4483-8a01-153170479f2e

Turn a **public GitHub repository** into a **single synthetic user prompt** that someone might paste into Cursor, Claude Code, Codex, etc. to vibe code the project from scratch.
Bir **Geliştirilmeye açık GitHub deposunu** birisinin Cursor, Claude Code, Codex vb. uygulamalara yapıştırarak projeyi sıfırdan kodlayabileceği **tek sentetik yapay zeka istem satırına** dönüştürün.

The app pulls **repo metadata**, a **root file tree** (depth 1), and the **README**, then uses an LLM via [OpenRouter](https://openrouter.ai/) to produce one short, conversational prompt grounded in that context.
Bu uygulama, **repo meta verilerini**, bir **kök dosya ağacını** (derinlik yani depth 1) ve **README** dosyasını alır; ardından [OpenRouter](https://openrouter.ai/) aracılığıyla bir LLM kullanarak bu bağlamda temellendirilmiş kısa ve sohbet tarzında bir istem satırı oluşturur.

Paste a GitHub URL or `owner/repo` on the home page. You can also open **`/owner/repo`** (e.g. `/vercel/next.js`) for a shareable link that runs the same flow.
Ana sayfaya bir Github URL'si veya 'owner/repo' (sahip/depo) yazın. Aynı iş akışını çalıştıran paylaşılabilir bir bağlantı için **'/sahip/depo'** (ör. '/vercel/next.js) adresinide açabilirsiniz.

## Stack
Bu sitedeki GitHub tarzı **'/owner/repo/tree/...'** URL'leri, 404 hatası vermemeleri için **`/owner/repo`** adresine yönlendirilir. Ters akış şimdilik hala tüm depoyu kullanmaktadır; **alt klasörleri algılayan** bağlam (o yolun kapsamına dahil) daha sonraki bir güncellemede eklenecektir.

Next.js (App Router), React, TypeScript, Tailwind CSS, GitHub API, OpenRouter.
## Yığın (Stack)
Next.js (Uygulama Yönlendiricisi), React, TypeScript, Tailwind CSS, Github API Ve OpenRouter.

## Configuration
## Yapılandırma
`.env.example` dosyasını `.env.local` dosyasına kopyalayın. **`OPENROUTER_API_KEY`**'e ihtiyacınız var. İsteğe bağlı: `OPENROUTER_MODEL` (varsayılan olarak `google/gemini-2.5-pro`), daha iyi GitHub hız sınırları için `GITHUB_TOKEN` ve sunucu tarafında önbellekleme istiyorsanız örnek dosyadaki Supabase ortam değişkenleri.

Copy `.env.example` to `.env.local`. You need **`OPENROUTER_API_KEY`**. Optional: `OPENROUTER_MODEL` (defaults to `google/gemini-2.5-pro`), `GITHUB_TOKEN` for better GitHub rate limits, and Supabase env vars from the example file if you want server-side caching.
### Özel ters yönlendirme (isteğe bağlı)



**deep / focus** istemleri için, **custom_reverse** hizmetini (ayrı bir TypeScript projesi; `README` dosyasına bakın; `pnpm dev`, varsayılan bağlantı noktası **3001**) yerel olarak çalıştırın veya kendi arka ucunuza dağıtın. `.env.local` dosyasında şunu ayarlayın:



`CUSTOM_REVERSE_SERVICE_URL=http://localhost:3001`



`SUPABASE_URL` ve `SUPABASE_PUBLISHABLE_KEY` ayarlandığında başarılı çalıştırmalar Supabase'de (`custom_prompt_cache`) saklanır; bunlar genel kütüphanede **görünmez**.



Ardından ana sayfada **Özel tersine çevirme** seçeneğini etkinleştirin ve neyin tersine mühendislik yapılacağını açıklayın.



## Geliştirme

## Development

```bash

pnpm install

pnpm dev

```

Open [http://localhost:3000](http://localhost:3000).

```bash
pnpm build
pnpm start
pnpm lint
```

Shout out to [GitIngest](http://github.com/coderamp-labs/gitingest) for inspiration.
[http://localhost:3000](http://localhost:3000) adresini açın.


[GitIngest](http://github.com/coderamp-labs/gitingest)'e fikir ve ilham için teşekkürler! :)

***Çeviri: mehmetdemir-tr (Mehmet Demir)***

69 changes: 69 additions & 0 deletions app/[owner]/[repo]/[focus]/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
import { notFound } from "next/navigation";
import { connection } from "next/server";
import { ReversePromptHome } from "@/components/reverse-prompt-home";
import { focusFingerprint } from "@/lib/focus-fingerprint";
import { isValidGitHubRepoPath, normalizeRepoSegment } from "@/lib/parse-github-repo";
import { getSupabase } from "@/lib/supabase";

type PageProps = {
params: Promise<{ owner: string; repo: string; focus: string }>;
};

export default async function RepoFocusPage({ params }: PageProps) {
await connection();
const { owner: ownerRaw, repo: repoRaw, focus: focusRaw } = await params;
const owner = decodeURIComponent(ownerRaw);
const repo = decodeURIComponent(repoRaw);
let focus: string;
try {
focus = decodeURIComponent(focusRaw);
} catch {
notFound();
}

if (!isValidGitHubRepoPath(owner, repo)) {
notFound();
}

const trimmedFocus = focus.trim();
if (!trimmedFocus) {
notFound();
}

const repoNorm = normalizeRepoSegment(repo);
const initialRepoInput = `${owner}/${repoNorm}`;
const fp = focusFingerprint(trimmedFocus);

let cachedPrompt: string | undefined;
try {
const supabase = getSupabase();
if (supabase) {
const { data } = await supabase
.from("custom_prompt_cache")
.select("prompt")
.eq("owner", owner)
.eq("repo", repoNorm)
.eq("focus_fingerprint", fp)
.maybeSingle();
if (data?.prompt) {
cachedPrompt = data.prompt as string;
}
}
} catch {
// fall back to client auto-submit
}

return (
<ReversePromptHome
initialRepoInput={initialRepoInput}
autoSubmit={false}
autoSubmitFocus={cachedPrompt ? undefined : trimmedFocus}
initialPrompt={cachedPrompt}
owner={owner}
repo={repoNorm}
preserveUrl
initialGenerationKind={cachedPrompt ? "manual" : undefined}
initialManualFocus={cachedPrompt ? trimmedFocus : undefined}
/>
);
}
57 changes: 57 additions & 0 deletions app/[owner]/[repo]/deep/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
import { notFound } from "next/navigation";
import { connection } from "next/server";
import { ReversePromptHome } from "@/components/reverse-prompt-home";
import { DEEP_REVERSE_FOCUS, focusFingerprint } from "@/lib/focus-fingerprint";
import { isValidGitHubRepoPath, normalizeRepoSegment } from "@/lib/parse-github-repo";
import { getSupabase } from "@/lib/supabase";

type PageProps = {
params: Promise<{ owner: string; repo: string }>;
};

export default async function RepoDeepPage({ params }: PageProps) {
await connection();
const { owner: ownerRaw, repo: repoRaw } = await params;
const owner = decodeURIComponent(ownerRaw);
const repo = decodeURIComponent(repoRaw);

if (!isValidGitHubRepoPath(owner, repo)) {
notFound();
}

const repoNorm = normalizeRepoSegment(repo);
const initialRepoInput = `${owner}/${repoNorm}`;
const fp = focusFingerprint(DEEP_REVERSE_FOCUS);

let cachedPrompt: string | undefined;
try {
const supabase = getSupabase();
if (supabase) {
const { data } = await supabase
.from("custom_prompt_cache")
.select("prompt")
.eq("owner", owner)
.eq("repo", repoNorm)
.eq("focus_fingerprint", fp)
.maybeSingle();
if (data?.prompt) {
cachedPrompt = data.prompt as string;
}
}
} catch {
// fall back to client auto-submit
}

return (
<ReversePromptHome
initialRepoInput={initialRepoInput}
autoSubmit={false}
autoSubmitDeep={!cachedPrompt}
initialPrompt={cachedPrompt}
owner={owner}
repo={repoNorm}
preserveUrl
initialGenerationKind={cachedPrompt ? "deep" : undefined}
/>
);
}
1 change: 1 addition & 0 deletions app/[owner]/[repo]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export default async function RepoPage({ params }: PageProps) {
initialPrompt={cachedPrompt}
owner={owner}
repo={repoNorm}
initialGenerationKind={cachedPrompt ? "quick" : undefined}
/>
);
}
25 changes: 25 additions & 0 deletions app/[owner]/[repo]/tree/[[...path]]/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { notFound, redirect } from "next/navigation";
import { connection } from "next/server";
import { isValidGitHubRepoPath, normalizeRepoSegment } from "@/lib/parse-github-repo";

type PageProps = {
params: Promise<{ owner: string; repo: string; path?: string[] }>;
};

/**
* GitHub-style `/owner/repo/tree/branch/...` → `/owner/repo` (avoids 404).
* Subfolder-scoped reverse context: planned for later; see README.
*/
export default async function RepoTreeRedirectPage({ params }: PageProps) {
await connection();
const { owner: ownerRaw, repo: repoRaw } = await params;
const owner = decodeURIComponent(ownerRaw);
const repo = decodeURIComponent(repoRaw);

if (!isValidGitHubRepoPath(owner, repo)) {
notFound();
}

const repoNorm = normalizeRepoSegment(repo);
redirect(`/${encodeURIComponent(owner)}/${encodeURIComponent(repoNorm)}`);
}
Loading