This content originally appeared on DEV Community and was authored by TagorenathV
Overview of My Submission
Nowadays, SaaS platforms & IoT devices are gaining popularity in a variety of use-cases. I built a prototype for IoT based SaaS platform for aquaculture. Users can register to the platform, subscribe to a device and get Real-Time alerts and Dashboards on the fly. Importantly, Pay-as-you-use.
Though IoT use cases primarily focus on Timeseries collections, I tried to include random features as much as possible to experience different MongoDB features with this proto-type project.
Submission Category:
Prime Time
Link to Code
https://github.com/tagorenathv/iot-saas
Tool Stack Used
- All data stored in
MongoDB Atlas
-
Timeseries collection
for storing sensor_data with granularity and expireAfterSeconds defined -
Atlas Search
: Search Index on device collection for fields: title with analyzers & mapping defined for Autocompletition functianality - Text Index on device collection for fields: title and description for
Full-Text search
functionality, including spell corrections -
Scheduled-Triggers
for:- simulating data
- calculating aggregated sensor data values
- generating bills every month
-
Database-Triggers
on every aggregated-value to check alert condition and insert into alert collection if any - Used
Realm-Functions
for performing data manipulations present in MongoDB Atlas collections - Frontend made with React JS, ant.design UI library and used
Realm-Web-Client
SDK for calling Realm-Functions - Used Email/Password provider of
Realm-Authentication
for UI authentication - Applied
Realm-DataAccess Rules
for added layer of Authorization for each collection - Hosted react application on
Realm-Hosting
Demo
To Watch: Link-1 or Link-2
To Experience: iot-saas
Wana Try?
Please follow README file for setup details and also to understand how different MongoDB services are combined together to perform some action in this project
Take-Aways
My Take-Aways on MongoDB ecosystem after this project
- MongoDB ecosystem has evolved at its best, making developers life easy and bringing ideas into existance with matter of clicks! Importantly, no need to go for other services. One stop solution for all your usecases.
- Want Autocomplete feature? Use Atlas-Search. No more replicating data to Elasticsearch
- Want Timeseries feature? Use Timeseries collection. Utilize granularity and expireAfterSeconds for data archivals and performance enhacement Out-of-the-box. (P.S: Use Atlas cluster from v5.0 for Timeseries collections)
- Want Full-Text search feature? Create Text-Index on collection. No more replicating data to Elasticsearch
- Want Authentication? Use Realm-Authentication
- Want Authorization? Use Realm-Rules
- Want Event-Driven triggers both Scheduled & Database? - Use Realm-Triggers
- Want to access data Serverlessly without backend? Use Realm-Client SDKs or Enable HTTP Endpoints
- Want to host your application? Use Realm-Hosting
- and lot lot lot more out-of-the-box
What else could be better?
PS.: In my opinion
- Times I felt, documentation is misleading. Navigations could be more clear
- Folders uploading not available at Realm-Hosting UI. Need to create folders and upload files individually if needed. Would save time if this is available from UI
- At Realm-Deployment, it would be helpful to modify all json configuration files and deploy from UI itself. External & Github actions are quite helpful thought.
- Eagerly waiting for Flutter Realm-SDK GA. Can't wait to use two best things for a project 🔥🔥🔥
Additional Resources / Info
- React UI library - ant.design
- MongoDB Atlas
- Realm-Functions
- Realm-Triggers
- Realm-Web Client SDK
- Realm-Rules
- Realm-Authentication
- Realm-Hosting
- Realm Github CI/CD
PS: Project is built and hosted with MongoDB ecosystem and ❤️
This content originally appeared on DEV Community and was authored by TagorenathV
TagorenathV | Sciencx (2022-01-11T12:41:56+00:00) IoT-SaaS: Web App using ReactJS, MongoDB Atlas & Realm. Retrieved from https://www.scien.cx/2022/01/11/iot-saas-web-app-using-reactjs-mongodb-atlas-realm/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.