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
21 changes: 21 additions & 0 deletions newoaksai-chatbubble-main/newoaksai-chatbubble-main/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 szguoxz

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
61 changes: 61 additions & 0 deletions newoaksai-chatbubble-main/newoaksai-chatbubble-main/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<h1 align="center">Newoaks AI React Chat Bubble</h1>
<div align="center">NewOaks AI is an AI chatbot builder, which allows you to engage with customers, nurture leads and book conversational appointments for your website, text SMS and files by Custom ChatGPT and Claude. The open source code is the chat bubble embedded on websites to engage with customers.

[Website](https://www.newoaks.ai) | [Documentation](https://www.newoaks.ai/guide/main) | [Blog](https://www.newoaks.ai/blog/) | [Twitter](https://twitter.com/Rockwood_XRay)</div>

![NewOaks AI](https://cdn.newoaks.ai/open/newoaksai-chatbubble/chatbot.png)

### ✨ features

* 🎈 Chat page is embedded in a website as a bubble
* You can also use `iframe` to embed the chat bubble as part of the page
* Or you can simple use the chat bubble as a syandalone page

### Quick Start

```shell
npx degit github:szguoxz/chatbubble my-chatbot-example

cd my-chatbot-example

yarn install

yarn dev
```

Visit:[`http://localhost:3000 ` ](http://localhost:3000)

### How to use the code

```html
<!-- Embed the chat bubble into your website -->
<script type="module" src="http://YOUR-DOMAIN/embed.bubble.js"></script>

<!-- Embed as iframe -->
<iframe src="http://YOUR-DOMAIN/chatbot" />
```

### FAQ

* How to build the chatbubble script: `embed.bubble.js`

> **chatbubble source code:`/bubble/*`**
>
> Build command:`yarn build:bubble`,need to run under the project root directory。
>
> After build succeeded, `embed.bubble.js` will be copied into `public` folder。
>
> Then you can visit:`http://localhost:3000/embed.bubble.js`

### Support & Community
You'll find a lot of resources to help you get started with HeyForm in the [help center](https://www.newoaks.ai/guide/main). However, if you can't find what you're looking for there, don't hesitate to reach out to us:

> Have a question? Join the [Discord server](https://discord.com/invite/fuBt2K6k3p) and get instant help.
>
> Found a bug? [Create an issue](https://github.com/szguoxz/chatbubble/issues)

### Want to know more?

Visit [Official](https://www.newoaks.ai) website

### Any questions?, welcome to submit issues or send email to :cguo@newoaks.ai
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import { resolve } from "path";

// https://vitejs.dev/config/
export default defineConfig({
publicDir: false,
plugins: [react()],
server: {
port: 3000,
},
resolve: {
alias: {
"@": resolve(__dirname, "./src"),
},
},
build: {
outDir: "public",
emptyOutDir: false,
assetsDir: "static",
rollupOptions: {
input: {
embed: resolve(__dirname, "bubble/main.tsx"),
},
output: {
entryFileNames: (chunkInfo) => {
const isEntry = chunkInfo.isEntry;
// return chunkInfo.name === 'embed' ? '[name].min.js' : '[name].js';
return isEntry ? "[name].bubble.js" : "[name]-[hash].js";
},
},
},
},
});
Loading