Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lit-recipe-search/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
dist
.DS_Store
.env
40 changes: 40 additions & 0 deletions lit-recipe-search/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# LitElement Recipe Search

A Codesphere-ready LitElement recipe search template powered by the free [TheMealDB](https://www.themealdb.com/api.php) public API.

## Features

- Search recipes by ingredient, dish name, or category
- View recipe photos, category, area, ingredients, and instructions
- Save favorite recipes in local storage
- Responsive Lit web components with Vite
- No API key required

## Run Locally

```bash
npm install
npm run dev
```

The app runs at `http://localhost:3000`.

## Deploy On Codesphere

Create a Codesphere workspace from this template and run the included CI pipeline:

1. `prepare` installs dependencies and builds the production bundle.
2. `run` serves the built app on port `3000`.

No extra API credentials are required. The template uses TheMealDB public endpoints:

- `https://www.themealdb.com/api/json/v1/1/search.php?s=`
- `https://www.themealdb.com/api/json/v1/1/filter.php?i=`
- `https://www.themealdb.com/api/json/v1/1/filter.php?c=`
- `https://www.themealdb.com/api/json/v1/1/lookup.php?i=`

## Customize

- Update `src/recipe-search-app.ts` to add more filters or a different recipe provider.
- Update `src/styles.css` to match your brand.
- If your recipe API requires credentials, add the needed variables in Codesphere and document them here.
16 changes: 16 additions & 0 deletions lit-recipe-search/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
prepare:
steps:
- name: "Install dependencies"
command: "npm install"
- name: "Build"
command: "npm run build"

test:
steps:
- name: "Type check"
command: "npm run typecheck"

run:
steps:
- name: "Run"
command: "npm run preview -- --host 0.0.0.0 --port 3000"
16 changes: 16 additions & 0 deletions lit-recipe-search/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>LitElement Recipe Search</title>
<meta
name="description"
content="A LitElement recipe search template for Codesphere."
/>
</head>
<body>
<recipe-search-app></recipe-search-app>
<script type="module" src="/src/recipe-search-app.ts"></script>
</body>
</html>
10 changes: 10 additions & 0 deletions lit-recipe-search/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"Workspace": "free",
"Links": {
"Lit": "https://lit.dev/",
"TheMealDB": "https://www.themealdb.com/api.php"
},
"Categories": ["Framework", "Application"],
"Contributors": ["kenproxx"],
"Title": "LitElement - Recipe Search App"
}
Loading