diff --git a/docker-compose.yml b/docker-compose.yml index 9c55b74232..bc505233e1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,8 +1,8 @@ version: '3.9' services: - next: - container_name: next + frontend: + container_name: frontend build: context: ./next dockerfile: Dockerfile @@ -28,17 +28,17 @@ services: - next/.env environment: REWORKD_PLATFORM_HOST: 0.0.0.0 - REWORKD_PLATFORM_DB_HOST: db + REWORKD_PLATFORM_DB_HOST: agentgpt_db REWORKD_PLATFORM_DB_PORT: "3307" REWORKD_PLATFORM_DB_USER: "reworkd_platform" REWORKD_PLATFORM_DB_PASS: "reworkd_platform" REWORKD_PLATFORM_DB_BASE: "reworkd_platform" depends_on: - - db + - agentgpt_db - db: + agentgpt_db: image: mysql:8.0 - container_name: db + container_name: agentgpt_db restart: always build: context: ./db @@ -51,23 +51,8 @@ services: MYSQL_ROOT_PASSWORD: "reworkd_platform" MYSQL_TCP_PORT: 3307 volumes: - - db_data:/var/lib/mysql + - agentgpt_db:/var/lib/mysql command: [ 'mysqld', '--character-set-server=utf8mb4', '--collation-server=utf8mb4_unicode_ci' ] - weaviate: - image: semitechnologies/weaviate:1.19.6 - restart: on-failure:0 # this should be 'no' or at least have ':1' - ports: - - "8080:8080" - environment: - QUERY_DEFAULTS_LIMIT: 25 - AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED: 'true' - PERSISTENCE_DATA_PATH: '/var/lib/weaviate' - DEFAULT_VECTORIZER_MODULE: 'none' - CLUSTER_HOSTNAME: 'node1' - volumes: - - weaviate:/var/lib/weaviate - volumes: - weaviate: - db_data: + agentgpt_db: diff --git a/next/entrypoint.sh b/next/entrypoint.sh index 7ea92df485..71010de0fc 100755 --- a/next/entrypoint.sh +++ b/next/entrypoint.sh @@ -13,7 +13,7 @@ rm .env.temp source .env # Ensure DB is available before running Prisma commands -./wait-for-db.sh db 3307 +./wait-for-db.sh agentgpt_db 3307 # Run Prisma commands if [[ ! -f "/app/prisma/${DATABASE_URL:5}" ]]; then diff --git a/next/package-lock.json b/next/package-lock.json index 98a24c985a..25055cbf37 100644 --- a/next/package-lock.json +++ b/next/package-lock.json @@ -32,9 +32,9 @@ "axios": "^0.26.0", "cheerio": "^1.0.0-rc.12", "clsx": "^1.2.1", + "cobe": "^0.6.3", "cookies-next": "^2.1.2", "framer-motion": "^10.12.8", - "graphology": "^0.25.1", "gray-matter": "^4.0.3", "html-to-image": "^1.11.11", "i18next": "^22.4.15", @@ -6032,6 +6032,14 @@ "node": ">= 0.12.0" } }, + "node_modules/cobe": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/cobe/-/cobe-0.6.3.tgz", + "integrity": "sha512-WHr7X4o1ym94GZ96h7b1pNemZJacbOzd02dZtnVwuC4oWBaLg96PBmp2rIS1SAhUDhhC/QyS9WEqkpZIs/ZBTg==", + "dependencies": { + "phenomenon": "^1.6.0" + } + }, "node_modules/collect-v8-coverage": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz", @@ -7979,24 +7987,6 @@ "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", "dev": true }, - "node_modules/graphology": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/graphology/-/graphology-0.25.1.tgz", - "integrity": "sha512-yYA7BJCcXN2DrKNQQ9Qf22zBHm/yTbyBR71T1MYBbGtywNHsv0QZtk8zaR6zxNcp2hCCZayUkHp9DyMSZCpoxQ==", - "dependencies": { - "events": "^3.3.0", - "obliterator": "^2.0.2" - }, - "peerDependencies": { - "graphology-types": ">=0.24.0" - } - }, - "node_modules/graphology-types": { - "version": "0.24.7", - "resolved": "https://registry.npmjs.org/graphology-types/-/graphology-types-0.24.7.tgz", - "integrity": "sha512-tdcqOOpwArNjEr0gNQKCXwaNCWnQJrog14nJNQPeemcLnXQUUGrsCWpWkVKt46zLjcS6/KGoayeJfHHyPDlvwA==", - "peer": true - }, "node_modules/gray-matter": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/gray-matter/-/gray-matter-4.0.3.tgz", @@ -11977,11 +11967,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/obliterator": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/obliterator/-/obliterator-2.0.4.tgz", - "integrity": "sha512-lgHwxlxV1qIg1Eap7LgIeoBWIMFibOjbrYPIPJZcI1mmGAI2m3lNYpK12Y+GBdPQ0U1hRwSord7GIaawz962qQ==" - }, "node_modules/oidc-token-hash": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/oidc-token-hash/-/oidc-token-hash-5.0.2.tgz", @@ -12254,6 +12239,11 @@ "node": ">=8" } }, + "node_modules/phenomenon": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/phenomenon/-/phenomenon-1.6.0.tgz", + "integrity": "sha512-7h9/fjPD3qNlgggzm88cY58l9sudZ6Ey+UmZsizfhtawO6E3srZQXywaNm2lBwT72TbpHYRPy7ytIHeBUD/G0A==" + }, "node_modules/picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", @@ -19069,6 +19059,14 @@ "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", "dev": true }, + "cobe": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/cobe/-/cobe-0.6.3.tgz", + "integrity": "sha512-WHr7X4o1ym94GZ96h7b1pNemZJacbOzd02dZtnVwuC4oWBaLg96PBmp2rIS1SAhUDhhC/QyS9WEqkpZIs/ZBTg==", + "requires": { + "phenomenon": "^1.6.0" + } + }, "collect-v8-coverage": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz", @@ -20530,21 +20528,6 @@ "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", "dev": true }, - "graphology": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/graphology/-/graphology-0.25.1.tgz", - "integrity": "sha512-yYA7BJCcXN2DrKNQQ9Qf22zBHm/yTbyBR71T1MYBbGtywNHsv0QZtk8zaR6zxNcp2hCCZayUkHp9DyMSZCpoxQ==", - "requires": { - "events": "^3.3.0", - "obliterator": "^2.0.2" - } - }, - "graphology-types": { - "version": "0.24.7", - "resolved": "https://registry.npmjs.org/graphology-types/-/graphology-types-0.24.7.tgz", - "integrity": "sha512-tdcqOOpwArNjEr0gNQKCXwaNCWnQJrog14nJNQPeemcLnXQUUGrsCWpWkVKt46zLjcS6/KGoayeJfHHyPDlvwA==", - "peer": true - }, "gray-matter": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/gray-matter/-/gray-matter-4.0.3.tgz", @@ -23318,11 +23301,6 @@ "es-abstract": "^1.20.4" } }, - "obliterator": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/obliterator/-/obliterator-2.0.4.tgz", - "integrity": "sha512-lgHwxlxV1qIg1Eap7LgIeoBWIMFibOjbrYPIPJZcI1mmGAI2m3lNYpK12Y+GBdPQ0U1hRwSord7GIaawz962qQ==" - }, "oidc-token-hash": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/oidc-token-hash/-/oidc-token-hash-5.0.2.tgz", @@ -23516,6 +23494,11 @@ "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", "dev": true }, + "phenomenon": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/phenomenon/-/phenomenon-1.6.0.tgz", + "integrity": "sha512-7h9/fjPD3qNlgggzm88cY58l9sudZ6Ey+UmZsizfhtawO6E3srZQXywaNm2lBwT72TbpHYRPy7ytIHeBUD/G0A==" + }, "picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", diff --git a/next/package.json b/next/package.json index 3179b4a03c..1c28ded672 100644 --- a/next/package.json +++ b/next/package.json @@ -38,9 +38,9 @@ "axios": "^0.26.0", "cheerio": "^1.0.0-rc.12", "clsx": "^1.2.1", + "cobe": "^0.6.3", "cookies-next": "^2.1.2", "framer-motion": "^10.12.8", - "graphology": "^0.25.1", "gray-matter": "^4.0.3", "html-to-image": "^1.11.11", "i18next": "^22.4.15", diff --git a/next/src/components/AppTitle.tsx b/next/src/components/AppTitle.tsx index 2b18561319..b6b63d9251 100644 --- a/next/src/components/AppTitle.tsx +++ b/next/src/components/AppTitle.tsx @@ -1,26 +1,19 @@ -import { useTranslation } from "next-i18next"; import React from "react"; -import Badge from "./Badge"; import BannerBadge from "./BannerBadge"; -import PopIn from "./motions/popin"; const AppTitle = () => { - const { i18n } = useTranslation(); - return ( -
+
- Agent - GPT - - - {i18n?.t("BETA", { - ns: "indexPage", - })} -  🚀 - - + + AgentGPT +
@@ -30,7 +23,7 @@ const AppTitle = () => { window.open("https://6h6bquxo5g1.typeform.com/to/qscfsOf1", "_blank"); }} > - Apply to automate your business with Agents + Automate your business with Agents
- {props.ping ? : <>}
{loading && ( diff --git a/next/src/components/DottedGridBackground.tsx b/next/src/components/DottedGridBackground.tsx deleted file mode 100644 index f5117580dc..0000000000 --- a/next/src/components/DottedGridBackground.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import clsx from "clsx"; -import React from "react"; - -interface DottedGridBackgroundProps { - children: React.ReactNode; - className?: string; -} - -const DottedGridBackground = ({ children, className }: DottedGridBackgroundProps) => { - return
{children}
; -}; - -export default DottedGridBackground; diff --git a/next/src/components/FadingHr.tsx b/next/src/components/FadingHr.tsx deleted file mode 100644 index 685ff44aed..0000000000 --- a/next/src/components/FadingHr.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import clsx from "clsx"; -import React from "react"; - -interface FadingHrProps { - className?: string; -} - -const FadingHr: React.FC = ({ className }) => { - return
; -}; -export default FadingHr; diff --git a/next/src/components/Globe.tsx b/next/src/components/Globe.tsx new file mode 100644 index 0000000000..cc92ffb9bd --- /dev/null +++ b/next/src/components/Globe.tsx @@ -0,0 +1,46 @@ +import type { COBEOptions } from "cobe"; +import createGlobe from "cobe"; +import type { MutableRefObject } from "react"; +import React, { useEffect, useRef } from "react"; + +export default function Globe(): JSX.Element { + const canvasRef: MutableRefObject = useRef(null); + + const size = 700; + useEffect(() => { + if (!canvasRef.current) return; + let phi = 0; + + const globeSettings: COBEOptions = { + devicePixelRatio: 2, + width: size * 2, + height: size * 2, + phi: 0, + theta: 0, + dark: 0, + diffuse: 1.2, + mapSamples: 16000, + mapBrightness: 6, + baseColor: [1, 1, 1], + markerColor: [1, 1, 0], + glowColor: [0.757, 0.784, 0.804], + markers: [], + onRender: (state) => { + // Called on every animation frame. + // `state` will be an empty object, return updated params. + state.phi = phi; + phi += 0.001; + }, + }; + + const globe = createGlobe(canvasRef.current, globeSettings); + + return () => { + if (canvasRef.current && globe) { + globe.destroy(); + } + }; + }, []); + + return ; +} diff --git a/next/src/components/Input.tsx b/next/src/components/Input.tsx index a7d24c1367..54fadaec92 100644 --- a/next/src/components/Input.tsx +++ b/next/src/components/Input.tsx @@ -51,7 +51,7 @@ const Input = (props: InputProps) => { inputElement = (