guided-cooking-app

Guided Cooking App

Table of Contents

  1. Introduction
  2. Features
  3. Tech Stack
  4. Getting Started
  5. Project Structure
  6. Design Principles & Refinements
  7. Backend Details
  8. Frontend Details
  9. Development History & Context
  10. Outstanding Issues & Next Steps

1. Introduction

The Guided Cooking App is a web application designed to enhance the home cooking experience. It allows users to discover new recipes, manage their pantry, generate shopping lists, and follow step-by-step cooking instructions with integrated timers. The application aims to provide a seamless and intuitive user experience with a modern, minimalist design.

2. Features

Core Features

New Feature: Meal Planning

A recently integrated feature that allows users to:

3. Tech Stack

The application is built with a modern and robust tech stack:

4. Getting Started

Prerequisites

Before you begin, ensure you have the following installed on your system:

Installation

Follow these steps to set up and run the project locally:

  1. Clone the repository:
    git clone https://github.com/smile-plzz/guided-cooking-app.git
    cd guided-cooking-app
    
  2. Install server dependencies:
    cd server
    npm install
    
  3. Install client dependencies:
    cd ../client
    npm install
    

Running the Application

You need to start both the backend server and the frontend client.

  1. Start the server: Navigate to the server directory and run:
    npm start
    

    The server will typically run on http://localhost:5000.

  2. Start the client: Navigate to the client directory and run:
    npm start
    

    The client application will typically open in your browser at http://localhost:3000.

Spoonacular API Key Setup

The application relies on the Spoonacular API for various features. You need to obtain an API key and configure it:

  1. Get an API Key:
  2. Configure the API Key:
    • Create a file named .env in the server/ directory (if it doesn’t already exist).
    • Add your API key to this file in the following format:
      SPOONACULAR_API_KEY="YOUR_ACTUAL_API_KEY_HERE"
      
    • Replace "YOUR_ACTUAL_API_KEY_HERE" with the key you obtained from Spoonacular.
    • Important: Restart the server after updating the .env file for the changes to take effect.

5. Project Structure

The project is organized into two main directories: client/ for the React frontend and server/ for the Node.js/Express backend.

guided-cooking-app/
├── client/                 # React frontend application
│   ├── public/             # Public assets (HTML, images, manifest)
│   ├── src/                # React source code
│   │   ├── components/     # Reusable UI components (e.g., Navbar, RecipeList, MealPlanner)
│   │   ├── styles/         # Global styles and design tokens (e.g., tokens.css)
│   │   ├── utils/          # Utility functions (e.g., motion.js for Framer Motion variants)
│   │   ├── App.js          # Main application component, handles routing
│   │   ├── index.css       # Tailwind CSS imports and global styles
│   │   └── index.js        # React app entry point
│   └── package.json        # Frontend dependencies and scripts
├── server/                 # Node.js/Express backend application
│   ├── config/             # Database configuration
│   ├── data/               # Initial seed data (recipes.json)
│   ├── tests/              # Backend unit and integration tests
│   ├── database.js         # Sequelize models and database connection
│   ├── server.js           # Main Express server setup and API routes
│   └── package.json        # Backend dependencies and scripts
├── .git/                   # Git version control
├── .gitignore              # Specifies intentionally untracked files to ignore
├── context.txt             # Detailed development history and current context
├── README.md               # Project documentation (this file)
└── ...                     # Other project-level configuration files

6. Design Principles & Refinements

General Design Guidelines

The application adheres to a minimalist aesthetic, focusing on a fluid user experience and accessibility. Key principles include:

Implemented Design Improvements

7. Backend Details

Database

The backend uses SQLite as its database, managed by Sequelize ORM.

API Endpoints

The Express.js server (server/server.js) provides a RESTful API for managing recipes and proxying Spoonacular API requests.

Testing

The backend includes comprehensive unit and integration tests using Jest and Supertest.

8. Frontend Details

Routing

The frontend uses react-router-dom (v6 API) for navigation:

State Management & Data Fetching

Styling

Components Overview

9. Development History & Context

This project has undergone continuous development and refinement. Key historical changes include:

10. Outstanding Issues & Next Steps

While the application is functional and feature-rich, there are areas for further improvement: