Skip to content

AET-DevOps26/team-bytebite

Repository files navigation

ByteBite

1. Problem Statement

Cooking a new meal often starts with inspiration from a blog, a social media post, or a handwritten note. However, the transition from "finding a recipe" to "having the ingredients" is filled with friction. Users often have to manually read through long descriptions, identify specific ingredients, estimate quantities, and then rewrite them into a categorized list suitable for a grocery store layout.

ByteBite solves this by removing the manual labor of list-making. It addresses the user's need for efficiency and accuracy, ensuring no ingredient is overlooked and reducing the time spent planning meals.

2. Main Functionality

The core of the application is an intelligent parser that transforms unconcrete recipes into clearly structured lists with quantity estimations, allowing an improved shopping and cooking experience. Key features include:

  • Recipe Extraction: Paste a full recipe text (including stories or instructions), and the app extracts only the necessary ingredients. Alternatively, paste the name of a recipe and the app will generate a full ingredients list.
  • Intelligent Categorization: Ingredients are automatically grouped by grocery store aisles (e.g., Produce, Dairy, Spices, Meat).
  • Dietary & Allergy Filtering: Users can state preferences (e.g., Vegan, Vegetarian, Gluten-Free, Lactose-Free). The app automatically identifies "red flag" ingredients and suggests safe alternatives.

3. Intended Users

  • The Busy Professional: Someone who wants to cook healthy meals but lacks the time to manually plan grocery trips.
  • The Home Cook: Enthusiasts who love trying new recipes from diverse sources but find the organization part tedious.
  • Students on a Budget: Users who need to ensure they only buy exactly what they need for a specific set of meals to avoid food waste.

4. Meaningful GenAI Integration

Unlike traditional apps that rely on rigid "If/Then" logic or specific formatting, ByteBite uses Generative AI (LLMs) to leverage its knowledge of countless recipes to generate custom grocery lists personalized to the users instructions:

  • Substitution Logic: If a recipe calls for an obscure ingredient, the GenAI can suggest common alternatives directly on the shopping list.
  • Scaling & Adjustments: Users can ask the AI to "Scale this recipe for 6 people instead of 2," and the shopping list will update dynamically using the AI's mathematical reasoning.

5. User Scenarios

Scenario A: The Blog Post Parser

  • User Action: Jason finds a 2,000-word blog post about "The Best Sunday Roast." He copies the entire text, including the author's life story, and pastes it into ByteBite.
  • App Action: The AI ignores the anecdotes about the author's grandmother and generates a clean list: "1.5kg Beef Brisket, 4 Large Carrots, 2 Sprigs of Rosemary."

Scenario B: The Lactose Dilemma

  • User Action: Mark asks for a recipe for Chicken Piccata but wants to know if he can swap the heavy cream for something lactose free.
  • App Action: He asks the integrated AI assistant. The AI suggests using lactose free yogurt and automatically updates his shopping list with the alternative ingredient.

Scenario C: Weekly Meal Prep

  • User Action: A user adds three different recipes for the week: Tacos, Stir-fry, and Salad.
  • App Action: The app identifies that all three recipes require "cilantro" and "lime." Instead of three separate entries, it provides a total count (e.g., "2 Bunches of Cilantro, 4 Limes") and sorts them into the 'Produce' section for a single trip through that aisle.

Project Layout

team-bytebite/
├── client/           # React + Vite frontend
├── gen-ai/           # Python FastAPI AI generation service
├── server/           # Java Spring Boot microservices
│   ├── api-gateway/      # Public entrypoint — routes requests to backend services
│   ├── user-service/     # User domain service
│   └── grocery-service/  # Grocery and recipe domain service
└── databases/        # Database image definitions and init schemas

Services

client — React / Vite

The user-facing web application. Provides a dish name input and displays the generated shopping list. Communicates with the backend via REST.

api-gateway — Java Spring Boot

The public backend entrypoint. Receives frontend API requests and forwards them to the owning backend service.

user-service — Java Spring Boot

Owns user-related data and connects to the user database.

grocery-service — Java Spring Boot

Owns recipes, grocery lists, and grocery items. Connects to the grocery database and calls the gen-ai service when ingredient generation is needed.

gen-ai — Python FastAPI

The AI generation service. Receives a dish name from the server and returns a shopping list with all required ingredients using LLM integrations.

Getting Started

Each service has its own detailed setup instructions in its respective directory's README. A short summary also follows here.

Local Development

Requires Java 21, Node 22, and Python 3.12. Each service runs in its own terminal.

1. Gen-AI (port 8000) — create gen-ai/.env with LOGOS_KEY=...; add OPENAI_API_KEY=sk-... if you want to use the OpenAI switch

cd gen-ai
python -m venv .venv
.venv/Scripts/Activate.ps1   # Windows
pip install -r requirements.txt
uvicorn main:app --reload

2. User Service (port 8083)

cd server/user-service
./mvnw spring-boot:run

3. Grocery Service (port 8082)

cd server/grocery-service
./mvnw spring-boot:run

4. API Gateway (port 8080)

cd server/api-gateway
./mvnw spring-boot:run

5. Client (port 5173)

cd client
npm install
npm run dev

Open http://localhost:5173

API Documentation

When the backend services are running, the API gateway exposes the aggregated Swagger UI at:

http://localhost:8080/swagger-ui.html

The UI includes the User Service, Grocery Service, and Gen AI Service OpenAPI definitions. The raw specs are available through the gateway at /v3/api-docs/user-service, /v3/api-docs/grocery-service, and /v3/api-docs/gen-ai.


Docker

Requires Docker Desktop running.

docker compose up --build
docker compose down  # To take down later

Open http://localhost:8081

Drop --build on subsequent starts if nothing has changed. To stop: docker compose down.


Kubernetes

Local Kubernetes Deployment

Requires a local Kubernetes cluster running via Docker Desktop.

kubectl config use-context docker-desktop
kubectl create namespace team-bytebite
helm upgrade --install bytebite ./helm/bytebite -f ./helm/bytebite/values-local.yaml --namespace team-bytebite --set genai.openaiApiKey="sk-..." --atomic
helm uninstall bytebite --namespace team-bytebite  # To take down later

Open http://localhost:80

Kubernetes Deployment to the AET cluster

Prerequisite: The team-bytebite namespace must exist in the cluster.

Deployment is automated via GitHub Actions:

  • Automatic: every push to main triggers the build workflow, which triggers the deploy workflow on success.
  • Manual: go to Actions → Deploy to KubernetesRun workflow to manually start the deploy workflow.

Alternatively, you can do manual deployment with Helm: (Requires helm and a valid kubeconfig)

kubectl config use-context stud
helm upgrade --install bytebite ./helm/bytebite --namespace team-bytebite --set genai.openaiApiKey="sk-..." --atomic
helm uninstall bytebite --namespace team-bytebite  # To take down later

The app is available at https://team-bytebite.stud.k8s.aet.cit.tum.de

About

Repository for team ByteBite

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors