Miru Documentation
website·Indexed 31 days ago
https://docs.miru.soDocumentation 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.
What's inside Miru
- 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.
Overview of Miru Stripe Integration
Miru integrates with Stripe using the official
stripeRuby gem. The integration handles three primary flows:- Invoice Collection: Uses Stripe Checkout for payments (
InvoicePayment::Checkout) and processes fulfillment viaWebhooks::StripeControllerandHandleStripeCheckoutEventService. - Subscription Billing: Managed via Stripe Checkout/Billing Portal (
Api::V1::SubscriptionsController) with synchronization handled bySubscriptions::StripeSyncService. - Stripe Connect: Onboarding is managed by
StripeConnectedAccountand exposed through Payment Settings APIs.
- Invoice Collection: Uses Stripe Checkout for payments (
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
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.
Use qmd as a low-token retrieval layer for AI agents
qmdserves 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.Understand the miru-web high-level architecture
The
miru-websystem 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
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.
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:
- Click Add Row.
- Select the client and project, then click Save Row (or type the names and press Enter).
- Enter the time in the row and click Save.
- Optional: Select an individual entry to add a description or toggle the "Billable" checkbox to mark the entry as billable or non-billable.
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.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).
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:
- Use the git-flow branching model: create a new branch from the
developbase branch. - Implement changes.
- Add or update tests to cover all new or modified cases.
- Ensure the test suite passes.
- Ensure code is linted and formatted.
- Submit a pull request.
- Use the git-flow branching model: create a new branch from the
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