Skip to content

Commit

Permalink
Merge pull request #42 from mohand3del/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
GreenVenom77 authored Oct 14, 2024
2 parents ab6123d + 5ed8d32 commit 2520548
Show file tree
Hide file tree
Showing 172 changed files with 8,547 additions and 20 deletions.
Binary file added .assets/Images/details_screen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .assets/Images/favourites_screen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .assets/Images/home_screen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .assets/Images/logo.webp
Binary file not shown.
Binary file added .assets/Images/search_screen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .assets/Images/signin_screen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .assets/Images/signup_screen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .assets/Images/splash_screen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions .idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions .idea/appInsightsSettings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions .idea/deploymentTargetSelector.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/migrations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

74 changes: 74 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Recipe App

<p style="text-align: center;"> <img src=".assets/Images/logo.webp" alt="App Logo"> </p>

Creating a complete recipe application that allows users to explore, search, and save their favorite recipes, with additional features such as video playback and user authentication.

## Table of Contents
- [Introduction](#introduction)
- [Features](#features)
- [Usage](#usage)
- [Screens](#screens)
- [Database](#database)
- [Navigation](#navigation)
- [Configuration](#configuration)

## Introduction
The Recipe App is designed to provide a seamless cooking experience, allowing users to search for recipes, view details, watch recipe-related videos, and save their favorites. The app includes multiple fragments for user authentication, recipe exploration, and user profile management, with an easy-to-use bottom navigation bar.

## Features
- **Splash Screen:** A splash screen using the Lottie library for animation.
- **User Authentication:** Login and registration screens to manage user sessions.
- **Recipe Search:** Search for recipes from [TheMealDB API](https://www.themealdb.com/api.php).
- **Favorites:** Save and manage your favorite recipes.
- **Video Playback:** Overlay video player for YouTube-like recipe videos.
- **Fragment Navigation:** Smooth navigation between different app sections using a Bottom Navigation component.
- **About Page:** Information about the app creator and app synopsis.

## Usage
1. Upon launching the app, the **Splash Screen** will appear.
2. New users must register or log in.
3. Once logged in, users will be directed to the **Home Fragment** where they can explore recipes.
4. Use the **Bottom Navigation** to switch between the **Home**, **Favorites**, and **Search** screens.
5. Click on a recipe to view details in the **RecipeDetailFragment**.
6. Save a recipe to favorites by clicking the "Save to Favorites" button.
7. Watch video instructions on recipes using the integrated video player.

## Screens
1. **SplashFragment**
- Displays the animated splash screen for a few seconds.
- ![Splash Screen](.assets/Images/splash_screen.png)

2. **SignInFragment & SignUpFragment**
- Handle user signing in and registration.
- ![SignIn Screen](.assets/Images/signin_screen.png)
- ![SignUp Screen](.assets/Images/signup_screen.png)

3. **HomeFragment**
- Lists recipes fetched from the API.
- ![Home Screen](.assets/Images/home_screen.png)

4. **RecipeDetailFragment**
- Displays recipe details, including image, ingredients, instructions and video.
- ![Recipe Details](.assets/Images/details_screen.png)

5. **FavouriteFragment**
- Shows a list of user's favorite recipes.
- ![Favorite Screen](.assets/Images/favourites_screen.png)

6. **SearchFragment**
- Enables searching for recipes by name, category or keyword.
- ![Search Screen](.assets/Images/search_screen.png)

## Database
- **Local Database:** Room database is used to store all the data about the user.
- **Database Operations:** Handle save, update, delete, and fetch operations for Registration, Login and favorites.

## Navigation
- **AuthActivity:** Manages the **SplashFragment**, **LoginFragment**, and **RegisterFragment**.
- **RecipeActivity:** Manages the remaining fragments, allowing navigation through the Bottom Navigation.
- **Bottom Navigation:** Includes tabs for Home, Search, and Favorites, facilitating easy access to all features.

## Configuration
- **Shared Preferences:** Used to store user login status and track whether the user has logged in before.
- **API Configuration:** Integrate TheMealDB API for fetching recipes.
12 changes: 12 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,16 @@ dependencies {
// Splashscreen
implementation("androidx.core:core-splashscreen:1.0.0")

// Hashing
implementation("org.mindrot:jbcrypt:0.4")

// Shimmer
implementation ("com.facebook.shimmer:shimmer:0.5.0")

// SwipereFreshLayout
implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.1.0")

// Youtube Player
implementation("com.pierfrancescosoffritti.androidyoutubeplayer:core:12.1.0")

}
22 changes: 16 additions & 6 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,23 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
xmlns:tools="http://schemas.android.com/tools" >

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />

<application
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:icon="@mipmap/logo"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:roundIcon="@mipmap/logo"
android:supportsRtl="true"
android:theme="@style/Theme.RecipeAppITI"
tools:targetApi="31">
tools:targetApi="31" >
<activity
android:name=".main.view.RecipeActivity"
android:windowSoftInputMode="adjustPan"
android:configChanges="orientation|screenSize|keyboardHidden|smallestScreenSize|screenLayout"
android:exported="false">
</activity>
<activity
android:name=".MainActivity"
android:name=".auth.AuthActivity"
android:windowSoftInputMode="adjustPan"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
package com.example.recipeappiti.aboutDevelopers.view

import android.content.Intent
import android.net.Uri
import android.os.Bundle
import androidx.fragment.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.TextView
import com.example.recipeappiti.R
import com.google.android.material.bottomnavigation.BottomNavigationView

class AboutDevelopersFragment : Fragment() {

private lateinit var userEmailIbrahim: TextView
private lateinit var userLinkedInIbrahim: TextView
private lateinit var userGitHubIbrahim: TextView


private lateinit var userEmailHossam: TextView
private lateinit var userLinkedInHossam: TextView
private lateinit var userGitHubHossam: TextView

private lateinit var userEmailMohaned: TextView
private lateinit var userLinkedInMohaned: TextView
private lateinit var userGitHubMohaned: TextView

private lateinit var bottomNavigationView: BottomNavigationView

override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_about_developers, container, false)
}

override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)

bottomNavigationView = requireActivity().findViewById(R.id.bottom_navigation)
bottomNavigationView.visibility = View.GONE

userEmailIbrahim = view.findViewById(R.id.userEmailIbrahim)
userLinkedInIbrahim = view.findViewById(R.id.userLinkedInIbrahim)
userGitHubIbrahim = view.findViewById(R.id.userGitHubIbrahim)

userEmailIbrahim.setOnClickListener {
sendEmail("ibrahim.mohamed.ibrahim.t@gmail.com")
}

userLinkedInIbrahim.setOnClickListener {
openLink("https://www.linkedin.com/in/eibrahim67")
}

userGitHubIbrahim.setOnClickListener {
openLink("https://github.com/eIbrahim67")
}

userEmailHossam = view.findViewById(R.id.userEmailHossam)
userLinkedInHossam = view.findViewById(R.id.userLinkedInHossam)
userGitHubHossam = view.findViewById(R.id.userGitHubHossam)

userEmailHossam.setOnClickListener {
sendEmail("hossamwalidgv@gmail.com")
}
userLinkedInHossam.setOnClickListener {
openLink("https://www.linkedin.com/in/gv-hossamwalid")
}
userGitHubHossam.setOnClickListener {
openLink("https://github.com/GreenVenom77")
}

userEmailMohaned = view.findViewById(R.id.userEmailMohand)
userLinkedInMohaned = view.findViewById(R.id.userLinkedInMohand)
userGitHubMohaned = view.findViewById(R.id.userGitHubMohand)

userEmailMohaned.setOnClickListener {
sendEmail("mohandadel2299@gmail.com")
}
userLinkedInMohaned.setOnClickListener {
openLink("https://www.linkedin.com/in/mohand-adel-034013189/")
}
userGitHubMohaned.setOnClickListener {
openLink("https://github.com/mohand3del")
}

}

private fun sendEmail(email: String) {
val intent = Intent(Intent.ACTION_SENDTO).apply {
data = Uri.parse("mailto:$email")
}
startActivity(intent)
}

private fun openLink(url: String) {
val intent = Intent(Intent.ACTION_VIEW).apply {
data = Uri.parse(url)
}
startActivity(intent)
}

override fun onDestroyView() {
super.onDestroyView()
bottomNavigationView.visibility = View.VISIBLE
}

}
Loading

0 comments on commit 2520548

Please sign in to comment.