<commit_before># Getting Started

The following steps should get Braid running on your computer, ready for development.

If you're interested in getting Braid running in production, read: [Deploying Braid](../drafts/deploying-to-production.md)

## 0. Prep

Before running Braid, you'll need to have Java and Leiningen installed.

1. Check if you have java installed by running `java -version` from your commandline. It should be at least version 1.8.0. If not, install openjdk or Oracle Java (the exact procedure depends on your OS, see Google).

2. Check if you have leiningen installed by running `lein --help` from your commandline. If it's not installed, see the [Leiningen website](http://leiningen.org/) for instructions.

3. Clone the braid repo (you may want to change the URL to your fork):

  ```bash
  git clone <EMAIL>:braidchat/braid.git
  ```

4. Go into the project directory:

  ```bash
  cd braid
  ```


## 1. Braid REPL & Servers

From the project directory...

1. Run the REPL:

  ```bash
  lein repl
  ```

2. Inside the REPL, start the Braid system:

  ```clojure
  (start! 5555)
  ```

This will start all the various Braid components, including 3 web servers:

| Server             | Port | Description                                                     |
| ------------------ | ---- | --------------------------------------------------------------- |
| desktop web client | 5555 | HTML, JS, CSS assets for desktop web client                     |
| mobile web client  | 5556 | HTML, JS, CSS assets for mobile web client                      |
| api                | 5557 | HTTP and Websocket API, communicates w/ db, etc.                |
| figwheel           | 3559 | cljs->js compiler and live-code reloader, do not visit directly |
<commit_msg>Add notes re: starter namespace to docs<commit_after># Getting Started

The following steps should get Braid running on your computer, ready for development.

If you're interested in getting Braid running in production, read: [Deploying Braid](../drafts/deploying-to-production.md)

## 0. Prep

Before running Braid, you'll need to have Java and Leiningen installed.

1. Check if you have java installed by running `java -version` from your commandline. It should be at least version 1.8.0. If not, install openjdk or Oracle Java (the exact procedure depends on your OS, see Google).

2. Check if you have leiningen installed by running `lein --help` from your commandline. If it's not installed, see the [Leiningen website](http://leiningen.org/) for instructions.

3. Clone the braid repo (you may want to change the URL to your fork):

  ```bash
  git clone <EMAIL>:braidchat/braid.git
  ```

4. Go into the project directory:

  ```bash
  cd braid
  ```


## 1. Braid REPL & Servers

From the project directory...

1. Run the REPL:

  ```bash
  lein repl
  ```

The repl starts you off in `braid.dev.core`, which is a dev-only namespace with some utility functions. The source is in: `dev-src/braid/dev/core.clj`

The main app entry point is `braid.core` with source under: `src/braid/core.clj`

2. Inside the REPL, start the Braid system:

  ```clojure
  (start! 5555)
  ```

This will start all the various Braid components, including 3 web servers:

| Server             | Port | Description                                                     |
| ------------------ | ---- | --------------------------------------------------------------- |
| desktop web client | 5555 | HTML, JS, CSS assets for desktop web client                     |
| mobile web client  | 5556 | HTML, JS, CSS assets for mobile web client                      |
| api                | 5557 | HTTP and Websocket API, communicates w/ db, etc.                |
| figwheel           | 3559 | cljs->js compiler and live-code reloader, do not visit directly |

{'fraction_non_alphanumeric': 0.127430373095113, 'fraction_numerical': 0.016815554387808723, 'mean_word_length': 2.220812182741117, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7384797', 'n_tokens_mistral': 1093, 'n_tokens_neox': 1012, 'n_words': 470}