Compare commits

..

9 Commits

Author SHA1 Message Date
7a9dd06fc6 feat: setup analytics-mailer with gitea cron pipeline for e-tib and klz
Some checks failed
Monorepo Pipeline / ⚡ Prioritize Release (push) Successful in 3s
Monorepo Pipeline / 🧹 Lint (push) Failing after 1m42s
Monorepo Pipeline / 🧪 Test (push) Successful in 56s
Monorepo Pipeline / 🏗️ Build (push) Successful in 2m35s
Monorepo Pipeline / 🚀 Release (push) Has been skipped
Monorepo Pipeline / 🐳 Build Gatekeeper (Product) (push) Has been skipped
Monorepo Pipeline / 🐳 Build Build-Base (push) Has been skipped
Monorepo Pipeline / 🐳 Build Production Runtime (push) Has been skipped
Monthly Analytics Mailer / 📊 Send Monthly Reports (push) Failing after 59s
🏥 Server Maintenance / 🧹 Prune & Clean (push) Failing after 7s
2026-06-21 20:52:31 +02:00
985e532c61 feat(vikunja-mcp): add task attachments and extra metadata parameters support
Some checks failed
Monorepo Pipeline / ⚡ Prioritize Release (push) Successful in 2s
Monorepo Pipeline / 🧹 Lint (push) Failing after 1m38s
Monorepo Pipeline / 🧪 Test (push) Successful in 54s
Monorepo Pipeline / 🏗️ Build (push) Successful in 2m38s
Monorepo Pipeline / 🚀 Release (push) Has been skipped
Monorepo Pipeline / 🐳 Build Gatekeeper (Product) (push) Has been skipped
Monorepo Pipeline / 🐳 Build Build-Base (push) Has been skipped
Monorepo Pipeline / 🐳 Build Production Runtime (push) Has been skipped
2026-06-21 12:26:44 +02:00
04462f21e1 feat: add outline MCP server
Some checks failed
Monorepo Pipeline / ⚡ Prioritize Release (push) Successful in 2s
Monorepo Pipeline / 🧪 Test (push) Successful in 1m56s
Monorepo Pipeline / 🧹 Lint (push) Failing after 3m24s
Monorepo Pipeline / 🏗️ Build (push) Successful in 4m11s
Monorepo Pipeline / 🚀 Release (push) Has been skipped
Monorepo Pipeline / 🐳 Build Gatekeeper (Product) (push) Has been skipped
Monorepo Pipeline / 🐳 Build Build-Base (push) Has been skipped
Monorepo Pipeline / 🐳 Build Production Runtime (push) Has been skipped
2026-06-04 21:40:00 +02:00
11babf3347 feat(mcp): expand Vikunja server with project, delete, and comment tools
All checks were successful
Monorepo Pipeline / ⚡ Prioritize Release (push) Successful in 2s
Monorepo Pipeline / 🧪 Test (push) Successful in 1m20s
Monorepo Pipeline / 🏗️ Build (push) Successful in 3m3s
Monorepo Pipeline / 🧹 Lint (push) Successful in 3m13s
Monorepo Pipeline / 🚀 Release (push) Has been skipped
Monorepo Pipeline / 🐳 Build Gatekeeper (Product) (push) Has been skipped
Monorepo Pipeline / 🐳 Build Build-Base (push) Has been skipped
Monorepo Pipeline / 🐳 Build Production Runtime (push) Has been skipped
2026-06-03 17:41:12 +02:00
3de92accc4 chore: configure Vikunja API token and base URL for MCP server
Some checks failed
Monorepo Pipeline / ⚡ Prioritize Release (push) Successful in 49s
Monorepo Pipeline / 🧹 Lint (push) Failing after 31s
Monorepo Pipeline / 🧪 Test (push) Failing after 23s
Monorepo Pipeline / 🏗️ Build (push) Failing after 22s
Monorepo Pipeline / 🚀 Release (push) Has been skipped
Monorepo Pipeline / 🐳 Build Gatekeeper (Product) (push) Has been skipped
Monorepo Pipeline / 🐳 Build Build-Base (push) Has been skipped
Monorepo Pipeline / 🐳 Build Production Runtime (push) Has been skipped
2026-06-03 17:34:00 +02:00
c8961411ec feat: add vikunja mcp server
Some checks failed
Monorepo Pipeline / ⚡ Prioritize Release (push) Has been cancelled
Monorepo Pipeline / 🧹 Lint (push) Has been cancelled
Monorepo Pipeline / 🧪 Test (push) Has been cancelled
Monorepo Pipeline / 🏗️ Build (push) Has been cancelled
Monorepo Pipeline / 🚀 Release (push) Has been cancelled
Monorepo Pipeline / 🐳 Build Gatekeeper (Product) (push) Has been cancelled
Monorepo Pipeline / 🐳 Build Build-Base (push) Has been cancelled
Monorepo Pipeline / 🐳 Build Production Runtime (push) Has been cancelled
2026-06-03 17:26:04 +02:00
42ea30c11f fix: disable automatic vikunja icon changes (pride logo)
All checks were successful
Monorepo Pipeline / ⚡ Prioritize Release (push) Successful in 1m2s
Monorepo Pipeline / 🧪 Test (push) Successful in 2m15s
Monorepo Pipeline / 🏗️ Build (push) Successful in 3m19s
Monorepo Pipeline / 🧹 Lint (push) Successful in 4m17s
Monorepo Pipeline / 🚀 Release (push) Has been skipped
Monorepo Pipeline / 🐳 Build Gatekeeper (Product) (push) Has been skipped
Monorepo Pipeline / 🐳 Build Build-Base (push) Has been skipped
Monorepo Pipeline / 🐳 Build Production Runtime (push) Has been skipped
2026-06-03 17:22:10 +02:00
7b2cc3723a feat: add vikunja deployment configuration
All checks were successful
Monorepo Pipeline / ⚡ Prioritize Release (push) Successful in 5s
Monorepo Pipeline / 🧹 Lint (push) Successful in 5m15s
Monorepo Pipeline / 🧪 Test (push) Successful in 1m31s
Monorepo Pipeline / 🏗️ Build (push) Successful in 5m35s
Monorepo Pipeline / 🚀 Release (push) Has been skipped
Monorepo Pipeline / 🐳 Build Gatekeeper (Product) (push) Has been skipped
Monorepo Pipeline / 🐳 Build Build-Base (push) Has been skipped
Monorepo Pipeline / 🐳 Build Production Runtime (push) Has been skipped
2026-06-03 17:16:55 +02:00
0fc4ddbc28 fix: clean buildx caches and dangling builder volumes in mintel-optimizer
All checks were successful
Monorepo Pipeline / ⚡ Prioritize Release (push) Successful in 7m37s
Monorepo Pipeline / 🧪 Test (push) Successful in 1m27s
Monorepo Pipeline / 🏗️ Build (push) Successful in 3m33s
Monorepo Pipeline / 🧹 Lint (push) Successful in 4m10s
Monorepo Pipeline / 🚀 Release (push) Has been skipped
Monorepo Pipeline / 🐳 Build Gatekeeper (Product) (push) Has been skipped
Monorepo Pipeline / 🐳 Build Build-Base (push) Has been skipped
Monorepo Pipeline / 🐳 Build Production Runtime (push) Has been skipped
2026-06-03 16:46:42 +02:00
81 changed files with 1955 additions and 11047 deletions

5
.env
View File

@@ -59,3 +59,8 @@ GLITCHTIP_API_KEY=3d37db66fa1fc3a1cdcd1357728b056225aca950f0163b50c5e922344807ed
UMAMI_BASE_URL=https://analytics.infra.mintel.me
GLITCHTIP_BASE_URL=https://errors.infra.mintel.me
SERPBEAR_BASE_URL=https://seo.infra.mintel.me
# Vikunja MCP
VIKUNJA_API_TOKEN=tk_468a6f7a59b329aa42796378e55075b79eb4d3d4
VIKUNJA_BASE_URL=https://tasks.infra.mintel.me

View File

