From acd843d31c5b4f1648b33c2cb1946f08a5672109 Mon Sep 17 00:00:00 2001 From: Khairul Hidayat Date: Tue, 5 Nov 2024 18:43:59 +0700 Subject: [PATCH] chore: initial commit --- frontend/.gitignore | 20 + frontend/.npmrc | 1 + frontend/README.md | 50 + frontend/app.json | 36 + frontend/app/+html.tsx | 42 + frontend/app/+not-found.tsx | 29 + frontend/app/_layout.tsx | 38 + frontend/app/index.tsx | 14 + frontend/assets/fonts/SpaceMono-Regular.ttf | Bin 0 -> 93252 bytes frontend/assets/images/adaptive-icon.png | Bin 0 -> 17547 bytes frontend/assets/images/favicon.png | Bin 0 -> 1466 bytes frontend/assets/images/icon.png | Bin 0 -> 22380 bytes frontend/assets/images/partial-react-logo.png | Bin 0 -> 5075 bytes frontend/assets/images/react-logo.png | Bin 0 -> 6341 bytes frontend/assets/images/react-logo@2x.png | Bin 0 -> 14225 bytes frontend/assets/images/react-logo@3x.png | Bin 0 -> 21252 bytes frontend/assets/images/splash.png | Bin 0 -> 47346 bytes frontend/babel.config.js | 6 + frontend/package.json | 50 + frontend/pnpm-lock.yaml | 10871 ++++++++++++++++ frontend/tsconfig.json | 17 + server/go.mod | 3 + server/main.go | 4 + 23 files changed, 11181 insertions(+) create mode 100644 frontend/.gitignore create mode 100644 frontend/.npmrc create mode 100644 frontend/README.md create mode 100644 frontend/app.json create mode 100644 frontend/app/+html.tsx create mode 100644 frontend/app/+not-found.tsx create mode 100644 frontend/app/_layout.tsx create mode 100644 frontend/app/index.tsx create mode 100755 frontend/assets/fonts/SpaceMono-Regular.ttf create mode 100644 frontend/assets/images/adaptive-icon.png create mode 100644 frontend/assets/images/favicon.png create mode 100644 frontend/assets/images/icon.png create mode 100644 frontend/assets/images/partial-react-logo.png create mode 100644 frontend/assets/images/react-logo.png create mode 100644 frontend/assets/images/react-logo@2x.png create mode 100644 frontend/assets/images/react-logo@3x.png create mode 100644 frontend/assets/images/splash.png create mode 100644 frontend/babel.config.js create mode 100644 frontend/package.json create mode 100644 frontend/pnpm-lock.yaml create mode 100644 frontend/tsconfig.json create mode 100644 server/go.mod create mode 100644 server/main.go diff --git a/frontend/.gitignore b/frontend/.gitignore new file mode 100644 index 0000000..6623142 --- /dev/null +++ b/frontend/.gitignore @@ -0,0 +1,20 @@ +node_modules/ +.expo/ +dist/ +npm-debug.* +*.jks +*.p8 +*.p12 +*.key +*.mobileprovision +*.orig.* +web-build/ + +# macOS +.DS_Store + +# @generated expo-cli sync-2b81b286409207a5da26e14c78851eb30d8ccbdb +# The following patterns were generated by expo-cli + +expo-env.d.ts +# @end expo-cli \ No newline at end of file diff --git a/frontend/.npmrc b/frontend/.npmrc new file mode 100644 index 0000000..d67f374 --- /dev/null +++ b/frontend/.npmrc @@ -0,0 +1 @@ +node-linker=hoisted diff --git a/frontend/README.md b/frontend/README.md new file mode 100644 index 0000000..cd4feb8 --- /dev/null +++ b/frontend/README.md @@ -0,0 +1,50 @@ +# Welcome to your Expo app 👋 + +This is an [Expo](https://expo.dev) project created with [`create-expo-app`](https://www.npmjs.com/package/create-expo-app). + +## Get started + +1. Install dependencies + + ```bash + npm install + ``` + +2. Start the app + + ```bash + npx expo start + ``` + +In the output, you'll find options to open the app in a + +- [development build](https://docs.expo.dev/develop/development-builds/introduction/) +- [Android emulator](https://docs.expo.dev/workflow/android-studio-emulator/) +- [iOS simulator](https://docs.expo.dev/workflow/ios-simulator/) +- [Expo Go](https://expo.dev/go), a limited sandbox for trying out app development with Expo + +You can start developing by editing the files inside the **app** directory. This project uses [file-based routing](https://docs.expo.dev/router/introduction). + +## Get a fresh project + +When you're ready, run: + +```bash +npm run reset-project +``` + +This command will move the starter code to the **app-example** directory and create a blank **app** directory where you can start developing. + +## Learn more + +To learn more about developing your project with Expo, look at the following resources: + +- [Expo documentation](https://docs.expo.dev/): Learn fundamentals, or go into advanced topics with our [guides](https://docs.expo.dev/guides). +- [Learn Expo tutorial](https://docs.expo.dev/tutorial/introduction/): Follow a step-by-step tutorial where you'll create a project that runs on Android, iOS, and the web. + +## Join the community + +Join our community of developers creating universal apps. + +- [Expo on GitHub](https://github.com/expo/expo): View our open source platform and contribute. +- [Discord community](https://chat.expo.dev): Chat with Expo users and ask questions. diff --git a/frontend/app.json b/frontend/app.json new file mode 100644 index 0000000..d30aa03 --- /dev/null +++ b/frontend/app.json @@ -0,0 +1,36 @@ +{ + "expo": { + "name": "frontend", + "slug": "frontend", + "version": "1.0.0", + "orientation": "portrait", + "icon": "./assets/images/icon.png", + "scheme": "myapp", + "userInterfaceStyle": "automatic", + "splash": { + "image": "./assets/images/splash.png", + "resizeMode": "contain", + "backgroundColor": "#ffffff" + }, + "ios": { + "supportsTablet": true + }, + "android": { + "adaptiveIcon": { + "foregroundImage": "./assets/images/adaptive-icon.png", + "backgroundColor": "#ffffff" + } + }, + "web": { + "bundler": "metro", + "output": "static", + "favicon": "./assets/images/favicon.png" + }, + "plugins": [ + "expo-router" + ], + "experiments": { + "typedRoutes": true + } + } +} diff --git a/frontend/app/+html.tsx b/frontend/app/+html.tsx new file mode 100644 index 0000000..2d6b247 --- /dev/null +++ b/frontend/app/+html.tsx @@ -0,0 +1,42 @@ +import { ScrollViewStyleReset } from "expo-router/html"; +import { type PropsWithChildren } from "react"; + +/** + * 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 }: PropsWithChildren) { + 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. */} +