diff --git a/frontend/package.json b/frontend/package.json index 93c79a2..f6246c1 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -16,17 +16,19 @@ "dependencies": { "@tauri-apps/api": "^2.9.1", "@tauri-apps/plugin-opener": "^2.5.3", + "@types/three": "^0.182.0", "compression": "^1.8.1", - "express": "^5.2.1" + "express": "^5.2.1", + "three": "^0.182.0" }, "devDependencies": { "@sveltejs/adapter-static": "^3.0.10", "@sveltejs/kit": "^2.50.1", "@sveltejs/vite-plugin-svelte": "^5.1.1", + "@tauri-apps/cli": "^2.9.6", "svelte": "^5.48.0", "svelte-check": "^4.3.5", "typescript": "~5.6.3", - "vite": "^6.4.1", - "@tauri-apps/cli": "^2.9.6" + "vite": "^6.4.1" } } diff --git a/frontend/src/lib/components/CameraScreen.svelte b/frontend/src/lib/components/CameraScreen.svelte new file mode 100644 index 0000000..4ee675a --- /dev/null +++ b/frontend/src/lib/components/CameraScreen.svelte @@ -0,0 +1,608 @@ + + +
+ {#if capturedImage} + Captured + {:else if useCamera} + + {:else} + +
+ + + +

Click the button below to upload an image

+
+ {/if} + +
+ {#if !showResult} + + + + + {/if} + + {#if analyzing} +
+
+
+ {/if} + + {#if !analyzing && !showResult} +
+ {#if useCamera} + + {:else} + + + {/if} +
+ {/if} + + {#if showResult} +
+ + +

{displayTitle}

+ +

Top Sustainable Alternatives

+ +
+
+
+ + + + ★ 4.9 +
+

Glass Bottle

+

$2.49

+
+ +
+
+ + + + ★ 4.7 +
+

Boxed Water

+

$1.89

+
+ +
+
+ + + + ★ 4.5 +
+

Aluminum

+

$1.29

+
+
+ + +
+ {/if} +
+
+ + diff --git a/frontend/src/lib/components/CloudSection.svelte b/frontend/src/lib/components/CloudSection.svelte new file mode 100644 index 0000000..f8b37d3 --- /dev/null +++ b/frontend/src/lib/components/CloudSection.svelte @@ -0,0 +1,104 @@ + + +
+ + + + + + + + + + +
+ +
+ + + + + + + + + + +
+ + diff --git a/frontend/src/lib/components/CustomTabBar.svelte b/frontend/src/lib/components/CustomTabBar.svelte new file mode 100644 index 0000000..73260c5 --- /dev/null +++ b/frontend/src/lib/components/CustomTabBar.svelte @@ -0,0 +1,280 @@ + + +
+ +
+
+ {#each tabs as tab, index} + {#if !tab.isCenter} + + {/if} + {#if index === 1} +
+ {/if} + {/each} +
+
+ + +
+
+ +
+
+
+ + diff --git a/frontend/src/lib/components/HomeScreen.svelte b/frontend/src/lib/components/HomeScreen.svelte new file mode 100644 index 0000000..2b3a6e1 --- /dev/null +++ b/frontend/src/lib/components/HomeScreen.svelte @@ -0,0 +1,295 @@ + + +
+
+
+
+

Ethix

+

Truth in every scan.

+
+
+ YO +
+
+ +
+ + +
+

Recent Activity

+ {#if recentItems.length === 0} +

No recent scans.

+ {:else} + {#each recentItems as item (item.id)} + + {/each} + {/if} +
+
+
+
+ + diff --git a/frontend/src/lib/components/ParallaxLandscape.svelte b/frontend/src/lib/components/ParallaxLandscape.svelte new file mode 100644 index 0000000..425f708 --- /dev/null +++ b/frontend/src/lib/components/ParallaxLandscape.svelte @@ -0,0 +1,188 @@ + + + + +
+ +
+
+ + +
+
+
+ + +
+ + + +
+ + +
+ + + + + + +
+ + +
+ + + +
+ + +
+ + + +
+ + +
+ + + + + + + + +
+
+ + diff --git a/frontend/src/lib/components/ProductCarousel3D.svelte b/frontend/src/lib/components/ProductCarousel3D.svelte new file mode 100644 index 0000000..c382242 --- /dev/null +++ b/frontend/src/lib/components/ProductCarousel3D.svelte @@ -0,0 +1,234 @@ + + +
+ + diff --git a/frontend/src/lib/components/ThreeBackground.svelte b/frontend/src/lib/components/ThreeBackground.svelte new file mode 100644 index 0000000..99b265a --- /dev/null +++ b/frontend/src/lib/components/ThreeBackground.svelte @@ -0,0 +1,174 @@ + + +
+ +
+ + diff --git a/frontend/src/routes/+layout.svelte b/frontend/src/routes/+layout.svelte index 9ef3c40..f0c9806 100644 --- a/frontend/src/routes/+layout.svelte +++ b/frontend/src/routes/+layout.svelte @@ -1,49 +1,159 @@ - {#if isApp}
{@render children()}
- + {:else} - -
- {@render children()} + + +
+
+ {@render children()} +
- {/if} diff --git a/frontend/src/routes/+page.svelte b/frontend/src/routes/+page.svelte index ec3b4c1..eb86122 100644 --- a/frontend/src/routes/+page.svelte +++ b/frontend/src/routes/+page.svelte @@ -1,231 +1,895 @@ -
-

Welcome to Tauri + Svelte

+ +
+ + - -
-

Get the App

-

- Experience the full power of our platform with the native app. + +

+
+
+ + See the real impact +
+

+ Know What
You Buy. +

+

+ Scan a product. See if it's actually good for the planet. Find + better alternatives if it's not. Simple as that.

- Download for Android +
- - -
-

📱 You are using the Native App!

+ +
+
+
+ {#key scoreIndex} +
+ {scores[scoreIndex].label} +
+ {/key} +
+
+
+ + +
+ {#key scoreIndex} +
+ +
+
+ {scores[scoreIndex].label} +
+
+ {scores[scoreIndex].score} +
+
+
+ {/key} +
+
- +
-
- - - - - - - - - + +
+ + +
+ +
+ {#each stats as stat} +
+
{stat.value}
+
{stat.label}
+
+ {/each} +
+
-

Click on the Tauri, Vite, and SvelteKit logos to learn more.

-
- - -
-

{greetMsg}

-
+ + +
+

How It Works

+

+ Tools to help you shop smarter. +

+
+
+ {#each features as feature} +
+
+ + + +
+

{feature.title}

+

{feature.desc}

+
+ {/each} +
+
+ + + +
+

Latest News

+

+ Updates from the world of sustainability. +

+
+
+ {#each news as item (item.id)} +
+
+ +
+
{item.date}
+

{item.title}

+

{item.desc}

+ + Read + + +
+ {/each} +
+
+ + + +
+
+
+

Scan History

+

Your recent findings

+
+ +
+ {#each scanHistory as item} +
+
+ +
+
+

{item.name}

+

{item.date}

+
+
+ {item.severity} +
+
+ {/each} +
+
+
diff --git a/frontend/src/routes/catalogue/+page.svelte b/frontend/src/routes/catalogue/+page.svelte new file mode 100644 index 0000000..d86e5dd --- /dev/null +++ b/frontend/src/routes/catalogue/+page.svelte @@ -0,0 +1,338 @@ + + +
+
+ +
+ +
+
+

Product Database

+

Search our verified sustainability ratings

+
+ + +
+ + +
+ + +
+ {#each categories as category} + + {/each} +
+ + +
+ {#each filteredProducts as product} +
+
+ +
+ +
+

{product.name}

+

{product.brand}

+
+ +
+ {product.score} +
+
+ {/each} +
+
+
+ + diff --git a/frontend/src/routes/chat/+page.svelte b/frontend/src/routes/chat/+page.svelte new file mode 100644 index 0000000..38c87f2 --- /dev/null +++ b/frontend/src/routes/chat/+page.svelte @@ -0,0 +1,362 @@ + + +
+
+ +
+ +
+ +
+
+
+ +
+
+

Ethix Assistant

+
+ +
+
+ {#each messages as msg (msg.id)} +
+

{msg.text}

+
+ {/each} +
+ +
+ + +
+
+
+
+
+
+ + diff --git a/frontend/src/routes/community/+page.svelte b/frontend/src/routes/community/+page.svelte new file mode 100644 index 0000000..8d1eb49 --- /dev/null +++ b/frontend/src/routes/community/+page.svelte @@ -0,0 +1,317 @@ + + +
+
+ +
+ +
+ +
+

Why We Exist

+

Our Mission & Goal

+
+ +
+ +
+
+ + + +
+

The Problem

+

+ "Greenwashing" is everywhere. Companies spend millions + to make you believe their products are sustainable, when + often they are not. +

+
+ 53% + of green claims are vague or misleading +
+
+ + +
+
+ + + +
+

The Solution

+

+ We believe in radical transparency. By using AI to + analyze packaging and verify claims, we give power back + to you, the consumer. +

+
    +
  • + + Instant Fact-Checking +
  • +
  • + + Unbiased Eco-Ratings +
  • +
  • + + Real Sustainable Alternatives +
  • +
+
+ + +
+
+

Our Ultimate Goal

+ +
+

+ To create a world where sustainability is the default, not a luxury. Where every purchase you make pushes + the industry toward a cleaner, ethical future. +

+
+
+
+
+
+ + diff --git a/frontend/src/routes/news/+page.svelte b/frontend/src/routes/news/+page.svelte new file mode 100644 index 0000000..7bd930d --- /dev/null +++ b/frontend/src/routes/news/+page.svelte @@ -0,0 +1,113 @@ + + +
+
+
+

Eco News

+

Latest sustainability updates

+
+ +
+ {#each news as item (item.id)} +
+
+

{item.date} • Trending

+

{item.title}

+

{item.desc}

+
+ {/each} +
+
+
+ + diff --git a/frontend/src/routes/report-details/+page.svelte b/frontend/src/routes/report-details/+page.svelte new file mode 100644 index 0000000..961beee --- /dev/null +++ b/frontend/src/routes/report-details/+page.svelte @@ -0,0 +1,424 @@ + + +
+ {#if item} +
+
+ +

Scan Report

+

Detailed analysis

+
+ +
+
+
+
+

{item.date}

+

{item.title}

+
+
+ {item.impact} Impact +
+
+ +
+ + + +
+

Analysis Result

+

+ {#if item.impact === "High"} + This item takes 450+ years to decompose. Consider switching + to sustainable alternatives immediately. + {:else} + This item is eco-friendly or easily recyclable. Good choice! + {/if} +

+
+
+ +
+

Recommended Alternatives

+
+
+
+ + + + ★ 4.9 +
+

Glass Bottle

+

$2.49

+
+ +
+
+ + + + ★ 4.7 +
+

Boxed Water

+

$1.89

+
+ +
+
+ + + + ★ 4.5 +
+

Aluminum

+

$1.29

+
+
+
+ + {#if item.impact !== "Low"} + + {/if} + + {#if item.imageUri} + Scanned product + {/if} +
+
+
+ {:else} +
+

Loading...

+
+ {/if} +
+ + diff --git a/frontend/src/routes/report/+page.svelte b/frontend/src/routes/report/+page.svelte new file mode 100644 index 0000000..8d43fa3 --- /dev/null +++ b/frontend/src/routes/report/+page.svelte @@ -0,0 +1,466 @@ + + +
+
+ +
+ +
+ {#if submitted} + +
+
+ +
+

Report Submitted!

+

+ Thank you for keeping companies honest. +

+
+
+ {:else} +
+

Report Greenwashing

+

Call out false eco-claims

+
+ + +
+
+ +
+ + +
+
+ +
+ +
+ + +
+
+ +
+ + +
+ + +
+
+ {/if} +
+
+ + diff --git a/frontend/static/coffee-cup.png b/frontend/static/coffee-cup.png new file mode 100644 index 0000000..74ebf9c Binary files /dev/null and b/frontend/static/coffee-cup.png differ diff --git a/frontend/static/ethix-logo.png b/frontend/static/ethix-logo.png new file mode 100644 index 0000000..912d2d4 Binary files /dev/null and b/frontend/static/ethix-logo.png differ diff --git a/frontend/static/plastic-bag.png b/frontend/static/plastic-bag.png new file mode 100644 index 0000000..274659f Binary files /dev/null and b/frontend/static/plastic-bag.png differ diff --git a/frontend/static/water-bottle.png b/frontend/static/water-bottle.png new file mode 100644 index 0000000..06e8977 Binary files /dev/null and b/frontend/static/water-bottle.png differ