From dd960f9306e19fb30a3ffbe78734d322b31636e7 Mon Sep 17 00:00:00 2001 From: Aarushi <50577581+aarushik93@users.noreply.github.com> Date: Thu, 27 Jun 2024 10:02:54 +0100 Subject: [PATCH] Add support for nextjs based app (#7266) * Getting started with nextjs * fix linting * remove gitignore for package.json --- .gitignore | 2 +- rnd/autogpt_builder/.eslintrc.json | 3 + rnd/autogpt_builder/.gitignore | 36 +++++++++ rnd/autogpt_builder/README.md | 25 ++++++ rnd/autogpt_builder/next.config.mjs | 4 + rnd/autogpt_builder/package.json | 26 +++++++ rnd/autogpt_builder/postcss.config.mjs | 8 ++ rnd/autogpt_builder/public/autogpt.svg | 72 ++++++++++++++++++ rnd/autogpt_builder/src/app/favicon.ico | Bin 0 -> 15406 bytes rnd/autogpt_builder/src/app/globals.css | 33 ++++++++ rnd/autogpt_builder/src/app/layout.tsx | 22 ++++++ rnd/autogpt_builder/src/app/page.tsx | 97 ++++++++++++++++++++++++ rnd/autogpt_builder/tailwind.config.ts | 20 +++++ rnd/autogpt_builder/tsconfig.json | 26 +++++++ 14 files changed, 373 insertions(+), 1 deletion(-) create mode 100644 rnd/autogpt_builder/.eslintrc.json create mode 100644 rnd/autogpt_builder/.gitignore create mode 100644 rnd/autogpt_builder/README.md create mode 100644 rnd/autogpt_builder/next.config.mjs create mode 100644 rnd/autogpt_builder/package.json create mode 100644 rnd/autogpt_builder/postcss.config.mjs create mode 100644 rnd/autogpt_builder/public/autogpt.svg create mode 100644 rnd/autogpt_builder/src/app/favicon.ico create mode 100644 rnd/autogpt_builder/src/app/globals.css create mode 100644 rnd/autogpt_builder/src/app/layout.tsx create mode 100644 rnd/autogpt_builder/src/app/page.tsx create mode 100644 rnd/autogpt_builder/tailwind.config.ts create mode 100644 rnd/autogpt_builder/tsconfig.json diff --git a/.gitignore b/.gitignore index 3b4050b42e..d23d09da8e 100644 --- a/.gitignore +++ b/.gitignore @@ -162,7 +162,7 @@ agbenchmark/reports/ # Nodejs package-lock.json -package.json + # Allow for locally private items # private diff --git a/rnd/autogpt_builder/.eslintrc.json b/rnd/autogpt_builder/.eslintrc.json new file mode 100644 index 0000000000..bffb357a71 --- /dev/null +++ b/rnd/autogpt_builder/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "next/core-web-vitals" +} diff --git a/rnd/autogpt_builder/.gitignore b/rnd/autogpt_builder/.gitignore new file mode 100644 index 0000000000..fd3dbb571a --- /dev/null +++ b/rnd/autogpt_builder/.gitignore @@ -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 diff --git a/rnd/autogpt_builder/README.md b/rnd/autogpt_builder/README.md new file mode 100644 index 0000000000..5aa16c6781 --- /dev/null +++ b/rnd/autogpt_builder/README.md @@ -0,0 +1,25 @@ +This is the frontend for AutoGPT's next generation + +## 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. + +## Deploy + +TODO \ No newline at end of file diff --git a/rnd/autogpt_builder/next.config.mjs b/rnd/autogpt_builder/next.config.mjs new file mode 100644 index 0000000000..4678774e6d --- /dev/null +++ b/rnd/autogpt_builder/next.config.mjs @@ -0,0 +1,4 @@ +/** @type {import('next').NextConfig} */ +const nextConfig = {}; + +export default nextConfig; diff --git a/rnd/autogpt_builder/package.json b/rnd/autogpt_builder/package.json new file mode 100644 index 0000000000..67b793bbad --- /dev/null +++ b/rnd/autogpt_builder/package.json @@ -0,0 +1,26 @@ +{ + "name": "autogpt_builder", + "version": "0.1.0", + "private": true, + "scripts": { + "dev": "next dev", + "build": "next build", + "start": "next start", + "lint": "next lint" + }, + "dependencies": { + "react": "^18", + "react-dom": "^18", + "next": "14.2.4" + }, + "devDependencies": { + "typescript": "^5", + "@types/node": "^20", + "@types/react": "^18", + "@types/react-dom": "^18", + "postcss": "^8", + "tailwindcss": "^3.4.1", + "eslint": "^8", + "eslint-config-next": "14.2.4" + } +} diff --git a/rnd/autogpt_builder/postcss.config.mjs b/rnd/autogpt_builder/postcss.config.mjs new file mode 100644 index 0000000000..1a69fd2a45 --- /dev/null +++ b/rnd/autogpt_builder/postcss.config.mjs @@ -0,0 +1,8 @@ +/** @type {import('postcss-load-config').Config} */ +const config = { + plugins: { + tailwindcss: {}, + }, +}; + +export default config; diff --git a/rnd/autogpt_builder/public/autogpt.svg b/rnd/autogpt_builder/public/autogpt.svg new file mode 100644 index 0000000000..3f322e4d3a --- /dev/null +++ b/rnd/autogpt_builder/public/autogpt.svg @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/rnd/autogpt_builder/src/app/favicon.ico b/rnd/autogpt_builder/src/app/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..74db319671075557116db09405f64c789cefebb9 GIT binary patch literal 15406 zcmeHO2~<=^x-LbLRTe=O1zH4TRas1;xFD+_i=r$lE}%3hE{F>g*9Jv_77-F17mP`a zlgLbB9Fv*BC3{TBGMUWcON_zz@{&wWj0sA2(`(K5H+`{z27&nAnRDLU!*~9=|9-3L z)~&887#qUOn7us%6|ur$j6K2_6Nx(R{T+cSga4RSxmt~xX34;`4mqJs}&@{%`* zKjY6XwI<=K*}=OnEemPAm=p5B%h|ymZ?m;8zQ$J1QjgserE#r%k#w#sof!RQ-sErI z%nQAJX?bww@kD>ABuZpaA2nv|k+^Yfr;~lcjwg(N=E<0Gb;nui8$hZip(w3AcI_Kv z|NK1v4}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~nS9IKb+6+)JQ#m{*>HB)MrTv^md*}i(I|{XqpR;~-K)0nK#6%@ zcD>1XV&Vw-ibXYwRoM!8;X*E7JDT;`EH_Yo^p#T5Dyp-eo4cGXTahwm}ID^C0p^tO*6zs9%e?L?+aTX|g9am!C z8g0Pa(^l!)7v|kjW-mX@7cc%_>+cVGM$9E_HO|!;I8XTk+TfpP1D%G>HU#b9>Pg$U zI--=T9^H(yOdGi>YCXsQCUNDQ)!(2Eo^4NCnZgs-4QM^&LHP_;{-dL0B=_1Apb?de zHGYytRlv^cnu*(G>abtwR8zLJDW`4vOf_@E8CA^s) { + return ( + + {children} + + ); +} diff --git a/rnd/autogpt_builder/src/app/page.tsx b/rnd/autogpt_builder/src/app/page.tsx new file mode 100644 index 0000000000..916ce244e8 --- /dev/null +++ b/rnd/autogpt_builder/src/app/page.tsx @@ -0,0 +1,97 @@ +import Image from "next/image"; + +export default function Home() { + return ( + + + + Get started by adding a + node + + + + By{" "} + + + + + + + + + + + + + Docs{" "} + + -> + + + + Find all the information about AutoGPT's features. + + + + + + + Runner{" "} + + -> + + + + Run your agent! + + + + + + Deploy{" "} + + -> + + + + Deploy your agent! + + + + + ); +} diff --git a/rnd/autogpt_builder/tailwind.config.ts b/rnd/autogpt_builder/tailwind.config.ts new file mode 100644 index 0000000000..e9a0944e7b --- /dev/null +++ b/rnd/autogpt_builder/tailwind.config.ts @@ -0,0 +1,20 @@ +import type { Config } from "tailwindcss"; + +const config: Config = { + content: [ + "./src/pages/**/*.{js,ts,jsx,tsx,mdx}", + "./src/components/**/*.{js,ts,jsx,tsx,mdx}", + "./src/app/**/*.{js,ts,jsx,tsx,mdx}", + ], + theme: { + extend: { + backgroundImage: { + "gradient-radial": "radial-gradient(var(--tw-gradient-stops))", + "gradient-conic": + "conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))", + }, + }, + }, + plugins: [], +}; +export default config; diff --git a/rnd/autogpt_builder/tsconfig.json b/rnd/autogpt_builder/tsconfig.json new file mode 100644 index 0000000000..7b28589304 --- /dev/null +++ b/rnd/autogpt_builder/tsconfig.json @@ -0,0 +1,26 @@ +{ + "compilerOptions": { + "lib": ["dom", "dom.iterable", "esnext"], + "allowJs": true, + "skipLibCheck": true, + "strict": true, + "noEmit": true, + "esModuleInterop": true, + "module": "esnext", + "moduleResolution": "bundler", + "resolveJsonModule": true, + "isolatedModules": true, + "jsx": "preserve", + "incremental": true, + "plugins": [ + { + "name": "next" + } + ], + "paths": { + "@/*": ["./src/*"] + } + }, + "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], + "exclude": ["node_modules"] +}
+ Get started by adding a + node +
node
+ Find all the information about AutoGPT's features. +
+ Run your agent! +
+ Deploy your agent! +