
# Installation

Linux installation:
- Clone this repo locally.
- Install Ruby >=3.0     : apt install ruby3.0
- Install Sqlite3 >=3.37 : apt install sqlite3
- Install Rails >=7.0    : gem install rails     # may require sudo

MacOS installation: TBD.

Windows installation: TBD.

# Confirm basic operation

- Go to the local repo directory and enter: rails server
- Open a browser tab at localhost:3000/
- You should see a Rails icon in the middle of the screen.
- Enter ctrl-c to stop the server.

# Project structure

The directory structure of the repo is that of a standard Rails app.
NOTE: All file paths herein are relative to the root of the repo which is also the root of the Rails app.
CSS and Javascript files are in public because it works and I haven't taken the time to figure out a better place to put them.
The server is written in Ruby using Rails.
The client is written in Javascript using Jquery.
The web server is Puma and the database is Sqlite.
The Rails app itself is containerized per Dockerfile. The entry point for the container is bin/docker-entrypoint
The Sqlite database file resides in a Docker volume named "db".

# Launching

At the top-level directory of the local repo, enter: ./run.rb
See comments in run.rb for arguments.

Execution path:
- run.rb
   - optionally runs docker build
- docker run Dockerfile
- bin/docker-entrypoint
   - optionally runs bin/rails { drop, migrate, seed }
- bin/rails server
   - standard rails boot sequence including:
      - config/environments/{ development.rb || production.rb }
      - config/initializers/*.rb
      - config/puma.rb
