Skip to content

Commit c749afa

Browse files
authored
Add files via upload
1 parent 37ca4a5 commit c749afa

2 files changed

Lines changed: 508 additions & 326 deletions

File tree

README.md

Lines changed: 30 additions & 139 deletions
Original file line numberDiff line numberDiff line change
@@ -1,154 +1,45 @@
1-
<div align="center">
1+
# EcoNavi (エコナビ) - AI Waste Sorting Assistant
22

3-
# ♻️ EcoNavi
4-
**AI-Powered Waste Sorting App - For Foreign Residents in Japan**
3+
EcoNavi is a web-based application that helps users correctly sort their waste using AI image recognition and barcode scanning. It features a gentle, Ghibli-inspired user interface to make the recycling process more enjoyable.
54

6-
<i>“Confused about Japan’s garbage rules? EcoNavi is here to help.”</i>
5+
## 🌟 Features
76

8-
</div>
9-
10-
---
11-
12-
## 📖 Overview
13-
14-
One of the biggest challenges many foreign residents face in Japan is **waste sorting**.
15-
Rules vary by municipality, are often very detailed, and in most cases, **information is only available in Japanese**.
16-
For example, PET bottles must have the **cap** and **label** removed, and even items like chopsticks or paper waste are handled differently depending on the city.
17-
18-
**EcoNavi** was developed to support **foreign residents in Japan** who struggle with these complex, Japan-specific rules.
19-
Simply take a photo of your trash with your smartphone, and the AI will identify the item and show the correct sorting method according to your local regulations.
20-
21-
**“Make life in Japan easier, and kinder to the environment.”** — that is EcoNavi’s mission.
22-
23-
---
24-
25-
## ✨ Key Features
26-
27-
- 🤖 **AI Image Recognition**
28-
Instantly identifies PET bottles, batteries, aluminum cans, and more (powered by Google Gemini API).
29-
30-
- 📍 **Region-Specific Rules**
31-
Supports all municipalities across Japan and displays sorting rules based on your location.
32-
33-
- 🗺️ **Easy Location Setup**
34-
- Enter municipality name (with autocomplete)
35-
- Automatically detect location via GPS
36-
37-
- 🔗 **Official Resources**
38-
Direct access to your municipality’s official waste sorting guide.
39-
40-
- 📱 **User-Friendly Design**
41-
A simple UI, easy to use even with limited Japanese skills.
42-
43-
---
44-
45-
## 🛠️ Tech Stack
46-
47-
- **Frontend**: HTML, CSS, JavaScript
48-
- **CSS Framework**: Tailwind CSS
49-
- **AI / Machine Learning**: Google Gemini API (for image recognition)
50-
- **Geolocation**: HeartRails Geo API (for reverse geocoding)
51-
- **Product Data**: Open Food Facts API (for barcode lookup)
52-
- **Barcode Scanning**: QuaggaJS (client-side library)
53-
54-
---
55-
56-
## 🔑 API Key Setup
57-
58-
### Get Your Free Google Gemini API Key
59-
60-
1. Visit: https://makersuite.google.com/app/apikey
61-
2. Sign in with your Google account
62-
3. Enable the Generative Language API
63-
4. Click "Create API Key"
64-
5. Copy your API key
65-
66-
## 🪄 First Launch & Feature Guide
67-
68-
### API Key Setup (for General Users)
69-
To use the **AI-powered image recognition feature**, you’ll need a **Google Gemini API key**.
70-
71-
Click the **“API Key Settings”** button at the bottom of the app to open the setup screen.
72-
Paste your API key into the input field and click **“Save”**.
73-
74-
If you attempt to use the image recognition feature without setting an API key, the setup screen will open automatically.
75-
76-
> **Note:** Your API key is securely stored in your browser’s local storage and is never shared externally.
77-
> You can update or clear your API key anytime from the settings screen.
78-
79-
---
80-
81-
## 💻 Languages
82-
83-
- HTML5
84-
- CSS3
85-
- JavaScript (ES6+)
86-
87-
---
7+
* **AI Image Recognition**: Upload a photo of trash, and Google Gemini AI will analyze it and tell you how to sort it (Burnable, Non-burnable, PET bottle, etc.).
8+
* **Barcode Scanning**: Scan product barcodes to automatically retrieve the product name and get AI-powered sorting advice.
9+
* **Location-Based Rules**: Supports sorting rules for 1700+ municipalities in Japan (with detailed overrides for Shibuya and Yokohama).
10+
* **Eco Points & Badges**: Gamification system where you earn points for sorting correctly and unlock badges.
11+
* **Disaster Waste Info**: Provides information on waste disposal during disasters (offline capable).
12+
* **Ghibli-Style UI**: A soothing, hand-drawn aesthetic with animations and soft colors.
8813

