Compare commits

...

6 Commits

Author SHA1 Message Date
m
193a4cd567 refactor: rename to KanzlAI-mGMT, pivot to Kanzleimanagement
New direction: law firm management (Fristen, Termine, case tracking)
instead of UPC case law search. Updated all references, Go module
path, and deployment info.
2026-03-25 12:40:15 +01:00
m
792d084b4f fix: use node fetch for frontend health check
wget in node:22-alpine can't connect to localhost:3000 — use
node's built-in fetch instead, which works correctly.
2026-03-24 23:47:36 +01:00
m
ff9a6f3866 fix: use expose instead of ports for Dokploy/Traefik compatibility
Port 3000 conflicts with Dokploy. Traefik routes traffic via
Docker network, so expose is sufficient. Also remove env_file
refs since Dokploy injects env vars directly.
2026-03-24 23:43:11 +01:00
m
83a18a0a85 build: add Docker Compose setup for Dokploy deployment 2026-03-24 19:25:48 +01:00
m
b797b349e7 build: add Docker Compose setup for Dokploy deployment
- Multi-stage Dockerfile for Go backend (golang:1.25-alpine -> alpine:3)
- Multi-stage Dockerfile for Next.js frontend (bun:1 -> node:22-alpine)
- docker-compose.yml with backend + frontend services, health checks
- Next.js standalone output + API rewrites to proxy /api/* to backend
- .dockerignore files for both services
- .env.example documenting required environment variables
2026-03-24 19:20:49 +01:00
m
b2139b046e feat: scaffold monorepo with Go backend + Next.js 15 frontend 2026-03-24 18:36:12 +01:00
13 changed files with 126 additions and 30 deletions

12
.env.example Normal file
View File

@@ -0,0 +1,12 @@
# KanzlAI Environment Variables
# Copy to .env and fill in values: cp .env.example .env
# Backend
PORT=8080
# Supabase (required for database access)
SUPABASE_URL=
SUPABASE_ANON_KEY=
# Claude API (required for AI features)
ANTHROPIC_API_KEY=

View File

@@ -1,6 +1,6 @@
# KanzlAI # KanzlAI-mGMT
AI-powered toolkit for patent litigation — UPC case law search, analysis, and AI-assisted legal research. Kanzleimanagement online — law firm management for deadlines (Fristen), appointments (Termine), and case tracking.
**Memory group_id:** `kanzlai` **Memory group_id:** `kanzlai`
@@ -18,9 +18,8 @@ frontend/ Next.js 15 (TypeScript, Tailwind CSS, App Router)
- **Frontend:** Next.js 15 with TypeScript, Tailwind CSS v4, App Router, Bun - **Frontend:** Next.js 15 with TypeScript, Tailwind CSS v4, App Router, Bun
- **Backend:** Go (standard library HTTP server) - **Backend:** Go (standard library HTTP server)
- **Database:** Supabase (PostgreSQL) — shared instance with other m projects - **Database:** Supabase (PostgreSQL) — `kanzlai` schema in flexsiebels instance
- **AI:** Claude API - **Deploy:** Dokploy on mLake, domain: kanzlai.msbls.de
- **Deploy:** mRiver with Caddy reverse proxy
## Development ## Development

View File

@@ -1,6 +1,6 @@
# KanzlAI # KanzlAI-mGMT
AI-powered toolkit for patent litigation — starting with UPC case law search and analysis. Kanzleimanagement online — law firm management for deadlines, appointments, and case tracking.
## Structure ## Structure
@@ -12,26 +12,16 @@ frontend/ Next.js 15 (TypeScript, Tailwind CSS)
## Development ## Development
```bash ```bash
# Backend make dev-backend # Go server on :8080
make dev-backend make dev-frontend # Next.js dev server
make build # Build both
# Frontend make lint # Lint both
make dev-frontend make test # Test both
# Build all
make build
# Lint all
make lint
# Test all
make test
``` ```
## Tech Stack ## Tech Stack
- **Frontend:** Next.js 15, TypeScript, Tailwind CSS - **Frontend:** Next.js 15, TypeScript, Tailwind CSS
- **Backend:** Go - **Backend:** Go
- **Database:** Supabase (PostgreSQL) - **Database:** Supabase (PostgreSQL)`kanzlai` schema
- **AI:** Claude API - **Deploy:** Dokploy on mLake (kanzlai.msbls.de)
- **Deploy:** mRiver + Caddy

6
backend/.dockerignore Normal file
View File

@@ -0,0 +1,6 @@
bin/
*.exe
.git
.gitignore
Dockerfile
.dockerignore

15
backend/Dockerfile Normal file
View File

@@ -0,0 +1,15 @@
# Build
FROM golang:1.25-alpine AS builder
WORKDIR /app
COPY go.mod ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -o server ./cmd/server
# Run
FROM alpine:3
RUN apk --no-cache add ca-certificates
WORKDIR /app
COPY --from=builder /app/server .
EXPOSE 8080
CMD ["./server"]

View File

@@ -1,3 +1,3 @@
module mgit.msbls.de/m/KanzlAI module mgit.msbls.de/m/KanzlAI-mGMT
go 1.25.5 go 1.25.5

31
docker-compose.yml Normal file
View File

@@ -0,0 +1,31 @@
services:
backend:
build:
context: ./backend
expose:
- "8080"
environment:
- PORT=8080
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://localhost:8080/health"]
interval: 30s
timeout: 5s
retries: 3
start_period: 5s
frontend:
build:
context: ./frontend
expose:
- "3000"
depends_on:
backend:
condition: service_healthy
environment:
- API_URL=http://backend:8080
healthcheck:
test: ["CMD", "node", "-e", "fetch('http://localhost:3000').then(r=>{if(!r.ok)throw r.status;process.exit(0)}).catch(()=>process.exit(1))"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s

9
frontend/.dockerignore Normal file
View File

@@ -0,0 +1,9 @@
node_modules/
.next/
out/
build/
.git
.gitignore
Dockerfile
.dockerignore
.env*

28
frontend/Dockerfile Normal file
View File

@@ -0,0 +1,28 @@
# Dependencies
FROM oven/bun:1 AS deps
WORKDIR /app
COPY package.json bun.lock ./
RUN bun install --frozen-lockfile
# Build
FROM oven/bun:1 AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
ENV API_URL=http://backend:8080
RUN mkdir -p public
RUN bun run build
# Run
FROM node:22-alpine AS runner
WORKDIR /app
ENV NODE_ENV=production
ENV HOSTNAME=0.0.0.0
ENV PORT=3000
COPY --from=builder /app/.next/standalone ./
COPY --from=builder /app/.next/static ./.next/static
COPY --from=builder /app/public ./public
EXPOSE 3000
CMD ["node", "server.js"]

View File

@@ -1,7 +1,13 @@
import type { NextConfig } from "next"; import type { NextConfig } from "next";
const nextConfig: NextConfig = { const nextConfig: NextConfig = {
/* config options here */ output: "standalone",
rewrites: async () => [
{
source: "/api/:path*",
destination: `${process.env.API_URL || "http://localhost:8080"}/:path*`,
},
],
}; };
export default nextConfig; export default nextConfig;

View File

@@ -1,5 +1,5 @@
{ {
"name": "frontend", "name": "kanzlai-mgmt",
"version": "0.1.0", "version": "0.1.0",
"private": true, "private": true,
"scripts": { "scripts": {

View File

@@ -13,8 +13,8 @@ const geistMono = Geist_Mono({
}); });
export const metadata: Metadata = { export const metadata: Metadata = {
title: "KanzlAI", title: "KanzlAI-mGMT",
description: "AI-powered toolkit for patent litigation", description: "Kanzleimanagement online",
}; };
export default function RootLayout({ export default function RootLayout({

View File

@@ -1,7 +1,7 @@
export default function Home() { export default function Home() {
return ( return (
<main className="flex min-h-screen items-center justify-center"> <main className="flex min-h-screen items-center justify-center">
<h1 className="text-4xl font-bold">KanzlAI</h1> <h1 className="text-4xl font-bold">KanzlAI-mGMT</h1>
</main> </main>
); );
} }