Add initial configuration for mobile app with Expo

- Created package.json for project dependencies and scripts
- Added TypeScript configuration with strict settings and React Native support
This commit is contained in:
Nawaz Dhandala
2025-10-11 12:16:39 +01:00
parent cd096f66ea
commit 144001981a
9 changed files with 14591 additions and 0 deletions

77
MobileApp/.gitignore vendored Normal file
View File

@@ -0,0 +1,77 @@
# OSX
#
.DS_Store
# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate
project.xcworkspace
# Android/IntelliJ
#
build/
.idea
.gradle
local.properties
*.iml
*.hprof
.cxx/
*.keystore
!debug.keystore
# node.js
#
node_modules/
npm-debug.log
yarn-error.log
# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/
**/fastlane/report.xml
**/fastlane/Preview.html
**/fastlane/screenshots
**/fastlane/test_output
# Bundle artifact
*.jsbundle
# Ruby / CocoaPods
/ios/Pods/
/vendor/bundle/
# Temporary files created by Metro to check the health of the file watcher
.metro-health-check*
# Expo
.expo/
dist/
web-build/
# @generated expo-cli sync-2b81b286409207a5da26e14c78851eb30d8ccbdb
# The following patterns were generated by expo-cli
# Expo local environment
.env*.local
# macOS
.DS_Store

33
MobileApp/App.tsx Normal file
View File

@@ -0,0 +1,33 @@
import { StatusBar } from 'expo-status-bar';
import { StyleSheet, Text, View } from 'react-native';
export default function App() {
return (
<View style={styles.container}>
<Text style={styles.title}>Welcome to OneUptime Mobile</Text>
<Text style={styles.subtitle}>Your monitoring app on the go</Text>
<StatusBar style="auto" />
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
padding: 20,
},
title: {
fontSize: 24,
fontWeight: 'bold',
marginBottom: 10,
textAlign: 'center',
},
subtitle: {
fontSize: 16,
color: '#666',
textAlign: 'center',
},
});

120
MobileApp/README.md Normal file
View File

@@ -0,0 +1,120 @@
# OneUptime Mobile App
A React Native mobile application built with Expo for the OneUptime monitoring platform. This app enables users to monitor their infrastructure, services, and applications on the go with real-time alerts and dashboards.
## 📱 About
OneUptime Mobile brings the power of OneUptime's comprehensive monitoring and observability platform to your mobile device. Stay connected to your systems wherever you are, receive instant notifications, and respond to incidents quickly.
### Key Features (Planned)
- 📊 Real-time monitoring dashboards
- 🔔 Push notifications for alerts and incidents
- 🚨 Incident management on the go
- 📈 Performance metrics and analytics
- 🔐 Secure authentication
- 🌐 Multi-tenant support
- 📱 Native iOS and Android experience
## Getting Started
### Prerequisites
- Node.js (v18 or later)
- npm or yarn
- Expo CLI (will be installed with dependencies)
- For iOS development: macOS with Xcode
- For Android development: Android Studio with Android SDK
### Installation
Dependencies are already installed. If you need to reinstall:
```bash
npm install
```
### Running the App
#### Start the Expo development server:
```bash
npm start
```
This will open the Expo DevTools in your browser where you can:
- Press `i` to open in iOS simulator
- Press `a` to open in Android emulator
- Scan the QR code with Expo Go app on your physical device
#### Run directly on Android:
```bash
npm run android
```
#### Run directly on iOS:
```bash
npm run ios
```
#### Run in web browser:
```bash
npm run web
```
### Project Structure
```
MobileApp/
├── App.tsx # Main application component
├── app.json # Expo configuration
├── package.json # Dependencies and scripts
├── tsconfig.json # TypeScript configuration
├── babel.config.js # Babel configuration
├── assets/ # Images, fonts, and other assets
└── .gitignore # Git ignore patterns
```
### Development
The app is built with:
- **React Native** - Mobile framework
- **Expo** - Development platform and tools
- **TypeScript** - Type-safe JavaScript
- **React** 18.2.0
- **React Native** 0.74.5
### Assets
Place your app assets in the `assets/` directory:
- `icon.png` - App icon (1024x1024)
- `splash.png` - Splash screen (1284x2778)
- `adaptive-icon.png` - Android adaptive icon (1024x1024)
- `favicon.png` - Web favicon
### Building for Production
For production builds, you'll need to configure EAS Build:
```bash
npm install -g eas-cli
eas login
eas build:configure
```
Then build for your platform:
```bash
eas build --platform android
eas build --platform ios
```
### Troubleshooting
- If you encounter issues, try clearing the Expo cache: `expo start -c`
- For iOS simulator issues, rebuild: `expo run:ios --clean`
- For Android emulator issues, clean build: `expo run:android --clean`
## Learn More
- [Expo Documentation](https://docs.expo.dev/)
- [React Native Documentation](https://reactnative.dev/)
- [OneUptime Documentation](https://oneuptime.com/docs)

32
MobileApp/app.json Normal file
View File

@@ -0,0 +1,32 @@
{
"expo": {
"name": "OneUptime Mobile",
"slug": "oneuptime-mobile",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"userInterfaceStyle": "light",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true,
"bundleIdentifier": "com.oneuptime.mobile"
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png",
"backgroundColor": "#ffffff"
},
"package": "com.oneuptime.mobile"
},
"web": {
"favicon": "./assets/favicon.png"
}
}
}

View File

@@ -0,0 +1,11 @@
# Assets Directory
This directory contains app assets such as icons and splash screens.
You should replace the placeholder files with actual assets:
- `icon.png` - App icon (1024x1024)
- `splash.png` - Splash screen image (1284x2778)
- `adaptive-icon.png` - Android adaptive icon (1024x1024)
- `favicon.png` - Web favicon (48x48 or larger)
For now, placeholder files can be generated using Expo's tools or you can add your own custom assets.

View File

@@ -0,0 +1,6 @@
module.exports = function(api) {
api.cache(true);
return {
presets: ['babel-preset-expo'],
};
};

14261
MobileApp/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

25
MobileApp/package.json Normal file
View File

@@ -0,0 +1,25 @@
{
"name": "oneuptime-mobile",
"version": "1.0.0",
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web"
},
"dependencies": {
"expo": "~51.0.28",
"expo-status-bar": "~1.12.1",
"react": "18.2.0",
"react-native": "0.74.5",
"react-native-safe-area-context": "4.10.5",
"react-native-screens": "~3.31.1"
},
"devDependencies": {
"@babel/core": "^7.24.0",
"@types/react": "~18.2.79",
"typescript": "~5.3.3"
},
"private": true
}

26
MobileApp/tsconfig.json Normal file
View File

@@ -0,0 +1,26 @@
{
"extends": "expo/tsconfig.base",
"compilerOptions": {
"strict": true,
"jsx": "react-native",
"target": "esnext",
"module": "esnext",
"lib": ["esnext"],
"moduleResolution": "node",
"noEmit": true,
"skipLibCheck": true,
"resolveJsonModule": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true
},
"include": [
"**/*.ts",
"**/*.tsx",
".expo/types/**/*.ts",
"expo-env.d.ts"
],
"exclude": [
"node_modules"
]
}