@accelbooks-react/accelbooks-react
v1.0.19
Published
AccelBooks 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.
Downloads
162
Readme
AccelBooks React Library
AccelBooks 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 @accelbooks-react/accelbooks-react
Usage
To use the AccelBooks React library, you need to wrap your application with the AccelProvider
and then use the exported components and hooks.
Setting up the Provider
import { AccelProvider } from "@accelbooks-react/accelbooks-react";
function App() {
return (
<AccelProvider
companyId="your-company-id"
enterpriseId="your-enterprise-id"
enterpriseSecret="your-enterprise-secret"
environment="development"
theme={yourThemeObject}
apiUrl={"your-api-url"}
>
{/* Your app components */}
</AccelProvider>
);
}
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 AccelBooks team at [email protected] for assistance.
Main Exports
AccelProvider
: The main provider component that wraps your application.useAccelContext
: A hook to access the Accel context within your components.useTransactionContext
: A hook to access transaction-related data and functions.useAccountContext
: A hook to access account-related data and functions.TransactionTable
: A component to display transaction data in a table format.Dashboard
: A pre-built dashboard view component.AccelView
: A comprehensive view component that includes various financial views.TransactionsView
: A component for displaying and managing transactions.SettingsView
: A component for managing application settings.ReportView
: A component for generating and displaying financial reports.
Using Components
import {
AccelView,
TransactionTable,
DashboardBox,
} from "@accelbooks-react/accelbooks-react";
function MyComponent() {
return (
<div>
<AccelView />
{/* Custom widget content */}
</DashboardBox>
</div>
);
}
Using Hooks
import {
useAccelContext,
useTransactionContext,
useAccountContext,
} from "@accelbooks-react/accelbooks-react";
function MyCustomComponent() {
const { auth, companyId, theme } = useAccelContext();
const { transactions } = useTransactionContext();
const { accounts } = useAccountContext();
// Use the data in your component
}
Features
- Comprehensive financial dashboard
- Transaction management
- Account management
- Profit and Loss reporting
- Balance Sheet reporting
- Cash Flow Statement
- AI-powered financial reports
- Plaid integration for bank account connections
- Customizable theming
Configuration
The AccelProvider
accepts the following props:
companyId
: Your company's unique identifierenterpriseId
: Your enterprise ID for authenticationenterpriseSecret
: Your enterprise secret for authenticationaccessToken
: (Optional) An access token if you're not using enterpriseId/secretenvironment
: The environment to use ('development' or 'production')theme
: A theme object to customize the appearanceapiUrl
: The URL of your API (required)
Contributing
Please read our contributing guidelines before submitting pull requests.
License
This project is licensed under the MIT License.