Skip to content

Latest commit

 

History

History

src

README

This README would normally document whatever steps are necessary to get the application up and running.

Ruby version

ruby-3.1.2

System dependencies

Built by docker-compose, docker, or manual with conda, redis, sidekiq, ...

Configuration

  • app: all you need (controllers, modles, views, sidekiq - defining jobs, mailers - defining email config, assets - bootstrap)
  • bin: generated by initialization.
  • config:

    switch environments: development.rb, production.rb, test.rb.
    set routes.rb: manage the directions of every clicks in website.
    *.yml: lots of config to interact with outer and inner environment.

  • db: database for manage the schema and initial data (seeds).
  • lib: the path where Hand Predictor API and hand_paraser.rb are saved.
  • log: output log.
  • public: public assets.
  • storage: active storage (maybe?).
  • test: test environment (but not implemented in this study).
  • tmp: temporary file.
  • Gemfile: defined gem packages.
  • Procfile: all-in-one start and stop for docker-compose env.
  • Procfile.backup: all-in-one start and stop for docker env.

Database creation

We use sqlite3 as the foundation of the database.

Database initialization

Automatically created by docker or docker-compose.

How to run the test suite

Not implemented.

Services (job queues, cache servers, search engines, etc.)

  • letter_opener: go to localhost:13006/letter_opener, where your mail will send to this fake mail box when local usage. You can click confirm, reset passwords, ... and so on.
  • admin: go to localhost:13006/admin, where is the backend of the website. You can see how the data storaged in the database and the users in the system.

Deployment instructions

Not implemented.

Development useful information

debug (byebug)

rails console
> load 'path/to/file.rb'

add <= byebug => in where you want to stop in the .html.erb

devise cheatsheet

user.admin?  
user.admin!  
user.role  
user.user?  
user.vip?