Initial commit

Generated by create-expo-app 3.3.0.
This commit is contained in:
Med Kamel 2025-04-15 01:11:41 +01:00
commit bf20e7e3d7
28 changed files with 13755 additions and 0 deletions

38
.gitignore vendored Normal file
View File

@ -0,0 +1,38 @@
# Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files
# dependencies
node_modules/
# Expo
.expo/
dist/
web-build/
expo-env.d.ts
# Native
*.orig.*
*.jks
*.p8
*.p12
*.key
*.mobileprovision
# Metro
.metro-health-check*
# debug
npm-debug.*
yarn-debug.*
yarn-error.*
# macOS
.DS_Store
*.pem
# local env files
.env*.local
# typescript
*.tsbuildinfo
app-example

50
README.md Normal file
View File

@ -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.

45
app.json Normal file
View File

@ -0,0 +1,45 @@
{
"expo": {
"name": "BrixCafe",
"slug": "BrixCafe",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/images/logo.png",
"scheme": "myapp",
"userInterfaceStyle": "automatic",
"newArchEnabled": true,
"ios": {
"supportsTablet": true
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/images/adaptive-icon.png",
"backgroundColor": "#ffffff"
},
"statusBar": {
"hidden": false,
"barStyle": "dark-content"
}
},
"web": {
"bundler": "metro",
"output": "static",
"favicon": "./assets/images/logo.png"
},
"plugins": [
"expo-router",
[
"expo-splash-screen",
{
"image": "./assets/images/splash-icon.png",
"imageWidth": 200,
"resizeMode": "contain",
"backgroundColor": "#ffffff"
}
]
],
"experiments": {
"typedRoutes": true
}
}
}

BIN
app.rar Normal file

Binary file not shown.

5
app/_layout.tsx Normal file
View File

@ -0,0 +1,5 @@
import { Stack } from 'expo-router';
export default function Layout() {
return <Stack screenOptions={{ headerShown: false}} />;
}

7
app/constants/colors.ts Normal file
View File

@ -0,0 +1,7 @@
const COLORS = {
background_user: '#FFFFFF',
text: '#FFFFFF',
primary: '#B07B2C',
};
export default COLORS;

5
app/index.tsx Normal file
View File

@ -0,0 +1,5 @@
import { Redirect } from 'expo-router';
export default function Index() {
return <Redirect href="/screens/auth/OpeningScreen" />;
}

View File

@ -0,0 +1,90 @@
import React from 'react';
import { View, Text, Image, StyleSheet, TouchableOpacity } from 'react-native';
import { router } from 'expo-router';
import COLORS from '../../constants/colors';
import { StatusBar } from 'expo-status-bar';
const OpeningScreen = () => {
return (
<View style={styles.container}>
<StatusBar style="auto" />
<Image source={require('../../../assets/images/logo.png')} style={styles.logo} />
<Text style={styles.welcomeText}>Bienvenue chez Brix Café</Text>
<Image source={require('../../../assets/images/coffee_cup.jpg')} style={styles.coffeeImage} />
<Text style={styles.descriptionText}>
Depuis 2024, Brix Café vous fait vivre une expérience café unique,
inspirée du savoir-faire italien et portée par une passion authentique.
Des grains dexception, une qualité incomparable.
</Text>
<TouchableOpacity style={styles.signInButton} onPress={() => router.push('/screens/auth/SignInScreen')}>
<Text style={styles.buttonText}>Se connecter</Text>
</TouchableOpacity>
<TouchableOpacity style={styles.signUpButton} onPress={() => router.push('/screens/auth/SignUpScreen')}>
<Text style={styles.buttonText}>Créer un compte</Text>
</TouchableOpacity>
</View>
);
};
// Styles
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#000000',
alignItems: 'center',
justifyContent: 'center',
paddingHorizontal: 20,
},
logo: {
width: 120,
height: 120,
marginBottom: 20,
},
welcomeText: {
fontSize: 26,
fontWeight: 'bold',
color: COLORS.text,
marginBottom: 20,
},
coffeeImage: {
width: '120%',
height: 150,
marginTop:40,
marginBottom: 30,
},
descriptionText: {
fontSize: 14,
color: COLORS.text,
textAlign: 'center',
marginBottom: 40,
},
signInButton: {
backgroundColor: COLORS.primary,
paddingVertical: 15,
paddingHorizontal: 40,
borderRadius: 10,
marginBottom: 20,
width: '80%',
alignItems: 'center',
},
signUpButton: {
borderWidth: 1,
borderColor: COLORS.primary,
paddingVertical: 15,
paddingHorizontal: 40,
borderRadius: 10,
width: '80%',
alignItems: 'center',
},
buttonText: {
fontSize: 16,
color: COLORS.text,
fontWeight: 'bold',
},
});
export default OpeningScreen;

