Skip to content

anitalves08/UniGreen-Mobile-App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

181 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UniGreen Development Report

Welcome to the documentation pages of UniGreen!

This Software Development Report, tailored for LEIC-ES-2024-25, provides comprehensive details about UniGreen, from high-level vision to low-level implementation decisions. It’s organised by the following activities.

Contributions are expected to be made exclusively by the initial team, but we may open them to the community, after the course, in all areas and topics: requirements, technologies, development, experimentation, testing, etc.

Please contact us!

Thank you!


Business Modelling

Business modeling in software development involves defining the product's vision, understanding market needs, aligning features with user expectations, and setting the groundwork for strategic planning and execution.

Product Vision

Empowering college students to track their carbon footprint and adopt a sustainable lifestyle through engaging weekly quizzes, personalized tips, and a dynamic reward system that unlocks incentives based on real-world environmental events, making sustainability both fun and impactful.

Features and Assumptions

High-Level Features

  • Automatic Movement Detection & Transportation Reminder: The app detects when the user is moving and sends a notification asking if they are traveling and by which mode of transport. This feature is meant to remind users to log their transportation in the app for carbon footprint tracking.

  • Carbon Footprint Tracking: The app calculates the user’s carbon footprint based on the transportation methods they log.

  • Daily Sustainability Quiz: Users receive a daily quiz with sustainability-related questions to increase awareness. Notifications remind users to complete the quiz.

  • Sustainable Events and Registration: Users can browse and register for events such as beach cleanups, tree planting, and eco-friendly workshops.

  • Points and Rewards System: Users earn points exclusively by participating in sustainable events. At the end of each three-month period, the user with the highest score receives a reward.

  • Ranking System: Users can compare their carbon footprint and event participation with others. The ranking system updates periodically based on the number of events attended.

Assumptions and Dependencies

  • The app relies on Firebase for backend services, including authentication, database management, and notifications.

  • Internet connectivity is required for event registration, ranking updates, and data synchronization.

  • Google Maps API is integrated for event location display and validation of user travel routes.

  • Google Activity Recognition API are used to detect movement and transportation modes.

  • Carbon Interface API is used to calculate the carbon footprint of transportation choices.

  • Event Verification System: Organizers may confirm attendance to prevent fraudulent point accumulation.

  • Users are expected to manually confirm their transportation mode for accurate tracking.

Elevator Pitch

Making eco-friendly choices can feel overwhelming—but what if it were fun and rewarding? Our app empowers college students to take control of their environmental impact in an engaging way!

  • Track your footprint with weekly quizzes that calculate your carbon emissions.
  • Get personalized tips to adopt greener habits effortlessly.
  • Earn rewards by participating in local environmental events.
  • Monitor progress in real-time with trip tracking and a dynamic ranking system.

We make sustainability measurable, interactive, and motivating. Ready to see it in action? Let’s schedule a demo!

User Stories

🟢 User Story 1: Account Registration

As a non-register user,
I want to create an account,
So that I can access the application's features and personalize my experience.

Mockup

alt text

Acceptance Tests

Given I am a non-registered user on the registration page,
When I fill in all required fields with valid information and submit the form,
Then my account should be created successfully,
AndI should be redirected to the main application screen.

Value and Effort:

  • Value (MoSCoW): Must-have
  • Effort (Fibonnacci): 2

🟢 User Story 2: Log In To Account

As a registered user,
I want to be able to log in securely to my account,
So that I can access my personalized data and features.

Mockup

alt text

Acceptance Tests

Given I am a registered user on the login page, When I enter my correct email and password and click the login button, Then I should be successfully logged in, And I should be redirected to the main application screen with my personalized data.

Value and Effort:

  • Value (MoSCoW): Must-have
  • Effort (Fibonnacci): 2

🟢 User Story 3: View Carbon Footprint

As a sustainable user,
I want to view my carbon footprint in home page,
So that I can track my environmental impact and make improvements.

Mockup

alt text

Acceptance Tests

