Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Byte me Byte me
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 5
    • Issues 5
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Terraform modules
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • JuvrajSingh.-
  • Byte meByte me
  • Wiki
  • Deliverable 3
  • System Architecture

System Architecture · Changes

Page history
Update System Architecture authored Apr 12, 2025 by Wenjun.Chen's avatar Wenjun.Chen
Hide whitespace changes
Inline Side-by-side
Deliverable-3/System-Architecture.md
View page @ dece06b6
...@@ -6,31 +6,35 @@ https://drive.google.com/file/d/1CvoqH_p84jSwCTQ2__f6gZt2DyL88udK/view?usp=shari ...@@ -6,31 +6,35 @@ https://drive.google.com/file/d/1CvoqH_p84jSwCTQ2__f6gZt2DyL88udK/view?usp=shari
**System Architecture Discussion** **System Architecture Discussion**
The Smart Grocery Management Mobile App is built on a modular, scalable architecture comprising four key layers:** Presentation (Client Devices), Application (Backend Server), Data (Database), and External Services**. This layered structure ensures a clear separation of concerns, facilitates maintainability, and provides robust support for collaborative, intelligent grocery management functionalities. The Smart Grocery Management Mobile App is built on a modular, scalable architecture comprising four key layers:** Presentation (Client Devices), Application (Backend Server), Data (Database), and External Services**. This layered structure ensures a clear separation of concerns, facilitates maintainability, and provides robust support for collaborative, intelligent grocery management functionalities.
Presentation Layer (Client Devices – Mobile App) Presentation Layer (Client Devices – Mobile App)
The client side application is developed using React Native, enabling cross-platform deployment on both Android and iOS through Expo Go. Core functionalities offered to users include: The client side application is developed using React Native, enabling cross-platform deployment on both Android and iOS through Expo Go. Core functionalities offered to users include:
- Secure user login and registration - Secure user login and registration
- Grocery inventory management - Grocery inventory management
- Group based data sharing and collaboration - Group based data sharing and collaboration
- 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
- /items: Supports adding, updating, and deleting inventory items - /items: Supports adding, updating, and deleting inventory items
These endpoints follow RESTful principles to ensure modularity and ease of integration. Beyond routing, the backend also implements essential business logic such as: These endpoints follow RESTful principles to ensure modularity and ease of integration. Beyond routing, the backend also implements essential business logic such as:
- 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.
External Services This flexible schema supports efficient querying and easy schema evolution, enabling real time group synchronization and historical data analytics.
**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 |
......
Clone repository
  • Deliverable 2
    • Requirements Statement
    • UML Class Model
    • Use Case Descriptions and Scenarios
    • Use Case Model
  • Deliverable 3
    • Final Document
      • Challenges and How We Solved Them
      • Key summary of all participants
      • Video Link
    • System Architecture
    • Updated Class diagram
    • Updated Use case Diagram
  • Functional Properties
  • Participation Journal
View All Pages