An open API service indexing awesome lists of open source software.

https://github.com/lucsantosdev/app-food-recipes

A modern Angular app to discover recipes quickly.
https://github.com/lucsantosdev/app-food-recipes

angular api app bootstrap food-recipes typescript

Last synced: 7 days ago
JSON representation

A modern Angular app to discover recipes quickly.

Awesome Lists containing this project

README

          

# Food Recipes App ๐Ÿฝ๏ธ

>A modern Angular app to discover recipes quickly, search by term, and open detailed views with key meal information.

![App Preview](public/preview-app.png)

## What This App Does โœจ

- Shows random recipe suggestions on the Home page.
- Lets users load more ideas in batches.
- Supports search by recipe name or ingredient keyword.
- Opens a complete recipe details page.
- Displays similar recipes to keep discovery going.

## Main Pages ๐Ÿงญ

- Home (/): random recipes with Load more behavior.
- Search (/search): query-based recipe search.
- About (/about): app overview and creator links.
- Recipe details (/recipe?id=123): full recipe information by id.

## Tech Stack ๐Ÿงฑ

- Angular 21 (standalone components)
- TypeScript
- RxJS
- Bootstrap 5
- Spoonacular API

## How The App Works Internally โš™๏ธ

1. User navigates through Angular Router links in the header.
2. UI components call dedicated services for each data type.
3. Services use HttpClient to call Spoonacular endpoints.
4. Responses are rendered in cards and detail sections.
5. Loading and error states are shown to improve UX.

### Services

- RandomRecipes service:
- Endpoint: /recipes/random
- Used on Home page (initial list + load more)
- SearchService:
- Endpoint: /recipes/complexSearch
- Used on Search page
- SingleRecipe service:
- Endpoints: /recipes/{id}/information and /recipes/{id}/similar
- Used on Recipe details page

## Project Structure (High Level) ๐Ÿ“

- src/app/components
- header, footer
- pages/home
- pages/search
- pages/about
- pages/single-recipe
- src/app/services
- random-recipes
- search
- single-recipe
- src/environments
- environments.example.ts (this file will become 'environment.ts' to work properly)

## API Key Setup ๐Ÿ”

This project uses Spoonacular API. Add your key here:

- File: src/environments/environments-example.ts
- Property: apiKey

Example:

```ts
export const environment = {
apiKey: 'YOUR_API_KEY_HERE',
};
```

Then, rename the file to 'environment.ts'.

## Run Locally ๐Ÿš€

Install dependencies:

```bash
npm install
```

โš ๏ธ Set up your API Key as instruced previouly.

Start development server:

```bash
ng serve
```

Open:

- http://localhost:4200/

## Build And Test ๐Ÿงช

Build:

```bash
npm run build
```

Unit tests:

```bash
npm test
```

## UX Notes ๐ŸŽจ

- Responsive layout for desktop and mobile.
- Clear loading and error feedback.
- Accessible external links using target _blank + rel noopener noreferrer.

## Built With โšก

- Recipe data: [Spoonacular API](https://spoonacular.com/food-api)
- Built with Angular

## License ๐Ÿ“„

This project is open source under the terms of the [MIT License](LICENSE).

## ๐Ÿ’ฌ Connect with Me
Follow my journey and other projects on:
- **LinkedIn:** [lucsantosdev](https://www.linkedin.com/in/lucsantosdev)
- **GitHub:** [lucsantosdev](https://github.com/lucsantosdev)
- **Email:** [lucsantosdev@gmail.com](mailto:lucsantosdev@gmail.com)
- **Support Me:** [Ko-Fi](https://ko-fi.com/lucsantosdev)

---

๐Ÿง  Je 9:23-24