diff --git a/Dockerfile b/Dockerfile index 7c52685f..69531588 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,7 +24,7 @@ ENV EXPO_PUBLIC_NEULAND_GRAPHQL_ENDPOINT=${EXPO_PUBLIC_NEULAND_GRAPHQL_ENDPOINT} ENV EXPO_PUBLIC_APTABASE_KEY=${EXPO_PUBLIC_APTABASE_KEY} ENV NODE_ENV=production -RUN npx expo export -p web +RUN npx expo export -p web -c # Final stage: Serve static files using npx serve FROM node:23 AS final diff --git a/app.config.json b/app.config.json index 42f3050d..6c18b422 100644 --- a/app.config.json +++ b/app.config.json @@ -103,6 +103,14 @@ "eas": { "projectId": "b0ef9e3f-3115-44b0-abc7-99dd75821353" } + }, + "web": { + "favicon": "./src/assets/web/favicon.png", + "shortName": "Neuland Next", + "name": "Neuland Next - Deine inoffizielle App für die THI", + "description": "Neuland Next ist eine inoffizielle App für die Technische Hochschule Ingolstadt. Sie bietet dir alle Funktionen, die du für dein Studium benötigst, an einem Ort.", + "lang": "de", + "preferRelatedApplications": true } } } diff --git a/babel.config.js b/babel.config.js index 1cdfe386..8214224d 100644 --- a/babel.config.js +++ b/babel.config.js @@ -2,6 +2,18 @@ module.exports = function (api) { api.cache(true) return { presets: ['babel-preset-expo'], - plugins: ['react-native-reanimated/plugin'], + plugins: [ + ['react-native-reanimated/plugin'], + [ + 'transform-inline-environment-variables', + { + include: [ + 'EXPO_PUBLIC_NEULAND_GRAPHQL_ENDPOINT', + 'EXPO_PUBLIC_NEULAND_GRAPHQL_ENDPOINT', + 'EXPO_PUBLIC_APTABASE_KEY', + ], + }, + ], + ], } } diff --git a/bun.lockb b/bun.lockb index 5b40a9f5..e773da94 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index 32554711..00000000 --- a/docker-compose.yml +++ /dev/null @@ -1,13 +0,0 @@ -services: - app: - build: . - ports: - - '3000:3000' - environment: - NODE_ENV: production - EXPO_PUBLIC_THI_API_KEY: ${EXPO_PUBLIC_THI_API_KEY} - EXPO_PUBLIC_NEULAND_GRAPHQL_ENDPOINT: ${EXPO_PUBLIC_NEULAND_GRAPHQL_ENDPOINT} - EXPO_PUBLIC_APTABASE_KEY: ${EXPO_PUBLIC_APTABASE_KEY} - volumes: - - .:/usr/src/app - restart: unless-stopped diff --git a/package.json b/package.json index b82b07e7..8f4cc396 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "@gorhom/bottom-sheet": "^5.0.6", "@howljs/calendar-kit": "^2.2.1", "@kichiyaki/react-native-barcode-generator": "^0.6.7", - "@maplibre/maplibre-react-native": "^10.0.0-beta.8", + "@maplibre/maplibre-react-native": "^10.0.0-beta.9", "@react-native-community/datetimepicker": "8.2.0", "@react-native-community/netinfo": "11.4.1", "@react-navigation/native": "^7.0.14", @@ -64,7 +64,7 @@ "expo-splash-screen": "~0.29.18", "expo-system-ui": "~4.0.6", "fuse.js": "^7.0.0", - "graphql": "^16.9.0", + "graphql": "^16.10.0", "i18next": "^24.1.0", "lucide-react-native": "^0.468.0", "metro": "^0.81.0", @@ -103,13 +103,14 @@ "zustand": "^5.0.2" }, "devDependencies": { + "babel-plugin-transform-inline-environment-variables": "^0.4.4", "@babel/core": "^7.26.0", "@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6", "@babel/plugin-proposal-optional-chaining": "^7.21.0", "@babel/plugin-transform-arrow-functions": "^7.25.9", "@babel/plugin-transform-shorthand-properties": "^7.25.9", "@babel/plugin-transform-template-literals": "^7.25.9", - "@commitlint/cli": "^19.6.0", + "@commitlint/cli": "^19.6.1", "@commitlint/config-conventional": "^19.6.0", "@expo/ngrok": "^4.1.3", "@graphql-codegen/cli": "5.0.3", diff --git a/src/api/neuland-api.ts b/src/api/neuland-api.ts index 1af6b78e..8b6fb272 100644 --- a/src/api/neuland-api.ts +++ b/src/api/neuland-api.ts @@ -15,7 +15,9 @@ import { UNIVERSITY_SPORTS_QUERY, } from './gql-documents' -const GRAPHQL_ENDPOINT: string = 'https://api.neuland.app/graphql' +const GRAPHQL_ENDPOINT: string = + process.env.EXPO_PUBLIC_NEULAND_GRAPHQL_ENDPOINT ?? + 'https://api.neuland.app/graphql' console.info('Using GraphQL endpoint:', GRAPHQL_ENDPOINT) const ASSET_ENDPOINT: string = 'https://assets.neuland.app' const USER_AGENT = `neuland.app-native/${packageInfo.version} (+${packageInfo.homepage})` diff --git a/src/assets/web/favicon.png b/src/assets/web/favicon.png new file mode 100644 index 00000000..aba3030a Binary files /dev/null and b/src/assets/web/favicon.png differ diff --git a/src/assets/web/og-image.png b/src/assets/web/og-image.png new file mode 100644 index 00000000..2189f732 Binary files /dev/null and b/src/assets/web/og-image.png differ