link-stack/apps/link
2025-12-17 15:30:34 +01:00
..
app Update dependencies and version number, remove link tickets endpoint 2025-10-07 11:24:00 +02:00
public Update deps, add robots.txt 2025-01-26 12:24:57 +01:00
.dockerignore Middleware and login updates 2023-02-22 13:05:52 +00:00
.gitignore Organize directories 2023-02-13 13:10:48 +00:00
docker-entrypoint.sh Move migrations to separate app 2024-08-07 16:05:26 +02:00
Dockerfile fix: Update Dockerfiles to copy entire app directory for package dependencies 2025-08-20 12:58:03 +02:00
LICENSE.md Organize directories 2023-02-13 13:10:48 +00:00
middleware.ts Update dependencies and version number, remove link tickets endpoint 2025-10-07 11:24:00 +02:00
next-env.d.ts Update dependencies and version number, remove link tickets endpoint 2025-10-07 11:24:00 +02:00
next.config.js More groups WIP 2025-07-07 20:02:54 +02:00
package.json Update deps 2025-12-17 15:30:34 +01:00
README.md Add basic READMEs 2025-05-23 13:20:07 +02:00
tsconfig.json CSRF refresh fixes 2024-08-14 13:03:50 +02:00

CDR Link

The main CDR (Center for Digital Resilience) Link application - a streamlined helpdesk interface built on top of Zammad with integrated communication channels and data visualization.

Overview

CDR Link provides a unified dashboard for managing support tickets, communication channels, and data analytics. It integrates multiple services including Zammad (ticketing), Bridge (multi-channel messaging), Leafcutter (data visualization), and OpenSearch.

Features

  • Simplified Helpdesk Interface: Streamlined UI for Zammad ticket management
  • Multi-Channel Communication: Integration with Signal, WhatsApp, Facebook, and Voice channels
  • Data Visualization: Embedded Leafcutter analytics and reporting
  • User Management: Role-based access control with Google OAuth
  • Search: Integrated OpenSearch for advanced queries
  • Label Studio Integration: For data annotation workflows

Development

Prerequisites

  • Node.js >= 20
  • npm >= 10
  • Running instances of Zammad, PostgreSQL, and Redis
  • Configured authentication providers

Setup

# Install dependencies
npm install

# Run development server
npm run dev

# Build for production
npm run build

# Start production server
npm run start

Environment Variables

Key environment variables required:

  • ZAMMAD_URL - Zammad instance URL
  • ZAMMAD_API_TOKEN - Zammad API authentication token
  • DATABASE_URL - PostgreSQL connection string
  • REDIS_URL - Redis connection URL
  • NEXTAUTH_URL - Application URL for authentication
  • NEXTAUTH_SECRET - Secret for NextAuth.js
  • GOOGLE_CLIENT_ID - Google OAuth client ID
  • GOOGLE_CLIENT_SECRET - Google OAuth client secret

Available Scripts

  • npm run dev - Start development server
  • npm run build - Build for production
  • npm run start - Start production server
  • npm run lint - Run ESLint
  • npm run export - Export static site

Architecture

Pages Structure

  • / - Main dashboard
  • /overview/[overview] - Ticket overview pages
  • /tickets/[id] - Individual ticket view/edit
  • /admin/bridge - Bridge configuration management
  • /leafcutter - Data visualization dashboard
  • /opensearch - Search dashboard
  • /zammad - Direct Zammad access
  • /profile - User profile management

API Routes

  • /api/auth - NextAuth.js authentication
  • /api/v2/users - User management API
  • /api/[service]/bots - Bot management for communication channels
  • /api/[service]/webhooks - Webhook endpoints

Key Components

  • ZammadWrapper - Embeds Zammad UI with authentication
  • SearchBox - Global search functionality
  • TicketList / TicketDetail - Ticket management components
  • Sidebar - Navigation and service switching

Docker Support

Build and run with Docker:

# Build image
docker build -t link-stack/link .

# Run with docker-compose
docker-compose -f docker/compose/link.yml up

Integration Points

  • Zammad: GraphQL queries for ticket data
  • Bridge Services: REST APIs for channel management
  • Leafcutter: Embedded iframe integration
  • OpenSearch: Direct dashboard embedding
  • Redis: Session and cache storage