# Project export: Sustaino

This document was generated by HackStack to give an AI agent context about a hackathon project. Sections are labeled with their provenance; content marked as truncated was cut to keep this document small.

## Project metadata

- Hackathon: TreeHacks 2024
- Tagline: To empower Gen Z, the future leaders of the world, by cultivating sustainable behavior and environmental consciousness, equipping them with the knowledge and mindset necessary for responsible living.
- Devpost: https://devpost.com/software/sustaino
- GitHub: https://github.com/parvdave/susten
- Video: https://www.youtube.com/embed/lDiVzIzCd5c?enablejsapi=1&hl=en_US&rel=0&start=&version=3&wmode=transparent
- Team: 1 GitHub contributor(s) — Parv Dave (3 commits)

## Devpost submission (written by the team)

### Inspiration

At the TreeHacks hackathon, amidst the buzz of innovation and collaboration, our team found inspiration in an unlikely place: the trash bins. As we observed the overflowing landfill bins in stark contrast to the scarcely filled recycling and compost bins, a collective realization dawned on us. It highlighted a glaring, often overlooked issue in our daily practices — the gap between our intentions for sustainability and the reality of our actions. This observation sparked a profound internal questioning: "Do we really understand what sustainability is? What impact do seemingly minor unsustainable practices have on our planet? Do we, as students and future leaders, genuinely prioritize our planet's well-being?" Motivated by this insight, we saw an opportunity for meaningful change right at the heart of the hackathon. The situation with the trashbins was not just a practical challenge; it was a symbol of a larger issue that resonated deeply with us. This led us to the ask ourselves - how could we bridge the gap between sustainable intentions and actions, starting from our immediate environment at the hackathon to broader, everyday life scenarios?

### What it does

At the heart of every action lies a mindset, and it's this mindset that our platform - Sustaino seeks to transform. Sustaino goes beyond imparting sustainable literacy; it actively reshapes behavioral patterns, fostering a culture of responsible consumption. By engaging with Sustaino, users learn not just the 'what' and 'why' of sustainability, but also the 'how.' From making informed choices about daily consumption to understanding the ripple effects of their actions on the global ecosystem, Sustaino guides users in building behavior that leaves a positive imprint on the planet. The key features of our platform are: Personalized Behavioral Nudges Provide personalized information and answers to users’ questions about sustainability Tailor content based on user interests, behaviors and interactions, making it more relevant and engaging. Incentivization through Gamification Users earn reward points and badges for engaging in sustainable behaviors, like recycling or reducing energy consumption. - Implementing systems where users can track their progress in sustainable practices, similar to leveling up in a game. Eco-Partner Rewards Network Accumulated reward points can be redeemed for discounts and special offers from our eco-friendly partner brands. The marketplace of deals and offers is regularly updated, keeping the options fresh, relevant, and appealing to our users.

### How we built it

In order to provide personalized and accurate sustainability recommendations, we needed to construct our own dataset. This was done by selecting multiple internet forums and filtering all threads searching for quality, highly-argumented answers to sustainability problems. We combined information from three major fields relevant in our everyday lives (however we did not limit ourselves to just these) - food, consumerism and travel. For each of these, the most relevant posts were selected in order to arrive at the final, concatenated database. This was then used to fine-tune a LongLlama 7B large language model so that it could reasonably answer any questions or remarks of the users, while providing sensible and creative responses. The model was both fine-tuned and deployed through MonsterAPI and is available as open-source. We also trained additional models for cross-compatibility with less powerful systems (also with MonsterAPI). The models can then be accessed by the webapp (built in Django) through the Python API and provides both a response for the user, as well as a classification and ranking of the user's actions necessary for the gamification component. Furthermore, historical data about the user's actions is fed into the model to provide a reasonable (and not too strict) approach to sustainability, focusing on educating, rather than penalizing the person. This progress can also be viewed in a visually appealing frontend (built in JS/HTML/CSS) through sustainability levels!

### Challenges we ran into

We faced a key challenge in meeting the diverse needs of Gen Z. We quickly realized that a 'one size fits all' approach would not suffice for our Gen Z audience. A generic approach wouldn't work. Our solution: a platform that customizes responses based on individual user interactions. This personal touch is crucial for an audience that values individuality and personalization. Motivating users to consistently engage in sustainable practices was another hurdle. We recognized that while many individuals aspire to lead more sustainable lives, various challenges can impact their motivation. To address this, we introduced incentivization through gamification. This makes the sustainability journey enjoyable and aligns well with Gen Z's preference for interactive digital experiences. We also identified that a major pain point for our users was the overwhelming amount of information available on sustainability.Our strategy: simplify and clarify. We focused on providing straightforward, digestible content, making sustainability more accessible and less intimidating.