Given that the user is authenticated and accesses the application's main page,
When the page is fully loaded,
Then the user's current carbon footprint should be displayed clearly in the main page.

Value and Effort:

  • Value (MoSCoW): Must-have
  • Effort (Fibonnacci): 5

🟢 User Story 4: Automatic Journey Detection & Carbon Footprint Calculation

As a user,
I want the application to automatically detect my travels and notify me,
So that I can confirm I can confirm journey details (distance, mode of transport) and calculate my carbon footprint.

Mockup

Mockup_User_Story4

Acceptance Tests

Given that the user is authenticated and has the journey detection feature enabled,
When the user completes a journey,
Then the application should automatically detect the journey, notify the user with the details (distance and mode of transport), and calculate the carbon footprint for that journey, allowing the user to confirm the details.

Value and Effort

  • Value (MoSCoW): Must-have
  • Effort (Fibonacci): 11

🟢 User Story 5: Log Daily Activities in the Format of Quizzes

As a user,
I want I want to log my daily activities through a simple quiz,
So that I can track their impact and help the app recalculate my carbon footprint more accurately.

Mock

Mockup_Quizzes

Acceptance Tests

Given that the user is authenticated and accesses the daily activity logging feature in the main page,
When the user starts the quiz to log their daily activities,
Then the user should be presented with a series of questions in a simple quiz format, allowing them to log their activities for the day.

Value and Effort

Value and Effort

  • Value (MoSCoW): Should-have
  • Effort (Fibonacci): 5

🟢 User Story 6: Sustainable Events

As a sustainable user from the University of Porto,
I want to discover sustainable events in the Porto region,
So that I can take meaningful actions to help the environment and reduce my carbon footprint.

Mockup

alt text

Acceptance Tests

Given that the user is in the Porto region,
When the user views sustainable events,
Then the application should display a list of upcoming events with details (date, location, description).

Value and Effort

  • Value (MoSCoW): Should-have
  • Effort (Fibonacci): 5

🟢 User Story 7: Compare with Other Users

As a user,
I want to see a leaderboard ranking users based on their carbon footprint,
So that I can compare my performance with others and improve my sustainable habits.

Mockup

alt text

Acceptance Tests

Given that the user is authenticated,
When the user accesses the leaderboard,
Then the application should display a ranking of users based on their carbon footprint and the user should be able to see their position relative to others.

Value and Effort

  • Value (MoSCoW): Should-have
  • Effort (Fibonacci): 5

🟢 User Story 8: Earn Rewards for Sustainability

As a user,
I want to earn points for participating in sustainable events,
So that I can redeem them for rewards like tickets to local events and stay motivated to engage in more sustainable initiatives.

Acceptance Tests

Given that the user participates in a sustainable event,
When the user completes the event,
Then the application should award the user points and the user should be able to view their total points and redeem them for rewards, such as tickets to local events.

Value and Effort

  • Value (MoSCoW): Should-have
  • Effort (Fibonacci): 8

🟢 User Story 9: Get Personalized Sustainability Tips

As a user,
I want receive personalized tips for living more sustainably,
So that I can make small, practical changes in my daily life to reduce my carbon footprint.

Acceptance Tests

Given that the user is authenticated and has provided relevant preferences,
When the user accesses the sustainability tips section,
Then the application should display personalized tips based on the user's preferences and activities and the user should be able to view and follow the suggestions to improve their sustainability habits.

Value and Effort

  • Value (MoSCoW): Could-have
  • Effort (Fibonacci): 4

Domain model

This diagram describes a system involving users, trips, rewards, events, and carbon footprint calculation.

Class Descriptions: Transportation (Car, Bus, Motorcycle): Used by users to make trips, directly impacting their carbon footprint.

User: Performs trips, answers quizzes, and participates in events and rewards, generating data like carbon footprint and leaderboard position.

Rewards: Awarded based on the user's activities, such as trips and events, updated every three months.

Events: Milestones the user can participate in, affecting rewards.

