Amiquin is a modular and extensible application designed to streamline development with a focus on configurability, logging, and dependency injection. This project leverages modern .NET technologies to provide a solid foundation for building applications. The goal is to create a robust, fun and scalable bot.
For comprehensive documentation, guides, and API references, visit our GitHub Pages documentation.
The documentation includes:
- Getting Started Guide - Step-by-step setup and configuration
- Commands Reference - Complete list of available Discord commands
- Architecture Overview - Technical details about the project structure
- Development Guide - Contributing and development best practices
- Configuration Guide - Detailed configuration options and examples
The easiest way to get started is using the automated setup scripts:
Windows (PowerShell):
# Run the interactive setup script
./scripts/setup-project.ps1
# Or use default values for quick setup
./scripts/setup-project.ps1 -Default
# Production setup with enhanced security
./scripts/setup-project.ps1 -ProductionLinux/macOS (Bash):
# Run the interactive setup script
./scripts/setup-project.sh
# Or use default values for quick setup
./scripts/setup-project.sh --default
# Non-interactive mode
./scripts/setup-project.sh --non-interactiveThe setup script will:
- ✓ Create
.envandappsettings.jsonconfiguration files - ✓ Prompt for required API keys (Discord, OpenAI)
- ✓ Configure optional features (memory system, web search, voice)
- ✓ Set up database (SQLite or MySQL)
- ✓ Create necessary data directories
- ✓ Build the solution
Docker is recommended for running the application in a containerized environment. (Docker required)
- Clone the repository:
git clone https://github.com/your-repo/amiquin.git
cd amiquin-
Configure the application:
- Copy the
.env.examplefile to.env. Update the values as needed. - Copy the
appsettings.example.jsonfile toappsettings.json. Update the values as needed.
- Copy the
-
Run docker:
docker-compose upIf you want to run the application locally, follow the steps below. (You have to install the prerequisites)
Install the prerequisites before running the application. Piper for the Text to Speech (TTS) feature. ffmpeg for the audio streaming to voicechat feature.
- Clone the repository:
git clone https://github.com/your-repo/amiquin.git
cd amiquin- Restore dependencies:
dotnet restore-
Configure the application:
- Copy the
.env.examplefile to.env. Update the values as needed. - Copy the
appsettings.example.jsonfile toappsettings.json. Update the values as needed.
- Copy the
-
Build the application:
dotnet run --project source/Amiquin.Bot -c Releaseor if you want to create a self-contained executable:
Publish Documentation
dotnet publish -c Release -r linux-x64 --self-containedFollow these steps to deploy Amiquin to production:
Before starting, ensure you have:
- ✅ Discord Bot Token - Create a bot at Discord Developer Portal
- ✅ OpenAI API Key - Get your key from OpenAI Platform
- ✅ Docker & Docker Compose - Install Docker
- ✅ Git - For cloning the repository
# Clone the repository
git clone https://github.com/HueByte/Amiquin.git
cd AmiquinThe setup script will configure everything for you interactively.
Windows (PowerShell):
# Interactive setup with prompts
./scripts/setup-project.ps1
# Or for production with security hardening
./scripts/setup-project.ps1 -ProductionLinux/macOS (Bash):
# Make scripts executable (first time only)
chmod +x scripts/*.sh
# Interactive setup with prompts
./scripts/setup-project.shWhat the script does:
- Prompts for Discord bot token
- Prompts for OpenAI API key (or other LLM provider)
- Asks about optional features:
- Web search (DuckDuckGo/Google/Bing)
- Memory system (Qdrant)
- Voice/TTS features
- Selects database (SQLite for dev, MySQL for production)
- Generates secure passwords automatically
- Creates
.envandappsettings.jsonfiles - Builds the solution
Run the pre-deployment checklist to ensure everything is configured correctly:
Windows:
./scripts/pre-deployment-checklist.ps1 -ProductionLinux/macOS:
./scripts/pre-deployment-checklist.sh --productionThe checklist validates:
- ✓ Configuration files exist and are complete
- ✓ API keys are set
- ✓ Dependencies are installed
- ✓ Project builds successfully
- ✓ Database configuration is correct
- ✓ Security settings are appropriate for production
Fix any errors before proceeding. The script will tell you exactly what's missing.
Choose your deployment profile based on your needs:
⚠️ Important: When using Docker Compose, ensure your.envfile uses Docker service names (mysql,qdrant) instead oflocalhost. The setup script handles this automatically.
5a. Development Deployment (SQLite + Qdrant):
# Start all development services
docker-compose --profile dev up -d
# View logs (note: service name is 'amiquinbot')
docker-compose logs -f amiquinbot5b. Production Deployment (MySQL + Qdrant):
# Start production services with MySQL
docker-compose --profile prod up -d
# View logs
docker-compose logs -f amiquinbot
# Check status
docker-compose ps5c. Production with Monitoring:
# Full production stack with monitoring
docker-compose --profile prod-full up -d-
Check container status:
docker-compose ps
All containers should show "Up" status.
-
Check bot logs:
docker-compose logs --tail=50 amiquin-bot
Look for "Bot is ready" or similar success message.
-
Test in Discord:
- Invite the bot to your server
- Try a command:
!amq help - Test AI chat by mentioning the bot
View logs:
# Follow live logs
docker-compose logs -f amiquin-bot
# Last 100 lines
docker-compose logs --tail=100 amiquin-botRestart services:
# Restart bot only
docker-compose restart amiquin-bot
# Restart all services
docker-compose restartUpdate to latest version:
# Pull latest changes
git pull origin main
# Rebuild and restart
docker-compose build --no-cache amiquin-bot
docker-compose up -dStop services:
# Stop all services
docker-compose --profile prod down
# Stop and remove volumes (⚠️ deletes data)
docker-compose --profile prod down -vBackup database:
# MySQL backup
docker exec mysql-amiquin mysqldump -u root -p amiquin_db > backup_$(date +%Y%m%d).sql
# Qdrant backup
docker exec qdrant-amiquin tar czf /qdrant/snapshots/backup.tar.gz /qdrant/storageThe project supports multiple deployment profiles for different use cases:
| Profile | Services | Use Case |
|---|---|---|
qdrant-only |
Qdrant only | Testing memory system |
database |
MySQL only | Testing database |
dev |
Bot + MySQL + Qdrant + Web UI | Full development environment |
prod |
Bot + MySQL + Qdrant | Production deployment |
prod-full |
All + monitoring | Production with monitoring |
Required:
AMQ_Discord__Token- Your Discord bot tokenAMQ_LLM__Providers__OpenAI__ApiKey- OpenAI API key (or alternative LLM)
Database:
AMQ_Database__Mode-0for MySQL,1for SQLite (default)AMQ_ConnectionStrings__Amiquin-Mysql- MySQL connection string (if using MySQL)
Optional Features:
AMQ_Memory__Enabled=true- Enable AI memory system with QdrantAMQ_WebSearch__Enabled=true- Enable web search in ReAct reasoningAMQ_WebSearch__Provider=DuckDuckGo- Search provider (DuckDuckGo/Google/Bing)AMQ_Voice__Enabled=true- Enable voice/TTS features
Security (Production):
AMQ_DB_ROOT_PASSWORD- MySQL root password (auto-generated)AMQ_DB_USER_PASSWORD- MySQL user password (auto-generated)AMQ_QDRANT_API_KEY- Qdrant API key for authentication (optional)
For complete configuration options, see DEPLOYMENT.md or .env.example.
Bot won't start:
- Check logs:
docker-compose logs amiquin-bot - Verify Discord token in
.env - Ensure OpenAI API key is set
- Run the checklist:
./scripts/pre-deployment-checklist.ps1
Database connection failed:
- Check MySQL container:
docker-compose ps mysql - Verify credentials in
.envmatch container settings - Wait for MySQL health check to pass (60s on first start)
Memory system not working:
- Check Qdrant container:
docker-compose ps qdrant - Verify
AMQ_Memory__Enabled=truein.env - Check host is set to
qdrant(notlocalhost) in Docker
Web search failing:
- For DuckDuckGo: No setup needed, should work out of the box
- For Google: Verify API key and Search Engine ID are set
- For Bing: Verify API key is set and valid
For detailed troubleshooting, see DEPLOYMENT.md.
The application uses appsettings.json and .env files for configuration. Ensure those files exist.
The templates are provided via appsettings.example.json and .env.example.
You can override settings using command-line arguments.
Required parameters:
Bot:Token(appsettings.json) orBOT_TOKEN(.env) - Discord bot token.Bot:OpenAIKey(appsettings.json) orOPEN_AI_KEY(.env) - OpenAI API key.
Note: the
.envfile is used only for docker-compose configuration.
Logs are written to the console and a rolling log file located in the directory specified by SQLITE_PATH environment variable or in the application root /Logs directory.
For detailed information about the project architecture, components, and structure, please refer to the Architecture Documentation.
Contributions are welcome! Please fork the repository and submit a pull request with your changes.
This project uses GitHub Pages to host its documentation. The documentation is automatically built and deployed from the docs/ folder.
For this project: https://huebyte.github.io/Amiquin/
The documentation is written in Markdown and located in the docs/ folder:
docs/index.md- Main documentation homepagedocs/getting-started.md- Installation and setup guidedocs/commands.md- Discord commands referencedocs/architecture.md- Technical architecture detailsdocs/development.md- Development and contribution guidedocs/configuration.md- Configuration options and examples
To update the documentation:
- Edit the relevant Markdown files in the
docs/folder - Commit and push your changes
- GitHub Pages will automatically rebuild and deploy the updated documentation
This project is licensed under the MIT License.
- Serilog for robust logging capabilities.
- SpectreConsole for beautiful console output.
- Discord.NET for Discord bot integration.