@@ -0,0 +1,44 @@
name: Monthly Analytics Mailer
on:
schedule:
- cron: '0 8 1 * *' # Run at 08:00 on the 1st of every month
workflow_dispatch: # Allow manual trigger
jobs:
send-reports:
name: 📊 Send Monthly Reports
runs-on: docker
container:
image: catthehacker/ubuntu:act-latest
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
UMAMI_BASE_URL: ${{ secrets.UMAMI_BASE_URL }}
UMAMI_USERNAME: ${{ secrets.UMAMI_USERNAME }}
UMAMI_PASSWORD: ${{ secrets.UMAMI_PASSWORD }}
MAILGUN_API_KEY: ${{ secrets.MAILGUN_API_KEY }}
MAILGUN_DOMAIN: ${{ secrets.MAILGUN_DOMAIN }}
MAILGUN_SENDER: ${{ secrets.MAILGUN_SENDER }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node_version: 20
- name: Enable pnpm
run: corepack enable && corepack prepare pnpm@10.2.0 --activate
- name: Install dependencies
run: pnpm install --frozen-lockfile --prefer-offline --ignore-scripts --no-color
- name: Build mail templates
run: pnpm --filter @mintel/mail build
- name: Build analytics mailer
run: pnpm --filter @mintel/analytics-mailer build
- name: Run Analytics Mailer
run: pnpm --filter @mintel/analytics-mailer run start

View File

@@ -1,46 +0,0 @@
# Mintel Universal Design System - Architecture Manifesto
Dieses Dokument ist der absolute Nordstern für alle Entwickler und KI-Agenten, die an der Mintel Codebase arbeiten. Es definiert, wie wir UI-Komponenten bauen, isolieren und skalieren, ohne in eine "Lock-in"-Falle zu tappen.
## 1. Das Problem: Die Design System Falle
Wir bauen eine neutrale Basis (`@mintel/ui`), auf der Web, Print (PDF), Präsentationen und Remotion-Videos basieren.
Das größte Risiko: Komponenten werden im Laufe der Zeit so komplex (mit dutzenden `if/else`-Switches für Kunden-Sonderfälle), dass niemand sich mehr traut, sie anzufassen, aus Angst, andere Projekte zu zerstören.
## 2. Die Zwiebel-Architektur (Core vs. Components)
Um dieses Problem zu lösen, teilen wir unser UI-Paket logisch in zwei Ebenen:
### Tier 1: Primitives (Der Kern)
- **Was ist das?** Die absoluten Grundbausteine: `<Box>`, `<Text>`, `<Flex>`, `<Grid>`.
- **Die Regel:** Diese Komponenten haben *keine* Meinung. Sie dienen ausschließlich als saubere, typisierte Wrapper, um Tailwind-Klassen und Props durchzureichen. Sie dürfen sich architektonisch nie ändern.
- **Warum?** Weil Projekte im Notfall immer auf diese Bausteine zurückfallen können, um eigene, hochgradig individuelle Layouts zu bauen.
### Tier 2: Base Components (Der Mintel Standard)
- **Was ist das?** Fertige Komponenten wie `<Button>`, `<Card>`, `<HeroSection>`.
- **Die Regel:** Sie haben den "neutralen" Mintel-Standardlook. Sie bauen zu 100% auf Tier 1 Primitives auf.
## 3. Die 3 Goldenen Regeln gegen den "Lock-in"
Wenn ein spezifisches Projekt (z.B. ein neuer Kunde) eine Komponente braucht, die radikal vom Mintel-Standard abweicht, gelten folgende Eskalationsstufen:
### Eskalation 1: Compound Components
Komponenten dürfen niemals gigantische Props-Monster (`<Card hideHeader={true} showFooter={false} />`) werden.
Wir nutzen **Compound Components**: Das Projekt setzt die Card selbst aus `<Card.Header>`, `<Card.Body>` und `<Card.Footer>` zusammen. Braucht das Projekt den Header nicht, lässt es ihn einfach weg.
### Eskalation 2: Das `asChild` Pattern (Slot)
Wir sperren Projekte niemals in unsere DOM-Struktur ein. Wenn eine Komponente Logik enthält, nutzen wir das `asChild` (oder Slot) Pattern.
*Beispiel:* Ein `<Button asChild>` rendert kein `<button>` HTML-Tag, sondern reicht seine Tailwind-Styles und seine Accessibility-Logik transparent an das Kind-Element durch (z.B. einen Next.js `<Link>`).
### Eskalation 3: Der "Eject" (Der Shadcn-Weg)
Wenn eine `@mintel/ui` Komponente absolut nicht mehr für den Kunden X passt, wird sie **nicht** durch `if (kunde === 'X')`-Logik in der Basis "aufgebohrt".
Stattdessen **ejecten** (kopieren) wir den Source-Code der Komponente physisch in das Projekt von Kunde X (`apps/kunde-x/components/`). Ab diesem Moment "besitzt" das Projekt diese Komponente und kann sie nach Belieben modifizieren. Die neutrale Basis bleibt sauber!
## 4. Agenten & LLM Workflow
Jeder KI-Agent, der eine neue Komponente für `@mintel/ui` baut, muss folgende Checkliste abarbeiten:
1. **Ladle-First (TDD):** Keine Komponente wird ohne eine dazugehörige `.stories.tsx` Datei für den Ladle-Katalog akzeptiert. Ladle ist unsere Source of Truth.
2. **Keine Business-Logik:** Die Komponente darf keinen State (außer internen UI-State wie `isOpen`), keine API-Fetches und keine projektspezifischen Konstanten enthalten.
3. **Universalität prüfen:** Die Komponente darf keine reinen Browser-APIs (`window.location`) ohne Fallbacks nutzen, damit sie auch serverseitig in der Print-Engine (PDF) und in der Remotion-Engine gerendert werden kann.
4. **Tailwind pur:** Nutze ausschließlich Tailwind-Klassen. Keine externen CSS-Module oder `style`-Tags, wenn nicht physikalisch zwingend (z.B. bei dynamischer Frame-Interpolation in Videos).
---
*Wer dieses Manifest bricht, sabotiert die Skalierbarkeit des Monorepos. Halte dich an die Zwiebel-Architektur!*

View File

@@ -0,0 +1,14 @@
[
{
"websiteId": "d773ea10-a3b3-4ccf-9024-987e14c4d669",
"domain": "e-tib.com",
"clientEmail": "marc@mintel.me",
"clientName": "E-TIB GmbH"
},
{
"websiteId": "59a7db94-0100-4c7e-98ef-99f45b17f9c3",
"domain": "klz-cables.com",
"clientEmail": "marc@mintel.me",
"clientName": "KLZ"
}
]

View File

@@ -0,0 +1,26 @@
{
"name": "@mintel/analytics-mailer",
"version": "1.0.0",
"private": true,
"type": "module",
"scripts": {
"build": "tsup src/index.ts --format esm --clean",
"start": "node dist/index.js",
"dev": "tsx src/index.ts"
},
"dependencies": {
"@mintel/mail": "workspace:*",
"axios": "^1.7.9",
"dotenv": "^16.4.7",
"form-data": "^4.0.1",
"mailgun.js": "^10.3.0"
},
"devDependencies": {
"@mintel/eslint-config": "workspace:*",
"@mintel/tsconfig": "workspace:*",
"@types/node": "^22.10.2",
"tsup": "^8.3.5",
"tsx": "^4.19.2",
"typescript": "^5.7.2"
}
}

View File

@@ -0,0 +1,143 @@
import fs from "fs/promises";
import path from "path";
import axios from "axios";
import { render } from "@mintel/mail";
import { MonthlyAnalyticsTemplate } from "@mintel/mail";
import Mailgun from "mailgun.js";
import formData from "form-data";
import * as dotenv from "dotenv";
dotenv.config();
const UMAMI_BASE_URL = process.env.UMAMI_BASE_URL || "https://umami.infra.mintel.me";
const UMAMI_USERNAME = process.env.UMAMI_USERNAME;
const UMAMI_PASSWORD = process.env.UMAMI_PASSWORD;
const UMAMI_API_KEY = process.env.UMAMI_API_KEY;
const MAILGUN_API_KEY = process.env.MAILGUN_API_KEY;
const MAILGUN_DOMAIN = process.env.MAILGUN_DOMAIN;
const MAILGUN_SENDER = process.env.MAILGUN_SENDER || "reports@mintel.me";
const MAILGUN_URL = process.env.MAILGUN_URL || "https://api.eu.mailgun.net";
interface ConfigClient {
websiteId: string;
domain: string;
clientEmail: string;
clientName: string;
}
async function getUmamiToken(): Promise<string> {
if (UMAMI_API_KEY) {
return UMAMI_API_KEY;
}
if (!UMAMI_USERNAME || !UMAMI_PASSWORD) {
throw new Error("Missing UMAMI_USERNAME and UMAMI_PASSWORD or UMAMI_API_KEY");
}
const res = await axios.post(`${UMAMI_BASE_URL}/api/auth/login`, {
username: UMAMI_USERNAME,
password: UMAMI_PASSWORD,
});
return res.data.token;
}
async function fetchUmamiData(api: any, websiteId: string, startAt: number, endAt: number) {
const [statsRes, pagesRes, refRes] = await Promise.all([
api.get(`/websites/${websiteId}/stats`, { params: { startAt, endAt } }),
api.get(`/websites/${websiteId}/metrics`, { params: { type: "url", limit: 5, startAt, endAt } }),
api.get(`/websites/${websiteId}/metrics`, { params: { type: "referrer", limit: 3, startAt, endAt } }),
]);
const stats = statsRes.data;
const topPages = (pagesRes.data || []).map((p: any) => ({ url: p.x, views: p.y }));
const topReferrers = (refRes.data || []).map((r: any) => ({ url: r.x, visitors: r.y }));
return {
totalVisitors: stats.visitors?.value || 0,
totalPageviews: stats.pageviews?.value || 0,
topPages,
topReferrers,
};
}
async function main() {
const isDryRun = process.argv.includes("--dry-run");
// Load config
const configPath = path.resolve(process.cwd(), "config.json");
const configRaw = await fs.readFile(configPath, "utf-8");
const clients: ConfigClient[] = JSON.parse(configRaw);
// Setup Umami API
const token = await getUmamiToken();
const headers = UMAMI_API_KEY ? { "x-umami-api-key": token } : { Authorization: `Bearer ${token}` };
const api = axios.create({ baseURL: `${UMAMI_BASE_URL}/api`, headers });
// Setup Mailgun
const mailgun = new Mailgun(formData);
const mg = mailgun.client({ username: "api", key: MAILGUN_API_KEY!, url: MAILGUN_URL });
// Time range calculation (previous month)
const now = new Date();
// Ensure we get the correct previous month relative to current local time, but use UTC boundary or local? Umami uses ms timestamps.
// Standard way: First day of previous month, last day of previous month.
const startOfPrevMonth = new Date(now.getFullYear(), now.getMonth() - 1, 1);
const endOfPrevMonth = new Date(now.getFullYear(), now.getMonth(), 0, 23, 59, 59, 999);
const startAt = startOfPrevMonth.getTime();
const endAt = endOfPrevMonth.getTime();
const monthName = startOfPrevMonth.toLocaleString("de-DE", { month: "long" });
const year = startOfPrevMonth.getFullYear().toString();
console.log(`Generating reports for ${monthName} ${year}...`);
for (const client of clients) {
if (client.websiteId === "replace-with-umami-website-id") continue;
console.log(`Processing ${client.domain} (${client.clientName})...`);
try {
const data = await fetchUmamiData(api, client.websiteId, startAt, endAt);
const html = await render(MonthlyAnalyticsTemplate({
clientName: client.clientName,
domain: client.domain,
month: monthName,
year,
totalVisitors: data.totalVisitors,
totalPageviews: data.totalPageviews,
topPages: data.topPages,
topReferrers: data.topReferrers,
}));
const subject = `Ihr Website-Report für ${monthName} ${year} - ${client.domain}`;
if (isDryRun) {
console.log(`[DRY-RUN] Would send email to ${client.clientEmail} for ${client.domain}`);
const debugPath = path.resolve(process.cwd(), `dry-run-${client.domain}.html`);
await fs.writeFile(debugPath, html);
console.log(`[DRY-RUN] Saved HTML preview to ${debugPath}`);
} else {
if (!MAILGUN_API_KEY) {
throw new Error("MAILGUN_API_KEY is missing for live run.");
}
await mg.messages.create(MAILGUN_DOMAIN!, {
from: MAILGUN_SENDER,
to: [client.clientEmail],
subject,
html,
});
console.log(`Successfully sent to ${client.clientEmail}`);
}
} catch (e: any) {
console.error(`Failed to process client ${client.domain}:`, e.response?.data || e.message);
}
}
console.log("Done.");
}
main().catch((err) => {
console.error("Fatal error:", err);
process.exit(1);
});

View File

@@ -0,0 +1,10 @@
{
"extends": "@mintel/tsconfig/base.json",
"compilerOptions": {
"outDir": "dist",
"rootDir": "src",
"module": "NodeNext",
"moduleResolution": "NodeNext"
},
"include": ["src/**/*"]
}

View File

@@ -1,24 +0,0 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
dist
dist-ssr
*.local
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

View File

@@ -1,73 +0,0 @@
# React + TypeScript + Vite
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Oxc](https://oxc.rs)
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/)
## React Compiler
The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation).
## Expanding the ESLint configuration
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
```js
export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...
// Remove tseslint.configs.recommended and replace with this
tseslint.configs.recommendedTypeChecked,
// Alternatively, use this for stricter rules
tseslint.configs.strictTypeChecked,
// Optionally, add this for stylistic rules
tseslint.configs.stylisticTypeChecked,
// Other configs...
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
])
```
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:
```js
// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'
export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...
// Enable lint rules for React
reactX.configs['recommended-typescript'],
// Enable lint rules for React DOM
reactDom.configs.recommended,
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
])
```

View File

@@ -1,22 +0,0 @@
import js from '@eslint/js'
import globals from 'globals'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'
import tseslint from 'typescript-eslint'
import { defineConfig, globalIgnores } from 'eslint/config'
export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
js.configs.recommended,
tseslint.configs.recommended,
reactHooks.configs.flat.recommended,
reactRefresh.configs.vite,
],
languageOptions: {
globals: globals.browser,
},
},
])

View File

@@ -1,13 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>example-presentation</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>

View File

@@ -1,31 +0,0 @@
{
"name": "example-presentation",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
"lint": "eslint .",
"preview": "vite preview"
},
"dependencies": {
"@mintel/ui": "workspace:*",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"spectacle": "^10.0.0"
},
"devDependencies": {
"@eslint/js": "^9.17.0",
"@types/react": "^18.3.18",
"@types/react-dom": "^18.3.5",
"@vitejs/plugin-react": "^4.3.4",
"eslint": "^9.17.0",
"eslint-plugin-react-hooks": "^5.0.0",
"eslint-plugin-react-refresh": "^0.4.16",
"globals": "^15.14.0",
"typescript": "~5.7.2",
"typescript-eslint": "^8.18.2",
"vite": "^6.0.5"
}
}

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 9.3 KiB

View File

