This project was created during a code challenge, when I was asked to implement a system that reads some information from an external api (xero) and let Vendors and Accounts list available for download.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
What things you need to install the software and how to install them
Node.js (version 8.11)
Create a free Xero developer account (xero.com) and load it with their sample data/create a sample company.
First and foremost, clone this repository into your local environment
git clone git@github.com:xumes/beanworks-accounts-payable.git
And then, install the dependencies
cd beanworks-accounts-payable
npm install
You can replace the Xero credentials using yours at:
/config/config.json
Make sure you have created a public application, and just replace the consumerKey and consumerSecret values.
The application is ready for use. You can run the tests or skip for the next section.
The application follows the JavaScript Standard Style: You can validate it running:
npm test
In order to run the application locally, trigger the script dev. It will run in parallel the scripts server (backend) and client (frontend)
npm run dev
The application runs on localhost port 3000:
http://localhost:3000
The landpage welcomes and invites you to connect to the Xero account and give access to the application.
Next, the application is redirected to the Xero website and asks for your credentials (must be the same where you created the public application described on the prerequisites on this README)
After insert your credentials and click on Login, select the organisation (It is recommended to use the Demo Company).
You will see the Taking you back to screen, hold on for a moment.
The Home Page application is loaded. A few information about the Demo Company is displayed for reference, like its address, phone number and a few finance information.
The two cards displayed at the bottom directs you to the subject area where yu can see or download the information: Vendors or Accounts
By clicking on Vendors the following page is displayed:
By clicking on Accounts the following page is displayed:
On both pages, clicking on Download button the excel file is generated:
The application is production ready. In order to start the deployment process, run the beforeInstall process and the minified bundle is created:
npm run beforeInstall
Check the result on '/dist' folder
- Node.js - The web framework used on Backend
- React - The web framework used on Frontend
- Redux - Used for state controlling
- Redux Promise - Used to work with async flow on Redux
- Xero - Used to integrate the app with Xero
- Reginaldo Marcelo dos Santos - developer