Course Viewer

Navigation

San Diego

San Diego

🏙️ San Diego — CREATE (CRUD Submodule 1)

Quest Chapter: The Food Route


Focus: C in CRUD — CREATE


Location: San Diego, CA ☀️🌮


Welcome! This interactive page lets learners actually create dishes, ingredients, and join records via simulated API calls — right in the browser.


🎯 San Diego Progress Tracker

🌮 Fish Tacos (Baja-style) - Incomplete
🌯 California Burrito - Incomplete
🍟 Carne Asada Fries - Incomplete
🍇 Acai Bowls - Incomplete
🥗 Baja Bowl - Incomplete
🐟 Baja Seafood - Incomplete
Completion: 0%
Fish Tacos created — +15 XP
🎉 Los Angeles Unlocked!
You can now continue to the next city!
  • 🧠 What Does CREATE Mean?
    • In databases, CREATE = inserting new records (e.g., dishes, ingredients, or join rows).

    • On the web, a client form sends a POST /api/dishes request.

    • The server creates:
      • a new dish record,
      • any missing ingredient entries, and
      • dish_ingredients join records — ideally inside a single transaction (all succeed or all fail).

    • Analogy: your database is like a kitchen pantry. Adding a dish = adding a recipe card and ensuring all the required ingredients already exist in the pantry.

%% Interactive: Mock Backend & Utilities

Initialization: Resets mock DB (localStorage) — use this to start fresh.
Terminal: ready

🌮 Fish Tacos (Baja-style) CREATE
Create a Fish Taco class with properties (id, fishType, toppings, sauce, price, spiceLevel) and method calculateTotalPrice() with 8% tax. Validate fishType is required.

    
    
🧩 Quick Quiz:

1️⃣ Why validate fishType in the constructor?



🌯 California Burrito CREATE
Implement CaliforniaBurrito class with properties (id, protein, hasFries, size, extras, price) and method calculateCalories(). Fries are what make it "California style"!

    
    
🧩 Quick Quiz:

1️⃣ What makes a burrito "California style"?



🍟 Carne Asada Fries CREATE
Build a CarneAsadaFries class with properties (id, friesType, meatPortion, toppings, cheeseType, price) and method isLoaded() that checks if it has at least 3 toppings.

    
    
🧩 Quick Quiz:

1️⃣ What makes fries "loaded" in this implementation?



🍇 Acai Bowls CREATE
Create an AcaiBowl class with properties (id, size, baseIngredients, toppings, granola, price) and methods calculateNutritionScore() and isHealthy().

    
    
🧩 Quick Quiz:

1️⃣ What determines if an acai bowl is "healthy" in this code?



🥗 Baja Bowl CREATE via API
Use the form to CREATE a Baja Bowl via our mock API! Fill in the details and make a POST request to simulate database insertion.
No ingredients yet
🐟 Baja Seafood CREATE Collection
Create a collection of Baja seafood dishes and bulk insert them into the database using POST /api/dishes/bulk

    
    
🧩 Quick Quiz:

1️⃣ What's the main benefit of bulk CREATE operations?




🎉 Module Complete — San Diego CREATE Mastery

Congratulations! You’ve mastered CREATE operations through San Diego’s finest foods:

  • 🌮 Fish Tacos: Class creation with validation
  • 🌯 California Burrito: Complex object construction
  • 🍟 Carne Asada Fries: Method-based data validation
  • 🍇 Acai Bowls: Health scoring algorithms
  • 🥗 Baja Bowl: API form submission
  • 🐟 Baja Seafood: Bulk creation operations

Los Angeles — READ module unlocked! 🌆 Continue to learn querying and data retrieval!