Compare commits

..

No commits in common. "6c2ebe7d7aa0720919b783f2c1f41d2cfb6050aa" and "c9b82462187b3e69cb30d3c868d55a50c90b71e8" have entirely different histories.

5 changed files with 103 additions and 119 deletions

View File

@ -35,12 +35,7 @@ To get started with DeguApp, follow these steps:
2. Install dependencies: 2. Install dependencies:
```bash ```bash
# frontend cd deguapp
cd deguapp/frontend
npm install
# backend
cd deguapp/api
npm install npm install
``` ```
@ -48,6 +43,11 @@ To get started with DeguApp, follow these steps:
5. Open the app in your browser or Android emulator and start exploring! 5. Open the app in your browser or Android emulator and start exploring!
## Contributing
Contributions are welcome! If you'd like to contribute to DeguApp, please fork the repository and submit a pull request with your changes.
Use the upstream of the project, which can be found at https:/git.filiprojek.cz/fr/deguapp. **GitHub repository is just a mirror!**
## Local builds ## Local builds
### Android ### Android
@ -74,24 +74,12 @@ bundletool build-apks --bundle=./frontend/android/app/build/outputs/bundle/relea
bundletool install-apks --apks=./deguapp.apks bundletool install-apks --apks=./deguapp.apks
``` ```
#### Resources:
### Resources:
- https://github.com/expo/eas-cli/issues/1300 - https://github.com/expo/eas-cli/issues/1300
- https://reactnative.dev/docs/signed-apk-android#generating-the-release-aab - https://reactnative.dev/docs/signed-apk-android#generating-the-release-aab
### Server
```bash
cd api/
npm i
npm run build
```
## Contributing
Contributions are welcome! If you'd like to contribute to DeguApp, please fork the repository and submit a pull request with your changes.
Use the upstream of the project, which can be found at https:/git.filiprojek.cz/fr/deguapp. **GitHub repository is just a mirror!**
## License ## License
This project is licensed under the GNU GPLv3 License - see the [LICENSE](LICENSE) file for details. This project is licensed under the GNU GPLv3 License - see the [LICENSE](LICENSE) file for details.

View File

@ -1,41 +1,43 @@
{ {
"expo": { "expo": {
"name": "deguapp", "name": "deguapp",
"slug": "deguapp", "slug": "deguapp",
"scheme": "deguapp", "scheme": "deguapp",
"version": "1.0.0", "version": "1.0.0",
"orientation": "portrait", "orientation": "portrait",
"icon": "./assets/icon.png", "icon": "./assets/icon.png",
"userInterfaceStyle": "light", "userInterfaceStyle": "light",
"splash": { "splash": {
"image": "./assets/splash.png", "image": "./assets/splash.png",
"resizeMode": "contain", "resizeMode": "contain",
"backgroundColor": "#ffffff" "backgroundColor": "#ffffff"
}, },
"assetBundlePatterns": ["**/*"], "assetBundlePatterns": [
"ios": { "**/*"
"supportsTablet": true ],
}, "ios": {
"android": { "supportsTablet": true
"adaptiveIcon": { },
"foregroundImage": "./assets/adaptive-icon.png", "android": {
"backgroundColor": "#ffffff" "adaptiveIcon": {
} "foregroundImage": "./assets/adaptive-icon.png",
}, "backgroundColor": "#ffffff"
"web": { }
"favicon": "./assets/favicon.png" },
}, "web": {
"plugins": [ "favicon": "./assets/favicon.png"
"expo-router", },
[ "plugins": [
"expo-image-picker", "expo-router",
{ [
"photosPermission": "The app accesses your photos to let you share them with your friends.", "expo-image-picker",
"cameraPermission": "The app accesses your camera to let you take photos of your beer and share them with your friends.", {
"microphonePermission": "The app accesses your microphone to let you record audio and share it with your friends." "photosPermission": "The app accesses your photos to let you share them with your friends.",
} "cameraPermission": "The app accesses your camera to let you take photos of your beer and share them with your friends.",
], "microphonePermission": "The app accesses your microphone to let you record audio and share it with your friends."
"expo-secure-store" }
] ],
} "expo-secure-store"
]
}
} }

View File