### Accomplishments we're proud of

We are especially proud of the dataset creation described in detail in "How we built it". We really put a lot of effort into selecting and later filtering, as well as cleaning the data so that it only concerns positive and realistic examples of sustainability. Interestingly, we were able to collect even more data than the model could compute in the limited time we had, so there is a lot of potential in future developments! We are especially proud of the dataset creation described in detail in "How we built it". We really put a lot of effort into selecting and later filtering, as well as cleaning the data so that it only concerns positive and realistic examples of sustainability. Interestingly, we were able to collect even more data than the model could compute in the limited time we had, so there is a lot of potential in future developments! We are also extremely proud of how we were able to use MonsterAPI - not only to fine-tune our model, but also to deploy it, repurpose the available LLM's and robustly use them in our webapp, utilizing the most out of this technology! We are also extremely proud of how we were able to use MonsterAPI - not only to fine-tune our model, but also to deploy it, repurpose the available LLM's and robustly use them in our webapp, utilizing the most out of this technology! Lastly, we are extremely happy with the collaboration inside of our team - all coming from very different places and with diverse experience, we managed to identify a common problem and work towards a solution, while maintaining a positive attitude. Coming here, we thought that it is simply not possible for us (having met on Friday evening) to compete with pre-established teams, yet now we're certain we can! Lastly, we are extremely happy with the collaboration inside of our team - all coming from very different places and with diverse experience, we managed to identify a common problem and work towards a solution, while maintaining a positive attitude. Coming here, we thought that it is simply not possible for us (having met on Friday evening) to compete with pre-established teams, yet now we're certain we can!

### What we learned

We realized that although most people know what sustainability is and have a general overview of how to practice it, they usually do not implement it in their lives (or at least do so poorly). This might be due to the fact that they do not realize the implications of their actions, do not fully understand the arguments behind some sustainable options or simply are confused. Although surprising, this realization helped us create a better product tailored to all of these people and helping them live better, both for themselves and the planet. We also learned that a slightly different outlook on a problem can really make a difference and help solve many challenges. However, understanding this would not have been possible without such a multidisciplinary team!

### What's next

When a group of passionate individuals comes together to build a project, the sky’s the limit. We are grateful for this opportunity, and have outlined the following steps to bring our vision for this product to its full potential: User Testing and Feedback Conduct beta testing with a diverse group of users, particularly from Gen Z, to gather feedback on usability, content, and features. Use this feedback to refine and improve the application, focusing on user experience and the relevance of the sustainability content. Accessibility and Inclusivity Ensure the app is accessible to a diverse range of users, considering voice integration, different languages, cultural contexts, and abilities. Include content and features that address a variety of sustainability challenges faced by different communities. Scalability and Expansion Plan for scalability, both in terms of technological infrastructure and content. Consider expanding the application's reach to new regions or demographics over time.

## README (from the GitHub repository)

No README available.

## Detected evidence (automated analysis)

Indexed codebase: 66 recognized source files, 255 KB.
- CSS (language) — detected in the code
- Django (technology) — detected in the code
- HTML (language) — detected in the code
- JavaScript (language) — detected in the code
- Python (language) — detected in the code

## Codebase structure (from repository index)

### Files (73 of 73)

```
.DS_Store
db.sqlite3
manage.py
requirements.txt
static/admin/css/autocomplete.css
static/admin/css/base.css
static/admin/css/changelists.css
static/admin/css/dark_mode.css
static/admin/css/dashboard.css
static/admin/css/forms.css
static/admin/css/login.css
static/admin/css/nav_sidebar.css
static/admin/css/responsive_rtl.css
static/admin/css/responsive.css
static/admin/css/rtl.css
static/admin/css/widgets.css
static/admin/img/LICENSE
static/admin/img/README.txt
static/admin/js/actions.js
static/admin/js/admin/DateTimeShortcuts.js
static/admin/js/admin/RelatedObjectLookups.js
static/admin/js/autocomplete.js
static/admin/js/calendar.js
static/admin/js/cancel.js
static/admin/js/change_form.js
static/admin/js/collapse.js
static/admin/js/core.js
static/admin/js/filters.js
static/admin/js/inlines.js
static/admin/js/jquery.init.js
static/admin/js/nav_sidebar.js
static/admin/js/popup_response.js
static/admin/js/prepopulate_init.js
static/admin/js/prepopulate.js
static/admin/js/SelectBox.js
static/admin/js/SelectFilter2.js
static/admin/js/theme.js
static/admin/js/urlify.js
static/sustenuser/js/script.js
static/sustenuser/progress_bar.css
static/sustenuser/script.js
static/sustenuser/style.css
susten/__init__.py
susten/asgi.py
susten/settings.py
susten/urls.py
susten/wsgi.py
sustenuser/__init__.py
sustenuser/.DS_Store
sustenuser/admin.py
sustenuser/apps.py
sustenuser/calculator_model.py
sustenuser/forms.py
sustenuser/level_helper.py
sustenuser/migrations/__init__.py
sustenuser/migrations/0001_initial.py
sustenuser/migrations/0002_rename_user_name_treehacksuser_username.py
sustenuser/migrations/0003_treehacksuser_levels_treehacksuser_points.py
sustenuser/models.py
sustenuser/static/sustenuser/js/script.js
sustenuser/static/sustenuser/progress_bar.css
sustenuser/static/sustenuser/script.js
sustenuser/static/sustenuser/style.css
sustenuser/sustainability_model.py
sustenuser/templates/.DS_Store
sustenuser/templates/sustenuser/chat.html
sustenuser/templates/sustenuser/index.html
sustenuser/templates/sustenuser/login.html
sustenuser/templates/sustenuser/scores.html
sustenuser/templates/sustenuser/your_progress.html
sustenuser/tests.py
sustenuser/urls.py
sustenuser/views.py
```

