WhatsApp/Signal/Formstack/admin updates
This commit is contained in:
parent
bcecf61a46
commit
d0cc5a21de
451 changed files with 16139 additions and 39623 deletions
|
|
@ -1,32 +1,106 @@
|
|||
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
|
||||
# CDR Link
|
||||
|
||||
## Getting Started
|
||||
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.
|
||||
|
||||
First, run the development server:
|
||||
## 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), and OpenSearch.
|
||||
|
||||
## 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
|
||||
|
||||
```bash
|
||||
# Install dependencies
|
||||
npm install
|
||||
|
||||
# Run development server
|
||||
npm run dev
|
||||
|
||||
# Build for production
|
||||
npm run build
|
||||
|
||||
# Start production server
|
||||
npm run start
|
||||
```
|
||||
|
||||
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
|
||||
### Environment Variables
|
||||
|
||||
You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file.
|
||||
Key environment variables required:
|
||||
|
||||
[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.js`.
|
||||
- `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
|
||||
|
||||
The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.
|
||||
### Available Scripts
|
||||
|
||||
## Learn More
|
||||
- `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
|
||||
|
||||
To learn more about Next.js, take a look at the following resources:
|
||||
## Architecture
|
||||
|
||||
- [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.
|
||||
### Pages Structure
|
||||
|
||||
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
|
||||
- `/` - 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
|
||||
|
||||
## Deploy on Vercel
|
||||
### API Routes
|
||||
|
||||
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.
|
||||
- `/api/auth` - NextAuth.js authentication
|
||||
- `/api/v2/users` - User management API
|
||||
- `/api/[service]/bots` - Bot management for communication channels
|
||||
- `/api/[service]/webhooks` - Webhook endpoints
|
||||
|
||||
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
|
||||
### 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
|
||||
```
|
||||
|
||||
## Integration Points
|
||||
|
||||
- **Zammad**: GraphQL queries for ticket data
|
||||
- **Bridge Services**: REST APIs for channel management
|
||||
- **OpenSearch**: Direct dashboard embedding
|
||||
- **Redis**: Session and cache storage
|
||||
Loading…
Add table
Add a link
Reference in a new issue