The Bridge Management System.
- Hashi means Bridge in Japanese.
- The Japanese pronounce the 4 as shi.
- Ha4 = The bridge.
- Ruby 2.7
- PostgreSQL
- PostGIS
- NodeJS + yarn
- Redis
- ImageMagick
- vips
- pdal
- docker
bundle
yarn
export HA4DB_DEVELOPMENT_DATABASE_URL=postgis://myuser:mypass@localhost/ha4db_development
rails db:create RAILS_ENV=development
rails db:gis:setup RAILS_ENV=development
rails db:migrate RAILS_ENV=developmentdocker run --rm -p 6379:6379 redisOpen two terminal or use tmux or GNU screen.
In one terminal, run webpack-dev-server.
bin/webpack-dev-serverIn other terminal, run rails s.
bin/rails sIndeed running only rails s is ok, but webpack-dev-server runs background and compiles at the moment when you modify something, so recommend to run both webpack-dev-server and rails s.
You may need to add AdminUser.
First, run rails console :
bin/rails cAnd add user in console.
a = AdminUser.new
a.name = 'foo'
a.password = 'sp0mhamegg'
a.saveexport HA4DB_TEST_DATABASE_URL=postgis://myuser:mypass@localhost/ha4db_test
rails db:create RAILS_ENV=test
rails db:gis:setup RAILS_ENV=test
rails db:migrate RAILS_ENV=test
bin/rspecAfter run rspec, the coverage generated in coverage/index.html.
This project supports guard.
bin/guardbin/rubocop
yarn eslint . --ext .js,.jsx,.ts,.tsxWe use i18n_generators.
Currently we support Japanese and English.
rails g i18n <your_language>After you create or modify model schema, re-generate config/locales/translation_*.yml via following tasks:
rails g i18n_translation en
rails g i18n_translation ja
# rails g i18n_translation <your_language>You need to check config/locales/translation_*.yml manually.