View File

@ -0,0 +1,34 @@
import React from 'react';
import { View, Text, StyleSheet, Button } from 'react-native';
import { router } from 'expo-router';
const SignInScreen = () => {
return (
<View style={styles.container}>
<Text style={styles.welcomeText}>Sign In Screen</Text>
<Button
title="Back to Opening Screen"
onPress={() => router.back()}
/>
</View>
);
};
// Styles
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#FFFFFF',
alignItems: 'center',
justifyContent: 'center',
paddingHorizontal: 20,
},
welcomeText: {
fontSize: 24,
fontWeight: 'bold',
color: '#000000',
marginBottom: 20,
},
});
export default SignInScreen;

View File

@ -0,0 +1,35 @@
import React from 'react';
import { View, Text,StyleSheet, Button } from 'react-native';
import { router } from 'expo-router';
const SignUpScreen = () => {
return (
<View style={styles.container}>
<Text style={styles.welcomeText}>Sign up Screen</Text>
<Button
title="Back to Opening Screen"
onPress={() => router.back()}
/>
</View>
);
};
// Styles
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#FFFFFF',
alignItems: 'center',
justifyContent: 'center',
paddingHorizontal: 20,
},
welcomeText: {
fontSize: 24,
fontWeight: 'bold',
color: '#000000',
marginBottom: 20,
},
});
export default SignUpScreen;

View File

@ -0,0 +1,8 @@
import { Stack } from 'expo-router';
export default function AuthLayout() {
return (
<Stack screenOptions={{ headerShown: false }}>
</Stack>
);
}

View File

@ -0,0 +1,31 @@
import React from 'react';
import { View, Text, Image, StyleSheet, TouchableOpacity } from 'react-native';
const UserHomeScreen = () => {
return (
<View style={styles.container}>
<Text style={styles.welcomeText}>UserHomeScreen</Text>
</View>
);
};
// Styles
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#FFFFFF',
alignItems: 'center',
justifyContent: 'center',
paddingHorizontal: 20,
},
welcomeText: {
fontSize: 24,
fontWeight: 'bold',
color: '#000000',
marginBottom: 20,
},
});
export default UserHomeScreen;

View File

@ -0,0 +1,8 @@
import { Stack } from 'expo-router';
export default function UserLayout() {
return (
<Stack screenOptions={{ headerShown: false }}>
</Stack>
);
}

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

BIN
assets/images/favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
assets/images/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
assets/images/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 681 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

13215
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

55
package.json Normal file
View File

@ -0,0 +1,55 @@
{
"name": "brixcafe",
"main": "expo-router/entry",
"version": "1.0.0",
"scripts": {
"start": "expo start",
"reset-project": "node ./scripts/reset-project.js",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web",
"test": "jest --watchAll",
"lint": "expo lint"
},
"jest": {
"preset": "jest-expo"
},
"dependencies": {
"@expo/vector-icons": "^14.0.2",
"@react-navigation/bottom-tabs": "^7.2.0",
"@react-navigation/native": "^7.0.14",
"expo": "~52.0.46",
"expo-blur": "~14.0.3",
"expo-constants": "~17.0.8",
"expo-font": "~13.0.4",
"expo-haptics": "~14.0.1",
"expo-linking": "~7.0.5",
"expo-router": "~4.0.20",
"expo-splash-screen": "~0.29.24",
"expo-status-bar": "~2.0.1",
"expo-symbols": "~0.2.2",
"expo-system-ui": "~4.0.9",
"expo-web-browser": "~14.0.2",
"react": "18.3.1",
"react-dom": "18.3.1",
"react-native": "0.76.9",
"react-native-gesture-handler": "~2.20.2",
"react-native-reanimated": "~3.16.1",
"react-native-safe-area-context": "4.12.0",
"react-native-screens": "~4.4.0",
"react-native-web": "~0.19.13",
"react-native-webview": "13.12.5"
},
"devDependencies": {
"@babel/core": "^7.25.2",
"@types/jest": "^29.5.12",
"@types/react": "~18.3.12",
"@types/react-native": "^0.73.0",
"@types/react-test-renderer": "^18.3.0",
"jest": "^29.2.1",
"jest-expo": "~52.0.6",
"react-test-renderer": "18.3.1",
"typescript": "^5.3.3"
},
"private": true
}

