Nimbella — Stateful Serverless App with Angular + Node + MongoDB — #DeveloperIPL

Our Team “Drafters” recently participated for a Exciting Hack-a-thon named “DeveloperIPL” on Hacker-earth Platform, and theme for it was Social Good.

(IPL: Indian Premier League is a professional Twenty20 cricket league in India)

[UPDATE] much awaited moment … We won second prize

About DeveloperIPL : It was perfect competition for us to build and explore more on Serverless Platform. Oover time as we were working on turning Idea to App, right from planning to implementation and finding out Which Technology will be best fit for solution, as Nimbella Supported almost every technology. As many participants were new to platform, for which Nimbella team organized various workshops right from How to Start building ?, How to use different features available ?, which was a great learning experience for us.

Also Whenever we used to face difficulty while implementing something, Nimbella Team was available on Slack Platform, and was easy to reach and get help, whenever doubts we had . We would love to participate again, in next season of DeveloperIPL and would encourage all the readers to try the Nimbella Platform (Serverless is the Future if you are from Tech.) and this is Free to Explore and I am sure will be Great Learning Experience for you as well.

About Nimbella :

Nimbella is a Serverless Cloud Platform [ Serverless means, developer does not have to manage any resources required for your app/workload like hosting, compute instance, database or storage, *nimbella’s re-serve everything for you in their underlying system], which allows developer to focus on code — build app and deploy/host within seconds.

:-) No need to stop and restart instance -> its serverless

This makes everything quick, easy and saves your time.

Get Started with Nimbella :

Learn More About Nimbella Platform :

Nimbella Supports Application Runtimes built with Technologies like :

.Net , Go , Java , JavaScript, PHP , Python + AI/ML (including packages for Tensorflow and PyTorch), Ruby, Swift

About Our Project : FoodTracker App

A week before competition, one of our team member, came across a news about food corruption [Under name of Free Food] and scarcity during pandemic that is still happening now, this idea of her, striked us, that we need to give a try on finding a working solution for.

In this Application, we have implemented a functionality, for Local Stores/Shops, who can maintain & track records of order/transactions of food items distributed to each Beneficiary/Customer.

And Shops in every region/area of country will be controlled by Govt/Agencies, who can calculate the consumptions in any regions with Application for particular time-period, this will help in stocking up of food in for any unforeseen scenarios.

Also We hear in news about Food Corruption, in which Beneficiary receives poor quality of food, on other side Good Quality Food is exported to somewhere else, With Review Functionality it will be easy to track and stop this bad practices.

FoodTracker Working Solution

Technologies used in Project:

  1. Front-End : Angular 8
  2. Back-End : Node JS
  3. Database : MongoDB (Document Store)
  4. Database : Redis (Key-Value Store) Provided By Nimbella
  5. Storage : Google Cloud Based Object Storage Provided By Nimbella

Tools used:

  1. Postman : API Testing
  2. Github : Repository + CI/CD
  3. STS/VSCode : Development

Git Repository of Project:

Development Phase :

  1. Initilly we read about Nimbella Serverless Platform, How it is built ? How the Project structure need to maintain ? and referred Sample Examples available on Git.
  2. We developed the backend part first with some functio developed with API NODE-JS and some with JAVA functions
  3. Database we used Redis (Provided by Nimbella) to store Stock Count Stats , User Details and other side We used MongoDB for storing Beneficiary Tranasactions
  4. To Store Images uploaded by Beneficiary as part of “Food Review” we used Object Storage (Provided by Nimbella) — its a Google Cloud Storage
  5. We deployed the BackEnd API on Nimbella and started with testing using POSTMAN
  6. After completion, we proceed with Front-End Development built with ANGULAR
  7. To Simplify the Development and Deployment Process, we configured CI/CD on Github (Actions)

Refer for Integration of Postman (Nimbella Provides a Plugin for same to Create Serverless API)

And That’s so easy building Serverless Application on Nimbella.

We would continue to build and try different stuff on Nimbella. :-)

Demo Implementation Steps:

  1. We Created Account on Nimbella:
  2. First thing was to understand the Nimbella Project Structure :
  • Backend Code/Functions will be grouped as Package’s inside “packages” directory
  • Front End UI generated static file will be inside “web” folder

3. Download Nimbella CLI :

  • Enter Below Cmd in CLI [Token will be available After you login to Nimbella]

nim auth login [token]

  • Verify Nimbella Installation & Login

nim info

nim auth list

  • For Any Help About Command or Required Parameter

nim — — help

4. Download Any Sample Nimbella Project :

5. Go To Directory Where Downloaded Sample Project Folder is Present

  • Deploy the Sample Project

nim project deploy [project/folder-name]

Woww! We Succesfully Deployed Project to Nimbella

Understanding Nimbella — Serverless Concepts

  1. In serverless, or think in our app every operation can be developed as a separate function/code and this Individual Function in Nimbella is called “ACTION”
  2. To Invoke this Action we get REST API Endpoint/URL, to which we either pass some payload/param [during POST] call or we expect some response in both [POST/GET] call.
  • Let’s check in our last deployed project what were the Actions

nim action list

  • Nimbella will generate URL for each action as per project package/folder structure linked to our account namespace

nim action get [action-name-from-list] — — url

  • Now Invoke this URL from Postman / Browser (Check what is required payload/parameter if any)

Fun Reading References :

  1. Postman — Nimbella Serverless API :
  2. How Serverless = Stateful ? :

#nimbella #postman #developeripl #hackerearth #serverless

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store