Skip to content

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

  1. Community Tooling and Integrations: Discord bots, translation services, and community management tools
  2. Websites and APIs: Web applications, documentation sites, and API services
  3. Apps and Games: Desktop applications, games, and interactive experiences

Getting Started

  1. Discord Bot: Install Hikari from the Discord app directory or invite to your server
  2. Web Dashboard: Visit hikari.nhcarrigan.com to access the dashboard
  3. 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

Terminal window
# Clone the repository
git clone https://git.nhcarrigan.com/nhcarrigan/hikari
# Install dependencies
pnpm install
# Build all services
pnpm build

Environment Configuration

Bot Service (bot/prod.env):

DISCORD_TOKEN=your_discord_token
ANTHROPIC_API_KEY=your_anthropic_key

Server Service:

MONGO_URI=your_mongodb_connection_string

Running Services

Terminal window
# Start bot service
cd bot && pnpm start
# Start client development server
cd client && ng serve
# Start server service
cd 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 announcements
  • GET /announcements - Retrieve announcements
  • Health check and monitoring endpoints

Key Configuration Files

Build and Deployment

The project uses Turbo for monorepo management:

Terminal window
# Build all projects
turbo build
# Run linting
turbo lint
# Run tests
turbo test

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

  1. Issue Creation: Use the provided templates in .gitea/issue_template/
  2. Pull Requests: Follow the template in .gitea/pull_request_template.yml
  3. 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