Quizzes: Daily questions whose answers influence the carbon footprint calculation and provide personalized tips.

Relationships: Trips affect the user's carbon footprint, which in turn determines their position on the leaderboard.

Rewards and events are updated periodically, and quizzes help personalize the tips provided to the user.

alt text

Architecture and Design

Logical architecture

The logical architecture of the UNI Green Application is structured into distinct logical packages, which together enable the efficient operation of the app. This diagram illustrates the high-level decomposition of the system, breaking it down into key logical packages without the need for specific allocation to components or machines.

At the core of the App package, the system is organized into three main logical packages: User Interface, App Logic, and Data Access.

The User Interface package is responsible for all user interactions within the application. It presents data to the user and collects user input. This package communicates with the App Logic to display dynamic information and updates based on the app’s functionality.

The App Logic package encapsulates the business logic of the application. It processes requests from the User Interface, applies the necessary business rules, and coordinates interactions with external systems. This layer is essential for decision-making and ensuring that the application behaves according to its design.

The Data Access package is responsible for interacting with the database and external systems to retrieve and store data. It connects to Firestore/Supabase for data persistence and Firebase Auth for user authentication, ensuring that user profiles and system events are properly managed and stored.

In addition to the core application components, the diagram also highlights interactions with External Systems, which are crucial for enriching the functionality of the application. These external systems include:

Geolocator: This system provides location-based services, allowing the app to track and display the user’s position, which is essential for event management and carbon footprint calculations.

Firestore/Supabase: This external system handles data storage and retrieval, ensuring that data is available to both the App Logic and User Interface layers.

Firebase Auth: This package provides user authentication services, ensuring secure login and profile management.

The separation of these packages reflects a clean, modular design where each package is responsible for a specific aspect of the application. The User Interface serves as the entry point for user interactions, while the App Logic encapsulates business rules and decision-making processes. Data Access ensures that the application can persist and retrieve data securely and efficiently. Finally, integration with the External Systems enriches the application’s functionality with essential services like geolocation and secure authentication.

This logical view allows for scalability and maintainability, as each package is responsible for a well-defined functionality, which can be developed, tested, and modified independently of the others.

Logical Diagram

Physical architecture

The physical architecture diagram illustrates the deployment of the UNI Green Application, a mobile platform developed using Flutter for both Student Smartphone and Admin Smartphone. Both users interact with the same backend infrastructure, which consists of several distributed components. The Student Smartphone, running the Flutter application, enables students to engage with the system’s features, including event management, carbon footprint tracking, and viewing statistics. Similarly, the Admin Smartphone uses a version of the app designed for administration, allowing admins to manage user profiles, events, and oversee the reward system. The backend of the application is powered by Google Cloud, utilizing Firebase and Firestore for real-time data persistence, user profiles, events, and statistics. The carbon footprint calculation and reward system logic are implemented in Dart, running on the backend. The application accesses various Google Server APIs such as the Geolocator API for event and user location, the Carbon Interface API to calculate the carbon footprint, and the Google Activity Recognition API for tracking user activities related to their environmental impact. Data synchronization between the mobile devices and backend is handled securely and efficiently through API calls, ensuring that users' actions are reflected in real-time. The combination of Flutter, Dart, Firebase, and Google APIs allows the system to offer a scalable, interactive, and secure platform for both students and administrators, while ensuring seamless data management and integration with external services for accurate calculations and tracking.

Physical Diagram

Vertical prototype

In Sprint 0, we completed the implementation of login and account creation, as well as the integration with Firebase. Since storing the user's progress is essential, we structured these pages in an organized and efficient way.

In addition to connecting with Firebase, we created a collection in Flutter Flow to store this information, allowing for personalized communication with the user by name. Furthermore, users can edit their data and switch accounts as needed.

We placed significant focus on the UI, ensuring that all pages follow a consistent design to provide a smooth, intuitive, and visually appealing user experience. This approach also facilitates future implementations, making project development more efficient and structured.

