No description
- TypeScript 79.4%
- CSS 20%
- Dockerfile 0.4%
- JavaScript 0.2%
|
|
||
|---|---|---|
| docs | ||
| public | ||
| src | ||
| .dockerignore | ||
| .env.example | ||
| .gitignore | ||
| bun.lock | ||
| docker-compose.yml | ||
| Dockerfile | ||
| Dockerfile.bot | ||
| drizzle.config.ts | ||
| eslint.config.mjs | ||
| LICENSE | ||
| next.config.ts | ||
| package.json | ||
| postcss.config.mjs | ||
| README.md | ||
| tsconfig.json | ||
Epitech Moulinette Discord Notifier
A powerful Discord bot and web dashboard to monitor Epitech's Moulinette (automated test system) for new results. Built with Next.js 16 (Turbopack) and Bun, it provides a modern, fast, and secure way to track your project results.
Features
- Automated Notifications: Sends rich embeds to Discord whenever a new result is published.
- Modern Dashboard: Manage your Microsoft cookies and server-wide settings with a beautiful Discord-style UI.
- Server Icon Status: Visual indicators (green/red rings) on the dashboard show at a glance which servers have cookies configured.
- Personal & Server Modes: Use it personally or for your entire guild.
- Slash Commands:
/latest,/list, and/selectto interact with results directly from Discord. - High Performance: Powered by Bun and SQLite for near-instant responses.
Documentation
Detailed documentation is available in the docs/ folder:
- Architecture & stack
- Configuration (environment variables)
- Database schema
- Web panel - pages & features
- Discord bot - commands & polling
- REST API
- Deployment
🛠 Setup Guide
1. Discord Developer Portal Configuration
- Go to the Discord Developer Portal.
- Create a New Application.
- Bot Settings:
- Enable Public Bot (if you want others to add it).
- Privileged Gateway Intents: Ensure
GUILD_MEMBERSis ON if you want the bot to detect admin permissions correctly.
- OAuth2 Settings:
- Add a Redirect URI:
https://your-domain.com/auth/discord/callback(orhttp://localhost:3342/auth/discord/callbackfor local testing). - Note your Client ID and Client Secret.
- Add a Redirect URI:
2. Environment Configuration
Copy .env.example to .env and fill in the values:
cp .env.example .env
| Variable | Description |
|---|---|
DISCORD_BOT_TOKEN |
Your bot's token from the "Bot" tab. |
DISCORD_CLIENT_ID |
Your application's Client ID. |
DISCORD_CLIENT_SECRET |
Your application's Client Secret. |
ADMIN_DISCORD_ID |
Your personal Discord User ID. |
URL |
Crucial: Your public base URL (e.g., https://moulify.com). |
PORT |
Port for the web panel (default: 3342). |
EPITEST_YEAR |
The academic year to monitor (e.g., 2025). |
POLL_INTERVAL |
How often to check for results (seconds, default: 60). |
SESSION_SECRET |
A random string for session encryption (auto-generated if empty). |
🔑 The Redirect URI
The application uses the URL variable to construct the redirect URI.
- In the Discord Developer Portal, add the redirect URI:
${URL}/auth/discord/callback. - Local Testing: Use
http://localhost:3342/auth/discord/callback. - Production: Use your public URL, e.g.,
https://mouli.example.com/auth/discord/callback.
3. Deployment with Docker (Recommended)
docker compose up -d --build
The web panel will be available on the port you specified (default: 3342).
4. Local Development
Ensure you have Bun installed:
# Install dependencies
bun install
# Run both web and bot in dev mode
bun run dev
📘 Usage
Web Panel
- Login via Discord at your hosted URL.
- Servers where you have Administrator or Manage Server permissions will appear on the dashboard.
- A green ring around a server icon means it is configured; a red ring means it needs cookies.
- Paste your Microsoft SSO cookies (Netscape format) in the settings for each guild.
Discord Commands
/latest: Shows the most recent test result./list: Displays a summary of all recent projects./select: Provides a dropdown to view detailed results for any project./status: Checks your cookie status and guild configuration./panel: Gets the link to your web dashboard.
🔒 Security & Cookies
The bot requires Microsoft SSO cookies (ESTSAUTH, etc.) to fetch results. These are stored in a local SQLite database (mouli.db).
Never share your mouli.db or .env file.
To get your cookies:
- Log in to myresults.epitest.eu.
- Use a browser extension (like "Get cookies.txt LOCALLY") to export cookies for
login.microsoftonline.comin Netscape format. - Paste the content into the guild or personal settings in the web panel.
🤝 Tech Stack
- Next.js 16: Frontend and API routes.
- Bun: Runtime, bot execution, and fast dependency management.
- Discord.js: Interface with the Discord API.
- Drizzle ORM: Type-safe database interactions.
- SQLite: Local data persistence.