├── .npmrc
├── src
├── lib
│ └── index.ts
├── app.d.ts
├── app.html
└── routes
│ └── +page.svelte
├── static
└── favicon.png
├── vite.config.ts
├── .gitignore
├── package.json
├── tsconfig.json
├── svelte.config.js
└── README.md
/.npmrc:
--------------------------------------------------------------------------------
1 | engine-strict=true
2 |
--------------------------------------------------------------------------------
/src/lib/index.ts:
--------------------------------------------------------------------------------
1 | // place files you want to import through the `$lib` alias in this folder.
2 |
--------------------------------------------------------------------------------
/static/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bagusindrayana/roastgithub/HEAD/static/favicon.png
--------------------------------------------------------------------------------
/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { sveltekit } from '@sveltejs/kit/vite';
2 | import { defineConfig } from 'vite';
3 |
4 | export default defineConfig({
5 | plugins: [sveltekit()]
6 | });
7 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 |
3 | # Output
4 | .output
5 | .vercel
6 | /.svelte-kit
7 | /build
8 |
9 | # OS
10 | .DS_Store
11 | Thumbs.db
12 |
13 | # Env
14 | .env
15 | .env.*
16 | !.env.example
17 | !.env.test
18 |
19 | # Vite
20 | vite.config.js.timestamp-*
21 | vite.config.ts.timestamp-*
22 |
--------------------------------------------------------------------------------
/src/app.d.ts:
--------------------------------------------------------------------------------
1 | // See https://kit.svelte.dev/docs/types#app
2 | // for information about these interfaces
3 | declare global {
4 | namespace App {
5 | // interface Error {}
6 | // interface Locals {}
7 | // interface PageData {}
8 | // interface PageState {}
9 | // interface Platform {}
10 | }
11 | }
12 |
13 | export {};
14 |
--------------------------------------------------------------------------------
/src/app.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | %sveltekit.head%
8 |
9 |
10 | %sveltekit.body%
11 |
12 |
13 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "roastgithub",
3 | "version": "0.0.1",
4 | "private": true,
5 | "scripts": {
6 | "dev": "vite dev",
7 | "build": "vite build",
8 | "preview": "vite preview",
9 | "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
10 | "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch"
11 | },
12 | "devDependencies": {
13 | "@sveltejs/adapter-auto": "^3.0.0",
14 | "@sveltejs/kit": "^2.0.0",
15 | "@sveltejs/vite-plugin-svelte": "^3.0.0",
16 | "svelte": "^4.2.7",
17 | "svelte-check": "^3.6.0",
18 | "typescript": "^5.0.0",
19 | "vite": "^5.0.3"
20 | },
21 | "type": "module",
22 | "dependencies": {
23 | "axios": "^1.7.3"
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./.svelte-kit/tsconfig.json",
3 | "compilerOptions": {
4 | "allowJs": true,
5 | "checkJs": true,
6 | "esModuleInterop": true,
7 | "forceConsistentCasingInFileNames": true,
8 | "resolveJsonModule": true,
9 | "skipLibCheck": true,
10 | "sourceMap": true,
11 | "strict": true,
12 | "moduleResolution": "bundler"
13 | }
14 | // Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias
15 | // except $lib which is handled by https://kit.svelte.dev/docs/configuration#files
16 | //
17 | // If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes
18 | // from the referenced tsconfig.json - TypeScript does not merge them in
19 | }
20 |
--------------------------------------------------------------------------------
/svelte.config.js:
--------------------------------------------------------------------------------
1 | import adapter from '@sveltejs/adapter-auto';
2 | import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
3 |
4 | /** @type {import('@sveltejs/kit').Config} */
5 | const config = {
6 | // Consult https://kit.svelte.dev/docs/integrations#preprocessors
7 | // for more information about preprocessors
8 | preprocess: vitePreprocess(),
9 |
10 | kit: {
11 | // adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
12 | // If your environment is not supported, or you settled on a specific environment, switch out the adapter.
13 | // See https://kit.svelte.dev/docs/adapters for more information about adapters.
14 | adapter: adapter()
15 | }
16 | };
17 |
18 | export default config;
19 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # New Version
2 | - new version in branch `v2`
3 | - new version using sveltekit api so don't need to run backend api
4 |
5 |
6 | ## Local Development
7 | Backend API repo : https://github.com/bagusindrayana/roastgithub-api
8 | - Clone the repository
9 | - Run `npm install`
10 | - make .env file and add the following
11 | ```
12 | PUBLIC_API_URL=http://localhost:3001
13 | ```
14 | - Run `npm run dev`
15 |
16 |
17 | ## Support Me!
18 |
--------------------------------------------------------------------------------
/src/routes/+page.svelte:
--------------------------------------------------------------------------------
1 |
117 |
118 |
119 | GitHub Profile Roasting 🔥🔥🔥
120 |
123 |
124 |
125 |
128 | GitHub Profile Roasting 🔥🔥🔥
129 |
130 |
131 |
136 |
137 |
138 | {#if status == "idle"}
139 | Enter a GitHub username to get started.
140 | {/if}
141 |
142 |
143 | Setting
144 |
145 |
146 |
151 |
152 |
153 |
154 |
158 |
159 |
160 |
161 |
162 | {#if status == "done"}
163 | Roasting For {username}
164 | {roastingResult}
165 | {:else if status == "loading"}
166 | Loading...
167 | {/if}
168 |
169 |
207 |
208 |
209 |
265 |
--------------------------------------------------------------------------------