Welcome to the React-Node Recipe App! This application allows users to view, add, and manage their favorite recipes. It is built using React for the frontend and Node.js with Prisma for the backend, offering a complete full-stack experience.
- Getting Started 🚀
- Technologies Used
- Setting Up the Project
- Backend Setup
- Frontend Setup
- Features
- License
- Contact
To get the React-Node Recipe App running locally, follow the steps below:
Make sure you have the following installed:
- Node.js and npm (Node Package Manager)
- PostgreSQL database
- A Spoonacular API key for fetching recipe data
-
Clone the Repository:
First, clone the repository to your local machine:
git clone https://github.com/ebrahimbeiati/recipe-app.git cd react-node-recipe-app -
Backend Setup:
-
Navigate to the backend directory:
cd backend -
Install the necessary dependencies:
npm install
-
Configure Spoonacular API:
- Obtain your Spoonacular API key.
- Add the API key to the
.envfile:API_KEY=your_spoonacular_api_key
-
ElephantSQL Setup:
- Create a PostgreSQL database instance on ElephantSQL.
- Copy the connection string provided by ElephantSQL.
-
Prisma Setup:
- Open the
.envfile and replace theDATABASE_URLvalue with your ElephantSQL connection string. - Initialize Prisma and generate the Prisma client:
npx prisma init npx prisma generate
- Open the
-
Start the backend server:
npm start
The backend server should now be running on
http://localhost:5000(or the port defined in your.envfile). -
-
Frontend Setup:
-
Navigate to the frontend directory:
cd frontend -
Install the frontend dependencies:
npm install
-
Start the frontend development server:
npm run dev
The frontend application should now be running at
http://localhost:3000(or the port defined in yourvite.config.jsfile). -
- Frontend:
- React: A JavaScript library for building user interfaces.
- Vite: A fast build tool for modern web development.
- Tailwind CSS: A utility-first CSS framework for styling the frontend.
- Backend:
- Node.js: JavaScript runtime used for the backend server.
- Express: Web application framework for Node.js.
- Prisma: ORM to interact with the PostgreSQL database.
- PostgreSQL: Relational database for storing recipe and user data.
- API:
- Spoonacular API: Provides recipe data, including ingredients, nutritional information, and more.
- View Recipes: Browse through a collection of recipes.
- Add Recipes: Users can add their own recipes.
- Manage Favorites: Save and manage favorite recipes for later viewing.
- Search Recipes: Filter recipes by name, ingredients, or categories.
- User Authentication: Users can sign up, log in, and securely store their data.
This project is licensed under the MIT License. See the LICENSE file for more details.
For any questions, issues, or suggestions, feel free to reach out:
- Email: [email protected]
- GitHub: github.com/ebrahimbeiati
Enjoy building and exploring the React-Node Recipe App! 🍲