Hikari
Hikari (hereinafter the “Application”) is a centralised platform for managing SpellWare’s products and services. It consists of three main components: a Discord bot with AI capabilities, an Angular web client for dashboard management, and a Fastify server backend. The platform enables users to manage their accounts, subscriptions, licenses, product configurations, and provides an AI-powered support agent for assistance with SpellWare’s ecosystem of products.
1. User Documentation
Section titled “1. User Documentation”Discord Bot Features
Section titled “Discord Bot Features”The Hikari Discord bot provides the following functionality:
- AI Support Agent: Chat with Hikari through direct messages to get help with SpellWare’s products
- Product Information: Ask questions about any of the available products and services
- Command Interface: Use slash commands for quick actions
/about- Get information about Hikari and available features/dm- Trigger a DM response to easily find your direct message channel
Web Dashboard Features
Section titled “Web Dashboard Features”The web dashboard provides a user-friendly interface for:
- Product Browsing: View all available products categorised by type (Community Tools, Websites/APIs, Apps/Games)
- Announcements: Stay updated with the latest product updates and community news
- Account Management: Manage your subscriptions, licenses, and configurations
- Product Filtering: Filter products by category or view all products at once
Product Categories
Section titled “Product Categories”- Community Tooling and Integrations: Discord bots, translation services, and community management tools
- Websites and APIs: Web applications, documentation sites, and API services
- Apps and Games: Desktop applications, games, and interactive experiences
Getting Started
Section titled “Getting Started”- Discord Bot: Install Hikari from the Discord app directory or invite to your server
- Web Dashboard: Visit hikari.spellware.dev to access the dashboard
- Support: Join the Discord community for additional help
2. Technical Documentation
Section titled “2. Technical Documentation”Architecture Overview
Section titled “Architecture Overview”Hikari follows a microservices architecture with three main components:
Bot Service (/bot)
Section titled “Bot Service (/bot)”- Framework: Discord.js v14.21.0
- AI Integration: Anthropic Claude API for intelligent responses
- Language: TypeScript with Node.js
- Key Features:
- Slash command handling
- Direct message AI conversations
- Web search integration
- Error handling and logging
Client Service (/client)
Section titled “Client Service (/client)”- Framework: Angular v20.0.4
- Language: TypeScript
- Key Features:
- Responsive web interface
- Product catalogue with filtering
- Announcements system
- Routing and navigation
Server Service (/server)
Section titled “Server Service (/server)”- Framework: Fastify v5.4.0
- Database: MongoDB with Prisma ORM
- Key Features:
- RESTful API endpoints
- Announcement management
- Database operations
- Discord integration
Development Setup
Section titled “Development Setup”Prerequisites
Section titled “Prerequisites”- Node.js (latest LTS)
- pnpm package manager
- MongoDB instance
- Discord bot token
- Anthropic API key
Installation
Section titled “Installation”# Clone the repositorygit clone https://github.com/spellware/hikari
# Install dependenciespnpm install
# Build all servicespnpm buildEnvironment Configuration
Section titled “Environment Configuration”Bot Service (bot/prod.env):
DISCORD_TOKEN=your_discord_tokenANTHROPIC_API_KEY=your_anthropic_keyServer Service:
MONGO_URI=your_mongodb_connection_stringRunning Services
Section titled “Running Services”# Start bot servicecd bot && pnpm start
# Start client development servercd client && ng serve
# Start server servicecd server && pnpm startDatabase Schema
Section titled “Database Schema”The application uses MongoDB with the following models:
model Announcements { id String @id @default(auto()) @map("_id") @db.ObjectId title String content String type String // "products" or "community" createdAt DateTime @default(now()) @unique}API Endpoints
Section titled “API Endpoints”POST /announcement- Create new announcementsGET /announcements- Retrieve announcements- Health check and monitoring endpoints
Key Configuration Files
Section titled “Key Configuration Files”client/src/app/config/products.ts- Product catalogue configurationbot/src/config/prompt.ts- AI agent personality and instructionsclient/src/app/app.routes.ts- Client-side routingbot/commandJson.js- Discord slash command definitions
Build and Deployment
Section titled “Build and Deployment”The project uses Turbo for monorepo management:
# Build all projectsturbo build
# Run lintingturbo lint
# Run teststurbo test3. Legal Documentation
Section titled “3. Legal Documentation”License
Section titled “License”This software is licensed under Naomi’s Public Licence.
Privacy Policy
Section titled “Privacy Policy”User data handling is governed by the SpellWare Privacy Policy.
Terms of Service
Section titled “Terms of Service”Usage of Hikari is subject to the SpellWare Terms of Service.
Security Policy
Section titled “Security Policy”Security vulnerabilities should be reported according to the SpellWare Security Policy.
Data Collection
Section titled “Data Collection”- Discord user IDs for bot functionality
- Message content for AI processing (not stored permanently)
- Usage analytics for service improvement
- Subscription and account information
Third-Party Services
Section titled “Third-Party Services”- Discord: Bot hosting and user interaction
- Anthropic Claude: AI conversation processing
- MongoDB: Data storage
- GitHub: Source code hosting
4. Contributing Documentation
Section titled “4. Contributing Documentation”Code of Conduct
Section titled “Code of Conduct”All contributors must follow the SpellWare Code of Conduct.
Contributing Guidelines
Section titled “Contributing Guidelines”Please review the Contributing Guidelines before submitting contributions.
Development Workflow
Section titled “Development Workflow”- Issue Creation: Post in the appropriate Discord forum channel (#bug-reports or #feature-requests) on our Discord community
- Pull Requests: Follow the template in
.github/pull_request_template.md - Code Standards:
- ESLint configuration enforced
- TypeScript strict mode
- Comprehensive error handling
- Logging for debugging
Project Structure
Section titled “Project Structure”hikari/├── bot/ # Discord bot service│ ├── src/ # TypeScript source│ └── prod/ # Compiled JavaScript├── client/ # Angular web application│ └── src/ # Angular source files├── server/ # Fastify API server│ ├── src/ # Server source│ └── prisma/ # Database schema└── docs/ # DocumentationTesting Requirements
Section titled “Testing Requirements”- Unit tests for new functionality
- Integration tests for API endpoints
- End-to-end tests for critical user flows
- Code coverage maintenance above threshold
Style Guidelines
Section titled “Style Guidelines”- Use TypeScript for all new code
- Follow existing naming conventions
- Include JSDoc comments for public methods
- Maintain consistent indentation (2 spaces)
- Use meaningful variable and function names
Submission Checklist
Section titled “Submission Checklist”- Code follows project style guidelines
- Tests added for new functionality
- Documentation updated as needed
- No breaking changes without discussion
- All checks pass in CI/CD pipeline
Getting Help
Section titled “Getting Help”- Discord Community: chat.spellware.dev
- Email: [email protected]