A modern, interactive frontend for the Discord SUI Analyzer - a tool for analyzing and visualizing Discord conversations with hierarchical message structures.
- 🌳 Hierarchical Tree Visualization: Interactive tree view of Discord threads and messages
- 🎯 Drag & Drop Interface: Reorganize conversations and messages with intuitive drag-and-drop
- 🔍 Advanced Search & Filtering: Find specific threads and messages quickly
- 📱 Responsive Design: Works seamlessly on desktop and mobile devices
- 🎨 Modern UI: Built with Tailwind CSS and Lucide React icons
- ⚡ Real-time Updates: Live synchronization with the backend API
- Framework: Next.js 14 with App Router
- Language: TypeScript
- Styling: Tailwind CSS
- State Management: Redux Toolkit
- Drag & Drop: @dnd-kit
- Icons: Lucide React
- Development: ESLint, TypeScript compiler
- Node.js 18+
- npm 8+
- Backend API server running on port 8000
- Clone the repository:
git clone https://github.com/yourusername/discord-sui-analyzer-frontend.git
cd discord-sui-analyzer-frontend
- Install dependencies:
npm install
- Create environment file:
cp .env.example .env.local
- Start the development server:
npm run dev
The application will be available at http://localhost:3000
.
Create a .env.local
file with the following variables:
API_BASE_URL=http://localhost:8000
NEXT_PUBLIC_API_URL=http://localhost:8000
npm run dev
- Start development servernpm run build
- Build for productionnpm run start
- Start production servernpm run lint
- Run ESLintnpm run type-check
- Run TypeScript type checkingnpm run clean
- Clean build artifacts and dependenciesnpm run reinstall
- Clean and reinstall dependencies
src/
├── app/ # Next.js App Router pages
│ ├── api/ # API routes (proxies to backend)
│ ├── globals.css # Global styles
│ ├── layout.tsx # Root layout
│ └── page.tsx # Home page
├── components/ # React components
│ ├── HierarchyNode.tsx # Individual tree node component
│ ├── HierarchyTree.tsx # Tree container component
│ └── ThreadPanel.tsx # Thread panel component
├── hooks/ # Custom React hooks
├── store/ # Redux store configuration
│ ├── index.ts # Store setup
│ └── slices/ # Redux slices
├── types/ # TypeScript type definitions
└── utils/ # Utility functions
The frontend communicates with the backend API through Next.js API routes that proxy requests to the main Discord SUI Analyzer server. The main endpoints are:
GET /api/threads
- Fetch all threadsGET /api/threads/[id]
- Fetch specific threadGET /api/messages/[id]
- Fetch specific messagePOST /api/threads/hierarchy
- Perform hierarchy operations
The project includes VS Code debug configurations for:
- Client-side debugging (React components)
- Server-side debugging (API routes)
- Full-stack debugging
Use F5
to start debugging or go to Run and Debug panel.
- ESLint configuration for code quality
- TypeScript strict mode enabled
- Prettier formatting (recommended)
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
MIT License - see LICENSE file for details.
- Discord SUI Analyzer Backend - The main backend API server