link-stack/apps/link/README.md

106 lines
2.9 KiB
Markdown
Raw Permalink Normal View History

2025-05-23 13:20:07 +02:00
# CDR Link
2022-12-01 16:01:44 +00:00
2025-05-23 13:20:07 +02:00
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.
2022-12-01 16:01:44 +00:00
2025-05-23 13:20:07 +02:00
## Overview
2025-11-10 14:55:22 +01:00
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), and OpenSearch.
2025-05-23 13:20:07 +02:00
## Features
- **Simplified Helpdesk Interface**: Streamlined UI for Zammad ticket management
- **Multi-Channel Communication**: Integration with Signal, WhatsApp, Facebook, and Voice channels
- **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
2022-12-01 16:01:44 +00:00
2022-12-02 10:55:56 +00:00
```bash
2025-05-23 13:20:07 +02:00
# Install dependencies
npm install
# Run development server
2022-12-02 10:55:56 +00:00
npm run dev
2025-05-23 13:20:07 +02:00
# Build for production
npm run build
# Start production server
npm run start
2022-12-01 16:01:44 +00:00
```
2025-05-23 13:20:07 +02:00
### Environment Variables
2022-12-01 16:01:44 +00:00
2025-05-23 13:20:07 +02:00
Key environment variables required:
2022-12-01 16:01:44 +00:00
2025-05-23 13:20:07 +02:00
- `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
2022-12-01 16:01:44 +00:00
2025-05-23 13:20:07 +02:00
### Available Scripts
2022-12-01 16:01:44 +00:00
2025-05-23 13:20:07 +02:00
- `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
2022-12-01 16:01:44 +00:00
2025-05-23 13:20:07 +02:00
## Architecture
2022-12-01 16:01:44 +00:00
2025-05-23 13:20:07 +02:00
### Pages Structure
2022-12-01 16:01:44 +00:00
2025-05-23 13:20:07 +02:00
- `/` - Main dashboard
- `/overview/[overview]` - Ticket overview pages
- `/tickets/[id]` - Individual ticket view/edit
- `/admin/bridge` - Bridge configuration management
- `/opensearch` - Search dashboard
- `/zammad` - Direct Zammad access
- `/profile` - User profile management
2022-12-01 16:01:44 +00:00
2025-05-23 13:20:07 +02:00
### 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:
```bash
# Build image
docker build -t link-stack/link .
# Run with docker-compose
docker-compose -f docker/compose/link.yml up
```
2022-12-01 16:01:44 +00:00
2025-05-23 13:20:07 +02:00
## Integration Points
2022-12-01 16:01:44 +00:00
2025-05-23 13:20:07 +02:00
- **Zammad**: GraphQL queries for ticket data
- **Bridge Services**: REST APIs for channel management
- **OpenSearch**: Direct dashboard embedding
- **Redis**: Session and cache storage