@@ -1,24 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg">
<symbol id="bluesky-icon" viewBox="0 0 16 17">
<g clip-path="url(#bluesky-clip)"><path fill="#08060d" d="M7.75 7.735c-.693-1.348-2.58-3.86-4.334-5.097-1.68-1.187-2.32-.981-2.74-.79C.188 2.065.1 2.812.1 3.251s.241 3.602.398 4.13c.52 1.744 2.367 2.333 4.07 2.145-2.495.37-4.71 1.278-1.805 4.512 3.196 3.309 4.38-.71 4.987-2.746.608 2.036 1.307 5.91 4.93 2.746 2.72-2.746.747-4.143-1.747-4.512 1.702.189 3.55-.4 4.07-2.145.156-.528.397-3.691.397-4.13s-.088-1.186-.575-1.406c-.42-.19-1.06-.395-2.741.79-1.755 1.24-3.64 3.752-4.334 5.099"/></g>
<defs><clipPath id="bluesky-clip"><path fill="#fff" d="M.1.85h15.3v15.3H.1z"/></clipPath></defs>
</symbol>
<symbol id="discord-icon" viewBox="0 0 20 19">
<path fill="#08060d" d="M16.224 3.768a14.5 14.5 0 0 0-3.67-1.153c-.158.286-.343.67-.47.976a13.5 13.5 0 0 0-4.067 0c-.128-.306-.317-.69-.476-.976A14.4 14.4 0 0 0 3.868 3.77C1.546 7.28.916 10.703 1.231 14.077a14.7 14.7 0 0 0 4.5 2.306q.545-.748.965-1.587a9.5 9.5 0 0 1-1.518-.74q.191-.14.372-.293c2.927 1.369 6.107 1.369 8.999 0q.183.152.372.294-.723.437-1.52.74.418.838.963 1.588a14.6 14.6 0 0 0 4.504-2.308c.37-3.911-.63-7.302-2.644-10.309m-9.13 8.234c-.878 0-1.599-.82-1.599-1.82 0-.998.705-1.82 1.6-1.82.894 0 1.614.82 1.599 1.82.001 1-.705 1.82-1.6 1.82m5.91 0c-.878 0-1.599-.82-1.599-1.82 0-.998.705-1.82 1.6-1.82.893 0 1.614.82 1.599 1.82 0 1-.706 1.82-1.6 1.82"/>
</symbol>
<symbol id="documentation-icon" viewBox="0 0 21 20">
<path fill="none" stroke="#aa3bff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.35" d="m15.5 13.333 1.533 1.322c.645.555.967.833.967 1.178s-.322.623-.967 1.179L15.5 18.333m-3.333-5-1.534 1.322c-.644.555-.966.833-.966 1.178s.322.623.966 1.179l1.534 1.321"/>
<path fill="none" stroke="#aa3bff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.35" d="M17.167 10.836v-4.32c0-1.41 0-2.117-.224-2.68-.359-.906-1.118-1.621-2.08-1.96-.599-.21-1.349-.21-2.848-.21-2.623 0-3.935 0-4.983.369-1.684.591-3.013 1.842-3.641 3.428C3 6.449 3 7.684 3 10.154v2.122c0 2.558 0 3.838.706 4.726q.306.383.713.671c.76.536 1.79.64 3.581.66"/>
<path fill="none" stroke="#aa3bff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.35" d="M3 10a2.78 2.78 0 0 1 2.778-2.778c.555 0 1.209.097 1.748-.047.48-.129.854-.503.982-.982.145-.54.048-1.194.048-1.749a2.78 2.78 0 0 1 2.777-2.777"/>
</symbol>
<symbol id="github-icon" viewBox="0 0 19 19">
<path fill="#08060d" fill-rule="evenodd" d="M9.356 1.85C5.05 1.85 1.57 5.356 1.57 9.694a7.84 7.84 0 0 0 5.324 7.44c.387.079.528-.168.528-.376 0-.182-.013-.805-.013-1.454-2.165.467-2.616-.935-2.616-.935-.349-.91-.864-1.143-.864-1.143-.71-.48.051-.48.051-.48.787.051 1.2.805 1.2.805.695 1.194 1.817.857 2.268.649.064-.507.27-.857.49-1.052-1.728-.182-3.545-.857-3.545-3.87 0-.857.31-1.558.8-2.104-.078-.195-.349-1 .077-2.078 0 0 .657-.208 2.14.805a7.5 7.5 0 0 1 1.946-.26c.657 0 1.328.092 1.946.26 1.483-1.013 2.14-.805 2.14-.805.426 1.078.155 1.883.078 2.078.502.546.799 1.247.799 2.104 0 3.013-1.818 3.675-3.558 3.87.284.247.528.714.528 1.454 0 1.052-.012 1.896-.012 2.156 0 .208.142.455.528.377a7.84 7.84 0 0 0 5.324-7.441c.013-4.338-3.48-7.844-7.773-7.844" clip-rule="evenodd"/>
</symbol>
<symbol id="social-icon" viewBox="0 0 20 20">
<path fill="none" stroke="#aa3bff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.35" d="M12.5 6.667a4.167 4.167 0 1 0-8.334 0 4.167 4.167 0 0 0 8.334 0"/>
<path fill="none" stroke="#aa3bff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.35" d="M2.5 16.667a5.833 5.833 0 0 1 8.75-5.053m3.837.474.513 1.035c.07.144.257.282.414.309l.93.155c.596.1.736.536.307.965l-.723.73a.64.64 0 0 0-.152.531l.207.903c.164.715-.213.991-.84.618l-.872-.52a.63.63 0 0 0-.577 0l-.872.52c-.624.373-1.003.094-.84-.618l.207-.903a.64.64 0 0 0-.152-.532l-.723-.729c-.426-.43-.289-.864.306-.964l.93-.156a.64.64 0 0 0 .412-.31l.513-1.034c.28-.562.735-.562 1.012 0"/>
</symbol>
<symbol id="x-icon" viewBox="0 0 19 19">
<path fill="#08060d" fill-rule="evenodd" d="M1.893 1.98c.052.072 1.245 1.769 2.653 3.77l2.892 4.114c.183.261.333.48.333.486s-.068.089-.152.183l-.522.593-.765.867-3.597 4.087c-.375.426-.734.834-.798.905a1 1 0 0 0-.118.148c0 .01.236.017.664.017h.663l.729-.83c.4-.457.796-.906.879-.999a692 692 0 0 0 1.794-2.038c.034-.037.301-.34.594-.675l.551-.624.345-.392a7 7 0 0 1 .34-.374c.006 0 .93 1.306 2.052 2.903l2.084 2.965.045.063h2.275c1.87 0 2.273-.003 2.266-.021-.008-.02-1.098-1.572-3.894-5.547-2.013-2.862-2.28-3.246-2.273-3.266.008-.019.282-.332 2.085-2.38l2-2.274 1.567-1.782c.022-.028-.016-.03-.65-.03h-.674l-.3.342a871 871 0 0 1-1.782 2.025c-.067.075-.405.458-.75.852a100 100 0 0 1-.803.91c-.148.172-.299.344-.99 1.127-.304.343-.32.358-.345.327-.015-.019-.904-1.282-1.976-2.808L6.365 1.85H1.8zm1.782.91 8.078 11.294c.772 1.08 1.413 1.973 1.425 1.984.016.017.241.02 1.05.017l1.03-.004-2.694-3.766L7.796 5.75 5.722 2.852l-1.039-.004-1.039-.004z" clip-rule="evenodd"/>
</symbol>
</svg>

Before

Width:  |  Height:  |  Size: 4.9 KiB

View File

@@ -1,184 +0,0 @@
.counter {
font-size: 16px;
padding: 5px 10px;
border-radius: 5px;
color: var(--accent);
background: var(--accent-bg);
border: 2px solid transparent;
transition: border-color 0.3s;
margin-bottom: 24px;
&:hover {
border-color: var(--accent-border);
}
&:focus-visible {
outline: 2px solid var(--accent);
outline-offset: 2px;
}
}
.hero {
position: relative;
.base,
.framework,
.vite {
inset-inline: 0;
margin: 0 auto;
}
.base {
width: 170px;
position: relative;
z-index: 0;
}
.framework,
.vite {
position: absolute;
}
.framework {
z-index: 1;
top: 34px;
height: 28px;
transform: perspective(2000px) rotateZ(300deg) rotateX(44deg) rotateY(39deg)
scale(1.4);
}
.vite {
z-index: 0;
top: 107px;
height: 26px;
width: auto;
transform: perspective(2000px) rotateZ(300deg) rotateX(40deg) rotateY(39deg)
scale(0.8);
}
}
#center {
display: flex;
flex-direction: column;
gap: 25px;
place-content: center;
place-items: center;
flex-grow: 1;
@media (max-width: 1024px) {
padding: 32px 20px 24px;
gap: 18px;
}
}
#next-steps {
display: flex;
border-top: 1px solid var(--border);
text-align: left;
& > div {
flex: 1 1 0;
padding: 32px;
@media (max-width: 1024px) {
padding: 24px 20px;
}
}
.icon {
margin-bottom: 16px;
width: 22px;
height: 22px;
}
@media (max-width: 1024px) {
flex-direction: column;
text-align: center;
}
}
#docs {
border-right: 1px solid var(--border);
@media (max-width: 1024px) {
border-right: none;
border-bottom: 1px solid var(--border);
}
}
#next-steps ul {
list-style: none;
padding: 0;
display: flex;
gap: 8px;
margin: 32px 0 0;
.logo {
height: 18px;
}
a {
color: var(--text-h);
font-size: 16px;
border-radius: 6px;
background: var(--social-bg);
display: flex;
padding: 6px 12px;
align-items: center;
gap: 8px;
text-decoration: none;
transition: box-shadow 0.3s;
&:hover {
box-shadow: var(--shadow);
}
.button-icon {
height: 18px;
width: 18px;
}
}
@media (max-width: 1024px) {
margin-top: 20px;
flex-wrap: wrap;
justify-content: center;
li {
flex: 1 1 calc(50% - 8px);
}
a {
width: 100%;
justify-content: center;
box-sizing: border-box;
}
}
}
#spacer {
height: 88px;
border-top: 1px solid var(--border);
@media (max-width: 1024px) {
height: 48px;
}
}
.ticks {
position: relative;
width: 100%;
&::before,
&::after {
content: '';
position: absolute;
top: -4.5px;
border: 5px solid transparent;
}
&::before {
left: 0;
border-left-color: var(--border);
}
&::after {
right: 0;
border-right-color: var(--border);
}
}

View File

@@ -1,26 +0,0 @@
import React from 'react';
import { Deck, Slide, Heading, Text as SpectacleText } from 'spectacle';
import { Box, Text, EnvironmentProvider } from '@mintel/ui';
function App() {
return (
<EnvironmentProvider env="presentation">
<Deck>
<Slide>
<Box className="flex flex-col items-center justify-center h-full">
<Heading>Mintel Universal Design System</Heading>
<SpectacleText>One Codebase. Web, Print, and Presentations.</SpectacleText>
<Box className="mt-8 p-4 bg-mintel-primary rounded-xl shadow-xl">
<Text className="text-white text-xl">
This Box and Text comes directly from @mintel/ui!
</Text>
</Box>
</Box>
</Slide>
</Deck>
</EnvironmentProvider>
);
}
export default App;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="35.93" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 228"><path fill="#00D8FF" d="M210.483 73.824a171.49 171.49 0 0 0-8.24-2.597c.465-1.9.893-3.777 1.273-5.621c6.238-30.281 2.16-54.676-11.769-62.708c-13.355-7.7-35.196.329-57.254 19.526a171.23 171.23 0 0 0-6.375 5.848a155.866 155.866 0 0 0-4.241-3.917C100.759 3.829 77.587-4.822 63.673 3.233C50.33 10.957 46.379 33.89 51.995 62.588a170.974 170.974 0 0 0 1.892 8.48c-3.28.932-6.445 1.924-9.474 2.98C17.309 83.498 0 98.307 0 113.668c0 15.865 18.582 31.778 46.812 41.427a145.52 145.52 0 0 0 6.921 2.165a167.467 167.467 0 0 0-2.01 9.138c-5.354 28.2-1.173 50.591 12.134 58.266c13.744 7.926 36.812-.22 59.273-19.855a145.567 145.567 0 0 0 5.342-4.923a168.064 168.064 0 0 0 6.92 6.314c21.758 18.722 43.246 26.282 56.54 18.586c13.731-7.949 18.194-32.003 12.4-61.268a145.016 145.016 0 0 0-1.535-6.842c1.62-.48 3.21-.974 4.76-1.488c29.348-9.723 48.443-25.443 48.443-41.52c0-15.417-17.868-30.326-45.517-39.844Zm-6.365 70.984c-1.4.463-2.836.91-4.3 1.345c-3.24-10.257-7.612-21.163-12.963-32.432c5.106-11 9.31-21.767 12.459-31.957c2.619.758 5.16 1.557 7.61 2.4c23.69 8.156 38.14 20.213 38.14 29.504c0 9.896-15.606 22.743-40.946 31.14Zm-10.514 20.834c2.562 12.94 2.927 24.64 1.23 33.787c-1.524 8.219-4.59 13.698-8.382 15.893c-8.067 4.67-25.32-1.4-43.927-17.412a156.726 156.726 0 0 1-6.437-5.87c7.214-7.889 14.423-17.06 21.459-27.246c12.376-1.098 24.068-2.894 34.671-5.345a134.17 134.17 0 0 1 1.386 6.193ZM87.276 214.515c-7.882 2.783-14.16 2.863-17.955.675c-8.075-4.657-11.432-22.636-6.853-46.752a156.923 156.923 0 0 1 1.869-8.499c10.486 2.32 22.093 3.988 34.498 4.994c7.084 9.967 14.501 19.128 21.976 27.15a134.668 134.668 0 0 1-4.877 4.492c-9.933 8.682-19.886 14.842-28.658 17.94ZM50.35 144.747c-12.483-4.267-22.792-9.812-29.858-15.863c-6.35-5.437-9.555-10.836-9.555-15.216c0-9.322 13.897-21.212 37.076-29.293c2.813-.98 5.757-1.905 8.812-2.773c3.204 10.42 7.406 21.315 12.477 32.332c-5.137 11.18-9.399 22.249-12.634 32.792a134.718 134.718 0 0 1-6.318-1.979Zm12.378-84.26c-4.811-24.587-1.616-43.134 6.425-47.789c8.564-4.958 27.502 2.111 47.463 19.835a144.318 144.318 0 0 1 3.841 3.545c-7.438 7.987-14.787 17.08-21.808 26.988c-12.04 1.116-23.565 2.908-34.161 5.309a160.342 160.342 0 0 1-1.76-7.887Zm110.427 27.268a347.8 347.8 0 0 0-7.785-12.803c8.168 1.033 15.994 2.404 23.343 4.08c-2.206 7.072-4.956 14.465-8.193 22.045a381.151 381.151 0 0 0-7.365-13.322Zm-45.032-43.861c5.044 5.465 10.096 11.566 15.065 18.186a322.04 322.04 0 0 0-30.257-.006c4.974-6.559 10.069-12.652 15.192-18.18ZM82.802 87.83a323.167 323.167 0 0 0-7.227 13.238c-3.184-7.553-5.909-14.98-8.134-22.152c7.304-1.634 15.093-2.97 23.209-3.984a321.524 321.524 0 0 0-7.848 12.897Zm8.081 65.352c-8.385-.936-16.291-2.203-23.593-3.793c2.26-7.3 5.045-14.885 8.298-22.6a321.187 321.187 0 0 0 7.257 13.246c2.594 4.48 5.28 8.868 8.038 13.147Zm37.542 31.03c-5.184-5.592-10.354-11.779-15.403-18.433c4.902.192 9.899.29 14.978.29c5.218 0 10.376-.117 15.453-.343c-4.985 6.774-10.018 12.97-15.028 18.486Zm52.198-57.817c3.422 7.8 6.306 15.345 8.596 22.52c-7.422 1.694-15.436 3.058-23.88 4.071a382.417 382.417 0 0 0 7.859-13.026a347.403 347.403 0 0 0 7.425-13.565Zm-16.898 8.101a358.557 358.557 0 0 1-12.281 19.815a329.4 329.4 0 0 1-23.444.823c-7.967 0-15.716-.248-23.178-.732a310.202 310.202 0 0 1-12.513-19.846h.001a307.41 307.41 0 0 1-10.923-20.627a310.278 310.278 0 0 1 10.89-20.637l-.001.001a307.318 307.318 0 0 1 12.413-19.761c7.613-.576 15.42-.876 23.31-.876H128c7.926 0 15.743.303 23.354.883a329.357 329.357 0 0 1 12.335 19.695a358.489 358.489 0 0 1 11.036 20.54a329.472 329.472 0 0 1-11 20.722Zm22.56-122.124c8.572 4.944 11.906 24.881 6.52 51.026c-.344 1.668-.73 3.367-1.15 5.09c-10.622-2.452-22.155-4.275-34.23-5.408c-7.034-10.017-14.323-19.124-21.64-27.008a160.789 160.789 0 0 1 5.888-5.4c18.9-16.447 36.564-22.941 44.612-18.3ZM128 90.808c12.625 0 22.86 10.235 22.86 22.86s-10.235 22.86-22.86 22.86s-22.86-10.235-22.86-22.86s10.235-22.86 22.86-22.86Z"></path></svg>

