├── template ├── .npmrc ├── .env-sample ├── static │ ├── robots.txt │ └── favicon.png ├── postcss.config.js ├── src │ ├── lib │ │ ├── images │ │ │ ├── sender.png │ │ │ ├── receiver.png │ │ │ ├── github.svg │ │ │ └── svelte-logo.svg │ │ ├── components │ │ │ ├── Footer.svelte │ │ │ ├── TextArea.svelte │ │ │ ├── SubmitButton.svelte │ │ │ ├── Profile.svelte │ │ │ ├── Message.svelte │ │ │ └── Header.svelte │ │ ├── config │ │ │ └── index.ts │ │ └── utils │ │ │ └── formatMessage.ts │ ├── app.d.ts │ ├── routes │ │ ├── about │ │ │ ├── +page.ts │ │ │ └── +page.svelte │ │ ├── +layout.svelte │ │ ├── api │ │ │ └── chat │ │ │ │ └── +server.ts │ │ ├── +page.svelte │ │ └── styles.css │ └── app.html ├── tailwind.config.js ├── .gitignore ├── gitignore ├── .eslintignore ├── .prettierignore ├── .prettierrc ├── vite.config.ts ├── .eslintrc.cjs ├── tsconfig.json ├── svelte.config.js ├── package.json └── README.md ├── .gitignore ├── package.json ├── README.md └── bin └── cli.js /template/.npmrc: -------------------------------------------------------------------------------- 1 | engine-strict=true 2 | -------------------------------------------------------------------------------- /template/.env-sample: -------------------------------------------------------------------------------- 1 | OPENAI_API_KEY= 2 | -------------------------------------------------------------------------------- /template/static/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /template/static/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WillKre/create-svelte-chatgpt/HEAD/template/static/favicon.png -------------------------------------------------------------------------------- /template/postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {} 5 | } 6 | }; 7 | -------------------------------------------------------------------------------- /template/src/lib/images/sender.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WillKre/create-svelte-chatgpt/HEAD/template/src/lib/images/sender.png -------------------------------------------------------------------------------- /template/src/lib/images/receiver.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WillKre/create-svelte-chatgpt/HEAD/template/src/lib/images/receiver.png -------------------------------------------------------------------------------- /template/src/lib/components/Footer.svelte: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /template/tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | export default { 3 | content: ['./src/**/*.{html,js,svelte,ts}'], 4 | theme: { 5 | extend: {} 6 | }, 7 | plugins: [] 8 | }; 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /build 4 | /.svelte-kit 5 | /package 6 | .env 7 | .env.* 8 | !.env.example 9 | .vercel 10 | .output 11 | vite.config.js.timestamp-* 12 | vite.config.ts.timestamp-* 13 | -------------------------------------------------------------------------------- /template/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /build 4 | /.svelte-kit 5 | /package 6 | .env 7 | .env.* 8 | !.env.example 9 | .vercel 10 | .output 11 | vite.config.js.timestamp-* 12 | vite.config.ts.timestamp-* 13 | -------------------------------------------------------------------------------- /template/gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /build 4 | /.svelte-kit 5 | /package 6 | .env 7 | .env.* 8 | !.env.example 9 | .vercel 10 | .output 11 | vite.config.js.timestamp-* 12 | vite.config.ts.timestamp-* 13 | -------------------------------------------------------------------------------- /template/.eslintignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /build 4 | /.svelte-kit 5 | /package 6 | .env 7 | .env.* 8 | !.env.example 9 | 10 | # Ignore files for PNPM, NPM and YARN 11 | pnpm-lock.yaml 12 | package-lock.json 13 | yarn.lock 14 | -------------------------------------------------------------------------------- /template/.prettierignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /build 4 | /.svelte-kit 5 | /package 6 | .env 7 | .env.* 8 | !.env.example 9 | 10 | # Ignore files for PNPM, NPM and YARN 11 | pnpm-lock.yaml 12 | package-lock.json 13 | yarn.lock 14 | -------------------------------------------------------------------------------- /template/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "trailingComma": "none", 4 | "printWidth": 100, 5 | "plugins": ["prettier-plugin-svelte"], 6 | "pluginSearchDirs": ["."], 7 | "overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }] 8 | } 9 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "create-svelte-chatgpt", 3 | "version": "1.0.0", 4 | "bin": { 5 | "create-svelte-chatgpt": "./bin/cli.js" 6 | }, 7 | "dependencies": { 8 | "chalk": "^5.2.0", 9 | "enquirer": "^2.3.6", 10 | "fs-extra": "^11.1.1" 11 | }, 12 | "type": "module" 13 | } 14 | -------------------------------------------------------------------------------- /template/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 Platform {} 9 | } 10 | } 11 | 12 | export {}; 13 | -------------------------------------------------------------------------------- /template/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { sveltekit } from '@sveltejs/kit/vite'; 2 | import { defineConfig } from 'vitest/config'; 3 | import wasm from 'vite-plugin-wasm'; 4 | 5 | export default defineConfig({ 6 | plugins: [sveltekit(), wasm()], 7 | test: { 8 | include: ['src/**/*.{test,spec}.{js,ts}'] 9 | } 10 | }); 11 | -------------------------------------------------------------------------------- /template/src/routes/about/+page.ts: -------------------------------------------------------------------------------- 1 | import { dev } from '$app/environment'; 2 | 3 | // we don't need any JS on this page, though we'll load 4 | // it in dev so that we get hot module replacement 5 | export const csr = dev; 6 | 7 | // since there's no dynamic data here, we can prerender 8 | // it so that it gets served as a static asset in production 9 | export const prerender = true; 10 | -------------------------------------------------------------------------------- /template/src/app.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | %sveltekit.head% 8 | 9 | 10 |