The web dashboard component of the Khaxy monorepo. A modern dashboard built with Next.js 16 for configuring and managing the Khaxy Discord bot.
- Server Management - Configure bot settings for your Discord servers
- Modern UI - Built with React 19, Tailwind CSS, and Radix UI components
- Authentication - Secure Discord OAuth login with Better Auth
- Internationalization - Support for English and Turkish
- Dark/Light Mode - Theme switching support
- Responsive Design - Works on desktop and mobile devices
- Node.js v22.0.0 or higher
- pnpm package manager
- PostgreSQL database (shared with the bot)
- The Khaxy bot must be running (the dashboard connects to its API)
-
Clone the repository (if you haven't already)
git clone https://github.com/Arsabutispik/Khaxy.git cd Khaxy -
Install dependencies from the root of the monorepo
pnpm install
-
Set up environment variables
All environment variables are configured in a single
.envfile at the root of the monorepo. See the root README for the full list of required variables.The web dashboard uses these variables:
Variable Description BETTER_AUTH_SECRETSecret key for Better Auth sessions BETTER_AUTH_URLBase URL of your web dashboard DISCORD_CLIENT_IDDiscord application client ID DISCORD_CLIENT_SECRETDiscord OAuth2 client secret DISCORD_BOT_TOKENDiscord bot token (for API calls) POSTGRES_URLPostgreSQL connection string for web app FASTIFY_API_URLURL of the bot's internal API INTERNAL_API_KEYSecret key for bot-web communication DATABASE_URLPostgreSQL connection string -
Configure Discord OAuth
- Go to the Discord Developer Portal
- Select your application (or create one)
- Navigate to OAuth2 settings
- Add your redirect URL:
http://localhost:3000/api/auth/callback/discord - Copy the Client ID and Client Secret to your root
.env
-
Start the dashboard
# Development mode pnpm run dev # Production mode pnpm run build pnpm run start
You can run the dashboard from the monorepo root:
# Start all apps (bot + web)
pnpm dev
# Or run just the web dashboard
pnpm -F khaxy-dashboard devNote: The web dashboard waits for the bot API to be available on port 3001 before starting.
apps/web/
├── src/
│ ├── app/ # Next.js App Router pages
│ ├── components/ # React components
│ │ └── ui/ # Reusable UI components
│ ├── actions/ # Server actions
│ ├── hooks/ # Custom React hooks
│ ├── i18n/ # Internationalization setup
│ ├── lib/ # Utility libraries
│ ├── types/ # TypeScript type definitions
│ └── utils/ # Utility functions
├── messages/ # Translation files
│ ├── en.json # English translations
│ └── tr.json # Turkish translations
├── public/ # Static assets
└── package.json
| Command | Description |
|---|---|
pnpm dev |
Start in development mode with Turbopack |
pnpm build |
Build for production |
pnpm start |
Start the production server |
pnpm lint |
Run ESLint |
pnpm type-check |
Run TypeScript type checking |
The dashboard supports multiple languages using next-intl. Translation files are in the messages/ directory:
en.json- Englishtr.json- Turkish
- Framework: Next.js 16 with App Router
- React: React 19
- Styling: Tailwind CSS
- Components: Radix UI primitives
- Authentication: Better Auth with Discord OAuth
- Animations: Framer Motion
- Database: Prisma ORM (shared with bot)
This project is licensed under the GNU GPLv3 License.