diff --git a/.cursorrules b/.cursorrules
new file mode 100644
index 0000000..02c997b
--- /dev/null
+++ b/.cursorrules
@@ -0,0 +1,58 @@
+You are an expert in TypeScript, Node.js, Vite, Vue.js, Vue Router, Pinia, VueUse, Shadcn-vue, and Tailwind v4, with a deep understanding of best practices and performance optimization techniques in these technologies.
+
+Code Style and Structure
+
+- Write concise, maintainable, and technically accurate TypeScript code with relevant examples.
+- Use functional and declarative programming patterns; avoid classes.
+- Favor iteration and modularization to adhere to DRY principles and avoid code duplication.
+- Use descriptive variable names with auxiliary verbs (e.g., isLoading, hasError).
+- Organize files systematically: each file should contain only related content, such as exported components, subcomponents, helpers, static content, and types.
+
+Naming Conventions
+
+- Use lowercase with dashes for directories (e.g., components/auth-wizard).
+- Favor named exports for functions.
+
+TypeScript Usage
+
+- Use TypeScript for all code; prefer interfaces over types for their extendability and ability to merge.
+- Avoid enums; use maps instead for better type safety and flexibility.
+- Use functional components with TypeScript interfaces.
+
+Syntax and Formatting
+
+- Use the "function" keyword for pure functions to benefit from hoisting and clarity.
+- Always use the Vue Composition API script setup style.
+
+Performance Optimization
+
+- Leverage VueUse functions where applicable to enhance reactivity and performance.
+- Wrap asynchronous components in Suspense with a fallback UI.
+- Use dynamic loading for non-critical components.
+- Optimize images: use WebP format, include size data, implement lazy loading.
+- Implement an optimized chunking strategy during the Vite build process, such as code splitting, to generate smaller bundle sizes.
+
+Key Conventions
+
+- Optimize Web Vitals (LCP, CLS, FID) using tools like Lighthouse or WebPageTest.
+- Use the VueUse library for performance-enhancing functions.
+- Implement lazy loading for non-critical components.
+- Optimize images: use WebP format, include size data, implement lazy loading.
+- Implement an optimized chunking strategy during the Vite build process, such as code splitting, to generate smaller bundle sizes.
+
+Code Review
+
+- Review code for performance, readability, and adherence to best practices.
+- Ensure all components and functions are optimized for performance and maintainability.
+- Check for unnecessary re-renders and optimize them using VueUse functions.
+- Use the VueUse library for performance-enhancing functions.
+- Implement lazy loading for non-critical components.
+- Optimize images: use WebP format, include size data, implement lazy loading.
+- Implement an optimized chunking strategy during the Vite build process, such as code splitting, to generate smaller bundle sizes.
+
+Best Practices
+
+- Use the VueUse library for performance-enhancing functions.
+- Implement lazy loading for non-critical components.
+- Optimize images: use WebP format, include size data, implement lazy loading.
+- Implement an optimized chunking strategy during the Vite build process, such as code splitting, to generate smaller bundle sizes.
diff --git a/package.json b/package.json
index 23f91cf..56bcca9 100644
--- a/package.json
+++ b/package.json
@@ -6,15 +6,17 @@
"scripts": {
"dev": "vite --host",
"build": "vue-tsc -b && vite build",
- "preview": "vite preview"
+ "preview": "vite preview",
+ "analyze": "vite build --mode analyze"
},
"dependencies": {
"@vueuse/core": "^12.5.0",
+ "@vueuse/components": "^12.5.0",
+ "@vueuse/head": "^2.0.0",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"fuse.js": "^7.0.0",
"lucide-vue-next": "^0.474.0",
- "nostr-tools": "^2.10.4",
"pinia": "^2.3.1",
"radix-vue": "^1.9.13",
"tailwind-merge": "^2.6.0",
@@ -22,18 +24,24 @@
"tailwindcss-animate": "^1.0.7",
"vue": "^3.5.13",
"vue-i18n": "^9.14.2",
- "vue-router": "^4.5.0"
+ "vue-router": "^4.5.0",
+ "web-vitals": "^3.5.2"
},
"devDependencies": {
"@tailwindcss/forms": "^0.5.10",
"@tailwindcss/typography": "^0.5.16",
"@tailwindcss/vite": "^4.0.1",
"@types/node": "^22.12.0",
+ "@types/rollup-plugin-visualizer": "^4.2.3",
"@vitejs/plugin-vue": "^5.2.1",
"@vue/tsconfig": "^0.7.0",
+ "rollup-plugin-visualizer": "^5.12.0",
+ "sharp": "^0.33.2",
"tailwindcss": "^4.0.1",
"typescript": "~5.6.2",
"vite": "^6.0.5",
+ "vite-plugin-image-optimizer": "^1.1.7",
+ "vite-plugin-inspect": "^0.8.3",
"vite-plugin-pwa": "^0.21.1",
"vue-tsc": "^2.2.0"
}
diff --git a/src/components/ConnectionStatus.vue b/src/components/ConnectionStatus.vue
deleted file mode 100644
index 3ed34e3..0000000
--- a/src/components/ConnectionStatus.vue
+++ /dev/null
@@ -1,120 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ status }}
-
- (1)
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/components/Login.vue b/src/components/Login.vue
deleted file mode 100644
index 9546958..0000000
--- a/src/components/Login.vue
+++ /dev/null
@@ -1,206 +0,0 @@
-
-