### Dependencies

- requirements.txt: annotated-types@==0.6.0, asgiref@==3.7.2, certifi@==2024.2.2, charset-normalizer@==3.3.2, Django@==4.2.10, idna@==3.6, monsterapi@==1.0.6, pydantic@==2.6.1, pydantic_core@==2.16.2, requests@==2.31.0, requests-toolbelt@==1.0.0, sqlparse@==0.4.4, typing_extensions@==4.9.0, urllib3@==2.2.0

### Recent commits (newest first)

- Forgot to push the code
- most of it done
- backend done?
- added initial endpoint

## Key source files (fetched from GitHub, selected and truncated for size)

### requirements.txt

```
annotated-types==0.6.0
asgiref==3.7.2
certifi==2024.2.2
charset-normalizer==3.3.2
Django==4.2.10
idna==3.6
monsterapi==1.0.6
pydantic==2.6.1
pydantic_core==2.16.2
requests==2.31.0
requests-toolbelt==1.0.0
sqlparse==0.4.4
typing_extensions==4.9.0
urllib3==2.2.0

```

### manage.py

```python
#!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys


def main():
    """Run administrative tasks."""
    os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'susten.settings')
    try:
        from django.core.management import execute_from_command_line
    except ImportError as exc:
        raise ImportError(
            "Couldn't import Django. Are you sure it's installed and "
            "available on your PYTHONPATH environment variable? Did you "
            "forget to activate a virtual environment?"
        ) from exc
    execute_from_command_line(sys.argv)


if __name__ == '__main__':
    main()

```

### sustenuser/level_helper.py

```python
from .models import TreeHacksUser
```

### sustenuser/tests.py

```python
from django.test import TestCase

# Create your tests here.

```

### sustenuser/apps.py

```python
from django.apps import AppConfig


class SustenUserConfig(AppConfig):
    default_auto_field = 'django.db.models.BigAutoField'
    name = 'sustenuser'

```

### sustenuser/admin.py

```python
from django.contrib import admin
from .models import TreeHacksUser, Score, Message,Store,Item

# Register your models here.
admin.site.register(TreeHacksUser)
admin.site.register(Score)
admin.site.register(Message)
admin.site.register(Store)
admin.site.register(Item)

```

### sustenuser/forms.py

```python
from django import forms
from django.contrib.auth import login,authenticate
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth.models import User
class RegisterForm(UserCreationForm):
    email = forms.EmailField()
    class Meta:
        model=User
        fields=['username','email','password1','password2']
```

### susten/asgi.py

```python
"""
ASGI config for susten project.

It exposes the ASGI callable as a module-level variable named ``application``.

For more information on this file, see
https://docs.djangoproject.com/en/4.2/howto/deployment/asgi/
"""

import os

from django.core.asgi import get_asgi_application

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'susten.settings')

application = get_asgi_application()

```

### susten/wsgi.py

```python
"""
WSGI config for susten project.

It exposes the WSGI callable as a module-level variable named ``application``.

For more information on this file, see
https://docs.djangoproject.com/en/4.2/howto/deployment/wsgi/
"""

import os

from django.core.wsgi import get_wsgi_application

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'susten.settings')

application = get_wsgi_application()

```

### susten/urls.py

```python
"""
URL configuration for susten project.

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/4.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path, include
from sustenuser import urls as susten_urls

urlpatterns = [
    path('admin/', admin.site.urls),
    path('',include('sustenuser.urls'))
]

```

[54 more indexed source files omitted to keep this export small. The full file list is in the Codebase structure section above.]