8914
## 🚀 How to Use
9015

91-
1. Open `index.html` in your browser.
92-
2. Set your municipality manually, or use the “Detect Current Location” button.
93-
3. Upload or drag & drop a photo of the item you want to sort.
94-
4. The AI will recognize the item and display the correct sorting method based on your local rules.
95-
96-
---
97-
98-
## 🌱 Future Plans
99-
100-
- Integration with garbage collection calendars
101-
- Push notification reminders for disposal days
102-
- Improved AI accuracy and support for more item categories
103-
- Supports various languages
104-
105-
---
106-
107-
## 💡 Why We Built This App
108-
109-
Many foreign residents in Japan face challenges such as:
110-
- Different rules depending on the municipality
111-
- Instructions often only in Japanese
112-
- Mistakes can result in complaints from neighbors or uncollected trash
113-
114-
EcoNavi was created to eliminate these difficulties.
115-
It aims to be not only a **life support tool for foreign residents** but also an app that contributes to a cleaner, more sustainable environment.
116-
117-
---
118-
119-
## 🎮 Gamification Features (New!)
120-
121-
To make waste sorting not only easier but also **fun and rewarding**, EcoNavi now includes a **gamified Eco Points system** and a **customizable Theme Store**.
122-
123-
### 🌿 Eco Points System
124-
Earn points for eco-friendly actions within the app:
16+
1. **Open the App**: Open `index.html` in your web browser.
17+
2. **Set Location**: Enter your Japanese city/ward (e.g., "横浜市") to get specific sorting advice.
18+
3. **Choose Method**:
19+
* **Barcode**: Tap the barcode button and scan a product code.
20+
* **Photo**: Tap the upload area to take a picture or select an image file.
21+
4. **View Results**: The AI will classify the item and show you the correct category and disposal tips.
12522

126-
| Action | Points |
127-
|:--|:--:|
128-
| Successful waste sorting | +10P |
129-
| First login of the day | +1P |
130-
| Viewing an eco tip (once per day) | +5P |
23+
## ⚙️ Setup
13124

132-
Your total Eco Points are displayed in the app header and stored safely in your browser via **localStorage**.
25+
To use the AI features, you need a **Google Gemini API Key**.
13326

134-
### 🏞️ Seasonal Theme Store
135-
Redeem your points for **seasonal background themes**, each beautifully designed to match Japan’s four seasons.
27+
1. Get a free API key from [Google AI Studio](https://makersuite.google.com/app/apikey).
28+
2. In the app, click "APIキー設定" (API Key Settings) at the bottom.
29+
3. Paste your key and click "保存" (Save).
30+
* *Note: The key is saved locally in your browser.*
13631

137-
| Theme | Cost | Description |
138-
|:--|:--:|:--|
139-
| 🌸 Spring | 10P | Gentle pink background with cherry blossom imagery |
140-
| ☀️ Summer | 10P | Bright blue background evoking clear summer skies |
141-
| 🍁 Autumn | 10P | Warm orange tones inspired by falling leaves |
142-
| ❄️ Winter | 10P | Cool white and blue hues for a calm winter mood |
32+
## 📂 Project Structure
14333

144-
Once purchased, themes are applied instantly and saved for future sessions.
145-
Access the Theme Store anytime from the **“Point Store”** button in the footer menu.
34+
* `index.html`: The main application file containing HTML, CSS, and logic.
35+
* `gamification.js`: Handles points, badges, and user progress.
36+
* `README.md`: This file.
14637

147-
### 🧠 Technical Overview
148-
- Points, purchased items, and selected themes are managed using **localStorage**.
149-
- All gamification logic is implemented in a **dedicated file (`gamification.js`)**, minimizing changes to existing code.
150-
- The store appears as a **modal window**, seamlessly integrated with the existing UI design.
38+
## 🎨 New Updates
15139

152-
> 💡 *EcoNavi now helps users live sustainably — and enjoy doing it through a simple, rewarding experience.*
40+
* **UI Overhaul**: Completely redesigned with a "Ghibli-esque" theme (Zen Maru Gothic font, pastel colors, rounded UI).
41+
* **Barcode Fix**: Fixed the barcode scanner connection to the AI for accurate product analysis.
42+
* **API Update**: Updated to use the reliable `v1beta` endpoint for Gemini Flash.
15343

15444
---
45+
*EcoNavi - Making recycling a little happier.*

0 commit comments

Comments
 (0)