For some definition of simple
This repo provides a modern web application template that uses Rails for your classic MVC server-client relationship and SvelteJS for interactive JS components.
Either Linux, WSL (Windows Subsystem for Linux), or Mac will work best.
- Git
- Ruby (
3.2.0-preview1
): Recommended via rbenv - NodeJS (LTS
16.15.1
): Recommended via nvm - Docker (If using WSL on Windows, install will default to the WSL2 engine - use this)
- The Heroku CLI - used as our local process runner.
-
Clone the repo.
SSH
git clone git@github.com:kyle-rader/simple-app
HTTPS
git clone https://github.com/kyle-rader/simple-app
-
Confirm you have
bundle
andnpm
on your path (installed with Ruby, and NodeJS). -
Install the Rails gem globally.
bundle install rails
-
Install ruby dependencies
bundle install
Note that you may need to install
libpq-dev
in order to install thepg
(Postgres) gem.On Linux or WSL this can be done with
sudo apt install libpq-dev
-
Install JS dependencies
npm install
-
Ensure
docker-compose
is installed (it should come with docker). -
Bring up a Postgres instance in the background with
docker-compose up -d
-
Create and migrate the database
rails db:reset
-
Launch the rails web server and the vite dev server
npm start
Note this just calls
heroku local -f Procfile.dev
simulating a Heroku deployment. You could also use theforeman
gem for this.
Coming Soon
TBD
- Create initial app with
inertia-rails
andvite-rails
- TBD
- Heroku Deployment
- Azure Deployment guide?
- AWS Deployment guide?
- Digital Ocean Deployment guide?