diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 098d985..7e89ecb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -5,42 +5,6 @@ We welcome contributions from the community! Please follow these guidelines to h ## Code of Conduct This project adheres to the [Contributor Covenant Code of Conduct](CODE_OF_CONDUCT.md). By participating, you agree to uphold its terms. -### Requirements -- Crystal 1.0+ -- Shards package manager -- SQLite3 - -## Local Development - -- linux -```bash -sudo apt-get update && sudo apt-get install -y crystal libssl-dev libsqlite3-dev -``` - -- macos -```bash -brew tap amberframework/micrate -brew install micrate -``` - -## Run -```bash -shards run bit -``` - -- Generate the `X-Api-Key` - -```bash -shards run cli -- --create-user=Admin -``` - -- Run tests - -```bash -ENV=test crystal spec -``` - - ## How to Contribute ### 1. Fork the Repository @@ -64,6 +28,7 @@ git checkout -b fix/issue-description ``` ### 4. Develop Your Changes +- Check [Local Development](docs/SETUP.md#local-development) guidelines - Ensure changes match the project scope - Write clear commit messages - Include tests for new functionality diff --git a/README.md b/README.md index 28dc28c..232aab4 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -[![Docker Pulls](https://img.shields.io/docker/pulls/sjdonado/bit.svg)](https://hub.docker.com/repository/docker/sjdonado/bit) -[![Docker Stars](https://img.shields.io/docker/stars/sjdonado/bit.svg)](https://hub.docker.com/repository/docker/sjdonado/bit) -[![Docker Image Size](https://img.shields.io/docker/image-size/sjdonado/bit/latest)](https://hub.docker.com/repository/docker/sjdonado/bit) +[![Docker Pulls](https://img.shields.io/docker/pulls/sjdonado/bit.svg)](https://hub.docker.com/r/sjdonado/bit) +[![Docker Stars](https://img.shields.io/docker/stars/sjdonado/bit.svg)](https://hub.docker.com/r/sjdonado/bit) +[![Docker Image Size](https://img.shields.io/docker/image-size/sjdonado/bit/latest)](https://hub.docker.com/r/sjdonado/bit) # Bit URL Shortener diff --git a/docs/SETUP.md b/docs/SETUP.md index d8636fc..24cb950 100644 --- a/docs/SETUP.md +++ b/docs/SETUP.md @@ -8,9 +8,9 @@ Options: --delete-user=USER_ID Delete a user by ID ``` -## Run it anywhere +## Run It Anywhere -### docker-compose +### Docker Compose ```bash docker-compose up @@ -19,7 +19,7 @@ docker-compose up # docker-compose exec -it app cli --create-user=Admin ``` -### Docker cli +### Docker CLI ```bash docker run \ @@ -60,6 +60,42 @@ dokku ports:add bit https:443:4000 # dokku run bit cli --create-user=Admin ``` +## Local Development + +### Requirements +- Crystal 1.12+ +- Shards package manager +- SQLite3 + +- linux +```bash +sudo apt-get update && sudo apt-get install -y crystal libssl-dev libsqlite3-dev +``` + +- macos +```bash +brew tap amberframework/micrate +brew install micrate +``` + +### Install Shards and Run + +```bash +shards run bit +``` + +- Generate the `X-Api-Key` + +```bash +shards run cli -- --create-user=Admin +``` + +- Run tests + +```bash +ENV=test crystal spec +``` + ## Benchmark Conducted on a MacBook Air M2 with 16GB RAM.