Before

Width:  |  Height:  |  Size: 4.0 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 8.5 KiB

View File

@@ -1,111 +0,0 @@
:root {
--text: #6b6375;
--text-h: #08060d;
--bg: #fff;
--border: #e5e4e7;
--code-bg: #f4f3ec;
--accent: #aa3bff;
--accent-bg: rgba(170, 59, 255, 0.1);
--accent-border: rgba(170, 59, 255, 0.5);
--social-bg: rgba(244, 243, 236, 0.5);
--shadow:
rgba(0, 0, 0, 0.1) 0 10px 15px -3px, rgba(0, 0, 0, 0.05) 0 4px 6px -2px;
--sans: system-ui, 'Segoe UI', Roboto, sans-serif;
--heading: system-ui, 'Segoe UI', Roboto, sans-serif;
--mono: ui-monospace, Consolas, monospace;
font: 18px/145% var(--sans);
letter-spacing: 0.18px;
color-scheme: light dark;
color: var(--text);
background: var(--bg);
font-synthesis: none;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
@media (max-width: 1024px) {
font-size: 16px;
}
}
@media (prefers-color-scheme: dark) {
:root {
--text: #9ca3af;
--text-h: #f3f4f6;
--bg: #16171d;
--border: #2e303a;
--code-bg: #1f2028;
--accent: #c084fc;
--accent-bg: rgba(192, 132, 252, 0.15);
--accent-border: rgba(192, 132, 252, 0.5);
--social-bg: rgba(47, 48, 58, 0.5);
--shadow:
rgba(0, 0, 0, 0.4) 0 10px 15px -3px, rgba(0, 0, 0, 0.25) 0 4px 6px -2px;
}
#social .button-icon {
filter: invert(1) brightness(2);
}
}
#root {
width: 1126px;
max-width: 100%;
margin: 0 auto;
text-align: center;
border-inline: 1px solid var(--border);
min-height: 100svh;
display: flex;
flex-direction: column;
box-sizing: border-box;
}
body {
margin: 0;
}
h1,
h2 {
font-family: var(--heading);
font-weight: 500;
color: var(--text-h);
}
h1 {
font-size: 56px;
letter-spacing: -1.68px;
margin: 32px 0;
@media (max-width: 1024px) {
font-size: 36px;
margin: 20px 0;
}
}
h2 {
font-size: 24px;
line-height: 118%;
letter-spacing: -0.24px;
margin: 0 0 8px;
@media (max-width: 1024px) {
font-size: 20px;
}
}
p {
margin: 0;
}
code,
.counter {
font-family: var(--mono);
display: inline-flex;
border-radius: 4px;
color: var(--text-h);
}
code {
font-size: 15px;
line-height: 135%;
padding: 4px 8px;
background: var(--code-bg);
}

View File

@@ -1,10 +0,0 @@
import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client'
import './index.css'
import App from './App.tsx'
createRoot(document.getElementById('root')!).render(
<StrictMode>
<App />
</StrictMode>,
)

View File

@@ -1,25 +0,0 @@
{
"compilerOptions": {
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
"target": "es2023",
"lib": ["ES2023", "DOM"],
"module": "esnext",
"types": ["vite/client"],
"skipLibCheck": true,
/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"verbatimModuleSyntax": true,
"moduleDetection": "force",
"noEmit": true,
"jsx": "react-jsx",
/* Linting */
"noUnusedLocals": true,
"noUnusedParameters": true,
"erasableSyntaxOnly": true,
"noFallthroughCasesInSwitch": true
},
"include": ["src"]
}

View File

@@ -1,7 +0,0 @@
{
"files": [],
"references": [
{ "path": "./tsconfig.app.json" },
{ "path": "./tsconfig.node.json" }
]
}

View File

@@ -1,24 +0,0 @@
{
"compilerOptions": {
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
"target": "es2023",
"lib": ["ES2023"],
"module": "esnext",
"types": ["node"],
"skipLibCheck": true,
/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"verbatimModuleSyntax": true,
"moduleDetection": "force",
"noEmit": true,
/* Linting */
"noUnusedLocals": true,
"noUnusedParameters": true,
"erasableSyntaxOnly": true,
"noFallthroughCasesInSwitch": true
},
"include": ["vite.config.ts"]
}

View File

@@ -1,7 +0,0 @@
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
// https://vite.dev/config/
export default defineConfig({
plugins: [react()],
})

View File

@@ -1,19 +0,0 @@
{
"name": "example-print",
"version": "1.0.0",
"private": true,
"main": "index.js",
"scripts": {
"build:pdf": "ts-node src/generator.tsx"
},
"dependencies": {
"@mintel/ui": "workspace:*",
"@react-pdf/renderer": "^3.4.0",
"react": "^18.2.0"
},
"devDependencies": {
"ts-node": "^10.9.2",
"typescript": "^5.0.0",
"@types/react": "^18.2.0"
}
}

View File

@@ -1,30 +0,0 @@
import React from 'react';
import ReactPDF, { Document, Page } from '@react-pdf/renderer';
import { Box, Text, EnvironmentProvider } from '@mintel/ui';
const InvoiceDocument = () => (
<EnvironmentProvider env="print">
<Document>
<Page size="A4" style={{ padding: 40, backgroundColor: '#ffffff' }}>
<Box pdfStyle={{ marginBottom: 20, borderBottom: '2px solid #1E40AF', paddingBottom: 10 }}>
<Text pdfStyle={{ fontSize: 28, color: '#1E40AF', fontWeight: 'bold' }}>
Mintel Universal Design
</Text>
</Box>
<Box pdfStyle={{ padding: 20, backgroundColor: '#f3f4f6', borderRadius: 8 }}>
<Text pdfStyle={{ fontSize: 14, color: '#374151' }}>
This PDF is generated using the exact same React components as the Web application.
</Text>
</Box>
</Page>
</Document>
</EnvironmentProvider>
);
const generatePDF = async () => {
console.log('Generating Universal PDF...');
await ReactPDF.render(<InvoiceDocument />, `${__dirname}/output.pdf`);
console.log('Successfully saved to output.pdf');
};
generatePDF();

View File

@@ -1,22 +0,0 @@
{
"name": "@mintel/example-video",
"version": "1.0.0",
"description": "Remotion video project using Mintel UI",
"scripts": {
"start": "remotion studio",
"build": "remotion render"
},
"dependencies": {
"@mintel/ui": "workspace:*",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"remotion": "^4.0.0"
},
"devDependencies": {
"@remotion/cli": "^4.0.0",
"@remotion/tailwind": "^4.0.0",
"typescript": "^5.0.0",
"@types/react": "^18.0.0",
"tailwindcss": "^3.0.0"
}
}

View File

@@ -1,6 +0,0 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
};

View File

@@ -1,4 +0,0 @@
import { Config } from "@remotion/cli/config";
Config.setVideoImageFormat("jpeg");
Config.setOverwriteOutput(true);

View File

@@ -1,40 +0,0 @@
import React from "react";
import { useCurrentFrame, useVideoConfig, interpolate } from "remotion";
import { Box, Text } from "@mintel/ui";
import "../../ui/index.css"; // Ensure Tailwind CSS from UI package is loaded
export const MintelPromo: React.FC = () => {
const frame = useCurrentFrame();
const { fps } = useVideoConfig();
// Fade in over the first 1 second (30 frames)
const opacity = interpolate(frame, [0, fps], [0, 1], {
extrapolateRight: "clamp",
});
// Slide up over the first 1 second
const translateY = interpolate(frame, [0, fps], [50, 0], {
extrapolateRight: "clamp",
});
return (
<div style={{ flex: 1, backgroundColor: "#f3f4f6" }}>
<Box
className="w-full h-full flex items-center justify-center bg-gray-100"
style={{ opacity }}
>
<Box
className="bg-white p-12 rounded-3xl shadow-2xl flex flex-col items-center"
style={{ transform: `translateY(${translateY}px)` }}
>
<Text variant="h1" className="text-blue-600 mb-4 text-8xl font-bold">
Mintel Video
</Text>
<Text variant="body" className="text-gray-600 text-3xl">
Powered by Remotion & @mintel/ui
</Text>
</Box>
</Box>
</div>
);
};

View File

@@ -1,18 +0,0 @@
import React from "react";
import { Composition } from "remotion";
import { MintelPromo } from "./Composition";
export const RemotionRoot: React.FC = () => {
return (
<>
<Composition
id="MintelPromo"
component={MintelPromo}
durationInFrames={150}
fps={30}
width={1920}
height={1080}
/>
</>
);
};

View File

@@ -1,4 +0,0 @@
import { registerRoot } from "remotion";
import { RemotionRoot } from "./Root";
registerRoot(RemotionRoot);

View File

@@ -1,11 +0,0 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
"./src/**/*.{ts,tsx}",
"../../packages/ui/src/**/*.{ts,tsx}"
],
theme: {
extend: {},
},
plugins: [],
};

View File

@@ -1,20 +0,0 @@
{
"compilerOptions": {
"target": "ESNext",
"useDefineForClassFields": true,
"lib": ["DOM", "DOM.Iterable", "ESNext"],
"allowJs": false,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"module": "ESNext",
"moduleResolution": "Node",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx"
},
"include": ["src"]
}

View File

@@ -1,41 +0,0 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/versions
# testing
/coverage
# next.js
/.next/
/out/
# production
/build
# misc
.DS_Store
*.pem
# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*
# env files (can opt-in for committing if needed)
.env*
# vercel
.vercel
# typescript
*.tsbuildinfo
next-env.d.ts

View File

@@ -1,5 +0,0 @@
<!-- BEGIN:nextjs-agent-rules -->
# This is NOT the Next.js you know
This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in `node_modules/next/dist/docs/` before writing any code. Heed deprecation notices.
<!-- END:nextjs-agent-rules -->

View File

@@ -1 +0,0 @@
@AGENTS.md

View File

@@ -1,36 +0,0 @@
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
## Getting Started
First, run the development server:
```bash
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
```
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
## Learn More
To learn more about Next.js, take a look at the following resources:
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
## Deploy on Vercel
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.

View File

@@ -1,18 +0,0 @@
import { defineConfig, globalIgnores } from "eslint/config";
import nextVitals from "eslint-config-next/core-web-vitals";
import nextTs from "eslint-config-next/typescript";
const eslintConfig = defineConfig([
...nextVitals,
...nextTs,
// Override default ignores of eslint-config-next.
globalIgnores([
// Default ignores of eslint-config-next:
".next/**",
"out/**",
"build/**",
"next-env.d.ts",
]),
]);
export default eslintConfig;

View File

@@ -1,7 +0,0 @@
import type { NextConfig } from "next";
const nextConfig: NextConfig = {
/* config options here */
};
export default nextConfig;

View File

