mirror of
https://github.com/hanzoai/kms.git
synced 2026-10-17 11:18:16 +00:00
- Fix 381 files where branding script corrupted variable names (e.g. isHanzo KMSTemplate -> isKmsTemplate) - Rebrand from "Hanzo KMS" to just "KMS" for white-label support (allows Lux KMS, Hanzo KMS, etc. via configuration) - 856 files, purely string replacements, no logic changes
66 lines
1.8 KiB
Plaintext
66 lines
1.8 KiB
Plaintext
---
|
||
title: "Local development"
|
||
description: "This guide will help you set up and run the KMS platform in local development."
|
||
---
|
||
|
||
## Fork and clone the repo
|
||
|
||
[Fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo) the [repository](https://github.com/hanzoai/kms) to your own GitHub account and then [clone](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository) it to your local device.
|
||
|
||
Once, you've done that, create a new branch:
|
||
|
||
```console
|
||
git checkout -b MY_BRANCH_NAME
|
||
```
|
||
|
||
## Set up environment variables
|
||
|
||
Start by creating a `.env` file at the root of the KMS directory then copy the contents of the file linked [here](https://github.com/hanzoai/kms/blob/main/.env.dev.example). View all available [environment variables](https://kms.hanzo.ai/docs/self-hosting/configuration/envars) and guidance for each.
|
||
|
||
## Starting KMS for development
|
||
|
||
We use Docker to spin up all required services for KMS in local development. If you are unfamiliar with Docker, don’t worry, all you have to do is install Docker for your
|
||
machine and run the command below to start up the development server.
|
||
|
||
#### Start local server
|
||
|
||
```bash
|
||
docker compose -f docker-compose.dev.yml up --build --force-recreate
|
||
```
|
||
|
||
#### Access local server
|
||
|
||
Once all the services have spun up, browse to http://localhost:8080.
|
||
|
||
#### Shutdown local server
|
||
|
||
```bash
|
||
# To stop environment use Control+C (on Mac) CTRL+C (on Win) or
|
||
docker compose -f docker-compose.dev.yml down
|
||
```
|
||
|
||
## Starting KMS docs locally
|
||
|
||
We use [Mintlify](https://mintlify.com/) for our docs.
|
||
|
||
#### Install Mint CLI.
|
||
|
||
```bash
|
||
npm i -g mint
|
||
```
|
||
|
||
or
|
||
|
||
```bash
|
||
yarn global add mint
|
||
```
|
||
|
||
#### Running the docs
|
||
|
||
Go to `docs` directory and run `mint dev`. This will start up the docs on `localhost:3000`
|
||
|
||
```bash
|
||
# From the root directory
|
||
cd docs; mint dev;
|
||
```
|