A simple Angular application for searching and visualizing fruit nutrition information.
Report a Bug
Table of Contents
This application allows users to search for fruits by name, order, family, or genus, and learn more about their nutritional values.
Fruit images are sourced from two online photo services: Unsplash and Pexels.
The project includes a Node.js backup server providing mocked APIs for the application. (The original online API was discontinued during development.) However, the server is not the core focus of this project.
This section lists the primary frameworks and tools used to build the project. Plugins and additional tools are mentioned in the acknowledgements. Key technologies include:
Follow these instructions to set up the project locally.
This project requires Node.js (v19 or higher) and a package manager. While the examples below use NPM, you may use any package manager you prefer.
If you just want to try the application in prduction-like mode, jump directly to the production-like mode section.
-
Obtain free API keys at:
-
Clone the repository:
git clone https://github.com/mancarius/fruitify2.git
-
Install API server dependencies:
cd api npm install
-
Create a .env file in the API directory and add your API keys:
NODE_ENV=development PEXELS_API_KEY=<la-tua-pexels-api-key> UNSPLASH_API_KEY=<la-tua-unsplash-api-key>
-
Install client dependencies:
cd ../client npm install
To run the application in development mode:
- Start the API server:
cd /api npm run start:dev
- Start the client:
cd ../client npm run dev
Access the application at http://localhost:4200
You must have a container management tool (e.g., Docker or Podman) installed on your machine to run this command.
Run the application in production mode using Docker:
docker-compose -f docker-compose.prod.yml up -d --build
Access the application at http://localhost
Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.
Mattia Mancarella - LinkedIn - hello@mattiamancarella.com
Project Link: https://github.com/mancarius/fruitify2