@@ -1,26 +0,0 @@
{
"name": "example-web",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "eslint"
},
"dependencies": {
"next": "16.2.7",
"react": "19.2.4",
"react-dom": "19.2.4"
},
"devDependencies": {
"@tailwindcss/postcss": "^4",
"@types/node": "^20",
"@types/react": "^19",
"@types/react-dom": "^19",
"eslint": "^9",
"eslint-config-next": "16.2.7",
"tailwindcss": "^4",
"typescript": "^5"
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,3 +0,0 @@
ignoredBuiltDependencies:
- sharp
- unrs-resolver

View File

@@ -1,7 +0,0 @@
const config = {
plugins: {
"@tailwindcss/postcss": {},
},
};
export default config;

View File

@@ -1 +0,0 @@
<svg fill="none" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M14.5 13.5V5.41a1 1 0 0 0-.3-.7L9.8.29A1 1 0 0 0 9.08 0H1.5v13.5A2.5 2.5 0 0 0 4 16h8a2.5 2.5 0 0 0 2.5-2.5m-1.5 0v-7H8v-5H3v12a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1M9.5 5V2.12L12.38 5zM5.13 5h-.62v1.25h2.12V5zm-.62 3h7.12v1.25H4.5zm.62 3h-.62v1.25h7.12V11z" clip-rule="evenodd" fill="#666" fill-rule="evenodd"/></svg>

Before

Width:  |  Height:  |  Size: 391 B

View File

@@ -1 +0,0 @@
<svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><g clip-path="url(#a)"><path fill-rule="evenodd" clip-rule="evenodd" d="M10.27 14.1a6.5 6.5 0 0 0 3.67-3.45q-1.24.21-2.7.34-.31 1.83-.97 3.1M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16m.48-1.52a7 7 0 0 1-.96 0H7.5a4 4 0 0 1-.84-1.32q-.38-.89-.63-2.08a40 40 0 0 0 3.92 0q-.25 1.2-.63 2.08a4 4 0 0 1-.84 1.31zm2.94-4.76q1.66-.15 2.95-.43a7 7 0 0 0 0-2.58q-1.3-.27-2.95-.43a18 18 0 0 1 0 3.44m-1.27-3.54a17 17 0 0 1 0 3.64 39 39 0 0 1-4.3 0 17 17 0 0 1 0-3.64 39 39 0 0 1 4.3 0m1.1-1.17q1.45.13 2.69.34a6.5 6.5 0 0 0-3.67-3.44q.65 1.26.98 3.1M8.48 1.5l.01.02q.41.37.84 1.31.38.89.63 2.08a40 40 0 0 0-3.92 0q.25-1.2.63-2.08a4 4 0 0 1 .85-1.32 7 7 0 0 1 .96 0m-2.75.4a6.5 6.5 0 0 0-3.67 3.44 29 29 0 0 1 2.7-.34q.31-1.83.97-3.1M4.58 6.28q-1.66.16-2.95.43a7 7 0 0 0 0 2.58q1.3.27 2.95.43a18 18 0 0 1 0-3.44m.17 4.71q-1.45-.12-2.69-.34a6.5 6.5 0 0 0 3.67 3.44q-.65-1.27-.98-3.1" fill="#666"/></g><defs><clipPath id="a"><path fill="#fff" d="M0 0h16v16H0z"/></clipPath></defs></svg>

Before

Width:  |  Height:  |  Size: 1.0 KiB

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 394 80"><path fill="#000" d="M262 0h68.5v12.7h-27.2v66.6h-13.6V12.7H262V0ZM149 0v12.7H94v20.4h44.3v12.6H94v21h55v12.6H80.5V0h68.7zm34.3 0h-17.8l63.8 79.4h17.9l-32-39.7 32-39.6h-17.9l-23 28.6-23-28.6zm18.3 56.7-9-11-27.1 33.7h17.8l18.3-22.7z"/><path fill="#000" d="M81 79.3 17 0H0v79.3h13.6V17l50.2 62.3H81Zm252.6-.4c-1 0-1.8-.4-2.5-1s-1.1-1.6-1.1-2.6.3-1.8 1-2.5 1.6-1 2.6-1 1.8.3 2.5 1a3.4 3.4 0 0 1 .6 4.3 3.7 3.7 0 0 1-3 1.8zm23.2-33.5h6v23.3c0 2.1-.4 4-1.3 5.5a9.1 9.1 0 0 1-3.8 3.5c-1.6.8-3.5 1.3-5.7 1.3-2 0-3.7-.4-5.3-1s-2.8-1.8-3.7-3.2c-.9-1.3-1.4-3-1.4-5h6c.1.8.3 1.6.7 2.2s1 1.2 1.6 1.5c.7.4 1.5.5 2.4.5 1 0 1.8-.2 2.4-.6a4 4 0 0 0 1.6-1.8c.3-.8.5-1.8.5-3V45.5zm30.9 9.1a4.4 4.4 0 0 0-2-3.3 7.5 7.5 0 0 0-4.3-1.1c-1.3 0-2.4.2-3.3.5-.9.4-1.6 1-2 1.6a3.5 3.5 0 0 0-.3 4c.3.5.7.9 1.3 1.2l1.8 1 2 .5 3.2.8c1.3.3 2.5.7 3.7 1.2a13 13 0 0 1 3.2 1.8 8.1 8.1 0 0 1 3 6.5c0 2-.5 3.7-1.5 5.1a10 10 0 0 1-4.4 3.5c-1.8.8-4.1 1.2-6.8 1.2-2.6 0-4.9-.4-6.8-1.2-2-.8-3.4-2-4.5-3.5a10 10 0 0 1-1.7-5.6h6a5 5 0 0 0 3.5 4.6c1 .4 2.2.6 3.4.6 1.3 0 2.5-.2 3.5-.6 1-.4 1.8-1 2.4-1.7a4 4 0 0 0 .8-2.4c0-.9-.2-1.6-.7-2.2a11 11 0 0 0-2.1-1.4l-3.2-1-3.8-1c-2.8-.7-5-1.7-6.6-3.2a7.2 7.2 0 0 1-2.4-5.7 8 8 0 0 1 1.7-5 10 10 0 0 1 4.3-3.5c2-.8 4-1.2 6.4-1.2 2.3 0 4.4.4 6.2 1.2 1.8.8 3.2 2 4.3 3.4 1 1.4 1.5 3 1.5 5h-5.8z"/></svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -1 +0,0 @@
<svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1155 1000"><path d="m577.3 0 577.4 1000H0z" fill="#fff"/></svg>

Before

Width:  |  Height:  |  Size: 128 B

View File

@@ -1 +0,0 @@
<svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" clip-rule="evenodd" d="M1.5 2.5h13v10a1 1 0 0 1-1 1h-11a1 1 0 0 1-1-1zM0 1h16v11.5a2.5 2.5 0 0 1-2.5 2.5h-11A2.5 2.5 0 0 1 0 12.5zm3.75 4.5a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5M7 4.75a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0m1.75.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5" fill="#666"/></svg>

Before

Width:  |  Height:  |  Size: 385 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

View File

@@ -1,26 +0,0 @@
@import "tailwindcss";
:root {
--background: #ffffff;
--foreground: #171717;
}
@theme inline {
--color-background: var(--background);
--color-foreground: var(--foreground);
--font-sans: var(--font-geist-sans);
--font-mono: var(--font-geist-mono);
}
@media (prefers-color-scheme: dark) {
:root {
--background: #0a0a0a;
--foreground: #ededed;
}
}
body {
background: var(--background);
color: var(--foreground);
font-family: Arial, Helvetica, sans-serif;
}

View File

@@ -1,33 +0,0 @@
import type { Metadata } from "next";
import { Geist, Geist_Mono } from "next/font/google";
import "./globals.css";
const geistSans = Geist({
variable: "--font-geist-sans",
subsets: ["latin"],
});
const geistMono = Geist_Mono({
variable: "--font-geist-mono",
subsets: ["latin"],
});
export const metadata: Metadata = {
title: "Create Next App",
description: "Generated by create next app",
};
export default function RootLayout({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
return (
<html
lang="en"
className={`${geistSans.variable} ${geistMono.variable} h-full antialiased`}
>
<body className="min-h-full flex flex-col">{children}</body>
</html>
);
}

View File

@@ -1,65 +0,0 @@
import Image from "next/image";
export default function Home() {
return (
<div className="flex flex-col flex-1 items-center justify-center bg-zinc-50 font-sans dark:bg-black">
<main className="flex flex-1 w-full max-w-3xl flex-col items-center justify-between py-32 px-16 bg-white dark:bg-black sm:items-start">
<Image
className="dark:invert"
src="/next.svg"
alt="Next.js logo"
width={100}
height={20}
priority
/>
<div className="flex flex-col items-center gap-6 text-center sm:items-start sm:text-left">
<h1 className="max-w-xs text-3xl font-semibold leading-10 tracking-tight text-black dark:text-zinc-50">
To get started, edit the page.tsx file.
</h1>
<p className="max-w-md text-lg leading-8 text-zinc-600 dark:text-zinc-400">
Looking for a starting point or more instructions? Head over to{" "}
<a
href="https://vercel.com/templates?framework=next.js&utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
className="font-medium text-zinc-950 dark:text-zinc-50"
>
Templates
</a>{" "}
or the{" "}
<a
href="https://nextjs.org/learn?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
className="font-medium text-zinc-950 dark:text-zinc-50"
>
Learning
</a>{" "}
center.
</p>
</div>
<div className="flex flex-col gap-4 text-base font-medium sm:flex-row">
<a
className="flex h-12 w-full items-center justify-center gap-2 rounded-full bg-foreground px-5 text-background transition-colors hover:bg-[#383838] dark:hover:bg-[#ccc] md:w-[158px]"
href="https://vercel.com/new?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
target="_blank"
rel="noopener noreferrer"
>
<Image
className="dark:invert"
src="/vercel.svg"
alt="Vercel logomark"
width={16}
height={16}
/>
Deploy Now
</a>
<a
className="flex h-12 w-full items-center justify-center rounded-full border border-solid border-black/[.08] px-5 transition-colors hover:border-transparent hover:bg-black/[.04] dark:border-white/[.145] dark:hover:bg-[#1a1a1a] md:w-[158px]"
href="https://nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
target="_blank"
rel="noopener noreferrer"
>
Documentation
</a>
</div>
</main>
</div>
);
}

View File

@@ -1,34 +0,0 @@
{
"compilerOptions": {
"target": "ES2017",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "react-jsx",
"incremental": true,
"plugins": [
{
"name": "next"
}
],
"paths": {
"@/*": ["./src/*"]
}
},
"include": [
"next-env.d.ts",
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts",
".next/dev/types/**/*.ts",
"**/*.mts"
],
"exclude": ["node_modules"]
}

View File

@@ -85,6 +85,30 @@ services:
networks:
- mcp-network
vikunja-mcp:
build:
context: ./packages/vikunja-mcp
container_name: vikunja-mcp
env_file:
- .env
ports:
- "3007:3007"
restart: unless-stopped
networks:
- mcp-network
outline-mcp:
build:
context: ./packages/outline-mcp
container_name: outline-mcp
env_file:
- .env
ports:
- "3008:3008"
restart: unless-stopped
networks:
- mcp-network
networks:
mcp-network:
driver: bridge

View File

@@ -22,43 +22,6 @@ services:
- "caddy=http://${TRAEFIK_HOST:-acquisition.localhost}"
- "caddy.reverse_proxy={{upstreams 3000}}"
at-mintel-ui:
image: node:22-alpine
working_dir: /app
volumes:
- .:/app
- ui_pnpm_store:/pnpm
environment:
- CI=true
networks:
- infra
restart: unless-stopped
command: >
sh -c "corepack enable && pnpm config set store-dir /pnpm && pnpm install --no-frozen-lockfile --ignore-scripts || true; echo 'Starting ladle...'; pnpm --filter @mintel/ui exec ladle serve --host 0.0.0.0 --port 61000"
labels:
- "caddy=http://ui.localhost"
- "caddy.reverse_proxy={{upstreams 61000}}"
at-mintel-video:
image: node:22-alpine
working_dir: /app
volumes:
- .:/app
- ui_pnpm_store:/pnpm
environment:
- CI=true
networks:
- infra
restart: unless-stopped
command: >
sh -c "corepack enable && pnpm config set store-dir /pnpm && pnpm install --no-frozen-lockfile --ignore-scripts || true; pnpm --filter @mintel/example-video exec remotion studio --host 0.0.0.0 --port 3001"
labels:
- "caddy=http://video.localhost"
- "caddy.reverse_proxy={{upstreams 3001}}"
networks:
infra:
external: true
volumes:
ui_pnpm_store:

View File

@@ -0,0 +1,2 @@
service:
allowiconchanges: false

View File

@@ -0,0 +1,42 @@
services:
db:
image: postgres:15-alpine
environment:
POSTGRES_USER: vikunja
POSTGRES_PASSWORD: mintel_vikunja_DB_2026!
POSTGRES_DB: vikunja
volumes:
- ./data/db:/var/lib/postgresql/data
restart: always
vikunja:
image: vikunja/vikunja:latest
environment:
VIKUNJA_DATABASE_HOST: db
VIKUNJA_DATABASE_PASSWORD: mintel_vikunja_DB_2026!
VIKUNJA_DATABASE_TYPE: postgres
VIKUNJA_DATABASE_USER: vikunja
VIKUNJA_DATABASE_DATABASE: vikunja
VIKUNJA_SERVICE_PUBLICURL: https://tasks.infra.mintel.me/
VIKUNJA_SERVICE_ENABLEREGISTRATION: true
VIKUNJA_SERVICE_ALLOWICONCHANGES: false
VIKUNJA_SERVICE_JWTSECRET: d2FzaHViZXJzZWN1cmVqd3RzZWNyZXQyMDI2IQ==
volumes:
- ./data/files:/app/vikunja/files
- ./config.yml:/etc/vikunja/config.yml:ro
depends_on:
- db
restart: always
labels:
- "traefik.enable=true"
- "traefik.http.routers.vikunja.rule=Host(`tasks.infra.mintel.me`)"
- "traefik.http.routers.vikunja.entrypoints=websecure"
- "traefik.http.routers.vikunja.tls.certresolver=le"
- "traefik.http.services.vikunja.loadbalancer.server.port=3456"
networks:
- default
- infra
networks:
infra:
external: true

View File

@@ -56,7 +56,17 @@ fi
# 3. Global Docker Pruning
echo "🧹 Pruning Docker resources..."
docker system prune -af --filter "until=24h"
echo "🧹 Pruning BuildKit builder containers and cache..."
# Remove orphaned buildkit containers to release volume locks
docker rm -f $(docker ps -aq --filter name=buildx_buildkit_builder) 2>/dev/null || true
docker builder prune -af || true
docker buildx prune -af || true
echo "🧹 Pruning Docker volumes..."
docker volume prune -f
# Force remove dangling buildx state volumes that might bypass standard prune
docker volume ls -q | grep buildx | xargs -r docker volume rm 2>/dev/null || true
echo "✅ Optimization complete!"
df -h /mnt/HC_Volume_104796416

View File

@@ -25,3 +25,4 @@ export * from "./templates/ConfirmationMessage";
export * from "./templates/FollowUpTemplate";
export * from "./templates/ProjectEstimateTemplate";
export * from "./templates/SiteAuditTemplate";
export * from "./templates/MonthlyAnalyticsTemplate";

View File

@@ -0,0 +1,205 @@
import * as React from "react";
import { Heading, Section, Text, Row, Column } from "@react-email/components";
import { MintelLayout } from "../layouts/MintelLayout";
export interface MonthlyAnalyticsTemplateProps {
clientName: string;
domain: string;
month: string;
year: string;
totalVisitors: number;
totalPageviews: number;
topPages: { url: string; views: number }[];
topReferrers: { url: string; visitors: number }[];
}
export const MonthlyAnalyticsTemplate = ({
clientName,
domain,
month,
year,
totalVisitors,
totalPageviews,
topPages,
topReferrers,
}: MonthlyAnalyticsTemplateProps) => {
const preview = `Ihr Website-Report für ${month} ${year}: ${domain}`;
return (
<MintelLayout preview={preview}>
<Heading style={h1}>Monatsreport: {month} {year}</Heading>
<Text style={intro}>
Hallo {clientName},<br /><br />
hier ist der monatliche Performance-Report für Ihre Website ({domain}).
Die Daten zeigen, wie viele Menschen Ihre Seite besucht haben und welche Inhalte am beliebtesten waren.
</Text>
<Section style={metricsContainer}>
<Row>
<Column style={metricColumn}>
<Text style={metricLabel}>BESUCHER</Text>
<Text style={metricValue}>{totalVisitors.toLocaleString('de-DE')}</Text>
</Column>
<Column style={metricColumn}>
<Text style={metricLabel}>SEITENAUFRUFE</Text>
<Text style={metricValue}>{totalPageviews.toLocaleString('de-DE')}</Text>
</Column>
</Row>
</Section>
<Section style={auditContainer}>
<Heading as="h2" style={h2}>Top Seiten</Heading>
{topPages.map((page, i) => (
<Row key={i} style={highlightRow}>
<Column style={bulletCol}>
<div style={bullet} />
</Column>
<Column>
<Text style={highlightText}>{page.url}</Text>
</Column>
<Column align="right">
<Text style={highlightNumber}>{page.views.toLocaleString('de-DE')} Aufrufe</Text>
</Column>
</Row>
))}
</Section>
<Section style={auditContainer}>
<Heading as="h2" style={h2}>Top Besucherquellen</Heading>
{topReferrers.length > 0 ? topReferrers.map((ref, i) => (
<Row key={i} style={highlightRow}>
<Column style={bulletCol}>
<div style={bullet} />
</Column>
<Column>
<Text style={highlightText}>{ref.url || "Direktaufruf"}</Text>
</Column>
<Column align="right">
<Text style={highlightNumber}>{ref.visitors.toLocaleString('de-DE')} Besucher</Text>
</Column>
</Row>
)) : (
<Text style={highlightText}>Keine externen Quellen verzeichnet.</Text>
)}
</Section>
<Text style={bodyText}>
Haben Sie Fragen zu diesen Zahlen oder möchten Sie die Reichweite Ihrer Seite weiter ausbauen?
Antworten Sie einfach auf diese E-Mail.
</Text>
<Text style={footerText}>
Beste Grüße,<br />
<strong>Marc Mintel</strong><br />
Digitaler Architekt
</Text>
</MintelLayout>
);
};
export default MonthlyAnalyticsTemplate;
const h1 = {
fontSize: "28px",
fontWeight: "900",
margin: "0 0 24px",
color: "#ffffff",
letterSpacing: "-0.04em",
};
const h2 = {
fontSize: "14px",
fontWeight: "900",
textTransform: "uppercase" as const,
color: "#444444",
margin: "0 0 16px",
letterSpacing: "0.1em",
};
const intro = {
fontSize: "16px",
lineHeight: "24px",
color: "#cccccc",
margin: "0 0 32px",
};
const metricsContainer = {
backgroundColor: "#151515",
padding: "32px",
borderRadius: "8px",
marginBottom: "32px",
border: "1px solid #222222",
textAlign: "center" as const,
};
const metricColumn = {
width: "50%",
};
const metricLabel = {
fontSize: "12px",
fontWeight: "bold",
color: "#888888",
letterSpacing: "0.1em",
margin: "0 0 8px",
};
const metricValue = {
fontSize: "36px",
fontWeight: "900",
color: "#4CAF50",
margin: "0",
letterSpacing: "-0.02em",
};
const auditContainer = {
backgroundColor: "#151515",
padding: "32px",
borderRadius: "8px",
marginBottom: "32px",
border: "1px solid #222222",
};
const highlightRow = {
marginBottom: "12px",
};
const bulletCol = {
width: "24px",
verticalAlign: "top" as const,
};
const bullet = {
width: "6px",
height: "6px",
backgroundColor: "#4CAF50",
marginTop: "8px",
};
const highlightText = {
fontSize: "15px",
color: "#ffffff",
margin: "0",
lineHeight: "22px",
wordBreak: "break-all" as const,
};
const highlightNumber = {
fontSize: "15px",
color: "#888888",
margin: "0",
whiteSpace: "nowrap" as const,
};
const bodyText = {
fontSize: "16px",
lineHeight: "24px",
color: "#888888",
margin: "0 0 32px",
};
const footerText = {
fontSize: "14px",
color: "#666666",
lineHeight: "20px",
};

View File

@@ -0,0 +1,15 @@
FROM node:20-bookworm-slim AS builder
WORKDIR /app
COPY package.json ./
RUN npm install -g pnpm@10.18.3 && pnpm install --ignore-workspace
COPY tsconfig.json ./
COPY src ./src
RUN pnpm build
FROM node:20-bookworm-slim
WORKDIR /app
COPY --from=builder /app/package.json ./
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/dist ./dist
ENTRYPOINT ["node", "dist/start.js"]

View File

@@ -0,0 +1,26 @@
{
"name": "@mintel/outline-mcp",
"version": "1.0.0",
"description": "Outline MCP server for Mintel infrastructure",
"main": "dist/index.js",
"type": "module",
"scripts": {
"build": "tsc",
"start": "node dist/start.js",
"dev": "tsx watch src/index.ts",
"test:unit": "vitest run"
},
"dependencies": {
"@modelcontextprotocol/sdk": "^1.5.0",
"axios": "^1.7.2",
"dotenv": "^17.3.1",
"express": "^4.19.2"
},
"devDependencies": {
"@types/express": "^4.17.21",
"@types/node": "^20.14.10",
"tsx": "^4.19.2",
"typescript": "^5.5.3",
"vitest": "^2.1.3"
}
}

View File

@@ -0,0 +1,91 @@
import { describe, it, expect, vi, beforeEach } from 'vitest';
import axios from 'axios';
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
// Mock environment
process.env.OUTLINE_API_TOKEN = 'test-token';
process.env.OUTLINE_BASE_URL = 'https://outline.test';
// Mock axios
vi.mock('axios', () => {
const mockPost = vi.fn();
return {
default: {
create: vi.fn(() => ({
post: mockPost
}))
}
};
});
describe('Outline MCP Server Tools', () => {
let mockPost: any;
let requestHandler: any;
beforeEach(async () => {
vi.clearAllMocks();
// Extract the mock
const axiosInstance = axios.create();
mockPost = axiosInstance.post;
// Mock Server setRequestHandler
let capturedHandler: any;
vi.spyOn(Server.prototype, 'setRequestHandler').mockImplementation((schema: any, handler: any) => {
// The first call is usually ListToolsRequestSchema, second is CallToolRequestSchema
// We just store the last one which is CallToolRequestSchema
capturedHandler = handler;
return {} as any;
});
// Re-import to trigger registration
vi.resetModules();
await import('./index.js');
requestHandler = capturedHandler;
});
it('should search documents', async () => {
mockPost.mockResolvedValueOnce({ data: { data: [{ id: '1', title: 'Test' }] } });
const result = await requestHandler({
params: {
name: 'outline_search_documents',
arguments: { query: 'test' }
}
});
expect(mockPost).toHaveBeenCalledWith('/api/documents.search', { query: 'test', collectionId: undefined });
expect(result.content[0].text).toContain('Test');
});
it('should get a document', async () => {
mockPost.mockResolvedValueOnce({ data: { data: { id: 'doc1', title: 'Doc 1' } } });
const result = await requestHandler({
params: {
name: 'outline_get_document',
arguments: { id: 'doc1' }
}
});
expect(mockPost).toHaveBeenCalledWith('/api/documents.info', { id: 'doc1' });
expect(result.content[0].text).toContain('Doc 1');
});
it('should create a document', async () => {
mockPost.mockResolvedValueOnce({ data: { data: { id: 'new-doc' } } });
const result = await requestHandler({
params: {
name: 'outline_create_document',
arguments: { collectionId: 'col1', title: 'New Doc', text: 'Hello', publish: true }
}
});
expect(mockPost).toHaveBeenCalledWith('/api/documents.create', {
collectionId: 'col1', title: 'New Doc', text: 'Hello', publish: true
});
expect(result.content[0].text).toContain('new-doc');
});
});

View File

@@ -0,0 +1,184 @@
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import {
CallToolRequestSchema,
ListToolsRequestSchema,
Tool,
} from "@modelcontextprotocol/sdk/types.js";
import axios from "axios";
// Environment variables
const OUTLINE_API_TOKEN = process.env.OUTLINE_API_TOKEN;
const OUTLINE_BASE_URL = process.env.OUTLINE_BASE_URL;
if (!OUTLINE_API_TOKEN || !OUTLINE_BASE_URL) {
console.error("Missing required environment variables: OUTLINE_API_TOKEN or OUTLINE_BASE_URL");
process.exit(1);
}
const axiosInstance = axios.create({
baseURL: OUTLINE_BASE_URL,
headers: {
Authorization: `Bearer ${OUTLINE_API_TOKEN}`,
"Content-Type": "application/json",
Accept: "application/json",
},
});
// Define tools
const tools: Tool[] = [
{
name: "outline_search_documents",
description: "Search for documents in Outline.",
inputSchema: {
type: "object",
properties: {
query: { type: "string", description: "Search query" },
collectionId: { type: "string", description: "Optional collection ID to scope search" },
},
required: ["query"],
},
},
{
name: "outline_get_document",
description: "Get a document by its ID.",
inputSchema: {
type: "object",
properties: {
id: { type: "string", description: "The ID of the document" },
},
required: ["id"],
},
},
{
name: "outline_create_document",
description: "Create a new document.",
inputSchema: {
type: "object",
properties: {
collectionId: { type: "string", description: "The ID of the collection" },
title: { type: "string", description: "Document title" },
text: { type: "string", description: "Document content in Markdown" },
publish: { type: "boolean", description: "Whether to publish the document" },
},
required: ["collectionId", "title", "text"],
},
},
{
name: "outline_update_document",
description: "Update an existing document.",
inputSchema: {
type: "object",
properties: {
id: { type: "string", description: "The ID of the document" },
title: { type: "string", description: "New title" },
text: { type: "string", description: "New content in Markdown" },
},
required: ["id"],
},
},
{
name: "outline_create_collection",
description: "Create a new collection.",
inputSchema: {
type: "object",
properties: {
name: { type: "string", description: "Collection name" },
description: { type: "string", description: "Collection description" },
},
required: ["name"],
},
},
];
const server = new Server(
{
name: "at-mintel-outline-mcp",
version: "1.0.0",
},
{
capabilities: {
tools: {},
},
}
);
server.setRequestHandler(ListToolsRequestSchema, async () => {
return { tools };
});
server.setRequestHandler(CallToolRequestSchema, async (request) => {
try {
switch (request.params.name) {
case "outline_search_documents": {
const { query, collectionId } = request.params.arguments as any;
const res = await axiosInstance.post("/api/documents.search", {
query,
collectionId,
});
return {
content: [{ type: "text", text: JSON.stringify(res.data, null, 2) }],
};
}
case "outline_get_document": {
const { id } = request.params.arguments as any;
const res = await axiosInstance.post("/api/documents.info", { id });
return {
content: [{ type: "text", text: JSON.stringify(res.data, null, 2) }],
};
}
case "outline_create_document": {
const { collectionId, title, text, publish } = request.params.arguments as any;
const res = await axiosInstance.post("/api/documents.create", {
collectionId,
title,
text,
publish: publish ?? true,
});
return {
content: [{ type: "text", text: JSON.stringify(res.data, null, 2) }],
};
}
case "outline_update_document": {
const { id, title, text } = request.params.arguments as any;
const res = await axiosInstance.post("/api/documents.update", {
id,
title,
text,
});
return {
content: [{ type: "text", text: JSON.stringify(res.data, null, 2) }],
};
}
case "outline_create_collection": {
const { name, description } = request.params.arguments as any;
const res = await axiosInstance.post("/api/collections.create", {
name,
description,
});
return {
content: [{ type: "text", text: JSON.stringify(res.data, null, 2) }],
};
}
default:
throw new Error(`Unknown tool: ${request.params.name}`);
}
} catch (error: any) {
const errorMsg = error.response?.data ? JSON.stringify(error.response.data) : error.message;
return {
content: [{ type: "text", text: `API Error: ${errorMsg}` }],
isError: true,
};
}
});
async function main() {
const transport = new StdioServerTransport();
await server.connect(transport);
console.error("Outline MCP Server running on stdio");
}
main().catch((error) => {
console.error("Fatal error:", error);
process.exit(1);
});

View File

@@ -0,0 +1,13 @@
import { config } from 'dotenv';
import { resolve } from 'path';
import { fileURLToPath } from 'url';
const __dirname = fileURLToPath(new URL('.', import.meta.url));
config({ quiet: true, path: resolve(__dirname, '../../../.env.local') });
config({ quiet: true, path: resolve(__dirname, '../../../.env') });
import('./index.js').catch(err => {
console.error('Failed to start Outline MCP Server:', err);
process.exit(1);
});

View File

@@ -0,0 +1,16 @@
{
"compilerOptions": {
"target": "ES2022",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"outDir": "./dist",
"rootDir": "./src",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true
},
"include": [
"src/**/*"
]
}

View File

@@ -1,26 +0,0 @@
{
"name": "@mintel/ui",
"version": "1.0.0",
"private": true,
"main": "./src/index.ts",
"types": "./src/index.ts",
"scripts": {
"ladle": "ladle serve",
"build": "ladle build"
},
"dependencies": {
"@react-pdf/renderer": "^3.4.0",
"framer-motion": "^11.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@ladle/react": "^4.0.0",
"tailwindcss": "^3.4.0",
"postcss": "^8.4.0",
"autoprefixer": "^10.4.0",
"typescript": "^5.0.0",
"@types/react": "^18.2.0",
"@types/react-dom": "^18.2.0"
}
}

View File

@@ -1,24 +0,0 @@
import React from 'react';
import { View } from '@react-pdf/renderer';
import { motion, HTMLMotionProps } from 'framer-motion';
import { useEnvironment } from '../context/EnvironmentContext';
export interface BoxProps extends HTMLMotionProps<"div"> {
children?: React.ReactNode;
pdfStyle?: any; // Specifically for PDF if Tailwind mapping is not enough
}
export const Box: React.FC<BoxProps> = ({ children, className, style, pdfStyle, ...props }) => {
const env = useEnvironment();
if (env === 'print') {
return <View style={pdfStyle || style}>{children}</View>;
}
// Web and Presentation get Framer Motion by default
return (
<motion.div className={className} style={style} {...props}>
{children}
</motion.div>
);
};

View File

@@ -1,23 +0,0 @@
import React from 'react';
import { Text as PdfText } from '@react-pdf/renderer';
import { motion, HTMLMotionProps } from 'framer-motion';
import { useEnvironment } from '../context/EnvironmentContext';
export interface TextProps extends HTMLMotionProps<"span"> {
children?: React.ReactNode;
pdfStyle?: any;
}
export const Text: React.FC<TextProps> = ({ children, className, style, pdfStyle, ...props }) => {
const env = useEnvironment();
if (env === 'print') {
return <PdfText style={pdfStyle || style}>{children}</PdfText>;
}
return (
<motion.span className={className} style={style} {...props}>
{children}
</motion.span>
);
};

View File

@@ -1,17 +0,0 @@
import React, { createContext, useContext } from 'react';
export type Environment = 'web' | 'print' | 'presentation';
const EnvironmentContext = createContext<Environment>('web');
export const EnvironmentProvider: React.FC<{ env: Environment; children: React.ReactNode }> = ({ env, children }) => {
return (
<EnvironmentContext.Provider value={env}>
{children}
</EnvironmentContext.Provider>
);
};
export const useEnvironment = () => {
return useContext(EnvironmentContext);
};

View File

@@ -1,3 +0,0 @@
export { Box } from './components/universal/Box';
export { Text } from './components/universal/Text';
export { EnvironmentProvider, useEnvironment } from './context/EnvironmentContext';

View File

@@ -1,17 +0,0 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
"./src/**/*.{js,jsx,ts,tsx}",
],
theme: {
extend: {
colors: {
mintel: {
primary: '#1E40AF',
accent: '#82ed20',
}
}
},
},
plugins: [],
}

