Skip to content

Commit 775f445

Browse files
committed
Don't mind me, just vibin'
0 parents  commit 775f445

40 files changed

+10858
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
workflow_dispatch:
7+
8+
concurrency:
9+
group: "pages"
10+
cancel-in-progress: false
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Setup Node.js
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: '22'
23+
cache: 'npm'
24+
25+
- name: Install dependencies
26+
run: npm ci
27+
28+
- name: Build
29+
run: npm run build
30+
31+
- name: Setup Pages
32+
uses: actions/configure-pages@v5
33+
34+
- name: Upload artifact
35+
uses: actions/upload-pages-artifact@v3
36+
with:
37+
path: ./dist
38+
39+
deploy:
40+
permissions:
41+
contents: read
42+
pages: write
43+
id-token: write
44+
45+
environment:
46+
name: github-pages
47+
url: ${{ steps.deployment.outputs.page_url }}
48+
49+
runs-on: ubuntu-latest
50+
needs: build
51+
steps:
52+
- name: Deploy to GitHub Pages
53+
id: deployment
54+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?

README.md

Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
# React + TypeScript + Vite
2+
3+
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
4+
5+
Currently, two official plugins are available:
6+
7+
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) for Fast Refresh
8+
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
9+
10+
## Expanding the ESLint configuration
11+
12+
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
13+
14+
# AI-Powered Z-Wave JS Log Analyzer
15+
16+
A web-based application that uses Google's Gemini AI to analyze Z-Wave JS network logs and provide intelligent insights about network performance, device behavior, and potential issues.
17+
18+
## Features
19+
20+
- **Smart Log Processing**: Real transform pipeline based on Z-Wave JS code for accurate log parsing
21+
- **AI-Powered Analysis**: Google Gemini AI provides intelligent insights about your Z-Wave network
22+
- **RSSI Analysis**: Specialized analysis of signal strength and network quality
23+
- **Interactive UI**: Modern React interface with drag-and-drop file upload
24+
- **Real-time Streaming**: Live analysis results as they're generated
25+
- **Secure**: API keys stored locally in your browser, no data sent to external servers
26+
27+
## Live Demo
28+
29+
Visit the live application at: [https://username.github.io/zwave-js-log-analyzer/](https://username.github.io/zwave-js-log-analyzer/)
30+
31+
## Usage
32+
33+
1. **Get a Google Gemini API Key**
34+
- Visit [Google AI Studio](https://aistudio.google.com/app/apikey)
35+
- Create a free API key
36+
- Enter it in the application (stored locally in your browser)
37+
38+
2. **Upload Your Z-Wave JS Log File**
39+
- Drag and drop your log file onto the upload area
40+
- Supports .log and .txt files from Z-Wave JS applications
41+
42+
3. **Ask Questions About Your Network**
43+
- Use the default query or ask specific questions
44+
- Examples:
45+
- "How good are the connections of my devices?"
46+
- "What errors occurred in this log?"
47+
- "Which devices have communication issues?"
48+
- "Analyze the RSSI values and signal quality"
49+
50+
4. **Review AI Analysis**
51+
- Get real-time insights as the AI analyzes your log
52+
- Receive actionable recommendations for network optimization
53+
54+
## Supported Log Formats
55+
56+
- Z-Wave JS structured logs (preferred)
57+
- Raw Z-Wave JS console output
58+
- Log files from Z-Wave JS applications
59+
60+
## Local Development
61+
62+
### Prerequisites
63+
64+
- Node.js 18 or higher
65+
- npm
66+
67+
### Installation
68+
69+
```bash
70+
git clone https://github.com/username/zwave-js-log-analyzer.git
71+
cd zwave-js-log-analyzer
72+
npm install
73+
```
74+
75+
### Development
76+
77+
```bash
78+
npm run dev
79+
```
80+
81+
Open [http://localhost:5173](http://localhost:5173) in your browser.
82+
83+
### Build
84+
85+
```bash
86+
npm run build
87+
```
88+
89+
The built application will be in the `dist` directory.
90+
91+
## Deployment
92+
93+
This application is configured for GitHub Pages deployment. Push to the `main` branch to automatically deploy via GitHub Actions.
94+
95+
### Manual Deployment
96+
97+
```bash
98+
npm run build
99+
# Deploy the contents of the dist/ directory to your web server
100+
```
101+
102+
## Architecture
103+
104+
- **Frontend**: React + TypeScript + Vite
105+
- **Styling**: Tailwind CSS
106+
- **AI Integration**: Google Gemini AI via @google/genai
107+
- **Log Processing**: Transform pipeline based on Z-Wave JS core
108+
- **State Management**: React hooks with localStorage for persistence
109+
110+
## Privacy & Security
111+
112+
- **Local Processing**: Log files are processed entirely in your browser
113+
- **API Key Storage**: Your Gemini API key is stored locally in your browser
114+
- **No Data Collection**: No log data or personal information is sent to external servers
115+
- **Client-Side Only**: This is a static web application with no backend
116+
117+
## Contributing
118+
119+
1. Fork the repository
120+
2. Create a feature branch
121+
3. Make your changes
122+
4. Test thoroughly
123+
5. Submit a pull request
124+
125+
## License
126+
127+
MIT License - see [LICENSE](LICENSE) for details.
128+
129+
## Acknowledgments
130+
131+
- Built using the real Z-Wave JS transform pipeline from [node-zwave-js](https://github.com/zwave-js/node-zwave-js)
132+
- Powered by Google's Gemini AI
133+
- Analysis prompts based on Z-Wave JS project's log analysis tools
134+
135+
You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
136+
137+
```js
138+
// eslint.config.js
139+
import reactX from 'eslint-plugin-react-x'
140+
import reactDom from 'eslint-plugin-react-dom'
141+
142+
export default tseslint.config([
143+
globalIgnores(['dist']),
144+
{
145+
files: ['**/*.{ts,tsx}'],
146+
extends: [
147+
// Other configs...
148+
// Enable lint rules for React
149+
reactX.configs['recommended-typescript'],
150+
// Enable lint rules for React DOM
151+
reactDom.configs.recommended,
152+
],
153+
languageOptions: {
154+
parserOptions: {
155+
project: ['./tsconfig.node.json', './tsconfig.app.json'],
156+
tsconfigRootDir: import.meta.dirname,
157+
},
158+
// other options...
159+
},
160+
},
161+
])
162+
```

eslint.config.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import js from '@eslint/js'
2+
import globals from 'globals'
3+
import reactHooks from 'eslint-plugin-react-hooks'
4+
import reactRefresh from 'eslint-plugin-react-refresh'
5+
import tseslint from 'typescript-eslint'
6+
import { globalIgnores } from 'eslint/config'
7+
8+
export default tseslint.config([
9+
globalIgnores(['dist']),
10+
{
11+
files: ['**/*.{ts,tsx}'],
12+
extends: [
13+
js.configs.recommended,
14+
tseslint.configs.recommended,
15+
reactHooks.configs['recommended-latest'],
16+
reactRefresh.configs.vite,
17+
],
18+
languageOptions: {
19+
ecmaVersion: 2020,
20+
globals: globals.browser,
21+
},
22+
},
23+
])

index.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<title>Z-Wave JS Log Analyzer</title>
8+
<link rel="preconnect" href="https://fonts.googleapis.com">
9+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
10+
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap" rel="stylesheet">
11+
</head>
12+
<body>
13+
<div id="root"></div>
14+
<script type="module" src="/src/main.tsx"></script>
15+
</body>
16+
</html>

0 commit comments

Comments
 (0)