Compare commits
6 Commits
mai/knuth/
...
193a4cd567
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
193a4cd567 | ||
|
|
792d084b4f | ||
|
|
ff9a6f3866 | ||
|
|
83a18a0a85 | ||
|
|
b797b349e7 | ||
|
|
b2139b046e |
12
.env.example
Normal file
12
.env.example
Normal 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=
|
||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
28
README.md
28
README.md
@@ -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
6
backend/.dockerignore
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
bin/
|
||||||
|
*.exe
|
||||||
|
.git
|
||||||
|
.gitignore
|
||||||
|
Dockerfile
|
||||||
|
.dockerignore
|
||||||
15
backend/Dockerfile
Normal file
15
backend/Dockerfile
Normal 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"]
|
||||||
@@ -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
31
docker-compose.yml
Normal 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
9
frontend/.dockerignore
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
node_modules/
|
||||||
|
.next/
|
||||||
|
out/
|
||||||
|
build/
|
||||||
|
.git
|
||||||
|
.gitignore
|
||||||
|
Dockerfile
|
||||||
|
.dockerignore
|
||||||
|
.env*
|
||||||
28
frontend/Dockerfile
Normal file
28
frontend/Dockerfile
Normal 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"]
|
||||||
@@ -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;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "frontend",
|
"name": "kanzlai-mgmt",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -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({
|
||||||
|
|||||||
@@ -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>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user