Mule SplitBill App - mulesoft-hackathon-2021
Mule SplitBill App is a project for MuleSoft Hackathon 2021 Submission
Inspiration
I often go out with friends for trips whether it's short or long. Usually we end up paying in a trip and sharing the money becomes very challenging. Therefore I created this app to help make bill sharing easier and better.
What it does
Users can add a bill and add friends to the bills and split the amount among each other. It allows users to pay in currencies as well as crypto currencies. Real time conversion rates are fetched and it gives a seamless experience to pay and share bills. There's also a AWS Rekognition based bill identfication service.
How we built it
The whole project was built keeping API Led Connectivity in mind. Design First approach was followed with proper RAML based modeling. From implementation perspective, out of the box API connectors were used for the overall orchestration of the APIs. The APIs are available in exchange : https://anypoint.mulesoft.com/exchange/portals/self-1874/
Services/APIs used:
- AWS Rekognition
- AWS S3
- AWS Lambda
- Coinbase APIs
- Mongo DB Atlas
System APIS -
Accounts System API This API is an interface to perform CRUD operation related to account creation and search operations. It interfaces with Mongo DB but can be extended to any data storage like AWS DynamoDB, MySQL, Oracle etc.
Implementation Flows:
- Create Account

- Search Account

- Create Account
Bills System API This API is an interface to perform CRUD operation related to bills. It interfaces with Mongo DB but can be extended to any data storage like AWS DynamoDB, MySQL, Oracle etc. This allows to create bills and transactions against a bill.
Implementation Flows:
- Create Bill

- Create Transaction for a Bill

- Fetch a Bill

- Update a Bill

- Create Bill
AWS System API This API is an interface to interact with AWS resources. For the use case developed, this API allows to save images to S3 and generate shareable URLs. It also calls an AWS Lambda to extract text from Bills.
Implementation Flows:
- Upload Image to S3

- Delete Image from S3

- Call AWS Rekognition Lambda

- Upload Image to S3
Process APIS -
- Split Bill Process API
This API performs the orchestration and business logic to allow adding bills and share among users based on split ratio. It also contains logic to allow users to pay in multiple currencies like USD, INR and BTC.
#### For implementation system API connectors has been used as below:

#### Implementation Flows:
- Create Split Bills

- Get Bill with its transactions

- Pay Bill

Experience APIS -
- Split Bill Experience API
This API is the experience api used by angular frontend application. It has interfaces to login, register and search users which talks to Account system API.
It also allows users to upload bill images which interfaces with AWS System API.
Users can also create bills and share among friends or other users using this API.
The conversion rates from Bitcoin to INR or USD is fetched real-time using coinbase APIs.
#### For implementation process and system API connectors has been used as below:

#### Implementation Flows:
- Convert Curency

- Register user using JCE enryption

- Login user using JCE enryption

- Upload multipart image

- Pay Bill

Architecture Diagram

Challenges we ran into
Initial thought process to bring all the orchestration together was a challenge. Also, since I started late with the hackathon, completing it within the deadline was a major issue. I had more ideas related to Machine Learning use cases which I wanted to implement but couldn't do because of the time constraint. AWS Rekognition was a new service and I wanted to try AWS Lambda integration with MuleSoft. It took some trials but was finally able to get it working.
Accomplishments that we're proud of
Completing a working prototype within short span was a major accomplishment for me. Creating the APIs and frontend application which works as expected was a delight.
What we learned
This project helped me make something that I plan to use in my actual life whenever I go on a trip with friends. I deep dived into MuleSoft's API Led concepts. Created a working model of those learnings. Yet again amazed by the enromous set of connectors and versatility in connecting various systems. Additionally it also enhanced my frontend skill. Also made AWS Lambda using Python which was a learning in itself.
What's next for MuleSoft Split Bill App
I wish to create a mobile app which will have another experience api. Also, I had plans on implementing Text analysis to upload bills which is partially done with AWS Lambda based python app and automate the whole process of splitting and send payment reminders.

Log in or sign up for Devpost to join the conversation.