Skip to content

Commit 86a3d32

Browse files
authored
Merge pull request #5 from Project-Code-UVA/application-implementation
Application implementation
2 parents 7f3d6a1 + e720be9 commit 86a3d32

24 files changed

+14663
-0
lines changed

.expo/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
> Why do I have a folder named ".expo" in my project?
2+
3+
The ".expo" folder is created when an Expo project is started using "expo start" command.
4+
5+
> What do the files contain?
6+
7+
- "devices.json": contains information about devices that have recently opened this project. This is used to populate the "Development sessions" list in your development builds.
8+
- "packager-info.json": contains port numbers and process PIDs that are used to serve the application to the mobile device/simulator.
9+
- "settings.json": contains the server configuration that is used to serve the application manifest.
10+
11+
> Should I commit the ".expo" folder?
12+
13+
No, you should not share the ".expo" folder. It does not contain any information that is relevant for other developers working on the project, it is specific to your machine.
14+
15+
Upon project creation, the ".expo" folder is already added to your ".gitignore" file.

.expo/settings.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"hostType": "lan",
3+
"lanType": "ip",
4+
"dev": true,
5+
"minify": false,
6+
"urlRandomness": null,
7+
"https": false
8+
}

a.eyes/.gitignore

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files
2+
3+
# dependencies
4+
node_modules/
5+
6+
# Expo
7+
.expo/
8+
dist/
9+
web-build/
10+
expo-env.d.ts
11+
12+
# Native
13+
*.orig.*
14+
*.jks
15+
*.p8
16+
*.p12
17+
*.key
18+
*.mobileprovision
19+
20+
# Metro
21+
.metro-health-check*
22+
23+
# debug
24+
npm-debug.*
25+
yarn-debug.*
26+
yarn-error.*
27+
28+
# macOS
29+
.DS_Store
30+
*.pem
31+
32+
# local env files
33+
.env*.local
34+
.env
35+
36+
# typescript
37+
*.tsbuildinfo

a.eyes/App.js

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
import React, { useState, useEffect } from 'react';
2+
import { View, StyleSheet, StatusBar, SafeAreaView } from 'react-native';
3+
import HomeScreen from './screens/HomeScreen';
4+
import CameraScreen from './screens/CameraScreen';
5+
import ChatScreen from './screens/HistoryScreens';
6+
import HistoryScreen from './screens/HistoryScreens';
7+
import HistoryChatScreen from './screens/HistoryChatScreen';
8+
9+
export default function App() {
10+
const [screen, setScreen] = useState('Home');
11+
const [chatParams, setChatParams] = useState(null);
12+
13+
const navigate = (target, params = null) => {
14+
console.log(`Navigating to ${target}`, params);
15+
16+
if (target === 'Chat' && params) {
17+
setChatParams(params);
18+
} else if (target === 'HistoryChat' && params) {
19+
setChatParams(params);
20+
} else if ((screen === 'Chat' || screen === 'HistoryChat') && target !== 'Chat' && target !== 'HistoryChat') {
21+
setChatParams(null);
22+
}
23+
24+
setScreen(target);
25+
};
26+
27+
// Add important debugging
28+
useEffect(() => {
29+
console.log('Current screen:', screen);
30+
console.log('Chat params:', chatParams);
31+
}, [screen, chatParams]);
32+
33+
return (
34+
<SafeAreaView style={styles.container}>
35+
<StatusBar barStyle="dark-content" />
36+
{screen === 'Home' && <HomeScreen navigate={navigate} />}
37+
{screen === 'Camera' && <CameraScreen navigate={navigate} />}
38+
{screen === 'Chat' && <ChatScreen navigate={navigate} chatParams={chatParams} />}
39+
{screen === 'History' && <HistoryScreen navigate={navigate} />}
40+
{screen === 'HistoryChat' && <HistoryChatScreen navigate={navigate} route={{ params: chatParams }} />}
41+
</SafeAreaView>
42+
);
43+
}
44+
45+
const styles = StyleSheet.create({
46+
container: {
47+
flex: 1,
48+
},
49+
});

a.eyes/app.json

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"expo": {
3+
"name": "A.Eyes",
4+
"slug": "a-eyes",
5+
"version": "1.0.0",
6+
"orientation": "portrait",
7+
"icon": "./assets/icon.png",
8+
"userInterfaceStyle": "light",
9+
"splash": {
10+
"image": "./assets/splash-icon.png",
11+
"resizeMode": "contain",
12+
"backgroundColor": "#ffffff"
13+
},
14+
"newArchEnabled": true,
15+
"assetBundlePatterns": [
16+
"**/*"
17+
],
18+
"ios": {
19+
"supportsTablet": true,
20+
"infoPlist": {
21+
"NSCameraUsageDescription": "A.Eyes needs access to your camera to capture images for analysis and description."
22+
},
23+
"newArchEnabled": true
24+
},
25+
"android": {
26+
"adaptiveIcon": {
27+
"foregroundImage": "./assets/adaptive-icon.png",
28+
"backgroundColor": "#ffffff"
29+
},
30+
"permissions": [
31+
"android.permission.CAMERA"
32+
],
33+
"newArchEnabled": true
34+
},
35+
"web": {
36+
"favicon": "./assets/favicon.png"
37+
},
38+
"plugins": [
39+
[
40+
"expo-camera",
41+
{
42+
"cameraPermission": "A.Eyes needs access to your camera to capture images for analysis and description."
43+
}
44+
]
45+
]
46+
}
47+
}

a.eyes/assets/adaptive-icon.png

17.1 KB
Loading

a.eyes/assets/favicon.png

1.43 KB
Loading

a.eyes/assets/icon.png

21.9 KB
Loading

a.eyes/assets/logo.png

1.35 MB
Loading

a.eyes/assets/placeholder.png

206 KB
Loading

0 commit comments

Comments
 (0)