@ -16,28 +16,23 @@ function SignupPage() {
const { onSignin } = useAuth(); const { onSignin } = useAuth();
async function signin() { async function signin() {
if (pass1 != pass2) { if (pass1 == pass2) {
alert("Passwords are not same!"); const res = await onSignin(username, email, pass1);
return; if (res.error) {
} if (res.msg.message == "validation error") {
alert(res.msg.data.message);
const res = await onSignin(username, email, pass1); } else {
const data = await res.json(); alert(res.msg.message);
}
if (res.status == 400) { }
if (data.message == "validation error") { if (!res.error) {
alert(data.data.message); alert("You have been successfully registered. Please Log In");
} else { router.replace("/login");
alert("Something went wrong");
} }
return; return;
} }
if (res.status == 201) { alert("Passwords are not same!");
alert("You have been successfully registered. Please Log In");
router.replace("/login");
return;
}
} }
return ( return (

View File

@ -1,7 +1,7 @@
{ {
"$schema": "https://biomejs.dev/schemas/1.7.3/schema.json", "$schema": "https://biomejs.dev/schemas/1.7.3/schema.json",
"files": { "files": {
"ignore": [".expo/", ".vscode/", "node_modules/", "dist/"] "ignore": [".expo/", ".vscode/", "node_modules/"]
}, },
"organizeImports": { "organizeImports": {
"enabled": true "enabled": true

View File

@ -1,43 +1,42 @@
{ {
"name": "deguapp", "name": "deguapp",
"version": "1.0.0", "version": "1.0.0",
"main": "expo-router/entry", "main": "expo-router/entry",
"scripts": { "scripts": {
"start": "expo start", "start": "expo start",
"android": "expo start --android", "android": "expo start --android",
"ios": "expo start --ios", "ios": "expo start --ios",
"web": "expo start --web", "web": "expo start --web",
"build:web": "npx expo export", "build:web": "npx expo export"
"format": "npx @biomejs/biome format --write ." },
}, "dependencies": {
"dependencies": { "@expo/metro-runtime": "~3.2.1",
"@expo/metro-runtime": "~3.2.1", "@react-native-async-storage/async-storage": "^1.23.1",
"@react-native-async-storage/async-storage": "^1.23.1", "@types/react": "~18.2.45",
"@types/react": "~18.2.45", "axios": "^1.6.8",
"axios": "^1.6.8", "expo": "^51.0.2",
"expo": "^51.0.2", "expo-constants": "~16.0.1",
"expo-constants": "~16.0.1", "expo-image-picker": "~15.0.4",
"expo-image-picker": "~15.0.4", "expo-linear-gradient": "~13.0.2",
"expo-linear-gradient": "~13.0.2", "expo-linking": "~6.3.1",
"expo-linking": "~6.3.1", "expo-router": "~3.5.11",
"expo-router": "~3.5.11", "expo-secure-store": "~13.0.1",
"expo-secure-store": "~13.0.1", "expo-status-bar": "~1.12.1",
"expo-status-bar": "~1.12.1", "expo-system-ui": "~3.0.4",
"expo-system-ui": "~3.0.4", "react": "18.2.0",
"react": "18.2.0", "react-dom": "18.2.0",
"react-dom": "18.2.0", "react-native": "0.74.1",
"react-native": "0.74.1", "react-native-dropdown-picker": "^5.4.6",
"react-native-dropdown-picker": "^5.4.6", "react-native-range-slider-expo": "^1.4.3",
"react-native-range-slider-expo": "^1.4.3", "react-native-safe-area-context": "4.10.1",
"react-native-safe-area-context": "4.10.1", "react-native-screens": "3.31.1",
"react-native-screens": "3.31.1", "react-native-web": "~0.19.6",
"react-native-web": "~0.19.6", "@shopify/flash-list": "1.6.4"
"@shopify/flash-list": "1.6.4" },
}, "devDependencies": {
"devDependencies": { "@babel/core": "^7.20.0",
"@babel/core": "^7.20.0", "@biomejs/biome": "1.7.3",
"@biomejs/biome": "1.7.3", "babel-plugin-module-resolver": "^5.0.2"
"babel-plugin-module-resolver": "^5.0.2" },
}, "private": true
"private": true
} }