View File

@@ -0,0 +1,15 @@
FROM node:20-bookworm-slim AS builder
WORKDIR /app
COPY package.json ./
RUN npm install -g pnpm@10.18.3 && pnpm install --ignore-workspace
COPY tsconfig.json ./
COPY src ./src
RUN pnpm build
FROM node:20-bookworm-slim
WORKDIR /app
COPY --from=builder /app/package.json ./
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/dist ./dist
ENTRYPOINT ["node", "dist/start.js"]

View File

@@ -0,0 +1,30 @@
{
"name": "@mintel/vikunja-mcp",
"version": "1.0.0",
"description": "Vikunja MCP server for Mintel infrastructure",
"main": "dist/index.js",
"type": "module",
"scripts": {
"build": "tsc",
"start": "node dist/start.js",
"dev": "tsx watch src/index.ts",
"test:unit": "vitest run"
},
"dependencies": {
"@modelcontextprotocol/sdk": "^1.5.0",
"axios": "^1.7.2",
"dotenv": "^17.3.1",
"express": "^4.19.2",
"form-data": "^4.0.5",
"marked": "^18.0.5"
},
"devDependencies": {
"@types/express": "^4.17.21",
"@types/form-data": "^2.5.2",
"@types/marked": "^6.0.0",
"@types/node": "^20.14.10",
"tsx": "^4.19.2",
"typescript": "^5.5.3",
"vitest": "^2.1.3"
}
}

