Skip to content

Commit

Permalink
fix(prettier): 21 files linting
Browse files Browse the repository at this point in the history
fix(prettier): pending files

fix(prettier): prettier workflow
  • Loading branch information
royalpinto007 committed Feb 1, 2024
1 parent df5d124 commit ab710e3
Show file tree
Hide file tree
Showing 21 changed files with 742 additions and 728 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing to Ember

***Thank you for considering contributing to Ember!***
**_Thank you for considering contributing to Ember!_**

We welcome contributions from the community to help us make this project even better and more impactful. Whether you're a developer, designer, writer, or have other skills, your input is valuable.

Expand Down
19 changes: 10 additions & 9 deletions README.md
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.
8 changes: 4 additions & 4 deletions client/App.js
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 />
}
53 changes: 26 additions & 27 deletions client/app.config.js
Original file line number Diff line number Diff line change
@@ -1,41 +1,40 @@
import "dotenv/config";
import 'dotenv/config'
export default {
"expo": {
"name": "client",
"slug": "client",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/ember.jpeg",
"userInterfaceStyle": "light",
"splash": {
"image": "./assets/ember.jpeg",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
expo: {
name: 'client',
slug: 'client',
version: '1.0.0',
orientation: 'portrait',
icon: './assets/ember.jpeg',
userInterfaceStyle: 'light',
splash: {
image: './assets/ember.jpeg',
resizeMode: 'contain',
backgroundColor: '#ffffff'
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true
assetBundlePatterns: ['**/*'],
ios: {
supportsTablet: true
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/ember.jpeg",
"backgroundColor": "#ffffff"
android: {
adaptiveIcon: {
foregroundImage: './assets/ember.jpeg',
backgroundColor: '#ffffff'
}
},
"web": {
"favicon": "./assets/ember.jpeg"
web: {
favicon: './assets/ember.jpeg'
},
"plugins": [
plugins: [
[
"expo-image-picker",
'expo-image-picker',
{
"photosPermission": "The app accesses your photos to let you share them with your friends."
photosPermission:
'The app accesses your photos to let you share them with your friends.'
}
]
],
"extra": {
extra: {
apiKey: process.env.API_KEY,
authDomain: process.env.AUTH_DOMAIN,
projectId: process.env.PROJECT_ID,
Expand Down
10 changes: 5 additions & 5 deletions client/babel.config.js
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']
}
}
14 changes: 7 additions & 7 deletions client/components/Navigation.js
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 />
}
58 changes: 29 additions & 29 deletions client/components/authStack.js
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>
)
}
96 changes: 47 additions & 49 deletions client/components/userStack.js
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>
)
}
22 changes: 11 additions & 11 deletions client/firebaseConfig.js
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()
24 changes: 12 additions & 12 deletions client/hooks/useAuth.js
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
}
}
Loading

0 comments on commit ab710e3

Please sign in to comment.