├── .gitignore
├── README.md
├── app.json
├── app
├── (tabs)
│ ├── _layout.tsx
│ ├── index.tsx
│ ├── profile.tsx
│ └── settings.tsx
└── _layout.tsx
├── assets
├── fonts
│ └── SpaceMono-Regular.ttf
├── icons
│ ├── add-money-wallet-icon.svg
│ ├── amazon-outlined.svg
│ ├── brand-uber.svg
│ ├── bxl-airbnb.svg
│ ├── dollar-line.svg
│ ├── dollar-sign.svg
│ ├── logo-figma.svg
│ ├── netflix.svg
│ ├── shopping-cart-line.svg
│ ├── spotify-logo-light.svg
│ └── wallet-credit-card.svg
└── images
│ ├── adaptive-icon.png
│ ├── favicon.png
│ ├── icon.png
│ ├── partial-react-logo.png
│ ├── react-logo.png
│ ├── react-logo@2x.png
│ ├── react-logo@3x.png
│ └── splash.png
├── babel.config.js
├── components
├── ExpenseBlock.tsx
├── Header.tsx
├── IncomeBlock.tsx
└── SpendingBlock.tsx
├── constants
├── Colors.ts
└── Icons.tsx
├── data
├── expenses.json
├── income.json
└── spending.json
├── declarations.d.ts
├── expo-env.d.ts
├── metro.config.js
├── package-lock.json
├── package.json
├── scripts
└── reset-project.js
├── tsconfig.json
└── types.ts
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules/
2 | .expo/
3 | dist/
4 | npm-debug.*
5 | *.jks
6 | *.p8
7 | *.p12
8 | *.key
9 | *.mobileprovision
10 | *.orig.*
11 | web-build/
12 |
13 | # macOS
14 | .DS_Store
15 |
16 | # @generated expo-cli sync-2b81b286409207a5da26e14c78851eb30d8ccbdb
17 | # The following patterns were generated by expo-cli
18 |
19 | expo-env.d.ts
20 | # @end expo-cli
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
Admin Dashboard
3 |
4 |
5 | 
6 |
7 | ## Features
8 | It is an admin panel developed with React Native. The user can track their sales, earnings and expenses through this panel. You can go to your profile from the Profile tab. Can set up account settings from the Settings tab.
9 |
10 | ## Built With
11 | - **@expo/vector-icons**
12 | - **@react-navigation/native**
13 | - **expo-router**
14 | - **expo-splash-screen**
15 | - **expo-status-bar**
16 | - **gifted-charts-core**
17 | - **lucide-react-native**
18 | - **react-native-gesture-handler**
19 | - **react-native-gifted-charts**
20 | - **react-native-reanimated**
21 | - **react-native-safe-area-context**
22 | - **react-native-screens**
23 | - **react-native-svg**
24 |
25 | ## Getting Started
26 | To get the project up and running on your local machine, follow these steps:
27 |
28 | Clone the repository:
29 | ````
30 | git clone https://github.com/dilarauluturhan/dashboard-react-native.git
31 | ````
32 | Go to the project directory:
33 | ````
34 | cd dashboard-react-native
35 | ````
36 | Install the required dependencies:
37 | ````
38 | npm install
39 | ````
40 | Start the application:
41 | ````
42 | npx expo start
43 | ````
44 | Go to `http://localhost:8081` in your Expo app.
45 |
46 | ## Contact With
47 | Dilara Uluturhan - [LinkedIn](https://www.linkedin.com/in/dilarauluturhan/) - dilarauluturhan@outlook.com
48 |
--------------------------------------------------------------------------------
/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "expo": {
3 | "name": "dashboard-expo",
4 | "slug": "dashboard-expo",
5 | "version": "1.0.0",
6 | "orientation": "portrait",
7 | "icon": "./assets/images/icon.png",
8 | "scheme": "myapp",
9 | "userInterfaceStyle": "automatic",
10 | "splash": {
11 | "image": "./assets/images/splash.png",
12 | "resizeMode": "contain",
13 | "backgroundColor": "#ffffff"
14 | },
15 | "ios": {
16 | "supportsTablet": true
17 | },
18 | "android": {
19 | "adaptiveIcon": {
20 | "foregroundImage": "./assets/images/adaptive-icon.png",
21 | "backgroundColor": "#ffffff"
22 | }
23 | },
24 | "web": {
25 | "bundler": "metro",
26 | "output": "static",
27 | "favicon": "./assets/images/favicon.png"
28 | },
29 | "plugins": [
30 | "expo-router"
31 | ],
32 | "experiments": {
33 | "typedRoutes": true
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/app/(tabs)/_layout.tsx:
--------------------------------------------------------------------------------
1 | import { View, Text } from "react-native";
2 | import React from "react";
3 | import { Tabs } from "expo-router";
4 | import {
5 | AntDesign,
6 | FontAwesome,
7 | SimpleLineIcons,
8 | Ionicons,
9 | } from "@expo/vector-icons";
10 | import Colors from "@/constants/Colors";
11 | import { StatusBar } from "expo-status-bar";
12 |
13 | export default function Layout() {
14 | return (
15 | <>
16 |
40 | (
44 |
51 |
52 |
53 | ),
54 | }}
55 | />
56 | (
60 |
67 |
68 |
69 | ),
70 | }}
71 | />
72 | (
76 |
83 |
84 |
85 | ),
86 | }}
87 | />
88 |
89 |
90 | >
91 | );
92 | }
93 |
--------------------------------------------------------------------------------
/app/(tabs)/index.tsx:
--------------------------------------------------------------------------------
1 | import { View, Text, StyleSheet, ScrollView } from "react-native";
2 | import React from "react";
3 | import Colors from "@/constants/Colors";
4 | import { Stack } from "expo-router";
5 | import Header from "@/components/Header";
6 | import { PieChart } from "react-native-gifted-charts";
7 | import ExpenseBlock from "@/components/ExpenseBlock";
8 | import ExpenseList from "@/data/expenses.json";
9 | import IncomeBlock from "@/components/IncomeBlock";
10 | import IncomeList from "@/data/income.json";
11 | import SpendingBlock from "@/components/SpendingBlock";
12 | import SpendingList from "@/data/spending.json";
13 |
14 | export default function Page() {
15 | const pieData = [
16 | {
17 | value: 47,
18 | color: Colors.tintColor,
19 | focused: true,
20 | text: "47%",
21 | },
22 | { value: 40, color: Colors.blue, text: "40%" },
23 | { value: 16, color: Colors.white, text: "16%" },
24 | { value: 7, color: Colors.grey, text: "16%" },
25 | ];
26 | return (
27 | <>
28 | ,
31 | }}
32 | />
33 |
34 |
35 |
38 |
39 |
42 | My Earning
43 |
44 |
47 | $7000.77
48 |
49 |
50 |
51 | {
62 | return (
63 |
66 |
73 | 77%
74 |
75 |
76 | );
77 | }}
78 | />
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 | >
88 | );
89 | }
90 |
91 | const styles = StyleSheet.create({
92 | container: {
93 | flex: 1,
94 | backgroundColor: Colors.black,
95 | paddingHorizontal: 20,
96 | },
97 | });
98 |
--------------------------------------------------------------------------------
/app/(tabs)/profile.tsx:
--------------------------------------------------------------------------------
1 | import {
2 | View,
3 | Text,
4 | StyleSheet,
5 | SafeAreaView,
6 | Image,
7 | TouchableOpacity,
8 | } from "react-native";
9 | import React from "react";
10 | import Colors from "@/constants/Colors";
11 | import { Stack } from "expo-router";
12 | import {
13 | FontAwesome,
14 | Ionicons,
15 | MaterialCommunityIcons,
16 | SimpleLineIcons,
17 | } from "@expo/vector-icons";
18 |
19 | export default function Page() {
20 | return (
21 | <>
22 |
23 |
24 |
25 |
26 |
27 |
31 |
32 | Dilotabi
33 |
34 |
35 |
36 |
37 |
38 |
39 | Account
40 |
41 |
42 |
43 |
44 |
45 |
50 | Notifications
51 |
52 |
53 |
54 |
55 |
56 |
61 | Settings
62 |
63 |
64 |
65 |
66 |
67 |
72 | Help
73 |
74 |
75 |
76 |
77 |
78 |
79 | Logout
80 |
81 |
82 |
83 |
84 |
85 | >
86 | );
87 | }
88 |
89 | const styles = StyleSheet.create({
90 | container: {
91 | flex: 1,
92 | backgroundColor: Colors.black,
93 | },
94 | safeArea: {
95 | flex: 1,
96 | },
97 | topSection: {
98 | height: 300,
99 | justifyContent: "center",
100 | alignItems: "center",
101 | },
102 | propicArea: {
103 | width: 150,
104 | height: 150,
105 | borderRadius: 100,
106 | borderWidth: 5,
107 | borderColor: Colors.tintColor,
108 | },
109 | propic: {
110 | width: "100%",
111 | height: "100%",
112 | borderRadius: 100,
113 | },
114 | text: {
115 | color: Colors.white,
116 | fontSize: 32,
117 | marginTop: 20,
118 | },
119 | btnText: {
120 | color: Colors.white,
121 | fontSize: 17,
122 | },
123 | btnSection: {
124 | paddingHorizontal: 25,
125 | marginBottom: 12,
126 | },
127 | btnArea: {
128 | paddingHorizontal: 15,
129 | paddingVertical: 13,
130 | flexDirection: "row",
131 | alignItems: "center",
132 | gap: 15,
133 | borderColor: Colors.grey,
134 | borderWidth: 1,
135 | borderRadius: 100,
136 | marginBottom: 7,
137 | },
138 | });
139 |
--------------------------------------------------------------------------------
/app/(tabs)/settings.tsx:
--------------------------------------------------------------------------------
1 | import {
2 | View,
3 | Text,
4 | StyleSheet,
5 | SafeAreaView,
6 | TouchableOpacity,
7 | ScrollView,
8 | } from "react-native";
9 | import React from "react";
10 | import Colors from "@/constants/Colors";
11 | import { Stack } from "expo-router";
12 | import { AntDesign } from "@expo/vector-icons";
13 |
14 | export default function Page() {
15 | const accountItems = [
16 | { icon: "meh", text: "Edit Profile" },
17 | { icon: "Safety", text: "Security" },
18 | { icon: "bells", text: "Notifications" },
19 | { icon: "lock", text: "Privacy" },
20 | ];
21 |
22 | const supportItems = [
23 | { icon: "creditcard", text: "My Subscription" },
24 | { icon: "questioncircleo", text: "Help & Support" },
25 | { icon: "infocirlceo", text: "Terms & Policies" },
26 | ];
27 |
28 | const cacheAndCellularItems = [
29 | { icon: "delete", text: "Free Up Space" },
30 | { icon: "save", text: "Date Saver" },
31 | ];
32 |
33 | const dashboardItems = [
34 | { icon: "flag", text: "Report a Problem" },
35 | { icon: "adduser", text: "Add Account" },
36 | { icon: "logout", text: "Log out" },
37 | ];
38 |
39 | const renderSettingsItem = ({
40 | icon,
41 | text,
42 | }: {
43 | icon: string;
44 | text: string;
45 | }) => (
46 | {}}
48 | style={{
49 | flexDirection: "row",
50 | alignItems: "center",
51 | paddingVertical: 8,
52 | paddingLeft: 30,
53 | }}
54 | >
55 |
56 |
64 | {text}
65 |
66 |
67 | );
68 | return (
69 | <>
70 |
71 |
72 |
73 | {/* Account */}
74 |
75 |
83 |
93 | Account
94 |
95 |
96 |
97 | {accountItems.map((item, index) => (
98 |
99 | {renderSettingsItem(item)}
100 |
101 | ))}
102 |
103 |
104 |
105 | {/* Support and About */}
106 |
107 |
115 |
125 | Support & About
126 |
127 |
128 |
129 | {supportItems.map((item, index) => (
130 |
131 | {renderSettingsItem(item)}
132 |
133 | ))}
134 |
135 |
136 |
137 | {/* Cache And Cellular */}
138 |
139 |
147 |
157 | Cache And Cellular
158 |
159 |
160 |
161 | {cacheAndCellularItems.map((item, index) => (
162 |
163 | {renderSettingsItem(item)}
164 |
165 | ))}
166 |
167 |
168 |
169 | {/* Dashboard Settings */}
170 |
171 |
179 |
189 | Dashboard Settings
190 |
191 |
192 |
193 | {dashboardItems.map((item, index) => (
194 |
195 | {renderSettingsItem(item)}
196 |
197 | ))}
198 |
199 |
200 |
201 |
202 | >
203 | );
204 | }
205 |
206 | const styles = StyleSheet.create({
207 | container: {
208 | flex: 1,
209 | backgroundColor: Colors.black,
210 | },
211 | wrapper: {
212 | marginBottom: 12,
213 | },
214 | });
215 |
--------------------------------------------------------------------------------
/app/_layout.tsx:
--------------------------------------------------------------------------------
1 | import { useFonts } from "expo-font";
2 | import { Stack } from "expo-router";
3 | import * as SplashScreen from "expo-splash-screen";
4 | import { useEffect } from "react";
5 | import "react-native-reanimated";
6 |
7 | SplashScreen.preventAutoHideAsync();
8 |
9 | export default function RootLayout() {
10 | const [loaded] = useFonts({
11 | SpaceMono: require("../assets/fonts/SpaceMono-Regular.ttf"),
12 | });
13 |
14 | useEffect(() => {
15 | if (loaded) {
16 | SplashScreen.hideAsync();
17 | }
18 | }, [loaded]);
19 |
20 | if (!loaded) {
21 | return null;
22 | }
23 |
24 | return (
25 |
26 |
27 |
28 | );
29 | }
30 |
--------------------------------------------------------------------------------
/assets/fonts/SpaceMono-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dilarauluturhan/dashboard-react-native/68c6ca3c0a96dc58b53c30de6e2f5aec4fe3311a/assets/fonts/SpaceMono-Regular.ttf
--------------------------------------------------------------------------------
/assets/icons/add-money-wallet-icon.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/assets/icons/amazon-outlined.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/assets/icons/brand-uber.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/assets/icons/bxl-airbnb.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/assets/icons/dollar-line.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/assets/icons/dollar-sign.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/assets/icons/logo-figma.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/assets/icons/netflix.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/assets/icons/shopping-cart-line.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/assets/icons/spotify-logo-light.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/assets/icons/wallet-credit-card.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/assets/images/adaptive-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dilarauluturhan/dashboard-react-native/68c6ca3c0a96dc58b53c30de6e2f5aec4fe3311a/assets/images/adaptive-icon.png
--------------------------------------------------------------------------------
/assets/images/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dilarauluturhan/dashboard-react-native/68c6ca3c0a96dc58b53c30de6e2f5aec4fe3311a/assets/images/favicon.png
--------------------------------------------------------------------------------
/assets/images/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dilarauluturhan/dashboard-react-native/68c6ca3c0a96dc58b53c30de6e2f5aec4fe3311a/assets/images/icon.png
--------------------------------------------------------------------------------
/assets/images/partial-react-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dilarauluturhan/dashboard-react-native/68c6ca3c0a96dc58b53c30de6e2f5aec4fe3311a/assets/images/partial-react-logo.png
--------------------------------------------------------------------------------
/assets/images/react-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dilarauluturhan/dashboard-react-native/68c6ca3c0a96dc58b53c30de6e2f5aec4fe3311a/assets/images/react-logo.png
--------------------------------------------------------------------------------
/assets/images/react-logo@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dilarauluturhan/dashboard-react-native/68c6ca3c0a96dc58b53c30de6e2f5aec4fe3311a/assets/images/react-logo@2x.png
--------------------------------------------------------------------------------
/assets/images/react-logo@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dilarauluturhan/dashboard-react-native/68c6ca3c0a96dc58b53c30de6e2f5aec4fe3311a/assets/images/react-logo@3x.png
--------------------------------------------------------------------------------
/assets/images/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dilarauluturhan/dashboard-react-native/68c6ca3c0a96dc58b53c30de6e2f5aec4fe3311a/assets/images/splash.png
--------------------------------------------------------------------------------
/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = function (api) {
2 | api.cache(true);
3 | return {
4 | presets: ['babel-preset-expo'],
5 | };
6 | };
7 |
--------------------------------------------------------------------------------
/components/ExpenseBlock.tsx:
--------------------------------------------------------------------------------
1 | import {
2 | View,
3 | Text,
4 | FlatList,
5 | ListRenderItem,
6 | StyleSheet,
7 | TouchableOpacity,
8 | } from "react-native";
9 | import React from "react";
10 | import { ExpenseType } from "@/types";
11 | import Colors from "@/constants/Colors";
12 | import { Feather } from "@expo/vector-icons";
13 |
14 | export default function ExpenseBlock({
15 | expenseList,
16 | }: {
17 | expenseList: ExpenseType[];
18 | }) {
19 | const renderItem: ListRenderItem> = ({
20 | item,
21 | index,
22 | }) => {
23 | if (index == 0) {
24 | return (
25 | {}}>
26 |
27 |
28 |
29 |
30 | );
31 | }
32 | return (
33 |
46 |
57 | {item.name}
58 |
59 |
71 | ${item.amount}
72 |
73 |
81 |
92 | {item.percentage}%
93 |
94 |
95 |
96 | );
97 | };
98 |
99 | const staticItem = [{ name: "Add Item" }];
100 |
101 | return (
102 |
103 |
109 |
110 | );
111 | }
112 |
113 | const styles = StyleSheet.create({
114 | expenseBlock: {
115 | backgroundColor: Colors.blue,
116 | width: 100,
117 | padding: 15,
118 | borderRadius: 15,
119 | marginRight: 20,
120 | gap: 7,
121 | justifyContent: "space-between",
122 | alignItems: "flex-start",
123 | },
124 | addItemBtn: {
125 | flex: 1,
126 | borderWidth: 2,
127 | borderColor: "#666",
128 | borderStyle: "dashed",
129 | borderRadius: 10,
130 | marginRight: 20,
131 | padding: 20,
132 | justifyContent: "center",
133 | alignItems: "center",
134 | },
135 | });
136 |
--------------------------------------------------------------------------------
/components/Header.tsx:
--------------------------------------------------------------------------------
1 | import {
2 | View,
3 | Text,
4 | SafeAreaView,
5 | StyleSheet,
6 | Image,
7 | TouchableOpacity,
8 | } from "react-native";
9 | import React from "react";
10 | import Colors from "@/constants/Colors";
11 |
12 | export default function Header() {
13 | return (
14 |
15 |
16 |
17 |
21 |
22 |
23 | Hi, Dilotabi!
24 |
25 |
28 | Your Admin Panel
29 |
30 |
31 |
32 |
33 | {}} style={styles.btnWrapper}>
34 | My Profile
35 |
36 |
37 |
38 | );
39 | }
40 |
41 | const styles = StyleSheet.create({
42 | container: { flex: 1, backgroundColor: Colors.black },
43 | wrapper: {
44 | flexDirection: "row",
45 | justifyContent: "space-between",
46 | alignItems: "center",
47 | height: 70,
48 | paddingHorizontal: 20,
49 | },
50 | userInfoWrapper: { flexDirection: "row", alignItems: "center" },
51 | userImg: { width: 50, height: 50, borderRadius: 30 },
52 | btnWrapper: {
53 | borderColor: "#666",
54 | borderWidth: 1,
55 | padding: 8,
56 | borderRadius: 10,
57 | },
58 | });
59 |
--------------------------------------------------------------------------------
/components/IncomeBlock.tsx:
--------------------------------------------------------------------------------
1 | import {
2 | View,
3 | Text,
4 | FlatList,
5 | ListRenderItem,
6 | TouchableOpacity,
7 | } from "react-native";
8 | import React from "react";
9 | import Colors from "@/constants/Colors";
10 | import { IncomeType } from "@/types";
11 | import {
12 | DollarIcon,
13 | WalletAddMoneyIcon,
14 | WalletCardIcon,
15 | } from "@/constants/Icons";
16 | import { Feather } from "@expo/vector-icons";
17 |
18 | export default function IncomeBlock({
19 | incomeList,
20 | }: {
21 | incomeList: IncomeType[];
22 | }) {
23 | const renderItem: ListRenderItem = ({ item }) => {
24 | let icon = ;
25 | if (item.name === "Freelancing") {
26 | icon = ;
27 | } else if (item.name === "Interest") {
28 | icon = ;
29 | }
30 | return (
31 |
41 |
48 |
57 | {icon}
58 |
59 | {}}>
60 |
61 |
62 |
63 | {item.name}
64 |
65 | {item.amount}
66 |
67 |
68 | );
69 | };
70 | return (
71 |
72 |
80 | My Income
81 |
82 |
88 |
89 | );
90 | }
91 |
--------------------------------------------------------------------------------
/components/SpendingBlock.tsx:
--------------------------------------------------------------------------------
1 | import { View, Text } from "react-native";
2 | import React from "react";
3 | import { SpendingType } from "@/types";
4 | import Colors from "@/constants/Colors";
5 | import {
6 | DollarIcon,
7 | AirbnbIcon,
8 | NetflixIcon,
9 | SpotifyIcon,
10 | AmazonIcon,
11 | FigmaIcon,
12 | ShoopingCartIcon,
13 | } from "@/constants/Icons";
14 | import { Feather, MaterialCommunityIcons } from "@expo/vector-icons";
15 |
16 | export default function SpendingBlock({
17 | spendingList,
18 | }: {
19 | spendingList: SpendingType[];
20 | }) {
21 | let icon = ;
22 |
23 | return (
24 |
25 |
33 | February Sale
34 |
35 |
36 | {spendingList.map((item) => {
37 | if (item.name == "Trendyol") {
38 | icon = (
39 |
46 | );
47 | } else if (item.name == "Hepsiburada") {
48 | icon = (
49 |
50 | );
51 | } else if (item.name == "Amazon") {
52 | icon = ;
53 | } else if (item.name == "Online Shopping") {
54 | icon = (
55 |
56 | );
57 | }
58 | return (
59 |
67 |
75 | {icon}
76 |
77 |
85 |
86 |
93 | {item.name}
94 |
95 | {item.date}
96 |
97 |
100 | ${item.amount}
101 |
102 |
103 |
104 | );
105 | })}
106 |
107 | );
108 | }
109 |
--------------------------------------------------------------------------------
/constants/Colors.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | black: "#1A1A1A",
3 | white: "#FCFCFC",
4 | grey: "#373A40",
5 | blue: "#405D72",
6 | tintColor: "#E6B9A6",
7 | };
8 |
--------------------------------------------------------------------------------
/constants/Icons.tsx:
--------------------------------------------------------------------------------
1 | import DollarIcon from "@/assets/icons/dollar-line.svg";
2 | import WalletAddMoneyIcon from "@/assets/icons/add-money-wallet-icon.svg";
3 | import WalletCardIcon from "@/assets/icons/wallet-credit-card.svg";
4 | import AmazonIcon from "@/assets/icons/amazon-outlined.svg";
5 | import UberIcon from "@/assets/icons/brand-uber.svg";
6 | import AirbnbIcon from "@/assets/icons/bxl-airbnb.svg";
7 | import DollarSignIcon from "@/assets/icons/dollar-sign.svg";
8 | import FigmaIcon from "@/assets/icons/logo-figma.svg";
9 | import ShoopingCartIcon from "@/assets/icons/shopping-cart-line.svg";
10 | import SpotifyIcon from "@/assets/icons/spotify-logo-light.svg";
11 | import NetflixIcon from "@/assets/icons/netflix.svg";
12 |
13 | export {
14 | DollarIcon,
15 | WalletAddMoneyIcon,
16 | WalletCardIcon,
17 | AmazonIcon,
18 | UberIcon,
19 | AirbnbIcon,
20 | DollarSignIcon,
21 | FigmaIcon,
22 | ShoopingCartIcon,
23 | SpotifyIcon,
24 | NetflixIcon,
25 | };
--------------------------------------------------------------------------------
/data/expenses.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "id": "1",
4 | "name": "Sale",
5 | "amount": "955.75",
6 | "percentage": "61"
7 | },
8 | {
9 | "id": "2",
10 | "name": "Turnover",
11 | "amount": "300.55",
12 | "percentage": "19"
13 | },
14 | {
15 | "id": "3",
16 | "name": "Saving",
17 | "amount": "200.95",
18 | "percentage": "13"
19 | },
20 | {
21 | "id": "4",
22 | "name": "Profit",
23 | "amount": "70.95",
24 | "percentage": "5"
25 | }
26 | ]
27 |
--------------------------------------------------------------------------------
/data/income.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "id": "1",
4 | "name": "Salary",
5 | "amount": "1,500.00"
6 | },
7 | {
8 | "id": "2",
9 | "name": "Freelancing",
10 | "amount": "850.99"
11 | },
12 | {
13 | "id": "3",
14 | "name": "Interest",
15 | "amount": "200.95"
16 | }
17 | ]
--------------------------------------------------------------------------------
/data/spending.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "id": "1",
4 | "name": "Trendyol",
5 | "amount": "355.45",
6 | "date": "2024-02-02"
7 | },
8 | {
9 | "id": "2",
10 | "name": "Hepsiburada",
11 | "amount": "755,23",
12 | "date": "2024-02-18"
13 | },
14 | {
15 | "id": "3",
16 | "name": "Amazon",
17 | "amount": "234.69",
18 | "date": "2024-02-06"
19 | },
20 | {
21 | "id": "4",
22 | "name": "Online Shopping",
23 | "amount": "136.99",
24 | "date": "2024-02-12"
25 | }
26 | ]
27 |
--------------------------------------------------------------------------------
/declarations.d.ts:
--------------------------------------------------------------------------------
1 | declare module "*.svg" {
2 | import React from "react";
3 | import { SvgProps } from "react-native-svg";
4 | const content: React.FC;
5 | export default content;
6 | }
7 |
--------------------------------------------------------------------------------
/expo-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
3 | // NOTE: This file should not be edited and should be in your git ignore
--------------------------------------------------------------------------------
/metro.config.js:
--------------------------------------------------------------------------------
1 | const { getDefaultConfig } = require("expo/metro-config");
2 |
3 | module.exports = (() => {
4 | const config = getDefaultConfig(__dirname);
5 |
6 | const { transformer, resolver } = config;
7 |
8 | config.transformer = {
9 | ...transformer,
10 | babelTransformerPath: require.resolve("react-native-svg-transformer/expo"),
11 | };
12 | config.resolver = {
13 | ...resolver,
14 | assetExts: resolver.assetExts.filter((ext) => ext !== "svg"),
15 | sourceExts: [...resolver.sourceExts, "svg"],
16 | };
17 |
18 | return config;
19 | })();
20 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "dashboard-expo",
3 | "main": "expo-router/entry",
4 | "version": "1.0.0",
5 | "scripts": {
6 | "start": "expo start",
7 | "reset-project": "node ./scripts/reset-project.js",
8 | "android": "expo start --android",
9 | "ios": "expo start --ios",
10 | "web": "expo start --web",
11 | "test": "jest --watchAll",
12 | "lint": "expo lint"
13 | },
14 | "jest": {
15 | "preset": "jest-expo"
16 | },
17 | "dependencies": {
18 | "@expo/vector-icons": "^14.0.2",
19 | "@react-navigation/native": "^6.0.2",
20 | "expo": "~51.0.23",
21 | "expo-constants": "~16.0.2",
22 | "expo-font": "~12.0.9",
23 | "expo-linear-gradient": "~13.0.2",
24 | "expo-linking": "~6.3.1",
25 | "expo-router": "~3.5.19",
26 | "expo-splash-screen": "~0.27.5",
27 | "expo-status-bar": "~1.12.1",
28 | "expo-system-ui": "~3.0.7",
29 | "expo-web-browser": "~13.0.3",
30 | "gifted-charts-core": "^0.1.25",
31 | "lucide-react-native": "^0.417.0",
32 | "react": "18.2.0",
33 | "react-dom": "18.2.0",
34 | "react-native": "0.74.3",
35 | "react-native-gesture-handler": "~2.16.1",
36 | "react-native-gifted-charts": "^1.4.23",
37 | "react-native-reanimated": "~3.10.1",
38 | "react-native-safe-area-context": "4.10.5",
39 | "react-native-screens": "3.31.1",
40 | "react-native-svg": "15.2.0",
41 | "react-native-web": "~0.19.10"
42 | },
43 | "devDependencies": {
44 | "@babel/core": "^7.20.0",
45 | "@types/jest": "^29.5.12",
46 | "@types/react": "~18.2.45",
47 | "@types/react-test-renderer": "^18.0.7",
48 | "jest": "^29.2.1",
49 | "jest-expo": "~51.0.3",
50 | "react-native-svg-transformer": "^1.5.0",
51 | "react-test-renderer": "18.2.0",
52 | "typescript": "~5.3.3"
53 | },
54 | "private": true
55 | }
56 |
--------------------------------------------------------------------------------
/scripts/reset-project.js:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env node
2 |
3 | /**
4 | * This script is used to reset the project to a blank state.
5 | * It moves the /app directory to /app-example and creates a new /app directory with an index.tsx and _layout.tsx file.
6 | * You can remove the `reset-project` script from package.json and safely delete this file after running it.
7 | */
8 |
9 | const fs = require('fs');
10 | const path = require('path');
11 |
12 | const root = process.cwd();
13 | const oldDirPath = path.join(root, 'app');
14 | const newDirPath = path.join(root, 'app-example');
15 | const newAppDirPath = path.join(root, 'app');
16 |
17 | const indexContent = `import { Text, View } from "react-native";
18 |
19 | export default function Index() {
20 | return (
21 |
28 | Edit app/index.tsx to edit this screen.
29 |
30 | );
31 | }
32 | `;
33 |
34 | const layoutContent = `import { Stack } from "expo-router";
35 |
36 | export default function RootLayout() {
37 | return (
38 |
39 |
40 |
41 | );
42 | }
43 | `;
44 |
45 | fs.rename(oldDirPath, newDirPath, (error) => {
46 | if (error) {
47 | return console.error(`Error renaming directory: ${error}`);
48 | }
49 | console.log('/app moved to /app-example.');
50 |
51 | fs.mkdir(newAppDirPath, { recursive: true }, (error) => {
52 | if (error) {
53 | return console.error(`Error creating new app directory: ${error}`);
54 | }
55 | console.log('New /app directory created.');
56 |
57 | const indexPath = path.join(newAppDirPath, 'index.tsx');
58 | fs.writeFile(indexPath, indexContent, (error) => {
59 | if (error) {
60 | return console.error(`Error creating index.tsx: ${error}`);
61 | }
62 | console.log('app/index.tsx created.');
63 |
64 | const layoutPath = path.join(newAppDirPath, '_layout.tsx');
65 | fs.writeFile(layoutPath, layoutContent, (error) => {
66 | if (error) {
67 | return console.error(`Error creating _layout.tsx: ${error}`);
68 | }
69 | console.log('app/_layout.tsx created.');
70 | });
71 | });
72 | });
73 | });
74 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "expo/tsconfig.base",
3 | "compilerOptions": {
4 | "strict": true,
5 | "paths": {
6 | "@/*": [
7 | "./*"
8 | ]
9 | }
10 | },
11 | "include": [
12 | "**/*.ts",
13 | "**/*.tsx",
14 | ".expo/types/**/*.ts",
15 | "expo-env.d.ts"
16 | ]
17 | }
18 |
--------------------------------------------------------------------------------
/types.ts:
--------------------------------------------------------------------------------
1 | export interface ExpenseType {
2 | id: string;
3 | name: string;
4 | amount: string;
5 | percentage: string;
6 | }
7 |
8 | export interface IncomeType {
9 | id: string;
10 | name: string;
11 | amount: string;
12 | }
13 |
14 | export interface SpendingType {
15 | id: string;
16 | name: string;
17 | amount: string;
18 | date: string;
19 | }
20 |
--------------------------------------------------------------------------------