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
nvm
to automatically detect and change node versions for your project as youcd
into the directory follow this) -
Install ruby 3.2.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
To run elasticsearch on latest macos(ventura) please follow the below instructions
- Install Docker Desktop ( M1 / Intel ) https://www.docker.com/products/docker-desktop/
- Run below command in your terminal & you can check by opening
localhost:9200
docker run -dp 127.0.0.1:9200:9200 -p 127.0.0.1:9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:7.17.7
- Install Chrome Extension to browse the Cluster ( Kind of like PGAdmin for Elastic Search ) https://chrome.google.com/webstore/search/multi%20elastic%20search%20head More information available at https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html
- Install Redis
brew install redis
- Setup the app
# Go to the miru-web app directory
bin/setup
- 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
Change database.yml
to embed TEST_ENV_NUMBER
test:
database: miru_web_test_<%= ENV['TEST_ENV_NUMBER'] %>
# Setup parallel specs
bundle exec rake parallel:create
# Copy Schema for new changes on branches
bundle exec rake parallel:prepare
# Run migrations if needed
bundle exec rake parallel:migrate
# Run all specs in parallel
RAILS_ENV=test bundle exec rake parallel:spec
- Run
COVERAGE=true bundle exec rspec
- Open
coverage/index.html
(open coverage/index.html
in MacOS andxdg-open coverage/index.html
in Debian/Ubuntu)
Role | Password | |
---|---|---|
Owner | vipul@example.com | welcome |
Admin | supriya@example.com | welcome |
Employee | sam@example.com | welcome |
Book keeper | book.keeper@example.com | welcome |
Install the cypress dependencies using the following command:
cd cypress
yarn install
Cypress 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:dev
To run the tests on local environment and in chrome browser use the following command:
cd cypress
yarn run cy:open:dev
To run the tests on staging environment and in headless mode use the following command:
cd cypress
yarn run cy:run:staging
To run the tests on staging environment and in chrome browser use the following command
cd cypress
yarn run cy:open:staging
To configure Sentry set the project's sentry dsn as value to SENTRY_DNS
environment variable.
- Feel free to join our Discord channel for support and questions.
- Subscribe our latest blog articles and tutorials.
- Discussions: Post your questions regarding Miru Web
- Documentation
We encourage everyone to contribute to Miru Web! Check out
Contributing Guide for guidelines about how to proceed..
Note: We are working on improving the documentation. So we had created a docusaurus app for documentation. Check out the Miru Docs Repo.
Thanks goes to all our contributors
Miru © 2023, Saeloun - Released under the MIT License.