diff --git a/app/.gitignore b/app/.gitignore new file mode 100644 index 0000000..9a1cf98 --- /dev/null +++ b/app/.gitignore @@ -0,0 +1,27 @@ +node_modules + +# Output +.output +.vercel +.netlify +.wrangler +/.svelte-kit +/build + +# OS +.DS_Store +Thumbs.db + +# Env +.env +.env.* +!.env.example +!.env.test + +# Vite +vite.config.js.timestamp-* +vite.config.ts.timestamp-* + +# npm +package-lock.json +*.log diff --git a/app/.npmrc b/app/.npmrc new file mode 100644 index 0000000..b6f27f1 --- /dev/null +++ b/app/.npmrc @@ -0,0 +1 @@ +engine-strict=true diff --git a/app/.vscode/extensions.json b/app/.vscode/extensions.json new file mode 100644 index 0000000..28d1e67 --- /dev/null +++ b/app/.vscode/extensions.json @@ -0,0 +1,3 @@ +{ + "recommendations": ["svelte.svelte-vscode"] +} diff --git a/app/README.md b/app/README.md new file mode 100644 index 0000000..98818ff --- /dev/null +++ b/app/README.md @@ -0,0 +1,42 @@ +# sv + +Everything you need to build a Svelte project, powered by [`sv`](https://github.com/sveltejs/cli). + +## Creating a project + +If you're seeing this, you've probably already done this step. Congrats! + +```sh +# create a new project +npx sv create my-app +``` + +To recreate this project with the same configuration: + +```sh +# recreate this project +npx sv@0.15.1 create --template minimal --types ts --install npm . +``` + +## Developing + +Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: + +```sh +npm run dev + +# or start the server and open the app in a new browser tab +npm run dev -- --open +``` + +## Building + +To create a production version of your app: + +```sh +npm run build +``` + +You can preview the production build with `npm run preview`. + +> To deploy your app, you may need to install an [adapter](https://svelte.dev/docs/kit/adapters) for your target environment. diff --git a/app/package.json b/app/package.json new file mode 100644 index 0000000..4880af8 --- /dev/null +++ b/app/package.json @@ -0,0 +1,23 @@ +{ + "name": "app", + "private": true, + "version": "0.0.1", + "type": "module", + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview", + "prepare": "svelte-kit sync || echo ''", + "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch" + }, + "devDependencies": { + "@sveltejs/adapter-static": "^3.0.10", + "@sveltejs/kit": "^2.57.0", + "@sveltejs/vite-plugin-svelte": "^7.0.0", + "svelte": "^5.55.2", + "svelte-check": "^4.4.6", + "typescript": "^6.0.2", + "vite": "^8.0.7" + } +} diff --git a/app/src/app.d.ts b/app/src/app.d.ts new file mode 100644 index 0000000..da08e6d --- /dev/null +++ b/app/src/app.d.ts @@ -0,0 +1,13 @@ +// See https://svelte.dev/docs/kit/types#app.d.ts +// for information about these interfaces +declare global { + namespace App { + // interface Error {} + // interface Locals {} + // interface PageData {} + // interface PageState {} + // interface Platform {} + } +} + +export {}; diff --git a/app/src/app.html b/app/src/app.html new file mode 100644 index 0000000..6a2bb58 --- /dev/null +++ b/app/src/app.html @@ -0,0 +1,12 @@ + + +
+ + + + %sveltekit.head% + + +Wird Stück für Stück mit Nostr-Funktionalität gefüllt.
diff --git a/app/static/robots.txt b/app/static/robots.txt new file mode 100644 index 0000000..b6dd667 --- /dev/null +++ b/app/static/robots.txt @@ -0,0 +1,3 @@ +# allow crawling everything by default +User-agent: * +Disallow: diff --git a/app/svelte.config.js b/app/svelte.config.js new file mode 100644 index 0000000..ac0fb60 --- /dev/null +++ b/app/svelte.config.js @@ -0,0 +1,25 @@ +import adapter from '@sveltejs/adapter-static'; +import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'; + +/** @type {import('@sveltejs/kit').Config} */ +const config = { + preprocess: vitePreprocess(), + compilerOptions: { + // Force runes mode for the project, except for libraries. Can be removed in svelte 6. + runes: ({ filename }) => (filename.split(/[/\\]/).includes('node_modules') ? undefined : true) + }, + kit: { + adapter: adapter({ + pages: 'build', + assets: 'build', + fallback: 'index.html', + precompress: false, + strict: false + }), + alias: { + $lib: 'src/lib' + } + } +}; + +export default config; diff --git a/app/tsconfig.json b/app/tsconfig.json new file mode 100644 index 0000000..2c2ed3c --- /dev/null +++ b/app/tsconfig.json @@ -0,0 +1,20 @@ +{ + "extends": "./.svelte-kit/tsconfig.json", + "compilerOptions": { + "rewriteRelativeImportExtensions": true, + "allowJs": true, + "checkJs": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "resolveJsonModule": true, + "skipLibCheck": true, + "sourceMap": true, + "strict": true, + "moduleResolution": "bundler" + } + // Path aliases are handled by https://svelte.dev/docs/kit/configuration#alias + // except $lib which is handled by https://svelte.dev/docs/kit/configuration#files + // + // To make changes to top-level options such as include and exclude, we recommend extending + // the generated config; see https://svelte.dev/docs/kit/configuration#typescript +} diff --git a/app/vite.config.ts b/app/vite.config.ts new file mode 100644 index 0000000..bbf8c7d --- /dev/null +++ b/app/vite.config.ts @@ -0,0 +1,6 @@ +import { sveltekit } from '@sveltejs/kit/vite'; +import { defineConfig } from 'vite'; + +export default defineConfig({ + plugins: [sveltekit()] +});