diff --git a/sveltekit-ndk-app/README.md b/sveltekit-ndk-app/README.md deleted file mode 100644 index a007ab4..0000000 --- a/sveltekit-ndk-app/README.md +++ /dev/null @@ -1,69 +0,0 @@ -# SvelteKit NDK App - -This project is a SvelteKit application that utilizes the NDK (Nostr Development Kit) library for building decentralized applications. It incorporates Tailwind CSS for styling, providing a modern and responsive UI. - -## Features - -- User authentication via browser extension or key pair creation. -- Ability to submit questions and receive comments. -- Voting mechanism after a timer expires. -- Real-time event handling using Nostr protocol. - -## Project Structure - -``` -sveltekit-ndk-app -├── src -│ ├── lib -│ │ └── components -│ │ └── ExampleComponent.svelte -│ ├── routes -│ │ ├── +layout.svelte -│ │ ├── +page.svelte -│ │ └── api -│ │ └── +server.js -│ ├── app.css -│ └── app.html -├── static -│ └── favicon.ico -├── tailwind.config.cjs -├── postcss.config.cjs -├── package.json -├── svelte.config.js -├── tsconfig.json -└── README.md -``` - -## Installation - -1. Clone the repository: - ``` - git clone - cd sveltekit-ndk-app - ``` - -2. Install dependencies: - ``` - npm install - ``` - -3. Run the development server: - ``` - npm run dev - ``` - -4. Open your browser and navigate to `http://localhost:3000`. - -## Usage - -- Users can log in using a browser extension or create a new key pair. -- After logging in, users can submit questions and view responses. -- Comments can be made until the timer expires, after which users can vote on the questions. - -## Contributing - -Contributions are welcome! Please open an issue or submit a pull request for any enhancements or bug fixes. - -## License - -This project is licensed under the MIT License. See the LICENSE file for more details. \ No newline at end of file diff --git a/sveltekit-ndk-app/package.json b/sveltekit-ndk-app/package.json deleted file mode 100644 index 6e679a4..0000000 --- a/sveltekit-ndk-app/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "sveltekit-ndk-app", - "version": "1.0.0", - "scripts": { - "dev": "vite", - "build": "vite build", - "preview": "vite preview" - }, - "dependencies": { - "svelte": "^3.44.0", - "sveltekit": "latest", - "@nostr-dev-kit/ndk-svelte": "^0.1.0", - "tailwindcss": "^2.2.19", - "postcss": "^8.4.6", - "autoprefixer": "^10.4.0" - }, - "devDependencies": { - "vite": "^2.6.14", - "svelte-preprocess": "^4.9.4" - }, - "keywords": [], - "author": "", - "license": "MIT" -} \ No newline at end of file diff --git a/sveltekit-ndk-app/postcss.config.cjs b/sveltekit-ndk-app/postcss.config.cjs deleted file mode 100644 index 8567b4c..0000000 --- a/sveltekit-ndk-app/postcss.config.cjs +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = { - plugins: { - tailwindcss: {}, - autoprefixer: {}, - }, -}; \ No newline at end of file diff --git a/sveltekit-ndk-app/src/app.css b/sveltekit-ndk-app/src/app.css deleted file mode 100644 index 914ca1d..0000000 --- a/sveltekit-ndk-app/src/app.css +++ /dev/null @@ -1,5 +0,0 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; - -/* Custom styles can be added below this line */ \ No newline at end of file diff --git a/sveltekit-ndk-app/src/app.html b/sveltekit-ndk-app/src/app.html deleted file mode 100644 index d5c2a56..0000000 --- a/sveltekit-ndk-app/src/app.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - SvelteKit NDK App - - - -
- - \ No newline at end of file diff --git a/sveltekit-ndk-app/src/routes/+layout.svelte b/sveltekit-ndk-app/src/routes/+layout.svelte deleted file mode 100644 index 3a78703..0000000 --- a/sveltekit-ndk-app/src/routes/+layout.svelte +++ /dev/null @@ -1,22 +0,0 @@ - - - -
-
-

Nostr Event App

-
- -
- -
- -
-

© 2023 Nostr Event App

-
-
- - \ No newline at end of file diff --git a/sveltekit-ndk-app/src/routes/+page.svelte b/sveltekit-ndk-app/src/routes/+page.svelte deleted file mode 100644 index 24acfe7..0000000 --- a/sveltekit-ndk-app/src/routes/+page.svelte +++ /dev/null @@ -1,84 +0,0 @@ - - -{#if $connected} -

Connected to Nostr relay

-{:else} -

Connecting to Nostr relay...

-{/if} - -

Nostr Events

-

- {$count} events seen -

- -{#if $events && $events.length > 0} -

Recent events

- -{:else} -

No events received yet. Waiting for events...

-{/if} - - \ No newline at end of file diff --git a/sveltekit-ndk-app/src/routes/api/+server.js b/sveltekit-ndk-app/src/routes/api/+server.js deleted file mode 100644 index 223cb73..0000000 --- a/sveltekit-ndk-app/src/routes/api/+server.js +++ /dev/null @@ -1,25 +0,0 @@ -import { json } from '@sveltejs/kit'; - -export async function POST({ request }) { - const data = await request.json(); - - // Here you would handle the data, e.g., save it to a database or process it - // For demonstration, we'll just return the received data - - return json({ - status: 'success', - data: data - }); -} - -export async function GET({ url }) { - // Here you could fetch data from a database or another API - // For demonstration, we'll return a static response - - const exampleData = { - message: 'Hello from the API!', - timestamp: new Date().toISOString() - }; - - return json(exampleData); -} \ No newline at end of file diff --git a/sveltekit-ndk-app/static/favicon.ico b/sveltekit-ndk-app/static/favicon.ico deleted file mode 100644 index 5f2e0c2..0000000 --- a/sveltekit-ndk-app/static/favicon.ico +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/sveltekit-ndk-app/svelte.config.js b/sveltekit-ndk-app/svelte.config.js deleted file mode 100644 index 816cd8e..0000000 --- a/sveltekit-ndk-app/svelte.config.js +++ /dev/null @@ -1,14 +0,0 @@ -import adapter from '@sveltejs/adapter-auto'; -import preprocess from 'svelte-preprocess'; - -export default { - preprocess: preprocess(), - kit: { - adapter: adapter(), - vite: { - css: { - postcss: true - } - } - } -}; \ No newline at end of file diff --git a/sveltekit-ndk-app/tailwind.config.cjs b/sveltekit-ndk-app/tailwind.config.cjs deleted file mode 100644 index a36afcf..0000000 --- a/sveltekit-ndk-app/tailwind.config.cjs +++ /dev/null @@ -1,11 +0,0 @@ -module.exports = { - content: [ - './src/**/*.{svelte,js,ts}', - './src/lib/**/*.{svelte,js,ts}', - './src/routes/**/*.{svelte,js,ts}', - ], - theme: { - extend: {}, - }, - plugins: [], -}; \ No newline at end of file diff --git a/sveltekit-ndk-app/tsconfig.json b/sveltekit-ndk-app/tsconfig.json deleted file mode 100644 index 5733950..0000000 --- a/sveltekit-ndk-app/tsconfig.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "@sveltejs/tsconfig", - "compilerOptions": { - "strict": true, - "esModuleInterop": true, - "skipLibCheck": true, - "forceConsistentCasingInFileNames": true - }, - "include": ["src/**/*"], - "exclude": ["node_modules", "**/*.spec.ts"] -} \ No newline at end of file