... | @@ -13,7 +13,8 @@ The client side application is developed using React Native, enabling cross-plat |
... | @@ -13,7 +13,8 @@ The client side application is developed using React Native, enabling cross-plat |
|
- Real time reminders, expense visualization, and calorie tracking
|
|
- Real time reminders, expense visualization, and calorie tracking
|
|
- AI powered recipe suggestions based on available inventory
|
|
- AI powered recipe suggestions based on available inventory
|
|
The mobile app communicates with the backend over HTTPS, using JSON formatted data via RESTful API calls to ensure secure and standardized information exchange
|
|
The mobile app communicates with the backend over HTTPS, using JSON formatted data via RESTful API calls to ensure secure and standardized information exchange
|
|
Application Layer (Backend Server – Node.js/Express)
|
|
|
|
|
|
**Application Layer (Backend Server – Node.js/Express)**
|
|
The backend is built with Node.js and Express, exposing a set of REST API endpoints for core functionalities:
|
|
The backend is built with Node.js and Express, exposing a set of REST API endpoints for core functionalities:
|
|
- /users: Handles user registration, login, and password reset
|
|
- /users: Handles user registration, login, and password reset
|
|
- /group: Manages group creation, joining, leaving, and ownership transfer
|
|
- /group: Manages group creation, joining, leaving, and ownership transfer
|
... | @@ -22,15 +23,18 @@ These endpoints follow RESTful principles to ensure modularity and ease of integ |
... | @@ -22,15 +23,18 @@ These endpoints follow RESTful principles to ensure modularity and ease of integ |
|
- Email based password verification using Nodemailer
|
|
- Email based password verification using Nodemailer
|
|
- Intelligent recipe requests to an external AI service
|
|
- Intelligent recipe requests to an external AI service
|
|
- Calorie and BMI computations for personalized health tracking
|
|
- Calorie and BMI computations for personalized health tracking
|
|
Data Layer (Database – MongoDB via Mongoose)
|
|
-
|
|
|
|
**Data Layer (Database – MongoDB via Mongoose)**
|
|
Persistent data storage is handled by MongoDB, with Mongoose used for schema validation and object modeling.
|
|
Persistent data storage is handled by MongoDB, with Mongoose used for schema validation and object modeling.
|
|
The database structure supports the following collections:
|
|
The database structure supports the following collections:
|
|
- Users: Stores account credentials, BMI data, and user preferences
|
|
- Users: Stores account credentials, BMI data, and user preferences
|
|
- Groups: Records group metadata and member associations
|
|
- Groups: Records group metadata and member associations
|
|
- Items: Contains inventory items with attributes like expiry, price, and calorie value
|
|
- Items: Contains inventory items with attributes like expiry, price, and calorie value
|
|
- Logs: Tracks food consumption history and financial records
|
|
- Logs: Tracks food consumption history and financial records
|
|
|
|
|
|
This flexible schema supports efficient querying and easy schema evolution, enabling real time group synchronization and historical data analytics.
|
|
This flexible schema supports efficient querying and easy schema evolution, enabling real time group synchronization and historical data analytics.
|
|
External Services
|
|
|
|
|
|
**External Services **
|
|
To extend core functionality, the system integrates with two external services:
|
|
To extend core functionality, the system integrates with two external services:
|
|
- Gmail SMTP (via Nodemailer): Used for sending 6 digit verification codes during password reset workflows, enhancing account security
|
|
- Gmail SMTP (via Nodemailer): Used for sending 6 digit verification codes during password reset workflows, enhancing account security
|
|
- Spoonacular API: Provides personalized recipe suggestions by analyzing the user’s inventory and dietary preferences
|
|
- Spoonacular API: Provides personalized recipe suggestions by analyzing the user’s inventory and dietary preferences
|
... | @@ -40,7 +44,7 @@ To extend core functionality, the system integrates with two external services: |
... | @@ -40,7 +44,7 @@ To extend core functionality, the system integrates with two external services: |
|
| ------ | ------ |
|
|
| ------ | ------ |
|
|
| Secure authentication | HTTPS, JWT tokens, and email verification via SMTP |
|
|
| Secure authentication | HTTPS, JWT tokens, and email verification via SMTP |
|
|
| Group collaboration | Shared MongoDB group model with role based access and synchronized REST API endpoints |
|
|
| Group collaboration | Shared MongoDB group model with role based access and synchronized REST API endpoints |
|
|
| Expiry and usage alerts | | Backend tracks expiry dates; frontend displays dynamic notifications |
|
|
| Expiry and usage alerts | Backend tracks expiry dates; frontend displays dynamic notifications |
|
|
| Expense tracking | MongoDB logging combined with client side charting features |
|
|
| Expense tracking | MongoDB logging combined with client side charting features |
|
|
| AI powered recipes | Backend connects to Spoonacular API to generate intelligent suggestions |
|
|
| AI powered recipes | Backend connects to Spoonacular API to generate intelligent suggestions |
|
|
| Cross platform compatibility | React Native ensures compatibility with both iOS and Android devices |
|
|
| Cross platform compatibility | React Native ensures compatibility with both iOS and Android devices |
|
... | | ... | |