112
scripts/reset-project.js Normal file
View File

@ -0,0 +1,112 @@
#!/usr/bin/env node
/**
* This script is used to reset the project to a blank state.
* It deletes or moves the /app, /components, /hooks, /scripts, and /constants directories to /app-example based on user input and creates a new /app directory with an index.tsx and _layout.tsx file.
* You can remove the `reset-project` script from package.json and safely delete this file after running it.
*/
const fs = require("fs");
const path = require("path");
const readline = require("readline");
const root = process.cwd();
const oldDirs = ["app", "components", "hooks", "constants", "scripts"];
const exampleDir = "app-example";
const newAppDir = "app";
const exampleDirPath = path.join(root, exampleDir);
const indexContent = `import { Text, View } from "react-native";
export default function Index() {
return (
<View
style={{
flex: 1,
justifyContent: "center",
alignItems: "center",
}}
>
<Text>Edit app/index.tsx to edit this screen.</Text>
</View>
);
}
`;
const layoutContent = `import { Stack } from "expo-router";
export default function RootLayout() {
return <Stack />;
}
`;
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout,
});
const moveDirectories = async (userInput) => {
try {
if (userInput === "y") {
// Create the app-example directory
await fs.promises.mkdir(exampleDirPath, { recursive: true });
console.log(`📁 /${exampleDir} directory created.`);
}
// Move old directories to new app-example directory or delete them
for (const dir of oldDirs) {
const oldDirPath = path.join(root, dir);
if (fs.existsSync(oldDirPath)) {
if (userInput === "y") {
const newDirPath = path.join(root, exampleDir, dir);
await fs.promises.rename(oldDirPath, newDirPath);
console.log(`➡️ /${dir} moved to /${exampleDir}/${dir}.`);
} else {
await fs.promises.rm(oldDirPath, { recursive: true, force: true });
console.log(`❌ /${dir} deleted.`);
}
} else {
console.log(`➡️ /${dir} does not exist, skipping.`);
}
}
// Create new /app directory
const newAppDirPath = path.join(root, newAppDir);
await fs.promises.mkdir(newAppDirPath, { recursive: true });
console.log("\n📁 New /app directory created.");
// Create index.tsx
const indexPath = path.join(newAppDirPath, "index.tsx");
await fs.promises.writeFile(indexPath, indexContent);
console.log("📄 app/index.tsx created.");
// Create _layout.tsx
const layoutPath = path.join(newAppDirPath, "_layout.tsx");
await fs.promises.writeFile(layoutPath, layoutContent);
console.log("📄 app/_layout.tsx created.");
console.log("\n✅ Project reset complete. Next steps:");
console.log(
`1. Run \`npx expo start\` to start a development server.\n2. Edit app/index.tsx to edit the main screen.${
userInput === "y"
? `\n3. Delete the /${exampleDir} directory when you're done referencing it.`
: ""
}`
);
} catch (error) {
console.error(`❌ Error during script execution: ${error.message}`);
}
};
rl.question(
"Do you want to move existing files to /app-example instead of deleting them? (Y/n): ",
(answer) => {
const userInput = answer.trim().toLowerCase() || "y";
if (userInput === "y" || userInput === "n") {
moveDirectories(userInput).finally(() => rl.close());
} else {
console.log("❌ Invalid input. Please enter 'Y' or 'N'.");
rl.close();
}
}
);

17
tsconfig.json Normal file
View File

@ -0,0 +1,17 @@
{
"extends": "expo/tsconfig.base",
"compilerOptions": {
"strict": true,
"paths": {
"@/*": [
"./*"
]
}
},
"include": [
"**/*.ts",
"**/*.tsx",
".expo/types/**/*.ts",
"expo-env.d.ts"
]
}