Skip to content

Commit

Permalink
Added additional docs
Browse files Browse the repository at this point in the history
  • Loading branch information
yatish27 committed May 14, 2024
1 parent 5b10e11 commit 8b5249a
Show file tree
Hide file tree
Showing 5 changed files with 130 additions and 5 deletions.
1 change: 1 addition & 0 deletions Brewfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# PostgreSQL - brew install postgresql
brew "libpq"
brew "postgresql@16"
brew "curl"

# Overmind (requires tmux)
brew "tmux"
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ group :development do
gem "brakeman", require: false
gem "bundler-audit", "~> 0.9.1", require: false
gem "erb_lint", "~> 0.5", require: false
gem "foreman", "~> 0.88"
gem "overmind"
gem "colorize", "~> 1.1"
gem "letter_opener", "~> 1.10"
gem "rubocop", "~> 1.63", ">= 1.63.5", require: false
Expand Down
8 changes: 6 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ GEM
factory_bot_rails (6.4.3)
factory_bot (~> 6.4)
railties (>= 5.0.0)
foreman (0.88.1)
fugit (1.9.0)
et-orbi (~> 1, >= 1.2.7)
raabro (~> 1.4)
Expand Down Expand Up @@ -186,6 +185,11 @@ GEM
racc (~> 1.4)
nokogiri (1.16.5-x86_64-linux)
racc (~> 1.4)
overmind (2.5.1)
overmind (2.5.1-arm-linux)
overmind (2.5.1-arm64-darwin)
overmind (2.5.1-x86-linux)
overmind (2.5.1-x86_64-darwin)
parallel (1.24.0)
parser (3.3.1.0)
ast (~> 2.4.1)
Expand Down Expand Up @@ -331,10 +335,10 @@ DEPENDENCIES
dotenv (~> 3.1, >= 3.1.2)
erb_lint (~> 0.5)
factory_bot_rails (~> 6.4, >= 6.4.3)
foreman (~> 0.88)
jbuilder (~> 2.12)
letter_opener (~> 1.10)
minitest-reporters (~> 1.6, >= 1.6.1)
overmind
pg (~> 1.5, >= 1.5.6)
puma (~> 6.4, >= 6.4.2)
rails (~> 7.1, >= 7.1.3.2)
Expand Down
42 changes: 40 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,55 @@
## 🌟 Features

- Ruby (3.3.1) and Rails (7.1)
- PostgresSQL 16.3
- [PostgresSQL 16.3](https://www.postgresql.org)
- [Tailwind CSS](https://tailwindcss.com)
- Uses [Vite Ruby](https://vite-ruby.netlify.app) for asset management. It is based on Vite.js. It replaces webpacker, jsbundling-rails, cssbundling-rails, importmaps and sprockets.
- Uses [Bun](https://bun.sh) for npm package manager. No need to install node and yarn.
- Uses [Phlex](https://www.phlex.fun) for component-based views. It is alternative to ViewComponent.
- Uses [Phlex](https://www.phlex.fun) for component-based views. It is an alternative to [ViewComponent](https://viewcomponent.org).
- Uses Rails' default testing library, minitest along with [Factorybot](https://github.com/thoughtbot/factory_bot)
- Auto-formats Ruby code with [rubocop](https://rubocop.org).
- Auto-formats JavaScript and CSS code with [prettier](https://prettier.io).
- Uses Github Actions for conntinuous integration and deployment.
- Supports deployment at [Heroku](https://www.heroku.com/platform) and [Render](https://render.com)


## Usage

### Prerequisites
- Ruby 3.3
- Check the [.ruby-version](.ruby-version)
- PostgreSQL 16.3
- Bun

Refer

### Building a new application

1. Clone the base repository
```
git clone [email protected]:yatish27/shore.git your_new_project_name
```

2. Enter the project directory
```
cd your_new_project_name
```

3. Replace `Shore` with your application's name. Let's say you want to name your project as `AirKit`

```
./bin/replace_name AirKit
```

4. Run setup

```
./bin/setup
```

5. Start your application
```
bin/dev
```

6. Visit `http://localhost:3000`
82 changes: 82 additions & 0 deletions docs/installing_prerequisites.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# Prerequsisties

## Ruby
Use a Ruby version manager like [rbenv](https://github.com/rbenv/rbenv?tab=readme-ov-file#using-package-managers) to install ruby.
1. Install rbenv
```
brew install rbenv ruby-build
```

2. Install ruby with the version in [.ruby-version](./../.ruby-version)

```
rbenv install 3.3.1
```

3. Check the version
```
ruby -v
```
```
ruby 3.3.1 (2024-04-23 revision c56cd86388) [arm64-darwin23]
```

## PostgresSQL
You can install PostgresSQL using [postgresapp.com](https://postgresapp.com) or Homebrew

### Using Homebrew

1. Install

```
brew install postgresql@16
```

2. Add psql to $PATH

```
echo 'export PATH="/opt/homebrew/opt/postgresql@16/bin:$PATH"' >> ~/.bashrc
```
3. Start the server
```
brew services start postgresql@16
```
4. Create a `postgres` user

```
createuser -s postgres
```

5. Set the password for postgres

```
psql postgres
```
Within psql

```
ALTER ROLE postgres WITH PASSWORD 'password';
```

### Using postgresapp.com

1. Visit https://postgresapp.com and download the app with PostgresSQL
2. Install the app
3. Start the server and initialize the cluster using the UI


## Bun
Visit [bun.sh](https://bun.sh/docs/installation) to learn about installation process

### Using homebrew

```
brew install oven-sh/bun/bun
```

After installing, check the version

```
bun -v
```

0 comments on commit 8b5249a

Please sign in to comment.