Hikari
Hikari (hereinafter the βApplicationβ) is a centralized platform for managing NHCarriganβ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 NHCarriganβs ecosystem of products.
1. User Documentation
Discord Bot Features
The Hikari Discord bot provides the following functionality:
- AI Support Agent: Chat with Hikari through direct messages to get help with NHCarriganβ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
The web dashboard provides a user-friendly interface for:
- Product Browsing: View all available products categorized 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
- 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
- Discord Bot: Install Hikari from the Discord app directory or invite to your server
- Web Dashboard: Visit hikari.nhcarrigan.com to access the dashboard
- Support: Join the Discord community or visit the forum for additional help
2. Technical Documentation
Architecture Overview
Hikari follows a microservices architecture with three main components:
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
)
- Framework: Angular v20.0.4
- Language: TypeScript
- Key Features:
- Responsive web interface
- Product catalog with filtering
- Announcements system
- Routing and navigation
Server Service (/server
)
- Framework: Fastify v5.4.0
- Database: MongoDB with Prisma ORM
- Key Features:
- RESTful API endpoints
- Announcement management
- Database operations
- Discord and forum integration
Development Setup
Prerequisites
- Node.js (latest LTS)
- pnpm package manager
- MongoDB instance
- Discord bot token
- Anthropic API key
Installation
# Clone the repositorygit clone https://git.nhcarrigan.com/nhcarrigan/hikari
# Install dependenciespnpm install
# Build all servicespnpm build
Environment Configuration
Bot Service (bot/prod.env
):
DISCORD_TOKEN=your_discord_tokenANTHROPIC_API_KEY=your_anthropic_key
Server Service:
MONGO_URI=your_mongodb_connection_string
Running Services
# Start bot servicecd bot && pnpm start
# Start client development servercd client && ng serve
# Start server servicecd server && pnpm start
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
POST /announcement
- Create new announcementsGET /announcements
- Retrieve announcements- Health check and monitoring endpoints
Key Configuration Files
client/src/app/config/products.ts
- Product catalog 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
The project uses Turbo for monorepo management:
# Build all projectsturbo build
# Run lintingturbo lint
# Run teststurbo test
3. Legal Documentation
License
This software is licensed under Naomiβs Public License.
Privacy Policy
User data handling is governed by the NHCarrigan Privacy Policy.
Terms of Service
Usage of Hikari is subject to the NHCarrigan Terms of Service.
Security Policy
Security vulnerabilities should be reported according to the NHCarrigan Security Policy.
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
- Discord: Bot hosting and user interaction
- Anthropic Claude: AI conversation processing
- MongoDB: Data storage
- Gitea: Source code hosting
4. Contributing Documentation
Code of Conduct
All contributors must follow the NHCarrigan Code of Conduct.
Contributing Guidelines
Please review the Contributing Guidelines before submitting contributions.
Development Workflow
- Issue Creation: Use the provided templates in
.gitea/issue_template/
- Pull Requests: Follow the template in
.gitea/pull_request_template.yml
- Code Standards:
- ESLint configuration enforced
- TypeScript strict mode
- Comprehensive error handling
- Logging for debugging
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/ # Documentation
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
- 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
- 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
- Discord Community: chat.nhcarrigan.com
- Forum: forum.nhcarrigan.com
- Email: [email protected]