---
title: Hikari
---

Hikari (hereinafter the "Application") is a centralised 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 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

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](https://hikari.nhcarrigan.com) to access the dashboard
3. **Support**: Join the [Discord community](https://chat.nhcarrigan.com) 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 catalogue 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 integration

### Development Setup

#### Prerequisites
- Node.js (latest LTS)
- pnpm package manager
- MongoDB instance
- Discord bot token
- Anthropic API key

#### Installation
```bash
# 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`):
```ini
DISCORD_TOKEN=your_discord_token
ANTHROPIC_API_KEY=your_anthropic_key
```

**Server Service**:
```ini
MONGO_URI=your_mongodb_connection_string
```

#### Running Services

```bash
# 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:

```prisma
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

- [`client/src/app/config/products.ts`](client/src/app/config/products.ts) - Product catalogue configuration
- [`bot/src/config/prompt.ts`](bot/src/config/prompt.ts) - AI agent personality and instructions
- [`client/src/app/app.routes.ts`](client/src/app/app.routes.ts) - Client-side routing
- [`bot/commandJson.js`](bot/commandJson.js) - Discord slash command definitions

### Build and Deployment

The project uses Turbo for monorepo management:

```bash
# Build all projects
turbo build

# Run linting
turbo lint

# Run tests
turbo test
```

## 3. Legal Documentation

### License
This software is licensed under [Naomi's Public Licence](https://docs.nhcarrigan.com/#/license).

### Privacy Policy
User data handling is governed by the [NHCarrigan Privacy Policy](https://docs.nhcarrigan.com/#/privacy).

### Terms of Service
Usage of Hikari is subject to the [NHCarrigan Terms of Service](https://docs.nhcarrigan.com/#/terms).

### Security Policy
Security vulnerabilities should be reported according to the [NHCarrigan Security Policy](https://docs.nhcarrigan.com/#/security).

### 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](https://docs.nhcarrigan.com/community/coc/).

### Contributing Guidelines
Please review the [Contributing Guidelines](https://docs.nhcarrigan.com/dev/contributing/) before submitting contributions.

### Development Workflow

1. **Issue Creation**: Post in the appropriate Discord forum channel (#bug-reports or #feature-requests) on our Discord community
2. **Pull Requests**: Follow the template in [`.gitea/pull_request_template.yml`](.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
- **Discord Community**: [chat.nhcarrigan.com](https://chat.nhcarrigan.com)
- **Email**: contact@nhcarrigan.com
