diff --git a/components/DataStorageBanner.tsx b/src/components/DataStorageBanner.tsx
similarity index 100%
rename from components/DataStorageBanner.tsx
rename to src/components/DataStorageBanner.tsx
diff --git a/components/EditChatTitleModal.tsx b/src/components/EditChatTitleModal.tsx
similarity index 100%
rename from components/EditChatTitleModal.tsx
rename to src/components/EditChatTitleModal.tsx
diff --git a/components/EmptyView.tsx b/src/components/EmptyView.tsx
similarity index 100%
rename from components/EmptyView.tsx
rename to src/components/EmptyView.tsx
diff --git a/components/EngineIcon.tsx b/src/components/EngineIcon.tsx
similarity index 100%
rename from components/EngineIcon.tsx
rename to src/components/EngineIcon.tsx
diff --git a/components/GitHubStarBadge.tsx b/src/components/GitHubStarBadge.tsx
similarity index 100%
rename from components/GitHubStarBadge.tsx
rename to src/components/GitHubStarBadge.tsx
diff --git a/components/Icon.tsx b/src/components/Icon.tsx
similarity index 100%
rename from components/Icon.tsx
rename to src/components/Icon.tsx
diff --git a/components/MessageLoader.tsx b/src/components/MessageLoader.tsx
similarity index 100%
rename from components/MessageLoader.tsx
rename to src/components/MessageLoader.tsx
diff --git a/components/QueryDrawer.tsx b/src/components/QueryDrawer.tsx
similarity index 100%
rename from components/QueryDrawer.tsx
rename to src/components/QueryDrawer.tsx
diff --git a/components/SettingModal.tsx b/src/components/SettingModal.tsx
similarity index 100%
rename from components/SettingModal.tsx
rename to src/components/SettingModal.tsx
diff --git a/components/WeChatQRCodeView.tsx b/src/components/WeChatQRCodeView.tsx
similarity index 100%
rename from components/WeChatQRCodeView.tsx
rename to src/components/WeChatQRCodeView.tsx
diff --git a/lib/connectors/index.ts b/src/lib/connectors/index.ts
similarity index 100%
rename from lib/connectors/index.ts
rename to src/lib/connectors/index.ts
diff --git a/lib/connectors/mysql/index.ts b/src/lib/connectors/mysql/index.ts
similarity index 100%
rename from lib/connectors/mysql/index.ts
rename to src/lib/connectors/mysql/index.ts
diff --git a/lib/connectors/postgres/index.ts b/src/lib/connectors/postgres/index.ts
similarity index 100%
rename from lib/connectors/postgres/index.ts
rename to src/lib/connectors/postgres/index.ts
diff --git a/pages/_app.tsx b/src/pages/_app.tsx
similarity index 100%
rename from pages/_app.tsx
rename to src/pages/_app.tsx
diff --git a/pages/api/chat.ts b/src/pages/api/chat.ts
similarity index 100%
rename from pages/api/chat.ts
rename to src/pages/api/chat.ts
index 62b92d8..be5566f 100644
--- a/pages/api/chat.ts
+++ b/src/pages/api/chat.ts
@@ -1,6 +1,6 @@
-import { openAIApiEndpoint, openAIApiKey } from "@/utils";
import { createParser, ParsedEvent, ReconnectInterval } from "eventsource-parser";
import { NextRequest } from "next/server";
+import { openAIApiEndpoint, openAIApiKey } from "@/utils";
export const config = {
runtime: "edge",
diff --git a/pages/api/connection/db.ts b/src/pages/api/connection/db.ts
similarity index 100%
rename from pages/api/connection/db.ts
rename to src/pages/api/connection/db.ts
diff --git a/pages/api/connection/db_schema.ts b/src/pages/api/connection/db_schema.ts
similarity index 100%
rename from pages/api/connection/db_schema.ts
rename to src/pages/api/connection/db_schema.ts
diff --git a/pages/api/connection/execute.ts b/src/pages/api/connection/execute.ts
similarity index 100%
rename from pages/api/connection/execute.ts
rename to src/pages/api/connection/execute.ts
diff --git a/pages/api/connection/test.ts b/src/pages/api/connection/test.ts
similarity index 100%
rename from pages/api/connection/test.ts
rename to src/pages/api/connection/test.ts
diff --git a/pages/api/ping.ts b/src/pages/api/ping.ts
similarity index 100%
rename from pages/api/ping.ts
rename to src/pages/api/ping.ts
diff --git a/pages/index.tsx b/src/pages/index.tsx
similarity index 100%
rename from pages/index.tsx
rename to src/pages/index.tsx
diff --git a/store/assistant.ts b/src/store/assistant.ts
similarity index 100%
rename from store/assistant.ts
rename to src/store/assistant.ts
diff --git a/store/chat.ts b/src/store/chat.ts
similarity index 100%
rename from store/chat.ts
rename to src/store/chat.ts
diff --git a/store/connection.ts b/src/store/connection.ts
similarity index 100%
rename from store/connection.ts
rename to src/store/connection.ts
diff --git a/store/index.ts b/src/store/index.ts
similarity index 100%
rename from store/index.ts
rename to src/store/index.ts
diff --git a/store/layout.ts b/src/store/layout.ts
similarity index 100%
rename from store/layout.ts
rename to src/store/layout.ts
diff --git a/store/message.ts b/src/store/message.ts
similarity index 100%
rename from store/message.ts
rename to src/store/message.ts
diff --git a/store/query.ts b/src/store/query.ts
similarity index 100%
rename from store/query.ts
rename to src/store/query.ts
diff --git a/store/user.ts b/src/store/user.ts
similarity index 100%
rename from store/user.ts
rename to src/store/user.ts
diff --git a/styles/data-table.css b/src/styles/data-table.css
similarity index 100%
rename from styles/data-table.css
rename to src/styles/data-table.css
diff --git a/styles/global.css b/src/styles/global.css
similarity index 100%
rename from styles/global.css
rename to src/styles/global.css
diff --git a/styles/tailwind.css b/src/styles/tailwind.css
similarity index 100%
rename from styles/tailwind.css
rename to src/styles/tailwind.css
diff --git a/types/api.ts b/src/types/api.ts
similarity index 100%
rename from types/api.ts
rename to src/types/api.ts
diff --git a/types/chat.ts b/src/types/chat.ts
similarity index 80%
rename from types/chat.ts
rename to src/types/chat.ts
index ae36a98..520949e 100644
--- a/types/chat.ts
+++ b/src/types/chat.ts
@@ -1,4 +1,4 @@
-import { Id, Timestamp } from "./";
+import { Id, Timestamp } from ".";
export interface Chat {
id: string;
diff --git a/types/common.ts b/src/types/common.ts
similarity index 100%
rename from types/common.ts
rename to src/types/common.ts
diff --git a/types/connection.ts b/src/types/connection.ts
similarity index 93%
rename from types/connection.ts
rename to src/types/connection.ts
index 959b3ea..2500c53 100644
--- a/types/connection.ts
+++ b/src/types/connection.ts
@@ -1,4 +1,4 @@
-import { Id } from "./";
+import { Id } from ".";
export enum Engine {
MySQL = "MYSQL",
diff --git a/types/database.ts b/src/types/database.ts
similarity index 91%
rename from types/database.ts
rename to src/types/database.ts
index e23d959..2d86fdb 100644
--- a/types/database.ts
+++ b/src/types/database.ts
@@ -1,4 +1,4 @@
-import { Id } from "./";
+import { Id } from ".";
export interface Database {
connectionId: Id;
diff --git a/types/index.ts b/src/types/index.ts
similarity index 100%
rename from types/index.ts
rename to src/types/index.ts
diff --git a/types/message.ts b/src/types/message.ts
similarity index 88%
rename from types/message.ts
rename to src/types/message.ts
index e1e30a2..a7d1fd3 100644
--- a/types/message.ts
+++ b/src/types/message.ts
@@ -1,4 +1,4 @@
-import { Id, Timestamp } from "./";
+import { Id, Timestamp } from ".";
export enum CreatorRole {
System = "system",
diff --git a/types/user.ts b/src/types/user.ts
similarity index 100%
rename from types/user.ts
rename to src/types/user.ts
diff --git a/utils/id.ts b/src/utils/id.ts
similarity index 100%
rename from utils/id.ts
rename to src/utils/id.ts
diff --git a/utils/index.ts b/src/utils/index.ts
similarity index 100%
rename from utils/index.ts
rename to src/utils/index.ts
diff --git a/utils/openai.ts b/src/utils/openai.ts
similarity index 100%
rename from utils/openai.ts
rename to src/utils/openai.ts
diff --git a/utils/sql.ts b/src/utils/sql.ts
similarity index 100%
rename from utils/sql.ts
rename to src/utils/sql.ts
diff --git a/tailwind.config.js b/tailwind.config.js
index 3b95f12..5b9659d 100644
--- a/tailwind.config.js
+++ b/tailwind.config.js
@@ -1,6 +1,6 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
- content: ["./pages/**/*.{js,ts,jsx,tsx}", "./components/**/*.{js,ts,jsx,tsx}"],
+ content: ["./src/pages/**/*.{js,ts,jsx,tsx}", "./src/components/**/*.{js,ts,jsx,tsx}"],
theme: {
extend: {
zIndex: {
diff --git a/tsconfig.json b/tsconfig.json
index 8b8e581..61c19ab 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -15,7 +15,7 @@
"jsx": "preserve",
"incremental": true,
"paths": {
- "@/*": ["./*"]
+ "@/*": ["./src/*"]
}
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],