View File

@@ -0,0 +1,205 @@
import { describe, it, expect, vi, beforeEach } from 'vitest';
// Mock axios
const mockGet = vi.fn();
const mockPost = vi.fn();
const mockPut = vi.fn();
const mockDelete = vi.fn();
vi.mock('axios', () => {
return {
default: {
create: vi.fn().mockImplementation(() => ({
get: mockGet,
post: mockPost,
put: mockPut,
delete: mockDelete,
})),
},
};
});
// Set env vars
process.env.VIKUNJA_API_TOKEN = 'test-token';
process.env.VIKUNJA_BASE_URL = 'https://tasks.test.me';
// Mock express to avoid starting a real server
vi.mock('express', () => {
const mockApp = {
use: vi.fn(),
get: vi.fn(),
post: vi.fn(),
listen: vi.fn().mockImplementation((port, host, cb) => cb && cb()),
};
const mockExpress = () => mockApp;
(mockExpress as any).json = () => vi.fn();
return { default: mockExpress };
});
let server: any;
describe('Vikunja MCP Server - New Tools (RED)', () => {
beforeEach(async () => {
vi.clearAllMocks();
if (!server) {
const mod = await import('./index.js');
server = mod.server;
}
});
it('should support vikunja_create_project', async () => {
mockPut.mockResolvedValueOnce({
data: { id: 10, title: 'New Project', description: 'Testing' }
});
const handler = (server as any)._requestHandlers.get('tools/call');
expect(handler).toBeDefined();
const response = await handler({
method: 'tools/call',
params: {
name: 'vikunja_create_project',
arguments: {
title: 'New Project',
description: 'Testing',
hex_color: 'ff0000',
},
},
});
expect(mockPut).toHaveBeenCalledWith('/projects', {
title: 'New Project',
description: 'Testing',
hex_color: 'ff0000',
});
expect(response.isError).toBeUndefined();
expect(JSON.parse(response.content[0].text)).toEqual({
id: 10,
title: 'New Project',
description: 'Testing',
});
});
it('should support vikunja_get_task', async () => {
mockGet.mockResolvedValueOnce({
data: { id: 42, title: 'My Task', project_id: 1 }
});
const handler = (server as any)._requestHandlers.get('tools/call');
const response = await handler({
method: 'tools/call',
params: {
name: 'vikunja_get_task',
arguments: {
task_id: 42,
},
},
});
expect(mockGet).toHaveBeenCalledWith('/tasks/42');
expect(response.isError).toBeUndefined();
expect(JSON.parse(response.content[0].text)).toEqual({
id: 42,
title: 'My Task',
project_id: 1,
});
});
it('should support vikunja_delete_task', async () => {
mockDelete.mockResolvedValueOnce({
data: { message: 'success' }
});
const handler = (server as any)._requestHandlers.get('tools/call');
const response = await handler({
method: 'tools/call',
params: {
name: 'vikunja_delete_task',
arguments: {
task_id: 42,
},
},
});
expect(mockDelete).toHaveBeenCalledWith('/tasks/42');
expect(response.isError).toBeUndefined();
expect(JSON.parse(response.content[0].text)).toEqual({
message: 'success',
});
});
it('should support vikunja_create_task_comment', async () => {
mockPut.mockResolvedValueOnce({
data: { id: 1, comment: 'New Comment', task_id: 42 }
});
const handler = (server as any)._requestHandlers.get('tools/call');
const response = await handler({
method: 'tools/call',
params: {
name: 'vikunja_create_task_comment',
arguments: {
task_id: 42,
comment: 'New Comment',
},
},
});
expect(mockPut).toHaveBeenCalledWith('/tasks/42/comments', {
comment: 'New Comment',
});
expect(response.isError).toBeUndefined();
expect(JSON.parse(response.content[0].text)).toEqual({
id: 1,
comment: 'New Comment',
task_id: 42,
});
});
it('should support vikunja_get_task_comments', async () => {
mockGet.mockResolvedValueOnce({
data: [{ id: 1, comment: 'New Comment', task_id: 42 }]
});
const handler = (server as any)._requestHandlers.get('tools/call');
const response = await handler({
method: 'tools/call',
params: {
name: 'vikunja_get_task_comments',
arguments: {
task_id: 42,
},
},
});
expect(mockGet).toHaveBeenCalledWith('/tasks/42/comments');
expect(response.isError).toBeUndefined();
expect(JSON.parse(response.content[0].text)).toEqual([
{ id: 1, comment: 'New Comment', task_id: 42 }
]);
});
it('should support vikunja_create_task and convert markdown description to HTML', async () => {
mockPut.mockResolvedValueOnce({
data: { id: 11, title: 'Markdown Task', description: '<p><strong>Bold</strong> and <em>italic</em></p>\n' }
});
const handler = (server as any)._requestHandlers.get('tools/call');
const response = await handler({
method: 'tools/call',
params: {
name: 'vikunja_create_task',
arguments: {
project_id: 1,
title: 'Markdown Task',
description: '**Bold** and *italic*'
},
},
});
expect(mockPut).toHaveBeenCalledWith('/projects/1/tasks', expect.objectContaining({
title: 'Markdown Task',
description: '<p><strong>Bold</strong> and <em>italic</em></p>\n'
}));
expect(response.isError).toBeUndefined();
});
});

View File

