The most efficient way to set up dev env is to utilize docker and docker compose.
Also, there is an old less efficient way to set up everything by manually installing all dependencies.
As we have both Bootstrap and TailwindCSS installed inside the project we need to split them somehow.
Thus, to utilize TailwindCSS make sure that you use the classes with the prefix. If you want to add a
p-1
class then it should betw-p-1
now. But it does not apply to the states, for example, if you want to add ap-2
on hover, then your class should behover:tw-p-2
.
- In order to reinit everything run
make reinit
. It will drop all containers and recreate everything from the scratch. - In order to recreate DB run
make reset-db
. - In order to (re)populate DB with a testing data run
make seed-db
. - In order to get a list of routes run
make routes
. - In order to use generator run
make generate options='generate options'
, e.g.make generate options='resource student name:string school:belongs_to'
. - In order to install all gems from
Gemfile.lock
runmake bundle-install
. - In order to install a gem run
make bundle-add gem='gem_name'
, e.g.make bundle-add gem='gmaps4rails'
. - In order to get access to inside the given docker container run
make sh c='container_name'
, e.g.make sh c='health-keeper-app'
. There you can do your stuff the same as within manual set up, e.g. runrails about
.
Logs can be obtained by:
- running
make logs
; - using Docker Desktop:
Containers > Container Name > Logs Tab
.
You should always run your test suite after using the RuboCop autocorrect functionality:
make lint options='-a'
ormake lint options='-x'
.
- In order to run all tests run
make test
.
Rspec tests will be run automatically on GitHub actions on creating a PR.
- In order to run linter (RuboCop in our case) and check your code run
make rubocop
. - Alternatively you can pass RuboCop a list of files and directories to check
make rubocop options='app spec lib/something.rb'
. - You can also run RuboCop in an autocorrect mode, where it will try to automatically fix the problems it found in your code
make rubocop options='-a'
. - You can use RuboCop as a formatter with a handy shortcut to run autocorrection only on code layout (a.k.a. formatting) offenses
make rubocop options='-x'
. - Also, you can combine different options, e.g.
make rubocop options='-x app spec
. - For more details check the available command-line options
make rubocop options='-h'
.
RuboCop will be run automatically on GitHub actions on creating a PR.
- For JetBrains RubyMine / Intellij IDEA RuboCop support is available out of the box as of the 2017.1 releases and further. You don't need to add anything.
- For VSCode you need to install and configure vscode-rubocop and ruby-lsp.
- If you have an error
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
while running make
command - you need to install the Xcode Command Line Tools
(run xcode-select --install
) or reset it if has been already done (run xcode-select --reset
).
- Health Data Management
- User Story 1: Manual input of blood test results.
- User Story 2: Import health data from PDF files.
- User Story 4: Display health data with color-coded references.
- User Interface and Experience
- User Story 16: See trends in health data over a defined period.
- Biomarker and Disease Database
- User Story 22: Allow users to add their own reference databases.
- Security
- Authentication.
- Authorization.
- Role management.
- Tune role policies.
- Wrap an app in Docker.