Compare commits

..

3 Commits

Author SHA1 Message Date
Flavio Fois
40340ce32a fix: update package dependencies and adjust filter input width 2026-02-14 23:06:14 +01:00
Flavio Fois
0aaa026429 fix: update MySQL image to use the latest stable version 2026-02-14 23:03:06 +01:00
Flavio Fois
492db8fcf8 feat: initialize dashboard with bug reporting functionality
- Add HTML structure for the dashboard application.
- Create database schema for bug reports and associated files.
- Implement database connection using Drizzle ORM with MySQL.
- Add utility functions for class names, byte formatting, and date formatting.
- Create error handling page for the application.
- Implement layout and main page structure with navigation and report listing.
- Add server-side logic for loading reports with pagination and filtering.
- Create report detail page with metadata, description, and file attachments.
- Implement API endpoints for downloading reports and files, refreshing report counts, and managing report statuses.
- Set up SvelteKit configuration and TypeScript support.
- Configure Vite for SvelteKit and Tailwind CSS integration.
- Update Docker Compose configuration for the dashboard service.
- Create systemd service for managing the dashboard server.
2026-02-14 23:01:08 +01:00
29 changed files with 62 additions and 38 deletions

View File

@@ -1,34 +0,0 @@
{
"name": "emly-dashboard",
"version": "1.0.0",
"private": true,
"scripts": {
"dev": "vite dev --port 3001",
"build": "vite build",
"preview": "vite preview",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json"
},
"devDependencies": {
"@sveltejs/adapter-node": "^5.2.0",
"@sveltejs/kit": "^2.21.0",
"@sveltejs/vite-plugin-svelte": "^5.0.0",
"@tailwindcss/vite": "^4.0.0",
"@types/node": "^25.2.3",
"svelte": "^5.0.0",
"svelte-check": "^4.0.0",
"tailwindcss": "^4.0.0",
"typescript": "^5.0.0",
"vite": "^6.0.0"
},
"dependencies": {
"drizzle-orm": "^0.38.0",
"mysql2": "^3.11.0",
"bits-ui": "^1.0.0",
"clsx": "^2.1.0",
"tailwind-merge": "^3.0.0",
"tailwind-variants": "^0.3.0",
"jszip": "^3.10.0",
"lucide-svelte": "^0.469.0"
},
"type": "module"
}

View File

@@ -12,6 +12,7 @@ ADMIN_KEY=change_me_admin_key
# Server
PORT=3000
DASHBOARD_PORT=3001
# Rate Limiting
RATE_LIMIT_MAX=5

7
server/.gitignore vendored
View File

@@ -2,3 +2,10 @@ node_modules/
.env
dist/
*.log
# Dashboard
dashboard/node_modules/
dashboard/.svelte-kit/
dashboard/build/
dashboard/.env
dashboard/bun.lock

View File

@@ -0,0 +1,34 @@
{
"name": "emly-dashboard",
"version": "1.0.0",
"private": true,
"scripts": {
"dev": "vite dev --port 3001",
"build": "vite build",
"preview": "vite preview",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json"
},
"devDependencies": {
"@sveltejs/adapter-node": "^5.5.3",
"@sveltejs/kit": "^2.51.0",
"@sveltejs/vite-plugin-svelte": "^5.1.1",
"@tailwindcss/vite": "^4.1.18",
"@types/node": "^25.2.3",
"svelte": "^5.51.1",
"svelte-check": "^4.4.0",
"tailwindcss": "^4.1.18",
"typescript": "^5.9.3",
"vite": "^6.4.1"
},
"dependencies": {
"drizzle-orm": "^0.38.4",
"mysql2": "^3.17.1",
"bits-ui": "^1.8.0",
"clsx": "^2.1.1",
"tailwind-merge": "^3.4.0",
"tailwind-variants": "^0.3.1",
"jszip": "^3.10.1",
"lucide-svelte": "^0.469.0"
},
"type": "module"
}

View File

@@ -46,7 +46,7 @@
<div class="space-y-4">
<!-- Filters -->
<div class="flex flex-wrap items-center gap-3">
<div class="relative flex-1 min-w-[200px] max-w-sm">
<div class="relative flex-1 min-w-50 max-w-sm">
<Search class="absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" />
<input
type="text"
@@ -79,7 +79,7 @@
class="inline-flex items-center gap-1.5 rounded-md bg-primary px-3 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90"
>
<RefreshCcw class="h-4 w-4" />
Filter
Refresh
</button>
{#if data.filters.search || data.filters.status}
<button

View File

@@ -1,6 +1,6 @@
services:
mysql:
image: mysql:8.0
image: mysql:lts
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE:-emly_bugreports}
@@ -37,7 +37,7 @@ services:
condition: service_healthy
dashboard:
build: ../dashboard
build: ./dashboard
ports:
- "${DASHBOARD_PORT:-3001}:3000"
environment:

View File

@@ -0,0 +1,16 @@
[Unit]
Description=EMLy Bug Report Server (Docker Compose)
Requires=docker.service
After=docker.service
[Service]
Type=oneshot
RemainAfterExit=yes
WorkingDirectory=/opt/emly-server
ExecStart=/usr/bin/docker compose up -d
ExecStop=/usr/bin/docker compose down
Restart=on-failure
TimeoutStartSec=120
[Install]
WantedBy=multi-user.target