@@ -0,0 +1,421 @@
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
import { SSEServerTransport } from "@modelcontextprotocol/sdk/server/sse.js";
import express from 'express';
import {
CallToolRequestSchema,
ListToolsRequestSchema,
Tool,
} from "@modelcontextprotocol/sdk/types.js";
import axios from "axios";
import https from "https";
import fs from "fs";
import path from "path";
import { marked } from "marked";
const VIKUNJA_BASE_URL = process.env.VIKUNJA_BASE_URL || "https://tasks.infra.mintel.me";
const VIKUNJA_API_TOKEN = process.env.VIKUNJA_API_TOKEN;
const httpsAgent = new https.Agent({
rejectUnauthorized: false,
});
if (!VIKUNJA_API_TOKEN) {
console.error("Warning: VIKUNJA_API_TOKEN is not set.");
}
function getApi() {
if (!VIKUNJA_API_TOKEN) {
throw new Error("VIKUNJA_API_TOKEN is not configured.");
}
return axios.create({
baseURL: `${VIKUNJA_BASE_URL}/api/v1`,
headers: {
Authorization: `Bearer ${VIKUNJA_API_TOKEN}`,
'Content-Type': 'application/json'
},
httpsAgent,
timeout: 10000
});
}
// --- Tool Definitions ---
const GET_PROJECTS_TOOL: Tool = {
name: "vikunja_get_projects",
description: "List all projects in Vikunja",
inputSchema: { type: "object", properties: {} },
};
const GET_TASKS_TOOL: Tool = {
name: "vikunja_get_tasks",
description: "Get all tasks for a specific project",
inputSchema: {
type: "object",
properties: {
project_id: { type: "number", description: "The ID of the project" },
},
required: ["project_id"],
},
};
const CREATE_TASK_TOOL: Tool = {
name: "vikunja_create_task",
description: "Create a new task in a project",
inputSchema: {
type: "object",
properties: {
project_id: { type: "number", description: "The ID of the project to add the task to" },
title: { type: "string", description: "The title of the task" },
description: { type: "string", description: "Optional description of the task" },
parent_task_id: { type: "number", description: "Optional ID of a parent task to create a subtask" },
due_date: { type: "string", description: "ISO 8601 Date string for due date" },
start_date: { type: "string", description: "ISO 8601 Date string for start date" },
end_date: { type: "string", description: "ISO 8601 Date string for end date" },
priority: { type: "number", description: "Priority level (e.g. 1-5)" },
percent_done: { type: "number", description: "Progress percentage" },
hex_color: { type: "string", description: "Hex color code" },
is_favorite: { type: "boolean", description: "Mark as favorite" }
},
required: ["project_id", "title"],
},
};
const UPDATE_TASK_TOOL: Tool = {
name: "vikunja_update_task",
description: "Update a task (e.g., mark as done)",
inputSchema: {
type: "object",
properties: {
task_id: { type: "number", description: "The ID of the task to update" },
done: { type: "boolean", description: "Set to true to mark the task as done" },
title: { type: "string", description: "Update the title" },
description: { type: "string", description: "Update the description" },
due_date: { type: "string", description: "ISO 8601 Date string for due date" },
start_date: { type: "string", description: "ISO 8601 Date string for start date" },
end_date: { type: "string", description: "ISO 8601 Date string for end date" },
priority: { type: "number", description: "Priority level (e.g. 1-5)" },
percent_done: { type: "number", description: "Progress percentage (0-1 or 0-100 depending on API version, try decimals like 0.5 first)" },
hex_color: { type: "string", description: "Hex color code" },
is_favorite: { type: "boolean", description: "Mark as favorite" }
},
required: ["task_id"],
},
};
const CREATE_PROJECT_TOOL: Tool = {
name: "vikunja_create_project",
description: "Create a new project (list) in Vikunja",
inputSchema: {
type: "object",
properties: {
title: { type: "string", description: "The title of the project" },
description: { type: "string", description: "Optional description of the project" },
hex_color: { type: "string", description: "Optional hex color without the '#' prefix" }
},
required: ["title"]
}
};
const GET_TASK_TOOL: Tool = {
name: "vikunja_get_task",
description: "Get details for a specific task by ID",
inputSchema: {
type: "object",
properties: {
task_id: { type: "number", description: "The ID of the task" }
},
required: ["task_id"]
}
};
const DELETE_TASK_TOOL: Tool = {
name: "vikunja_delete_task",
description: "Delete a task by ID",
inputSchema: {
type: "object",
properties: {
task_id: { type: "number", description: "The ID of the task to delete" }
},
required: ["task_id"]
}
};
const CREATE_TASK_COMMENT_TOOL: Tool = {
name: "vikunja_create_task_comment",
description: "Add a comment to a task",
inputSchema: {
type: "object",
properties: {
task_id: { type: "number", description: "The ID of the task to comment on" },
comment: { type: "string", description: "The comment text" }
},
required: ["task_id", "comment"]
}
};
const GET_TASK_COMMENTS_TOOL: Tool = {
name: "vikunja_get_task_comments",
description: "Get all comments for a specific task",
inputSchema: {
type: "object",
properties: {
task_id: { type: "number", description: "The ID of the task" }
},
required: ["task_id"]
}
};
const GET_TASK_ATTACHMENT_TOOL: Tool = {
name: "vikunja_get_task_attachment",
description: "Download a task attachment to a local file",
inputSchema: {
type: "object",
properties: {
task_id: { type: "number", description: "The ID of the task" },
attachment_id: { type: "number", description: "The ID of the attachment" },
save_path: { type: "string", description: "Absolute path to save the file to" }
},
required: ["task_id", "attachment_id", "save_path"]
}
};
const CREATE_TASK_ATTACHMENT_TOOL: Tool = {
name: "vikunja_upload_task_attachment",
description: "Upload an attachment file to a specific task",
inputSchema: {
type: "object",
properties: {
task_id: { type: "number", description: "The ID of the task" },
file_path: { type: "string", description: "Absolute path to the local file to upload" }
},
required: ["task_id", "file_path"]
}
};
// --- Server Setup ---
export const server = new Server(
{ name: "vikunja-mcp", version: "1.0.0" },
{ capabilities: { tools: {} } }
);
server.setRequestHandler(ListToolsRequestSchema, async () => ({
tools: [
GET_PROJECTS_TOOL,
GET_TASKS_TOOL,
CREATE_TASK_TOOL,
UPDATE_TASK_TOOL,
CREATE_PROJECT_TOOL,
GET_TASK_TOOL,
DELETE_TASK_TOOL,
CREATE_TASK_COMMENT_TOOL,
GET_TASK_COMMENTS_TOOL,
GET_TASK_ATTACHMENT_TOOL,
CREATE_TASK_ATTACHMENT_TOOL
],
}));
server.setRequestHandler(CallToolRequestSchema, async (request) => {
try {
const api = getApi();
if (request.params.name === "vikunja_get_projects") {
const res = await api.get('/projects');
return { content: [{ type: "text", text: JSON.stringify(res.data, null, 2) }] };
}
if (request.params.name === "vikunja_get_tasks") {
const { project_id } = request.params.arguments as any;
const res = await api.get(`/projects/${project_id}/tasks`);
return { content: [{ type: "text", text: JSON.stringify(res.data, null, 2) }] };
}
if (request.params.name === "vikunja_create_task") {
const {
project_id, title, description, parent_task_id,
due_date, start_date, end_date, priority, percent_done, hex_color, is_favorite
} = request.params.arguments as any;
const payload: any = {
title,
description: description ? await marked.parse(description) : ""
};
if (parent_task_id !== undefined) payload.parent_task_id = parent_task_id;
if (due_date !== undefined) payload.due_date = due_date;
if (start_date !== undefined) payload.start_date = start_date;
if (end_date !== undefined) payload.end_date = end_date;
if (priority !== undefined) payload.priority = priority;
if (percent_done !== undefined) payload.percent_done = percent_done;
if (hex_color !== undefined) payload.hex_color = hex_color;
if (is_favorite !== undefined) payload.is_favorite = is_favorite;
const res = await api.put(`/projects/${project_id}/tasks`, payload);
return { content: [{ type: "text", text: JSON.stringify(res.data, null, 2) }] };
}
if (request.params.name === "vikunja_update_task") {
const {
task_id, done, title, description,
due_date, start_date, end_date,
priority, percent_done, hex_color, is_favorite
} = request.params.arguments as any;
const payload: any = {};
if (done !== undefined) payload.done = done;
if (title !== undefined) payload.title = title;
if (description !== undefined) payload.description = await marked.parse(description);
if (due_date !== undefined) payload.due_date = due_date;
if (start_date !== undefined) payload.start_date = start_date;
if (end_date !== undefined) payload.end_date = end_date;
if (priority !== undefined) payload.priority = priority;
if (percent_done !== undefined) payload.percent_done = percent_done;
if (hex_color !== undefined) payload.hex_color = hex_color;
if (is_favorite !== undefined) payload.is_favorite = is_favorite;
const res = await api.post(`/tasks/${task_id}`, payload);
return { content: [{ type: "text", text: JSON.stringify(res.data, null, 2) }] };
}
if (request.params.name === "vikunja_create_project") {
const { title, description, hex_color } = request.params.arguments as any;
// Vikunja standard: creating a new root resource uses PUT /projects in this version
const res = await api.put('/projects', {
title,
description: description || "",
hex_color: hex_color || ""
});
return { content: [{ type: "text", text: JSON.stringify(res.data, null, 2) }] };
}
if (request.params.name === "vikunja_get_task") {
const { task_id } = request.params.arguments as any;
const res = await api.get(`/tasks/${task_id}`);
return { content: [{ type: "text", text: JSON.stringify(res.data, null, 2) }] };
}
if (request.params.name === "vikunja_delete_task") {
const { task_id } = request.params.arguments as any;
const res = await api.delete(`/tasks/${task_id}`);
return { content: [{ type: "text", text: JSON.stringify(res.data, null, 2) }] };
}
if (request.params.name === "vikunja_create_task_comment") {
const { task_id, comment } = request.params.arguments as any;
// Vikunja standard: task sub-resources (like comments) are typically appended using PUT /tasks/{id}/comments
const res = await api.put(`/tasks/${task_id}/comments`, { comment });
return { content: [{ type: "text", text: JSON.stringify(res.data, null, 2) }] };
}
if (request.params.name === "vikunja_get_task_comments") {
const { task_id } = request.params.arguments as any;
const res = await api.get(`/tasks/${task_id}/comments`);
return { content: [{ type: "text", text: JSON.stringify(res.data, null, 2) }] };
}
if (request.params.name === "vikunja_get_task_attachment") {
const { task_id, attachment_id, save_path } = request.params.arguments as any;
const res = await api.get(`/tasks/${task_id}/attachments/${attachment_id}`, {
responseType: 'arraybuffer'
});
fs.writeFileSync(save_path, Buffer.from(res.data));
return { content: [{ type: "text", text: `Successfully saved attachment to ${save_path}` }] };
}
if (request.params.name === "vikunja_upload_task_attachment") {
const { task_id, file_path } = request.params.arguments as any;
if (!fs.existsSync(file_path)) {
throw new Error(`File not found: ${file_path}`);
}
const buffer = fs.readFileSync(file_path);
const blob = new Blob([buffer]);
const formData = new FormData();
formData.append('files', blob, path.basename(file_path));
const res = await api.put(`/tasks/${task_id}/attachments`, formData, {
headers: {
'Content-Type': 'multipart/form-data'
}
});
return { content: [{ type: "text", text: `Successfully uploaded attachment to task ${task_id}.\nResponse: ${JSON.stringify(res.data)}` }] };
}
throw new Error(`Unknown tool: ${request.params.name}`);
} catch (e: any) {
const msg = e.response?.data?.message || e.message;
return {
isError: true,
content: [{ type: "text", text: `MCP Service Error: ${msg}` }]
};
}
});
// --- Express / SSE Server Setup ---
async function run() {
const isStdio = process.argv.includes('--stdio');
if (isStdio) {
const { StdioServerTransport } = await import('@modelcontextprotocol/sdk/server/stdio.js');
const transport = new StdioServerTransport();
await server.connect(transport);
console.error('Vikunja MCP server is running on stdio');
} else {
const app = express();
const transports = new Map<string, SSEServerTransport>();
app.use((req, res, next) => {
res.setHeader('Access-Control-Allow-Origin', '*');
res.setHeader('Access-Control-Allow-Methods', 'GET, POST, OPTIONS');
res.setHeader('Access-Control-Allow-Headers', 'Content-Type, Authorization, x-mcp-protocol-version');
if (req.method === 'OPTIONS') {
res.status(204).end();
return;
}
next();
});
app.use((req, _res, next) => {
console.error(`${req.method} ${req.url}`);
next();
});
app.get('/sse', async (req, res) => {
const transport = new SSEServerTransport('/message', res as any);
const sessionId = transport.sessionId;
console.error(`New SSE connection: ${sessionId}`);
transports.set(sessionId, transport);
const heartbeatInterval = setInterval(() => {
res.write(": heartbeat\n\n");
}, 15000);
req.on('close', () => {
console.error(`SSE connection closed: ${sessionId}`);
clearInterval(heartbeatInterval);
transports.delete(sessionId);
});
await server.connect(transport);
});
app.post('/message', express.json(), async (req, res) => {
const sessionId = req.query.sessionId as string;
const transport = transports.get(sessionId);
if (!transport) {
res.status(400).send('No active SSE connection for this session');
return;
}
await transport.handlePostMessage(req, res);
});
const PORT = Number(process.env.VIKUNJA_MCP_PORT) || 3007;
app.listen(PORT, '0.0.0.0', () => {
console.error(`Vikunja MCP server running on http://0.0.0.0:${PORT}/sse`);
});
}
}
run().catch((err) => {
console.error("Fatal error:", err);
process.exit(1);
});

View File

@@ -0,0 +1,13 @@
import { config } from 'dotenv';
import { resolve } from 'path';
import { fileURLToPath } from 'url';
const __dirname = fileURLToPath(new URL('.', import.meta.url));
config({ quiet: true, path: resolve(__dirname, '../../../.env.local') });
config({ quiet: true, path: resolve(__dirname, '../../../.env') });
import('./index.js').catch(err => {
console.error('Failed to start Vikunja MCP Server:', err);
process.exit(1);
});

View File

@@ -0,0 +1,16 @@
{
"compilerOptions": {
"target": "ES2022",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"outDir": "./dist",
"rootDir": "./src",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true
},
"include": [
"src/**/*"
]
}

6096
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff