Quickstart Guide
Learn how to integrate OpenLedger into your application to provide embedded accounting features
Open Ledger React Library
Open Ledger React is a comprehensive library for building financial dashboards and managing accounting data. It provides a set of React components and hooks for easy integration into your application.
Installation
npm install @openledger/accounting-reactSetting up the Provider
import { OpenLedgerProvider } from "@openledger/accounting-react";
function App() {
return (
<OpenLedgerProvider
companyId="your-company-id"
enterpriseId="your-enterprise-id"
enterpriseSecret="your-enterprise-secret"
environment="development"
theme={yourThemeObject}
apiUrl={"your-api-url"}
>
{/* Your app components */}
</OpenLedgerProvider>
);
}Warning: Without valid keys (companyId, enterpriseId, and enterpriseSecret), the package will throw errors. If you need to obtain these keys or have any issues, please reach out to the Open Ledger team at info@openledger.com for assistance.
Main Exports
- OpenLedgerProvider: The main provider component that wraps your application
- useOpenLedgerContext: A hook to access the OpenLedger context
- useTransactionContext: A hook to access transaction-related data
- useAccountContext: A hook to access account-related data
- TransactionTable: A component to display transaction data
- Dashboard: A pre-built dashboard view component
- OpenLedgerView: A comprehensive view component
- TransactionsView: A component for displaying transactions
Usage Examples
import {
OpenLedgerView,
TransactionTable,
DashboardBox,
} from "@openledger/accounting-react";
function MyComponent() {
return (
<div>
<OpenLedgerView />
<DashboardBox>{/* Custom widget content */}</DashboardBox>
</div>
);
}Features
Core Functionality
- Comprehensive financial dashboard
- Transaction management
- Account management
- Customizable theming
Reports
- Profit and Loss reporting
- Balance Sheet reporting
- Cash Flow Statement
- AI-powered financial reports
Integrations
- Plaid integration for bank accounts
- Export to CSV/Excel
- API integration
- Webhook support
Accounting Principles
Open Ledger follows standard double-entry bookkeeping principles for all financial transactions:
Core Accounting Rules
- Double-Entry System: Every transaction affects at least two accounts.
- Balancing Principle: For every transaction, total debits must equal total credits.
- Account Behaviors:
- Assets and Expenses INCREASE with DEBITS and DECREASE with CREDITS
- Liabilities, Equity, and Revenue INCREASE with CREDITS and DECREASE with DEBITS
Need help getting started?
Contact our support team for assistance