Miru Documentation

website·Indexed 31 days ago

https://docs.miru.so

Documentation for Miru, a time tracking, invoicing, expenses, payments, and reporting application. Built with Rails 8, React 19, and Vite, the platform includes a comprehensive product guide and a contributing guide covering local development setup for macOS and Ubuntu/Debian, RSpec testing, and a UI component library.

Tokens
26.1K
Snippets
130
Records
210
Agent score
50%

What's inside Miru

  1. Overview of Miru to QuickBooks Online synchronization

    Miru provides a one-way sync from Miru to QuickBooks Online. This allows for the export of clients, invoices, and recorded payments. Because the sync is one-way, Miru remains the primary source of truth for time entries and invoice creation.
  2. Overview of Miru Stripe Integration

    Miru integrates with Stripe using the official stripe Ruby gem. The integration handles three primary flows:

    1. Invoice Collection: Uses Stripe Checkout for payments (InvoicePayment::Checkout) and processes fulfillment via Webhooks::StripeController and HandleStripeCheckoutEventService.
    2. Subscription Billing: Managed via Stripe Checkout/Billing Portal (Api::V1::SubscriptionsController) with synchronization handled by Subscriptions::StripeSyncService.
    3. Stripe Connect: Onboarding is managed by StripeConnectedAccount and exposed through Payment Settings APIs.
  3. Overview of Miru Testing Stack

    Miru uses a Ruby/Rails testing infrastructure consisting of the following tools:

    • RSpec: Primary testing framework
    • FactoryBot: Test data generation
    • Capybara: Integration and system testing
    • Selenium WebDriver: Browser automation for system tests
    • VCR & WebMock: HTTP request stubbing
    • Database Cleaner: Test isolation
    • SimpleCov: Code coverage reporting
    • Shoulda Matchers: Rails-specific test matchers
  4. Manage time tracking views (Day, Week, Month)

    Miru provides three perspectives for time tracking:

    • Day View (Time Tracking > DAY): Best for real-time tracking and appending detailed notes to entries as you work.
    • Week View (Time Tracking > WEEK): Optimized for bulk-entering time across several days.
    • Month View (Time Tracking > MONTH): Provides a comprehensive snapshot of total work hours for the entire month. Admins can use the dropdown in this view to see time entries for other team members.
  5. Use qmd as a low-token retrieval layer for AI agents

    qmd serves as a low-token retrieval layer designed to be used before large agent prompts. It allows developers to filter and retrieve only the most relevant document excerpts, reducing the token load on downstream LLM prompts.
  6. Understand the miru-web high-level architecture

    The miru-web system architecture consists of a Rails backend and a React frontend powered by Vite. The infrastructure includes the following components:

    • Primary Data Store: PostgreSQL
    • Background Processing: Solid Queue
    • Caching and Messaging: Redis
    • Object Storage: Active Storage
    • Payments: Stripe integration
    • Communication: Email delivery path
  7. Miru Key Features and Capabilities

    Miru provides a comprehensive suite for time and project management:

    • Time Tracking: Supports timers, manual entries, bulk imports, and project-based organization (billable vs. non-billable).
    • Invoicing: Automated invoice generation, recurring billing for retainers, multi-currency support, and integrations with Stripe and PayPal.
    • Analytics: Real-time dashboards, profitability analysis, and time estimates vs. actuals.
    • Team Management: Role-based permissions (Owner, Admin, Employee, Client), leave management (PTO/Sick days), expense tracking, and client portals.
  8. Log work hours using the Week View

    The Week view is used for entering substantial amounts of time across multiple days simultaneously. Access this view via Time Tracking > WEEK.

    To add time in the Weekly Overview:

    1. Click Add Row.
    2. Select the client and project, then click Save Row (or type the names and press Enter).
    3. Enter the time in the row and click Save.
    4. Optional: Select an individual entry to add a description or toggle the "Billable" checkbox to mark the entry as billable or non-billable.
  9. Miru Web Technical Stack Overview

    Miru Web is a comprehensive application for time tracking, invoicing, expenses, payments, and reporting. The architecture is divided into three primary layers: an App Surface for the user interface, a Core Backend for business logic and data, and External Systems for specialized services like payments and storage.
  10. Manage payments using the Miru Payment Dashboard

    The Miru payments dashboard allows users with the Admin Role to manage and track payments. Payments processed via Stripe or PayPal are automatically marked as 'paid' and added to the listing. The dashboard provides a comprehensive list of transactions with the following details:

    • Client Name: The client associated with the payment.
    • Invoice Number: Unique reference number for the invoice.
    • Transaction Date: The date the transaction occurred.
    • Notes: Custom comments or reference information.
    • Transaction Type: The payment method used (e.g., Stripe, PayPal, or ACH).
    • Amount: The financial value of the transaction.
    • Status: The current state of the transaction (e.g., Paid or Failed).
  11. Fix a bug in Miru

    To contribute a bug fix, select an issue from the GitHub issues page and comment to notify the team you are working on it. If the fix requires design or architecture changes, propose the solution in the issue comments and wait for maintainer approval before starting.

    Follow these steps for the contribution workflow:

    1. Use the git-flow branching model: create a new branch from the develop base branch.
    2. Implement changes.
    3. Add or update tests to cover all new or modified cases.
    4. Ensure the test suite passes.
    5. Ensure code is linted and formatted.
    6. Submit a pull request.
  12. Prepare Ubuntu or Debian system for Miru development

    Before installing Miru, ensure the system meets these minimum requirements: Ubuntu 20.04 LTS+ or Debian 11+, 8GB RAM (16GB recommended), 10GB free disk space, and sudo access. Update system packages and install essential build tools including curl, git, build-essential, and various development libraries.
    # Update package lists and upgrade existing packages
    sudo apt update && sudo apt upgrade -y
    
    # Install essential build tools
    sudo apt install -y curl git build-essential libssl-dev zlib1g-dev \
        libbz2-dev libreadline-dev libsqlite3-dev wget llvm \
        libncurses5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev \
        libffi-dev liblzma-dev software-properties-common