Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| report:conc [2026/06/13 18:07] – [9.3 Future Development] team1 | report:conc [2026/06/14 14:55] (current) – [8.2.2 Back-end] team1 | ||
|---|---|---|---|
| Line 22: | Line 22: | ||
| * Liven, a mental health application designed to increase in the user's relaxation and levels of serenity. | * Liven, a mental health application designed to increase in the user's relaxation and levels of serenity. | ||
| + | == 8.2.1.1 Comparative analysis == | ||
| + | The team originally planned to write this app using Ionic Vue, but that idea quickly changed and instead the developer made the front-end using Flutter. Figure {{ref> | ||
| - | == 8.2.1.1 UI == | + | <WRAP center round box 100%> |
| + | < | ||
| + | <table comparative_analysis_frontend> | ||
| + | < | ||
| + | < | ||
| + | |||
| + | ^ Category ^ Flutter ^ Ionic Vue ^ Reason for choosing Flutter ^ | ||
| + | | Framework type | Native cross-platform framework | Hybrid framework (WebView-based) | Flutter provides better performance and a more native app experience | | ||
| + | | Performance | Compiled to native code | Runs inside a WebView | Flutter offers smoother UI and better performance for real-time updates | | ||
| + | | UI rendering | Own rendering engine (Skia) | HTML/CSS inside WebView | Flutter ensures consistent UI across Android and iOS | | ||
| + | | Real-time sensor updates | Efficient UI rebuilding for frequent updates | Can lag with frequent DOM updates | Flutter handles continuous sensor streaming more efficiently | | ||
| + | | Device integration | Strong plugin ecosystem for hardware features | Depends heavily on plugins and WebView bridges | Flutter simplifies access to device features needed for IoT monitoring | | ||
| + | | Development focus | Mobile-first framework | Web-first framework adapted for mobile apps | Flutter is better suited for performance-critical mobile applications | | ||
| + | |||
| + | </ | ||
| + | </ | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | |||
| + | == 8.2.1.2 UI == | ||
| The wireframe was made with high-fidelity in mind, meaning it had its own housestyle before the final decision on housestyle for the eventual application. Because of this, the final product looks a bit different from what was shown during user testing. However, the main concepts stayed the same, being the colors, positioning of elements and edge design. | The wireframe was made with high-fidelity in mind, meaning it had its own housestyle before the final decision on housestyle for the eventual application. Because of this, the final product looks a bit different from what was shown during user testing. However, the main concepts stayed the same, being the colors, positioning of elements and edge design. | ||
| Line 46: | Line 68: | ||
| Secondly, the settings icon isn't displayed anymore in the top right corner of the application. This can also be seen on figure {{ref> | Secondly, the settings icon isn't displayed anymore in the top right corner of the application. This can also be seen on figure {{ref> | ||
| - | == 8.2.1.2 Logics == | + | == 8.2.1.3 Logics == |
| The original idea was for this application to be written in Ionic Vue JavaScript, but due to its taxing amount of energy on smaller devices that idea was quickly scrapped. The app is thus written in Flutter. | The original idea was for this application to be written in Ionic Vue JavaScript, but due to its taxing amount of energy on smaller devices that idea was quickly scrapped. The app is thus written in Flutter. | ||
| Line 113: | Line 135: | ||
| } | } | ||
| </ | </ | ||
| + | |||
| + | === 8.2.2 Back-end === | ||
| + | The back-end is not written by the developer. Instead, the team uses Supabase, a cloud-based back-end solution which offers tools to handle database entries, policies and authentication. | ||
| + | |||
| + | == 8.2.2.1 Comparative analysis == | ||
| + | Figure {{ref> | ||
| + | |||
| + | <WRAP center round box 100%> | ||
| + | < | ||
| + | <table comparative_analysis_backend> | ||
| + | < | ||
| + | < | ||
| + | |||
| + | ^ Category ^ Supabase ^ Custom back-end ^ Reason for choosing Supabase ^ | ||
| + | | Development time | Ready-to-use backend platform | Requires full server development | Supabase significantly reduces development time | | ||
| + | | Hosting | Fully managed cloud hosting | Requires manual hosting setup | No need to manage servers or deployment infrastructure | | ||
| + | | Database management | Built-in PostgreSQL with dashboard tools | Requires manual database setup and maintenance | Easier database handling and configuration | | ||
| + | | Real-time features | Built-in real-time subscriptions | Requires WebSockets or polling implementation | Simplifies live sensor data updates | | ||
| + | | Authentication | Built-in authentication system | Must be implemented from scratch | Faster and more secure authentication setup | | ||
| + | | Ease of use | Provides dashboards, APIs, and tools | Requires custom implementation of all features | Easier overall backend workflow | | ||
| + | | Maintenance | Managed by Supabase | Fully maintained by developer/ | ||
| + | | Scalability | Automatically scalable cloud infrastructure | Depends on custom server design | More reliable scaling without extra effort | | ||
| + | |||
| + | </ | ||
| + | </ | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | == 8.2.2.2 Supabase tools == | ||
| + | As mentioned before, Supabase offers various tools to make it easier to develop a product, allowing for greater focus on the front-end. One of these tools is built-in authentication logic with integration of third party account systems such as Google and Facebook. This form of authentication is encrypted, putting user data security as a top priority [(supabase2026auth)]. | ||
| + | |||
| + | Secondly, using Supabase means the team doesn' | ||
| + | |||
| + | Thirdly, Supabase allows for realtime table changes to be read from the front-end. This makes is very simple to display the live sensor data from the plant pot to the application. This functionality is called Supabase Realtime [(supabase2026realtime)]. | ||
| + | |||
| + | == 8.2.2.3 Push notifications using Firebase Cloud Messaging == | ||
| + | |||
| + | Push notifications are implemented by combining Supabase as the backend system with Firebase Cloud Messaging (FCM) as the delivery service. Supabase itself does not directly send push notifications to mobile devices. Instead, it is used to detect when a notification should be triggered, while FCM is responsible for delivering the notification to the user’s device. | ||
| + | |||
| + | In this architecture, | ||
| + | |||
| + | Once a critical condition is detected, Supabase executes a server-side action that prepares a notification payload. This payload usually includes information such as the type of alert, sensor ID, timestamp, and severity level. Supabase then sends a request to Firebase Cloud Messaging using a secure server-to-server API call. | ||
| + | |||
| + | Firebase Cloud Messaging acts as the messaging intermediary between the backend and the mobile application. It receives the notification request from Supabase and routes it to the correct device using a unique device token stored in the Supabase database. The device token is generated when the Flutter application first registers the user’s device with FCM and is linked to the user account in Supabase. | ||
| + | |||
| + | FCM is capable of delivering notifications even when the application is closed or running in the background, as it operates at the operating system level. This ensures that critical sensor alerts are reliably delivered regardless of the application state. When the user receives the notification, | ||
| + | |||
| + | This approach separates responsibilities clearly: Supabase manages data storage, real-time evaluation, and trigger logic, while Firebase Cloud Messaging handles cross-platform notification delivery. | ||
| + | === 8.3 Flow charts === | ||
| + | Using flow charts, the developer displays how the product flow goes for various functions. The functions are the ones listed below. | ||
| + | |||
| + | * Starting a focus session. | ||
| + | * Manual watering of the plant. | ||
| + | * Automated watering of the plant. | ||
| + | * Switching the plant pot mode between manual and automated. | ||
| + | * Reading data from the plant pot's sensors. | ||
| + | * Sending a notification when the data read hits the danger zone. | ||
| + | * Making a post for the garden. | ||
| + | |||
| + | Figure {{ref> | ||
| + | |||
| + | <WRAP centeralign> | ||
| + | <figure fig: | ||
| + | {{ : | ||
| + | < | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | Figure {{ref> | ||
| + | |||
| + | <WRAP centeralign> | ||
| + | <figure fig: | ||
| + | {{ : | ||
| + | < | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | Figure {{ref> | ||
| + | <WRAP centeralign> | ||
| + | <figure fig: | ||
| + | {{ : | ||
| + | < | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | Figure {{ref> | ||
| + | |||
| + | <WRAP centeralign> | ||
| + | <figure fig: | ||
| + | {{ : | ||
| + | < | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | Figure {{ref> | ||
| + | |||
| + | <WRAP centeralign> | ||
| + | <figure fig: | ||
| + | {{ : | ||
| + | < | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | Figure {{ref> | ||
| + | |||
| + | <WRAP centeralign> | ||
| + | <figure fig: | ||
| + | {{ : | ||
| + | < | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | Figure {{ref> | ||
| + | |||
| + | <WRAP centeralign> | ||
| + | <figure fig: | ||
| + | {{ : | ||
| + | < | ||
| + | </ | ||
| + | </ | ||
| + | |||
| ===== 9. Conclusions ===== | ===== 9. Conclusions ===== | ||