chore: remove React frontend, rename frontend-leptos to frontend
This commit is contained in:
+1
-1
@@ -13,5 +13,5 @@ logs/
|
|||||||
.moon/docker
|
.moon/docker
|
||||||
worktrees/
|
worktrees/
|
||||||
.worktrees/
|
.worktrees/
|
||||||
frontend-leptos/frontend/dist/
|
services/frontend/frontend/dist/
|
||||||
target/
|
target/
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ Built with **pnpm workspace monorepo** with 3 services and 1 shared library:
|
|||||||
|---------|------|-------------|
|
|---------|------|-------------|
|
||||||
| `discord-moderation-backend` | `services/backend` | Express HTTP/WS server, REST API, Redis bridge |
|
| `discord-moderation-backend` | `services/backend` | Express HTTP/WS server, REST API, Redis bridge |
|
||||||
| `@bete/discord-gateway` | `services/discord-gateway` | Discord client, voice recording, message capture, AI moderation |
|
| `@bete/discord-gateway` | `services/discord-gateway` | Discord client, voice recording, message capture, AI moderation |
|
||||||
| `@gmw/frontend` | `services/frontend` | React 19 + Vite + Tailwind web dashboard |
|
| `frontend` | `services/frontend/frontend` | Leptos 0.7 CSR WASM dashboard |
|
||||||
| `@bete/shared` | `packages/shared` | Shared types, errors, logger, utilities |
|
| `@bete/shared` | `packages/shared` | Shared types, errors, logger, utilities |
|
||||||
|
|
||||||
**Database:** PostgreSQL (Drizzle ORM) — NOT SQLite.
|
**Database:** PostgreSQL (Drizzle ORM) — NOT SQLite.
|
||||||
@@ -28,7 +28,7 @@ Discord
|
|||||||
|
|
|
|
||||||
v
|
v
|
||||||
discord-gateway ---- Redis ---- backend ---- WebSocket ---- frontend
|
discord-gateway ---- Redis ---- backend ---- WebSocket ---- frontend
|
||||||
| pub/sub (broadcast) (React)
|
| pub/sub (broadcast) (Leptos WASM)
|
||||||
| |
|
| |
|
||||||
| |
|
| |
|
||||||
<------------------+
|
<------------------+
|
||||||
@@ -194,19 +194,18 @@ The core service that connects to Discord using `discord.js-selfbot-v13`.
|
|||||||
- `src/shared/database/voiceRecordingRepo.ts` — Voice recording queries
|
- `src/shared/database/voiceRecordingRepo.ts` — Voice recording queries
|
||||||
- `src/shared/discord/clientOptions.ts` — Discord client configuration
|
- `src/shared/discord/clientOptions.ts` — Discord client configuration
|
||||||
|
|
||||||
### frontend (`services/frontend`)
|
### frontend (`services/frontend/frontend`)
|
||||||
|
|
||||||
React 19 + Vite 8 + Tailwind CSS 4 + TypeScript dashboard.
|
Leptos 0.7 CSR WASM + TypeScript + CSS dashboard.
|
||||||
|
|
||||||
**Tech stack:**
|
**Tech stack:**
|
||||||
- React 19 with hooks
|
- Leptos 0.7 CSR (WASM via `#[wasm_bindgen(start)]`)
|
||||||
- Vite 8 (rolldown) for bundling
|
- Trunk for bundling
|
||||||
- Tailwind CSS 4 with PostCSS
|
- Plain CSS with design tokens
|
||||||
- Three.js + React Three Fiber + Drei for 3D visualizations
|
- Canvas 2D via `web-sys` for audio visualization
|
||||||
- GSAP + Framer Motion for animations
|
- CSS animations (GSAP/Framer Motion dihapus — unused)
|
||||||
- Radix UI primitives (ScrollArea, Slot, Tabs)
|
- `web-sys` primitives (WebSocket, AudioContext, IntersectionObserver)
|
||||||
- TanStack React Query for data fetching
|
- `lucide-leptos` 3 for icons
|
||||||
- Lucide React for icons
|
|
||||||
|
|
||||||
**Feature structure (entity + feature slices):**
|
**Feature structure (entity + feature slices):**
|
||||||
- `entities/` — Type exports re-exported from shared API client
|
- `entities/` — Type exports re-exported from shared API client
|
||||||
@@ -389,15 +388,16 @@ pnpm install
|
|||||||
# Run each service in development mode (separate terminal each)
|
# Run each service in development mode (separate terminal each)
|
||||||
pnpm run dev:backend # Backend on port 3001
|
pnpm run dev:backend # Backend on port 3001
|
||||||
pnpm run dev:discord-gateway # Discord client + all features
|
pnpm run dev:discord-gateway # Discord client + all features
|
||||||
pnpm run dev:web # Frontend on Vite dev server
|
pnpm run dev:web # Frontend via trunk serve
|
||||||
|
|
||||||
# Build
|
# Build
|
||||||
pnpm run build:backend
|
pnpm run build:backend
|
||||||
pnpm run build:discord-gateway
|
pnpm run build:discord-gateway
|
||||||
pnpm run build:web
|
pnpm run build:web # trunk build --release
|
||||||
|
|
||||||
# Type checking across all packages
|
# Type checking
|
||||||
pnpm run typecheck
|
pnpm run typecheck # Node services (pnpm -r)
|
||||||
|
pnpm run typecheck:web # Leptos frontend (cargo check)
|
||||||
|
|
||||||
# Lint (Biome)
|
# Lint (Biome)
|
||||||
pnpm run lint
|
pnpm run lint
|
||||||
|
|||||||
+3
-2
@@ -7,10 +7,11 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"dev:backend": "pnpm --filter './services/backend' run dev",
|
"dev:backend": "pnpm --filter './services/backend' run dev",
|
||||||
"dev:discord-gateway": "pnpm --filter './services/discord-gateway' run dev",
|
"dev:discord-gateway": "pnpm --filter './services/discord-gateway' run dev",
|
||||||
"dev:web": "pnpm --filter './services/frontend' run dev",
|
"dev:web": "cd services/frontend/frontend && trunk serve --address 0.0.0.0",
|
||||||
|
"build:web": "cd services/frontend/frontend && trunk build --release",
|
||||||
|
"typecheck:web": "cd services/frontend/frontend && cargo check",
|
||||||
"build:backend": "pnpm --filter './services/backend' run build",
|
"build:backend": "pnpm --filter './services/backend' run build",
|
||||||
"build:discord-gateway": "pnpm --filter './services/discord-gateway' run build",
|
"build:discord-gateway": "pnpm --filter './services/discord-gateway' run build",
|
||||||
"build:web": "pnpm --filter './services/frontend' run build",
|
|
||||||
"typecheck": "pnpm -r run typecheck",
|
"typecheck": "pnpm -r run typecheck",
|
||||||
"lint": "biome check --diagnostic-level=error .",
|
"lint": "biome check --diagnostic-level=error .",
|
||||||
"format": "biome format --write .",
|
"format": "biome format --write .",
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
packages:
|
packages:
|
||||||
- services/frontend
|
|
||||||
- services/backend
|
- services/backend
|
||||||
- services/discord-gateway
|
- services/discord-gateway
|
||||||
- packages/shared
|
- packages/shared
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
# API/WS endpoints — set these before building
|
|
||||||
VITE_BE_API_URL=http://localhost:3001
|
|
||||||
VITE_BE_WS_URL=ws://localhost:3001/ws
|
|
||||||
@@ -1,5 +1,3 @@
|
|||||||
# Backend API URL (default: http://localhost:3001)
|
# API/WS endpoints — set these before building
|
||||||
VITE_BE_API_URL=http://localhost:3001
|
VITE_BE_API_URL=http://localhost:3001
|
||||||
|
VITE_BE_WS_URL=ws://localhost:3001/ws
|
||||||
# Backend WebSocket URL (default: ws://localhost:3001)
|
|
||||||
VITE_BE_WS_URL=ws://localhost:3001
|
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user