<commit_before># Contributing

We are currently in the V2 Milestone. Take a look at the V2 Column in the [Project Page](https://github.com/scalacenter/scastie/projects/1) to see our priorities.
You are more than welcome to contribute any PR regardeless if it's listed or not.

## How to run locally

requirements: 

* node (for less)
* phantomjs (for running client tests) ```npm install -g phantomjs```
* `export SBT_OPTS = "-Xms512M -Xmx1536M -Xss1M -XX:+CMSClassUnloadingEnabled"`
* sbt
* docker (for deploying)

```
sbt
> sbtRunner/reStart
> ~server/reStart
```

open http://localhost:9000

## Structure

```
.
├── api                 | autowire api (rpc server <=> browser)
|                       |   models for server <=> sbt (akka-remote)
├── balancer            | distribute load based on sbt configuration
├── bin                 | scalfmt runner
├── build.sbt           | build definition
├── client              | Scala.js & scalajs-react code for the frontend 
├── codemirror          | Codemirror facade
├── demo                | cool examples to try in scastie
├── deployment          | production configurations
├── docker              | Dockerfile for sbt images
├── instrumentation     | Worksheet implementation
├── project             | build extras like Deployment or Scala.js packaging and plugins
├── runtime-dotty       | see `runtime-scala`
├── runtime-scala       | methods exposed inside scastie
├── sbt-runner          | remote actor communicating with sbt instance over I/O streams
├── sbt-scastie         | sbt plugin to report errors and console output with the `sbt-api` model 
├── server              | web server
└── utils               | read/writte files
```

## High-Level Architecture

```
                                                                            +-----------------------------------------+
                                                                           +-----------------------------------------+|
 Scala.js Client     run/save/format                                      +-----------------------------------------+||
+-----------------+  AutowireApi      +---------------------+             |    SbtActor               Sbt(Proccess) |||
|      AppBackend |  (HTTP)           | +------------+      | akka-remote |   +----------+            +-----------+ |||
|      +--------+ +-----------------> | |LoadBalancer| <--------------------> |          |            |           | |||
|      |        | |                   | +------------+      |             |   |          |            |           | |||
|      |        | |                   |                     |             |   |          |  <----->   |           | |||
|      |        | |                   | SnippetContainer(DB)|             |   |          | I/O Stream |           | |||
|      |        | |                   |                     |             |   |          |            |sbt-scastie| |||
|      |        | | <-----------------+ oauth               |             |   |          |            |           | |||
|      +--------+ |  SnippetProgress  | static ressources   |             |   +----------+            +-----------+ |||
+-----------------+  (sse/websocket)  +---------------------+             |                                         ||+
                                                                          |                                         |+
                                                                          +-----------------------------------------+

Editor: http://asciiflow.com/
```

# Let's talk

If you have any questions join us in the [gitter channel](https://gitter.im/scalacenter/scastie)

# How to deploy

## Requirements

1. To deploy the application to the productions servers (scastie.scala-lang.org) you will need to have ssh access to the following machine:

* `<EMAIL>`

These people have access:

* @MasseGuillaume
* @heathermiller
* @julienrf
* @jvican
* @olafurpg

2. You need to be a member of the scalacenter on dockerhub: https://hub.docker.com/u/scalacenter 

3. do`docker login`

4. bump the version in build.sbt

5. tag and commit the new version

6. Run this command locally: `sbt deploy`

7. Make sure everything went well: https://scastie.scala-lang.org


## Running with docker locally

`docker run --network=host scalacenter/scastie-sbt-runner:0.20.0`<commit_msg>added dimart to the deployers<commit_after># Contributing

We are currently in the V2 Milestone. Take a look at the V2 Column in the [Project Page](https://github.com/scalacenter/scastie/projects/1) to see our priorities.
You are more than welcome to contribute any PR regardeless if it's listed or not.

## How to run locally

requirements: 

* node (for less)
* phantomjs (for running client tests) ```npm install -g phantomjs```
* `export SBT_OPTS = "-Xms512M -Xmx1536M -Xss1M -XX:+CMSClassUnloadingEnabled"`
* sbt
* docker (for deploying)

```
sbt
> sbtRunner/reStart
> ~server/reStart
```

open http://localhost:9000

## Structure

```
.
├── api                 | autowire api (rpc server <=> browser)
|                       |   models for server <=> sbt (akka-remote)
├── balancer            | distribute load based on sbt configuration
├── bin                 | scalfmt runner
├── build.sbt           | build definition
├── client              | Scala.js & scalajs-react code for the frontend 
├── codemirror          | Codemirror facade
├── demo                | cool examples to try in scastie
├── deployment          | production configurations
├── docker              | Dockerfile for sbt images
├── instrumentation     | Worksheet implementation
├── project             | build extras like Deployment or Scala.js packaging and plugins
├── runtime-dotty       | see `runtime-scala`
├── runtime-scala       | methods exposed inside scastie
├── sbt-runner          | remote actor communicating with sbt instance over I/O streams
├── sbt-scastie         | sbt plugin to report errors and console output with the `sbt-api` model 
├── server              | web server
└── utils               | read/writte files
```

## High-Level Architecture

```
                                                                            +-----------------------------------------+
                                                                           +-----------------------------------------+|
 Scala.js Client     run/save/format                                      +-----------------------------------------+||
+-----------------+  AutowireApi      +---------------------+             |    SbtActor               Sbt(Proccess) |||
|      AppBackend |  (HTTP)           | +------------+      | akka-remote |   +----------+            +-----------+ |||
|      +--------+ +-----------------> | |LoadBalancer| <--------------------> |          |            |           | |||
|      |        | |                   | +------------+      |             |   |          |            |           | |||
|      |        | |                   |                     |             |   |          |  <----->   |           | |||
|      |        | |                   | SnippetContainer(DB)|             |   |          | I/O Stream |           | |||
|      |        | |                   |                     |             |   |          |            |sbt-scastie| |||
|      |        | | <-----------------+ oauth               |             |   |          |            |           | |||
|      +--------+ |  SnippetProgress  | static ressources   |             |   +----------+            +-----------+ |||
+-----------------+  (sse/websocket)  +---------------------+             |                                         ||+
                                                                          |                                         |+
                                                                          +-----------------------------------------+

Editor: http://asciiflow.com/
```

# Let's talk

If you have any questions join us in the [gitter channel](https://gitter.im/scalacenter/scastie)

# How to deploy

## Requirements

1. To deploy the application to the productions servers (scastie.scala-lang.org) you will need to have ssh access to the following machine:

* `scastie@scastie.scala-lang.org`

These people have access:

* [@MasseGuillaume](https://github.com/MasseGuillaume)
* [@heathermiller](https://github.com/heathermiller)
* [@julienrf](https://github.com/julienrf)
* [@jvican](https://github.com/jvican)
* [@olafurpg](https://github.com/olafurpg)
* [@dimart](https://github.com/dimart)

2. You need to be a member of the scalacenter on dockerhub: https://hub.docker.com/u/scalacenter 

3. do`docker login`

4. bump the version in build.sbt

5. tag and commit the new version

6. Run this command locally: `sbt deploy`

7. Make sure everything went well: https://scastie.scala-lang.org


## Running with docker locally

`docker run --network=host scalacenter/scastie-sbt-runner:0.20.0`
{'fraction_non_alphanumeric': 0.1876114081996435, 'fraction_numerical': 0.005793226381461676, 'mean_word_length': 1.1053001876172608, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 18, 'https://': 14, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 66, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2680288', 'n_tokens_mistral': 2356, 'n_tokens_neox': 2259, 'n_words': 624}