Miru is an open-source tool, designed to make time tracking, invoice management, and accounting easy for small businesses worldwide. It is a platform for organizations to help them streamline their workflow.
- Clone repo to local
git clone https://github.com/saeloun/miru-web.git
-
(Tip: To allow
nvmto automatically detect and change node versions for your project as youcdinto the directory follow this) -
Install ruby 3.1.1
rvm install $(cat .ruby-version)
- Install Node 16.4.2(can be skipped if you followed the tip mentioned in (2) above)
nvm install $(cat .nvmrc)
- Install Postgres
brew install postgresql
- Install elasticsearch
brew install elastic/tap/elasticsearch-full
brew services start elasticsearch-full
- Install Redis
brew install redis
- Install gem
bundle install
- Install node packages
yarn install
- Setup ENV's
cp .env.example .env
-
Update
DATABASE_URLin.envas per localpsqlcreds. For example, if the user isrootand password ispassword, change the variable asDATABASE_URL="postgres://root:password@localhost/miru_web?encoding=utf8&pool=5&timeout=5000" -
Update
APP_BASE_URLin.envtolocalhost:3000 -
Run
bin/rails db:create RAILS_ENV=developmentto create the database -
Run
bin/rails db:migrate RAILS_ENV=developmentfor migrations -
Run
bin/rails db:seedfor populating the database with initial data -
Run app in local env
foreman start -f Procfile.dev
- Navigate to http://0.0.0.0:3000
Go to /sent_emails for accessing the emails(for /sent_emails route to work,
add EMAIL_DELIVERY_METHOD='letter_opener_web' to .env)
- Run
bin/rails db:create RAILS_ENV=test - Run
bin/rails db:migrate RAILS_ENV=test - Run
bundle exec rspec
- Run
COVERAGE=true bundle exec rspec - Open
coverage/index.html(open coverage/index.htmlin MacOS andxdg-open coverage/index.htmlin Debian/Ubuntu)
| Role | Password | |
|---|---|---|
| Owner | [email protected] | password |
| Admin | [email protected] | password |
| Employee | [email protected] | password |
Install the cypress dependencies using the following command:
cd cypress
yarn installCypress tests can be run on local, staging and production environment.
To run the cypress tests on the local environment and in headless mode use the following command:
cd cypress
yarn run cy:run:devTo run the tests on local environment and in chrome browser use the following command:
cd cypress
yarn run cy:open:devTo run the tests on staging environment and in headless mode use the following command:
cd cypress
yarn run cy:run:stagingTo run the tests on staging environment and in chrome browser use the following command
cd cypress
yarn run cy:open:stagingYou can deploy Miru on Heroku using the one-click-deployment button: