Skip to content

Commit f6b9b48

Browse files
committed
Add Firebase AI SDK sample app
1 parent e244b83 commit f6b9b48

Some content is hidden

Large Commits have some content hidden by default. Use the searcx below for content that may be hidden.

42 files changed

+9236
-2
lines changed

‎ai/ai-react-app/.prettierrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

‎ai/ai-react-app/README.md

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Firebase AI Sample App
2+
3+
![Photo of the Firebase AI Sample App](images/screenshot.png)
4+
5+
This sample application demonstrates features of the Firebase AI SDK for Web (`firebase/ai`), integrated into a web application built with React and TypeScript.
6+
7+
For more information about the Firebase AI SDK, see the [Firebase AI Logic Docs](https://firebase.google.com/docs/vertex-ai).
8+
9+
## Setup Instructions
10+
11+
1. Follow the instructions to create a Firebase project that uses Firebase AI Logic.
12+
13+
1. Update `src/config/firebase-config.ts` with your Firebase project configuration.
14+
15+
1. Install dependencies:
16+
17+
```bash
18+
yarn
19+
```
20+
21+
1. Start the development server:
22+
23+
```bash
24+
yarn dev
25+
```
26+
27+
## Support
28+
29+
- [Firebase Support](https://firebase.google.com/support/)
30+
31+
## License
32+
33+
© Google, 2025. Licensed under an [Apache-2](../LICENSE)

‎ai/ai-react-app/eslint.config.js

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import js from "@eslint/js";
2+
import globals from "globals";
3+
import reactHooks from "eslint-plugin-react-hooks";
4+
import reactRefresh from "eslint-plugin-react-refresh";
5+
import tseslint from "typescript-eslint";
6+
import eslintConfigPrettier from "eslint-config-prettier/flat"
7+
8+
export default tseslint.config(
9+
{ ignores: ["dist"] },
10+
{
11+
extends: [js.configs.recommended, ...tseslint.configs.recommended],
12+
files: ["**/*.{ts,tsx}"],
13+
languageOptions: {
14+
ecmaVersion: 2020,
15+
globals: globals.browser,
16+
},
17+
plugins: {
18+
"react-hooks": reactHooks,
19+
"react-refresh": reactRefresh,
20+
},
21+
rules: {
22+
...reactHooks.configs.recommended.rules,
23+
"react-refresh/only-export-components": [
24+
"warn",
25+
{ allowConstantExport: true },
26+
],
27+
},
28+
},
29+
eslintConfigPrettier
30+
);

‎ai/ai-react-app/firebase-icon.svg

+6
Loading

‎ai/ai-react-app/images/screenshot.png

93.7 KB
Loading

‎ai/ai-react-app/index.html

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" type="image/svg+xml" href="/firebase-icon.svg" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<title>Firebase AI Sample App</title>
8+
</head>
9+
<body>
10+
<div id="root"></div>
11+
<script type="module" src="/src/main.tsx"></script>
12+
</body>
13+
</html>

0 commit comments

Comments
 (0)