From 60360e8eb969f381b2de58bea8c20684606223cd Mon Sep 17 00:00:00 2001 From: joaomiranda Date: Wed, 19 Nov 2025 23:00:37 +0000 Subject: [PATCH] feat: implement initial finance application structure with asset and goal management --- .gitignore | 41 +++++++++++++ .vscode/extensions.json | 1 + .vscode/settings.json | 7 +++ app.json | 39 ++++++++++++ app/(tabs)/_layout.tsx | 59 ++++++++++++++++++ app/(tabs)/index.tsx | 31 ++++++++++ app/(tabs)/two.tsx | 31 ++++++++++ app/+html.tsx | 38 ++++++++++++ app/+not-found.tsx | 40 ++++++++++++ app/_layout.tsx | 59 ++++++++++++++++++ app/modal.tsx | 35 +++++++++++ assets/fonts/SpaceMono-Regular.ttf | Bin 0 -> 93252 bytes assets/images/adaptive-icon.png | Bin 0 -> 17547 bytes assets/images/favicon.png | Bin 0 -> 1466 bytes assets/images/icon.png | Bin 0 -> 22380 bytes assets/images/splash-icon.png | Bin 0 -> 17547 bytes components/EditScreenInfo.tsx | 77 ++++++++++++++++++++++++ components/ExternalLink.tsx | 25 ++++++++ components/StyledText.tsx | 5 ++ components/Themed.tsx | 45 ++++++++++++++ components/__tests__/StyledText-test.js | 10 +++ components/useClientOnlyValue.ts | 4 ++ components/useClientOnlyValue.web.ts | 12 ++++ components/useColorScheme.ts | 1 + components/useColorScheme.web.ts | 8 +++ constants/Colors.ts | 19 ++++++ package.json | 37 ++++++++++++ tsconfig.json | 17 ++++++ 28 files changed, 641 insertions(+) create mode 100644 .gitignore create mode 100644 .vscode/extensions.json create mode 100644 .vscode/settings.json create mode 100644 app.json create mode 100644 app/(tabs)/_layout.tsx create mode 100644 app/(tabs)/index.tsx create mode 100644 app/(tabs)/two.tsx create mode 100644 app/+html.tsx create mode 100644 app/+not-found.tsx create mode 100644 app/_layout.tsx create mode 100644 app/modal.tsx create mode 100755 assets/fonts/SpaceMono-Regular.ttf create mode 100644 assets/images/adaptive-icon.png create mode 100644 assets/images/favicon.png create mode 100644 assets/images/icon.png create mode 100644 assets/images/splash-icon.png create mode 100644 components/EditScreenInfo.tsx create mode 100644 components/ExternalLink.tsx create mode 100644 components/StyledText.tsx create mode 100644 components/Themed.tsx create mode 100644 components/__tests__/StyledText-test.js create mode 100644 components/useClientOnlyValue.ts create mode 100644 components/useClientOnlyValue.web.ts create mode 100644 components/useColorScheme.ts create mode 100644 components/useColorScheme.web.ts create mode 100644 constants/Colors.ts create mode 100644 package.json create mode 100644 tsconfig.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d914c32 --- /dev/null +++ b/.gitignore @@ -0,0 +1,41 @@ +# Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files + +# dependencies +node_modules/ + +# Expo +.expo/ +dist/ +web-build/ +expo-env.d.ts + +# Native +.kotlin/ +*.orig.* +*.jks +*.p8 +*.p12 +*.key +*.mobileprovision + +# Metro +.metro-health-check* + +# debug +npm-debug.* +yarn-debug.* +yarn-error.* + +# macOS +.DS_Store +*.pem + +# local env files +.env*.local + +# typescript +*.tsbuildinfo + +# generated native folders +/ios +/android diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..b7ed837 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1 @@ +{ "recommendations": ["expo.vscode-expo-tools"] } diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..e2798e4 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,7 @@ +{ + "editor.codeActionsOnSave": { + "source.fixAll": "explicit", + "source.organizeImports": "explicit", + "source.sortMembers": "explicit" + } +} diff --git a/app.json b/app.json new file mode 100644 index 0000000..41819ff --- /dev/null +++ b/app.json @@ -0,0 +1,39 @@ +{ + "expo": { + "name": "finance-app", + "slug": "finance-app", + "version": "1.0.0", + "orientation": "portrait", + "icon": "./assets/images/icon.png", + "scheme": "financeapp", + "userInterfaceStyle": "automatic", + "newArchEnabled": true, + "splash": { + "image": "./assets/images/splash-icon.png", + "resizeMode": "contain", + "backgroundColor": "#ffffff" + }, + "ios": { + "supportsTablet": true + }, + "android": { + "adaptiveIcon": { + "foregroundImage": "./assets/images/adaptive-icon.png", + "backgroundColor": "#ffffff" + }, + "edgeToEdgeEnabled": true, + "predictiveBackGestureEnabled": false + }, + "web": { + "bundler": "metro", + "output": "static", + "favicon": "./assets/images/favicon.png" + }, + "plugins": [ + "expo-router" + ], + "experiments": { + "typedRoutes": true + } + } +} diff --git a/app/(tabs)/_layout.tsx b/app/(tabs)/_layout.tsx new file mode 100644 index 0000000..30914fb --- /dev/null +++ b/app/(tabs)/_layout.tsx @@ -0,0 +1,59 @@ +import React from 'react'; +import FontAwesome from '@expo/vector-icons/FontAwesome'; +import { Link, Tabs } from 'expo-router'; +import { Pressable } from 'react-native'; + +import Colors from '@/constants/Colors'; +import { useColorScheme } from '@/components/useColorScheme'; +import { useClientOnlyValue } from '@/components/useClientOnlyValue'; + +// You can explore the built-in icon families and icons on the web at https://icons.expo.fyi/ +function TabBarIcon(props: { + name: React.ComponentProps['name']; + color: string; +}) { + return ; +} + +export default function TabLayout() { + const colorScheme = useColorScheme(); + + return ( + + , + headerRight: () => ( + + + {({ pressed }) => ( + + )} + + + ), + }} + /> + , + }} + /> + + ); +} diff --git a/app/(tabs)/index.tsx b/app/(tabs)/index.tsx new file mode 100644 index 0000000..6cbee6d --- /dev/null +++ b/app/(tabs)/index.tsx @@ -0,0 +1,31 @@ +import { StyleSheet } from 'react-native'; + +import EditScreenInfo from '@/components/EditScreenInfo'; +import { Text, View } from '@/components/Themed'; + +export default function TabOneScreen() { + return ( + + Tab One + + + + ); +} + +const styles = StyleSheet.create({ + container: { + flex: 1, + alignItems: 'center', + justifyContent: 'center', + }, + title: { + fontSize: 20, + fontWeight: 'bold', + }, + separator: { + marginVertical: 30, + height: 1, + width: '80%', + }, +}); diff --git a/app/(tabs)/two.tsx b/app/(tabs)/two.tsx new file mode 100644 index 0000000..f2ea47e --- /dev/null +++ b/app/(tabs)/two.tsx @@ -0,0 +1,31 @@ +import { StyleSheet } from 'react-native'; + +import EditScreenInfo from '@/components/EditScreenInfo'; +import { Text, View } from '@/components/Themed'; + +export default function TabTwoScreen() { + return ( + + Tab Two + + + + ); +} + +const styles = StyleSheet.create({ + container: { + flex: 1, + alignItems: 'center', + justifyContent: 'center', + }, + title: { + fontSize: 20, + fontWeight: 'bold', + }, + separator: { + marginVertical: 30, + height: 1, + width: '80%', + }, +}); diff --git a/app/+html.tsx b/app/+html.tsx new file mode 100644 index 0000000..cb31090 --- /dev/null +++ b/app/+html.tsx @@ -0,0 +1,38 @@ +import { ScrollViewStyleReset } from 'expo-router/html'; + +// This file is web-only and used to configure the root HTML for every +// web page during static rendering. +// The contents of this function only run in Node.js environments and +// do not have access to the DOM or browser APIs. +export default function Root({ children }: { children: React.ReactNode }) { + return ( + + + + + + + {/* + Disable body scrolling on web. This makes ScrollView components work closer to how they do on native. + However, body scrolling is often nice to have for mobile web. If you want to enable it, remove this line. + */} + + + {/* Using raw CSS styles as an escape-hatch to ensure the background color never flickers in dark-mode. */} +