We integrated the Google Maps Geolocation API for location tracking and the Google Maps Directions API for detecting movements. However, we still need to implement automated functions to allow users to utilize these features seamlessly.

alt text alt text alt text alt text alt text alt text alt text

Project management

What we did well: Maintained effective communication among the five group members through weekly meetings, messages for quick problem-solving, and a continuous effort to reach a consensus to find the best solutions for various challenges.

Clearly defined the objective of our app, both in terms of aesthetics and functionality.

Areas for Improvement: Fully committing to each task from start to finish to avoid prolonging simpler tasks over multiple days.

Challenges Faced: Learning to develop the application using Flutter Flow and dealing with platform bugs, which required us to work both within Flutter Flow and directly in Flutter programming.

Ready (Prepared):

  • The user story includes a basic visual representation (mockup).

  • The development team has estimated the effort required for the user story.

  • Clear Acceptance Criteria are provided for the feature to be considered functional.

  • The user story is placed in the Iteration Backlog on the project board.

Done (Completed):

  • The pull request has been reviewed and received approval.

  • Both Acceptance and Unit Tests have successfully passed.

  • The feature works on a real mobile device.

Sprint 0

Beginning alt text End alt text

Sprint 1

Beginning alt text

End alt text alt text

Sprint review

Created an initial quiz with questions that help calculate the user's carbon footprint based on their answers.

Sprint retrospective

  • What went well:

    • Successfully built the quiz structure.
    • The work was well balanced and shared across the whole team.
    • Respected eachother´s ideas
  • What we would do differently:

    • Improve communication within the team when making updates to the app.
    • Schedule more frequent team meetings.
    • Have a better time management
  • What didn't work out so well:

    • At the beggining, figuring out how to calculate the carbon footprint in FlutterFlow based on the user's answers.

Hapiness Meters

alt text

Sprint 2

Beginning alt text alt text alt text

End alt text alt text alt text alt text alt text alt text

Sprint review

In this sprint, we focused on developing the "Daily Activities" form, allowing users to input their daily actions, which will contribute to calculating their carbon footprint.

Sprint retrospective

  • What went well:

    • Clear Communication: Team collaboration was productive, with effective decision-making.
    • Clear ideias about the decisions in making
    • We successfully defined the app's core features, ensuring a focused development approach.
  • What could be improved:

    • Have a better time management
    • Have better communication between teammates
  • what didn't work out so well:

    • Misunderstandings in Task Execution: At times, we assumed certain tasks could be done in a specific way, only to realize later that it wasn't quite as straightforward, which led to having to undo some of our work.

Hapiness Meters

alt text

Sprint 3

Beginning alt text alt text alt text

End alt text alt text alt text

Sprint review

In this sprint, we implemented dynamic event logic triggered by QR codes, improved the carbon score calculation, and enabled background geolocation. We also made the rewards display functional, enhanced the user profile features, and fixed navigation and authentication issues for a smoother, more interactive user experience.

Sprint retrospective

What went well

  • The team worked well together, especially on tricky features like QR code events and background location.
  • We made clear decisions about the app’s main features, which helped keep the work focused.

What could be improved

  • We should improve how we test new features before merging, to catch bugs earlier.
  • Some ideas, especially related to design, were not always written down, which caused misunderstandings. Documenting these would help avoid confusion.
  • Feedback should be more organized so everyone knows what needs to be fixed or improved.

What didn’t work out so well

  • Merge conflicts caused delays when combining code from different team members.
  • Feedback on app updates was sometimes unclear and hard to follow.

Actions to take in the next sprint (if any)

  • Use a simple form or a dedicated chat to collect feedback in an organized way.
  • Set clear rules for working with code branches to avoid conflicts and make merging easier.
  • Make sure to write down important ideas and design decisions to keep everyone aligned.

Hapiness Meters

alt text

Sprint 4

Final Release

About

A user-friendly mobile application designed to calculate your carbon footprint based on your daily activities, while also providing incentives for individuals who engage in environmental charity events.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors