Nexus Accounts
Nexus Account is an API which can be used to perform different accounting tasks such as creating Journal, Ledger, Trial Balance, Profit & Loss Account and Balance Sheet. It is also useful to create Flexible Budget or an Inventory.
Prerequisites
To work with the api you must have to install the following:
- NodeJS - Node.js® is a JavaScript runtime built on Chrome’s V8 JavaScript engine.
- MongoDB Server - NoSql Database and server
- Postman - API development environment
Installation
Before doing anything you have to clone or download(and unzip) the project folder, open terminal and navigate to the project folder and run:
npm install
This will install all the dependencies required by the project.
Getting Started
To start using this API, start your local database server, open terminal and navigate to the project folder and run:
npm run start
If an error occur, check your database server or check if you have installed the prerequisites correctly.
If there was no error, open Postman and create and send a new get request to:
http://localhost:3000/
Expected Output:
{
message: "Welcome!"
}
Firstly, you have to create a new user for working with the API.
Send a post request to:
http://localhost:3000/user/register
Along with ‘id’ and ‘password’ field in the ‘x-www-form-urlencoded’ option for the body of the request in postman:
id | demouserid |
password | demo |
Expected Output:
{
"success": "User registered and Logged In!"
}
Once you get this message, you are ready to work with the api.
Routes
Url for all these routes is http://localhost:3000
and parameters for POST request are sent through ‘x-www-form-urlencoded’ method.
User Routes
URL | Parameters | Method | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
/user/register</th> |
|
POST | Register a user | </tr>||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
/user/login</th> |
|
POST | Login a user | </tr>||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
/user/logout</th> |
POST
|
Logout a user
|
</tr>
</table>
### Accounting Route
|