hidakatsuya / shopping_list-web

A simple shopping list management application built with Rails8 and Hotwire and Tailwind CSS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Shopping List

Test

A simple web application to manage shopping list. It is built with Rails7 and Hotwire and Tailwind CSS.

  • Sign up and sign in with Google account
  • Managing items on shopping list
  • Updating the completion status of items
  • Dark mode support
  • Multiple language support
  • API for adding items: POST /items

Related Products

Built With

  • Ruby 3.3
  • Rails 7.1
  • Turbo (turbo-rails)
  • Propshaft
  • Tailwind CSS (tailwindcss-rails)
  • SQLite

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

  • Google OAuth Client
  • Ruby or Docker

Installing

Copy .env.sample to create .env, and set the client ID and secret key for Google OAuth client.

cp .env.sample .env

Then, execute the followings to launch the application.

./bin/setup
./bin/dev

Alternatively, you can launch the application in a Docker container.

docker compose build
docker compose run app bin/setup
docker compose up -d

Running the tests

First, refer to the above and launch the application in a Docker container.

Runnning unit tests:

docker compose exec app bin/rails test

Running system tests:

docker compose exec app bin/rails test:system

Running all tests:

docker compose exec app bin/rails test:all

Deploying to production using Kamal

Copy .env.sample to create .env.production, and set the settings.

cp .env.sample .env.production

Note

You may need to add SECRET_KEY_BASE and KAMAL_REGISTRY_PASSWORD environment variables.

Configure Kamal with reference to the official documentation.

Run the bin/kamal to deploy. bin/kamal loads .env.production file present in the application root.

Caution

Do not run kamal directly. Kamal loads .env file present in the application root.

License

This project is licensed under the MIT License - see the LICENSE file for details

About

A simple shopping list management application built with Rails8 and Hotwire and Tailwind CSS

License:MIT License


Languages

Language:Ruby 60.4%Language:HTML 32.4%Language:JavaScript 3.0%Language:Dockerfile 1.7%Language:Shell 1.4%Language:CSS 1.1%