Repository: bagusindrayana/roastgithub
Branch: master
Commit: c127b7defd34
Files: 11
Total size: 13.0 KB
Directory structure:
gitextract_kb9tz80h/
├── .gitignore
├── .npmrc
├── README.md
├── package.json
├── src/
│ ├── app.d.ts
│ ├── app.html
│ ├── lib/
│ │ └── index.ts
│ └── routes/
│ └── +page.svelte
├── svelte.config.js
├── tsconfig.json
└── vite.config.ts
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
node_modules
# Output
.output
.vercel
/.svelte-kit
/build
# OS
.DS_Store
Thumbs.db
# Env
.env
.env.*
!.env.example
!.env.test
# Vite
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
================================================
FILE: .npmrc
================================================
engine-strict=true
================================================
FILE: README.md
================================================
# New Version
- new version in branch `v2`
- new version using sveltekit api so don't need to run backend api
## Local Development
Backend API repo : https://github.com/bagusindrayana/roastgithub-api
- Clone the repository
- Run `npm install`
- make .env file and add the following
```
PUBLIC_API_URL=http://localhost:3001
```
- Run `npm run dev`
## Support Me!
<a href="https://trakteer.id/bagood" target="_blank"
><img
id="wse-buttons-preview"
src="https://cdn.trakteer.id/images/embed/trbtn-red-1.png?date=18-11-2023"
height="40"
style="border: 0px; height: 40px; --darkreader-inline-border-top: 0px; --darkreader-inline-border-right: 0px; --darkreader-inline-border-bottom: 0px; --darkreader-inline-border-left: 0px;"
alt="Trakteer Saya"
data-darkreader-inline-border-top=""
data-darkreader-inline-border-right=""
data-darkreader-inline-border-bottom=""
data-darkreader-inline-border-left=""
/></a
>
================================================
FILE: package.json
================================================
{
"name": "roastgithub",
"version": "0.0.1",
"private": true,
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch"
},
"devDependencies": {
"@sveltejs/adapter-auto": "^3.0.0",
"@sveltejs/kit": "^2.0.0",
"@sveltejs/vite-plugin-svelte": "^3.0.0",
"svelte": "^4.2.7",
"svelte-check": "^3.6.0",
"typescript": "^5.0.0",
"vite": "^5.0.3"
},
"type": "module",
"dependencies": {
"axios": "^1.7.3"
}
}
================================================
FILE: src/app.d.ts
================================================
// See https://kit.svelte.dev/docs/types#app
// for information about these interfaces
declare global {
namespace App {
// interface Error {}
// interface Locals {}
// interface PageData {}
// interface PageState {}
// interface Platform {}
}
}
export {};
================================================
FILE: src/app.html
================================================
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
%sveltekit.head%
</head>
<body data-sveltekit-preload-data="hover">
<div style="display: contents">%sveltekit.body%</div>
</body>
</html>
================================================
FILE: src/lib/index.ts
================================================
// place files you want to import through the `$lib` alias in this folder.
================================================
FILE: src/routes/+page.svelte
================================================
<script lang="ts">
import { PUBLIC_API_URL } from "$env/static/public";
import axios from "axios";
let apiUrl =
import.meta.env.VITE_API_URL ??
PUBLIC_API_URL ??
"http://localhost:3001";
let username: string = "";
let model: string = "gemini";
let language: string = "auto";
let roastingResult: string = "";
let status: string = "idle";
let apiKey:string = "";
async function fetchGithubData() {
if (!username || status == "loading") return;
status = "loading";
var datas = null;
var readmeResponse = { status: 404, data: null };
try {
var profileResponse = await axios.get(
`https://api.github.com/users/${username}`,
);
const repoResponse = await axios.get(
`https://api.github.com/users/${username}/repos?sort=updated`,
);
try {
readmeResponse = await axios.get(
`https://raw.githubusercontent.com/${username}/${username}/main/README.md`,
);
} catch (error) {
try {
readmeResponse = await axios.get(
`https://raw.githubusercontent.com/${username}/${username}/master/README.md`,
);
} catch (error) {}
}
datas = {
name: profileResponse.data.name,
bio: profileResponse.data.bio,
company: profileResponse.data.company,
location: profileResponse.data.location,
followers: profileResponse.data.followers,
following: profileResponse.data.following,
public_repos: profileResponse.data.public_repos,
created_at: profileResponse.data.created_at,
updated_at: profileResponse.data.updated_at,
repositories: repoResponse.data
.map(
(repo: {
name: any;
description: any;
language: any;
stargazers_count: any;
open_issues_count: any;
license: any;
fork: any;
created_at: any;
updated_at: any;
}) => ({
name: repo.name,
description: repo.description,
language: repo.language,
stargazers_count: repo.stargazers_count,
open_issues_count: repo.open_issues_count,
license: repo.license,
fork: repo.fork,
created_at: repo.created_at,
updated_at: repo.updated_at,
}),
)
.slice(0, 50),
};
} catch (error) {
console.error(
"Error fetching GitHub data in client, try in server...",
error,
);
}
try {
// Send data to Gemini AI for roasting
const geminiResponse = await axios.post<{ roasting: string }>(
apiUrl + "/roasting?username=" + username,
{
jsonData: JSON.stringify(datas),
README: readmeResponse.data,
model:model,
language:language,
apiKey:apiKey
},
);
roastingResult = geminiResponse.data.roasting;
} catch (error: any) {
console.error("Error : ", error);
if (axios.isAxiosError(error)) {
//get response from error
var responseData = error.response?.data;
if(responseData != undefined && responseData.error){
roastingResult =
"Failed to fetch response, error in server : " +
responseData.error;
} else {
roastingResult =
"Failed to fetch response, error in server : " +
error?.message;
}
} else {
roastingResult = `Failed to fetch response, something wrong : ${error?.message}. please try again later ...`;
}
}
status = "done";
}
</script>
<svelte:head>
<title>GitHub Profile Roasting 🔥🔥🔥</title>
<meta
name="description"
content="Roasting Your GitHub Profile with AI"/>
</svelte:head>
<main>
<div id="header">
<marquee style="color:red;">Siapkan mental anda sebelum menekan tombol submit, semua response digenerate oleh AI, bisa saja response yang diberikan sangat menyinggung anda.</marquee>
</div>
<h1>GitHub Profile Roasting 🔥🔥🔥</h1>
<div>
<input
type="text"
bind:value={username}
placeholder="Enter GitHub username"
/>
<button on:click={fetchGithubData}>Submit</button>
</div>
{#if status == "idle"}
<p>Enter a GitHub username to get started.</p>
{/if}
<br>
<details>
<summary>Setting</summary>
<div class="input-group">
<label for="language">Language</label>
<select bind:value={language} name="language" id="language">
<option value="auto">Auto</option>
<option value="english">English</option>
<option value="indonesia">Indonesia</option>
</select>
</div>
<div class="input-group">
<label for="model">AI Model</label>
<select bind:value={model} name="model" id="model">
<option value="gemini">Gemini AI</option>
<option value="llama">LLama (Groq AI)</option>
</select>
<input type="password" bind:value={apiKey} placeholder="(Optional) API KEY...">
</div>
</details>
{#if status == "done"}
<h2>Roasting For {username}</h2>
<p>{roastingResult}</p>
{:else if status == "loading"}
<p>Loading...</p>
{/if}
<div style="height: 100px;"></div>
<div id="footer">
<div>
<div>
<a
href="https://wallofdonations.my.id"
class="underline"
target="_blank"
>
WallOfDonations
</a>
<a
href="https://roastgithub.my.id"
class="underline"
target="_blank">New RoastGithub</a
>
<a href="https://roastlinkedin.my.id" target="_blank">RoastLinkedin</a>
<a href="https://roastwaifu.my.id" target="_blank">RoastWaifu</a>
</div>
<br>
<div class="btn-list">
<a href="https://trakteer.id/bagood" target="_blank"
><img
id="wse-buttons-preview"
src="https://cdn.trakteer.id/images/embed/trbtn-red-1.png?date=18-11-2023"
height="40"
style="border: 0px; height: 40px; --darkreader-inline-border-top: 0px; --darkreader-inline-border-right: 0px; --darkreader-inline-border-bottom: 0px; --darkreader-inline-border-left: 0px;"
alt="Trakteer Saya"
data-darkreader-inline-border-top=""
data-darkreader-inline-border-right=""
data-darkreader-inline-border-bottom=""
data-darkreader-inline-border-left=""
/></a
>
<iframe src="https://ghbtns.com/github-btn.html?user=bagusindrayana&repo=roastgithub&type=star&count=true&size=large" frameborder="0" scrolling="0" width="170" height="30" title="GitHub"></iframe>
</div>
</div>
</div>
</main>
<style>
main {
padding: 1em;
max-width: 800px;
margin: 0 auto;
}
input {
margin-right: 0.5em;
padding: 0.5em;
}
button {
padding: 0.5em;
}
#header {
display: flex;
justify-content: center;
align-items: center;
position: fixed;
top: 0;
left: 0;
right: 0;
margin: auto;
padding: 16px;
text-align: center;
background-color: white;
}
#footer {
display: flex;
justify-content: center;
align-items: center;
position: fixed;
bottom: 0;
left: 0;
right: 0;
margin: auto;
padding: 16px;
text-align: center;
background-color: white;
}
.input-group {
margin-bottom: 16px;
display: flex;
gap: 6px;
flex-direction: column;
}
.btn-list {
display: flex;
gap: 6px;
justify-content: center;
align-items: center;
}
</style>
================================================
FILE: svelte.config.js
================================================
import adapter from '@sveltejs/adapter-auto';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
/** @type {import('@sveltejs/kit').Config} */
const config = {
// Consult https://kit.svelte.dev/docs/integrations#preprocessors
// for more information about preprocessors
preprocess: vitePreprocess(),
kit: {
// adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
// If your environment is not supported, or you settled on a specific environment, switch out the adapter.
// See https://kit.svelte.dev/docs/adapters for more information about adapters.
adapter: adapter()
}
};
export default config;
================================================
FILE: tsconfig.json
================================================
{
"extends": "./.svelte-kit/tsconfig.json",
"compilerOptions": {
"allowJs": true,
"checkJs": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"sourceMap": true,
"strict": true,
"moduleResolution": "bundler"
}
// Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias
// except $lib which is handled by https://kit.svelte.dev/docs/configuration#files
//
// If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes
// from the referenced tsconfig.json - TypeScript does not merge them in
}
================================================
FILE: vite.config.ts
================================================
import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vite';
export default defineConfig({
plugins: [sveltekit()]
});
gitextract_kb9tz80h/ ├── .gitignore ├── .npmrc ├── README.md ├── package.json ├── src/ │ ├── app.d.ts │ ├── app.html │ ├── lib/ │ │ └── index.ts │ └── routes/ │ └── +page.svelte ├── svelte.config.js ├── tsconfig.json └── vite.config.ts
Condensed preview — 11 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (15K chars).
[
{
"path": ".gitignore",
"chars": 191,
"preview": "node_modules\n\n# Output\n.output\n.vercel\n/.svelte-kit\n/build\n\n# OS\n.DS_Store\nThumbs.db\n\n# Env\n.env\n.env.*\n!.env.example\n!."
},
{
"path": ".npmrc",
"chars": 19,
"preview": "engine-strict=true\n"
},
{
"path": "README.md",
"chars": 1131,
"preview": "# New Version\n- new version in branch `v2`\n- new version using sveltekit api so don't need to run backend api\n\n\n## Local"
},
{
"path": "package.json",
"chars": 612,
"preview": "{\n\t\"name\": \"roastgithub\",\n\t\"version\": \"0.0.1\",\n\t\"private\": true,\n\t\"scripts\": {\n\t\t\"dev\": \"vite dev\",\n\t\t\"build\": \"vite bui"
},
{
"path": "src/app.d.ts",
"chars": 269,
"preview": "// See https://kit.svelte.dev/docs/types#app\n// for information about these interfaces\ndeclare global {\n\tnamespace App {"
},
{
"path": "src/app.html",
"chars": 346,
"preview": "<!doctype html>\n<html lang=\"en\">\n\t<head>\n\t\t<meta charset=\"utf-8\" />\n\t\t<link rel=\"icon\" href=\"%sveltekit.assets%/favicon."
},
{
"path": "src/lib/index.ts",
"chars": 75,
"preview": "// place files you want to import through the `$lib` alias in this folder.\n"
},
{
"path": "src/routes/+page.svelte",
"chars": 9161,
"preview": "<script lang=\"ts\">\n import { PUBLIC_API_URL } from \"$env/static/public\";\n import axios from \"axios\";\n\n let apiU"
},
{
"path": "svelte.config.js",
"chars": 676,
"preview": "import adapter from '@sveltejs/adapter-auto';\nimport { vitePreprocess } from '@sveltejs/vite-plugin-svelte';\n\n/** @type "
},
{
"path": "tsconfig.json",
"chars": 649,
"preview": "{\n\t\"extends\": \"./.svelte-kit/tsconfig.json\",\n\t\"compilerOptions\": {\n\t\t\"allowJs\": true,\n\t\t\"checkJs\": true,\n\t\t\"esModuleInte"
},
{
"path": "vite.config.ts",
"chars": 144,
"preview": "import { sveltekit } from '@sveltejs/kit/vite';\nimport { defineConfig } from 'vite';\n\nexport default defineConfig({\n\tplu"
}
]
About this extraction
This page contains the full source code of the bagusindrayana/roastgithub GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 11 files (13.0 KB), approximately 3.3k tokens. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.