A Next.js application for swarm control with AI chat capabilities, built with modern React and TypeScript.
- 📊 Interactive data visualization with Plotly
- 🎨 Modern UI with Radix UI components and Tailwind CSS
- 📝 Markdown rendering with math support (KaTeX)
- 🔐 Authentication with NextAuth.js
- 📱 Responsive design with mobile support
- Framework: Next.js 14.1.0
- Language: TypeScript
- Styling: Tailwind CSS
- UI Components: Radix UI
- State Management: Recoil, Jotai, TanStack Query
- Markdown: react-markdown with remark/rehype plugins
- Authentication: NextAuth.js
- Charts: Plotly.js
- Node.js 18+
- npm, yarn, pnpm, or bun
- Clone the repository
- Install dependencies:
npm install- Set up environment variables by copying the appropriate env file:
# For development
cp .env.example .env.dev
# For production
cp .env.example .env.main
# For staging
cp .env.example .env.stagingRun the development server:
# Development environment (port 5173)
npm run dev
# Production environment
npm run dev-pro
# Staging environment
npm run dev-stgOpen http://localhost:5173 (or the appropriate port) to view the application.
# Build for production
npm run build:prod
# Build for development
npm run build:dev
# Standard build
npm run build# Start production server
npm run start
# Lint code
npm run lint
# Format code
npm run formatsrc/
├── components/
│ └── customs/
│ ├── chat/ # Chat interface components
│ ├── markdown.tsx # Markdown renderer
│ └── ...
├── contexts/ # React contexts
├── hooks/ # Custom hooks
├── lib/ # Utility functions
└── ...
The application includes advanced markdown rendering with:
- GitHub Flavored Markdown (GFM)
- Math equations (KaTeX)
- Code syntax highlighting
- Custom directives and alerts
- HTML support
- Message threading
- Custom markdown rendering for chat messages
- ESLint for code linting
- Prettier for code formatting
- TypeScript for type safety
- Tailwind CSS for styling
The project supports multiple environments:
- Development:
.env.dev- Testnet configuration - Staging:
.env.staging- Staging environment - Production:
.env.main- Main production environment
Private project - All rights reserved.