Welcome to the Intuit Developer's Time Tracking and Invoicing Java Sample App.
This sample app is meant to provide working examples of how to integrate your app with the Intuit Small Business ecosystem. Specifically, this sample application demonstrates the following:
- Implementing OAuth to connect an application to a customer's QuickBooks Online company.
- Syncing employee, customer, and service item data from the app's local database to the QuickBooks Online company.
- Using the QuickBooks Online SDK to create TimeActivity and Invoice objects in the QuickBooks Online company.
Please note that while these examples work, features not called out above are not intended to be taken and used in production business applications. In other words, this is not a seed project to be taken cart blanche and deployed to your production environment.
For example, certain concerns are not addressed at all in our samples (e.g. security, privacy, scalability). In our sample apps, we strive to strike a balance between clarity, maintainability, and performance where we can. However, clarity is ultimately the most important quality in a sample app.
Therefore there are certain instances where we might forgo a more complicated implementation (e.g. caching a frequently used value, robust error handling, more generic domain model structure) in favor of code that is easier to read. In that light, we welcome any feedback that makes our samples apps easier to learn from.
- Requirements
- First Use Instructions
- Running the code
- High Level Workflow
- Importing into IntelliJ IDEA & Eclipse
- Project Structure
- How To Guides
- Testing the code
- Reset the App
- Watch & Learn
- More Information
In order to successfully run this sample app you need a few things:
- Java 1.7
- A developer.intuit.com account
- An app on developer.intuit.com and the associated app token, consumer key, and consumer secret.
- QuickBooks Java SDK (already included in the
libs
folder)
- Clone the GitHub repo to your computer
- Fill in your
oauth.json
file values (app token, consumer key, consumer secret) by copying over from the keys section for your app.
Once the sample app code is on your computer, you can do the following steps to run the app:
- cd to the project directory
- Run the command:
./gradlew bootRun
(Mac OS) orgradlew.bat bootRun
(Windows) - Wait until the terminal output displays the READY message.
4. Open your browser and go to `http://localhost:9001/app/index.html`
If you happen to be behind an http proxy you will need to create a file called gradle.properties in the root of the project and follow instructions on this page for configuring gradle to use a proxy.
- Connect to a QuickBooks Online company.
- Setup—sync the following from the local database to the QuickBooks Online company.
- employees—so time can be recorded against a specific service,
- customers—so time can be recorded as billable to a specific customer,
- items—the list of billable services.
- Create and push approved time activity objects to QuickBooks Online company for payroll and billing purposes.
- Create and push invoice objects to QuickBooks Online company for billing purposes.
To edit the code you will need to open it in an IDE. Currently we support both IntelliJ IDEA and Eclipse.
- The project is maintained with IntelliJ IDEA and as such an .ipr file is checked into the GitHub repo.
- The Java code for integrating with the QuickBooks Online Accounting is located in the
src
directory.- For OAuth implementation see:
- For QBO V3 Java SDK usage see:
- The Java code for the rest of the application is located in the
src-general
directory - The HTML, CSS and JavaScript code for the web-based client are is located in the
public
directory
The following How-To guides related to implementation tasks necessary to produce a production-ready Intuit Partner Platform app (e.g. OAuth, OpenId, etc) are available:
The two types of tests in the project (and how to run them) are listed below.
- ./gradlew test
To run the Javascript Karma tests you must have NodeJs v0.10.28 or later (http://nodejs.org/) installed and have npm on the path.
- cd public
- npm test
This app uses a file-based HSQL database that is stored in the database folder in the root of the project. Deleting this folder will delete all data persisted in the database. The next time you start your app a clean database will be created with no data.
More detailed information for this sample app can be found here here.