Skip to content

Commit

Permalink
ai chat example (#51)
Browse files Browse the repository at this point in the history
* initial work on the chat

* update with walelt preview url

* change wallet url

* add credits
  • Loading branch information
microchipgnu authored Nov 27, 2023
1 parent 5245a6f commit 85ec0ab
Show file tree
Hide file tree
Showing 29 changed files with 6,385 additions and 0 deletions.
1 change: 1 addition & 0 deletions ai-chat/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MB_API_KEY=
3 changes: 3 additions & 0 deletions ai-chat/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "next/core-web-vitals"
}
36 changes: 36 additions & 0 deletions ai-chat/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js
.yarn/install-state.gz

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
36 changes: 36 additions & 0 deletions ai-chat/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).

## Getting Started

First, run the development server:

```bash
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.

This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.

## Learn More

To learn more about Next.js, take a look at the following resources:

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!

## Deploy on Vercel

The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.

Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
16 changes: 16 additions & 0 deletions ai-chat/components.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "default",
"rsc": true,
"tsx": true,
"tailwind": {
"config": "tailwind.config.js",
"css": "app/globals.css",
"baseColor": "slate",
"cssVariables": true
},
"aliases": {
"components": "@/components",
"utils": "@/lib/utils"
}
}
14 changes: 14 additions & 0 deletions ai-chat/next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
webpack(config) {
// eslint-disable-next-line no-param-reassign
config.resolve.fallback = {
...config.resolve.fallback,
fs: false, // https://stackoverflow.com/a/67478653/470749
};

return config;
},
};

module.exports = nextConfig;
44 changes: 44 additions & 0 deletions ai-chat/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"name": "my-app",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"@mintbase-js/data": "0.5.0-beta.2",
"@near-wallet-selector/modal-ui": "^8.7.1",
"@mintbase-js/react": "0.5.0-beta.2",
"@mintbase-js/rpc": "0.5.0-beta.2",
"@mintbase-js/sdk": "0.5.0-beta.2",
"@mintbase-js/storage": "0.5.0-beta.2",
"@hookform/resolvers": "^3.3.2",
"@radix-ui/react-label": "^2.0.2",
"@radix-ui/react-slot": "^1.0.2",
"ai": "^2.2.25",
"class-variance-authority": "^0.7.0",
"clsx": "^2.0.0",
"lucide-react": "^0.292.0",
"next": "14.0.3",
"react": "^18",
"react-dom": "^18",
"react-hook-form": "^7.48.2",
"tailwind-merge": "^2.0.0",
"tailwindcss-animate": "^1.0.7",
"zod": "^3.22.4"
},
"devDependencies": {
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"autoprefixer": "^10.0.1",
"eslint": "^8",
"eslint-config-next": "14.0.3",
"postcss": "^8",
"tailwindcss": "^3.3.0",
"typescript": "^5"
}
}
Loading

4 comments on commit 85ec0ab

@vercel
Copy link

@vercel vercel bot commented on 85ec0ab Nov 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

examples-starter-react-vite – ./starter/react-vite

examples-starter-react-vite-git-main-mintbase.vercel.app
starter-react-vite.vercel.app
examples-starter-react-vite-mintbase.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 85ec0ab Nov 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

examples-simple-marketplace – ./simple-marketplace

examples-simple-marketplace.vercel.app
examples-simple-marketplace-mintbase.vercel.app
examples-simple-marketplace-git-main-mintbase.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 85ec0ab Nov 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

examples-starter – ./starter/next-js

mintbase-starter.vercel.app
examples-starter-git-main-mintbase.vercel.app
examples-starter-mintbase.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 85ec0ab Nov 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

examples-simple-minter – ./minter

examples-simple-minter.vercel.app
examples-simple-minter-git-main-mintbase.vercel.app
examples-simple-minter-mintbase.vercel.app

Please sign in to comment.