-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
21 changed files
with
742 additions
and
728 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,32 @@ | ||
# Ember | ||
|
||
***A Carbon Footprint App with Monetisation Strategies*** | ||
**_A Carbon Footprint App with Monetisation Strategies_** | ||
|
||
![designs](assets/designs.png) | ||
|
||
|
||
Welcome to Ember, your all-in-one platform for sustainable living. | ||
- We offer eco-friendly transit solutions, gamified sustainability challenges, a thriving community hub, incentives for green actions, a green marketplace, and carbon offset options. | ||
|
||
- We offer eco-friendly transit solutions, gamified sustainability challenges, a thriving community hub, incentives for green actions, a green marketplace, and carbon offset options. | ||
- Our monetization strategies include advertisements, coupons, an eco-products marketplace, and location-based services. | ||
|
||
***Join us in the movement towards a greener future today!*** | ||
**_Join us in the movement towards a greener future today!_** | ||
|
||
### Mechanism | ||
|
||
![Mechanism](assets/mechanism.png) | ||
|
||
### Technology Stack | ||
|
||
- Frontend: React-Native, TailwindCSS | ||
- Backend: django REST | ||
- Machine Learning: PyTorch | ||
|
||
|
||
### Reference- Problem Statement | ||
|
||
Urban areas face challenges like traffic congestion, air pollution, and carbon emissions due to increased private vehicle usage. | ||
|
||
- To promote eco-friendly transportation options (walking, biking, carpooling, public transit), we need an innovative mobile app that uses gamification and social elements to motivate users, reduce private car dependence, and create | ||
sustainable cities. | ||
sustainable cities. | ||
- Daily challenges, leaderboards, and a supportive community foster engagement, while real-time incentives, optimized route planning, and carbon footprint tracking enhance the experience and environmental impact awareness. | ||
- With an intuitive interface and seamless integration, the application must | ||
revolutionize urban commuting habits for greener, healthier, and vibrant spaces. | ||
|
||
|
||
revolutionize urban commuting habits for greener, healthier, and vibrant spaces. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import React from 'react'; | ||
import Navigation from './components/Navigation'; | ||
import React from 'react' | ||
import Navigation from './components/Navigation' | ||
|
||
export default function App() { | ||
return <Navigation />; | ||
} | ||
return <Navigation /> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
module.exports = function (api) { | ||
api.cache(true); | ||
api.cache(true) | ||
return { | ||
presets: ["babel-preset-expo"], | ||
plugins: ["nativewind/babel", "react-native-reanimated/plugin"], | ||
}; | ||
}; | ||
presets: ['babel-preset-expo'], | ||
plugins: ['nativewind/babel', 'react-native-reanimated/plugin'] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import React from 'react'; | ||
import { useAuth } from '../hooks/useAuth'; | ||
import UserStack from './userStack'; | ||
import AuthStack from './authStack'; | ||
import React from 'react' | ||
import { useAuth } from '../hooks/useAuth' | ||
import UserStack from './userStack' | ||
import AuthStack from './authStack' | ||
|
||
export default function Navigation() { | ||
const { user } = useAuth(); | ||
const { user } = useAuth() | ||
|
||
return user ? <UserStack /> : <AuthStack />; | ||
} | ||
return user ? <UserStack /> : <AuthStack /> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,33 @@ | ||
import React from 'react'; | ||
import { NavigationContainer } from '@react-navigation/native'; | ||
import { createStackNavigator } from '@react-navigation/stack'; | ||
import React from 'react' | ||
import { NavigationContainer } from '@react-navigation/native' | ||
import { createStackNavigator } from '@react-navigation/stack' | ||
|
||
import HomeScreen from "../screens/HomeScreen"; | ||
import Login from "../screens/Login"; | ||
import Signup from "../screens/Signup"; | ||
import HomeScreen from '../screens/HomeScreen' | ||
import Login from '../screens/Login' | ||
import Signup from '../screens/Signup' | ||
|
||
const Stack = createStackNavigator(); | ||
const Stack = createStackNavigator() | ||
|
||
export default function AuthStack() { | ||
return ( | ||
<NavigationContainer> | ||
<Stack.Navigator initialRouteName="Home"> | ||
<Stack.Screen | ||
name="Home" | ||
component={HomeScreen} | ||
options={{ headerShown: false }} | ||
/> | ||
<Stack.Screen | ||
name="Login" | ||
component={Login} | ||
options={{ headerShown: false }} | ||
/> | ||
<Stack.Screen | ||
name="Signup" | ||
component={Signup} | ||
options={{ headerShown: false }} | ||
/> | ||
</Stack.Navigator> | ||
</NavigationContainer> | ||
); | ||
} | ||
return ( | ||
<NavigationContainer> | ||
<Stack.Navigator initialRouteName="Home"> | ||
<Stack.Screen | ||
name="Home" | ||
component={HomeScreen} | ||
options={{ headerShown: false }} | ||
/> | ||
<Stack.Screen | ||
name="Login" | ||
component={Login} | ||
options={{ headerShown: false }} | ||
/> | ||
<Stack.Screen | ||
name="Signup" | ||
component={Signup} | ||
options={{ headerShown: false }} | ||
/> | ||
</Stack.Navigator> | ||
</NavigationContainer> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,51 @@ | ||
import React from 'react'; | ||
import { NavigationContainer } from '@react-navigation/native'; | ||
import { createStackNavigator } from '@react-navigation/stack'; | ||
import React from 'react' | ||
import { NavigationContainer } from '@react-navigation/native' | ||
import { createStackNavigator } from '@react-navigation/stack' | ||
|
||
import Dashboard from '../screens/Dashboard'; | ||
import TransitScreen from '../screens/TransitScreen'; | ||
import Profile from '../screens/Profile'; | ||
import Statistics from '../screens/Statistics'; | ||
import Chat from '../screens/Chat'; | ||
import Post from '../screens/Post'; | ||
import Dashboard from '../screens/Dashboard' | ||
import TransitScreen from '../screens/TransitScreen' | ||
import Profile from '../screens/Profile' | ||
import Statistics from '../screens/Statistics' | ||
import Chat from '../screens/Chat' | ||
import Post from '../screens/Post' | ||
|
||
const Stack = createStackNavigator(); | ||
const Stack = createStackNavigator() | ||
|
||
export default function UserStack() { | ||
return ( | ||
<NavigationContainer> | ||
<Stack.Navigator initialRouteName="Dashboard"> | ||
|
||
<Stack.Screen | ||
name="Dashboard" | ||
component={Dashboard} | ||
options={{ headerShown: false }} | ||
/> | ||
<Stack.Screen | ||
name="Profile" | ||
component={Profile} | ||
options={{ headerShown: false }} | ||
/> | ||
<Stack.Screen | ||
name="TransitScreen" | ||
component={TransitScreen} | ||
options={{ headerShown: true }} | ||
/> | ||
<Stack.Screen | ||
name="Statistics" | ||
component={Statistics} | ||
options={{ headerShown: true }} | ||
/> | ||
<Stack.Screen | ||
name="Post" | ||
component={Post} | ||
options={{ headerShown: true }} | ||
/> | ||
<Stack.Screen | ||
name="Chat" | ||
component={Chat} | ||
options={{ headerShown: true }} | ||
/> | ||
</Stack.Navigator> | ||
</NavigationContainer> | ||
); | ||
} | ||
|
||
return ( | ||
<NavigationContainer> | ||
<Stack.Navigator initialRouteName="Dashboard"> | ||
<Stack.Screen | ||
name="Dashboard" | ||
component={Dashboard} | ||
options={{ headerShown: false }} | ||
/> | ||
<Stack.Screen | ||
name="Profile" | ||
component={Profile} | ||
options={{ headerShown: false }} | ||
/> | ||
<Stack.Screen | ||
name="TransitScreen" | ||
component={TransitScreen} | ||
options={{ headerShown: true }} | ||
/> | ||
<Stack.Screen | ||
name="Statistics" | ||
component={Statistics} | ||
options={{ headerShown: true }} | ||
/> | ||
<Stack.Screen | ||
name="Post" | ||
component={Post} | ||
options={{ headerShown: true }} | ||
/> | ||
<Stack.Screen | ||
name="Chat" | ||
component={Chat} | ||
options={{ headerShown: true }} | ||
/> | ||
</Stack.Navigator> | ||
</NavigationContainer> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
import { initializeApp } from "firebase/app"; | ||
import { getAuth } from "firebase/auth"; | ||
import { getFirestore } from "firebase/firestore"; | ||
import Constants from "expo-constants"; | ||
import { getStorage } from "firebase/storage"; | ||
import { initializeApp } from 'firebase/app' | ||
import { getAuth } from 'firebase/auth' | ||
import { getFirestore } from 'firebase/firestore' | ||
import Constants from 'expo-constants' | ||
import { getStorage } from 'firebase/storage' | ||
|
||
const firebaseConfig = { | ||
apiKey: Constants.expoConfig.extra.apiKey, | ||
authDomain: Constants.expoConfig.extra.authDomain, | ||
projectId: Constants.expoConfig.extra.projectId, | ||
storageBucket: Constants.expoConfig.extra.storageBucket, | ||
messagingSenderId: Constants.expoConfig.extra.messagingSenderId, | ||
appId: Constants.expoConfig.extra.appId, | ||
}; | ||
appId: Constants.expoConfig.extra.appId | ||
} | ||
|
||
initializeApp(firebaseConfig); | ||
export const auth = getAuth(); | ||
export const database = getFirestore(); | ||
export const storage= getStorage(); | ||
initializeApp(firebaseConfig) | ||
export const auth = getAuth() | ||
export const database = getFirestore() | ||
export const storage = getStorage() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
import React, { useEffect,useState } from "react"; | ||
import { getAuth, onAuthStateChanged, User } from "firebase/auth"; | ||
import { auth } from "../firebaseConfig"; | ||
import React, { useEffect, useState } from 'react' | ||
import { getAuth, onAuthStateChanged, User } from 'firebase/auth' | ||
import { auth } from '../firebaseConfig' | ||
|
||
export function useAuth() { | ||
const [user, setUser] = useState(); | ||
const [user, setUser] = useState() | ||
|
||
useEffect(() => { | ||
const unsubscribeFromAuthStateChanged = onAuthStateChanged(auth, (user) => { | ||
if (user) { | ||
// User is signed in, see docs for a list of available properties | ||
// https://firebase.google.com/docs/reference/js/firebase.User | ||
setUser(user); | ||
setUser(user) | ||
} else { | ||
// User is signed out | ||
setUser(undefined); | ||
setUser(undefined) | ||
} | ||
}); | ||
}) | ||
|
||
return unsubscribeFromAuthStateChanged; | ||
}, []); | ||
return unsubscribeFromAuthStateChanged | ||
}, []) | ||
|
||
return { | ||
user, | ||
}; | ||
} | ||
user | ||
} | ||
} |
Oops, something went wrong.