diff --git a/public/images/emoji/1F600.png b/public/images/emoji/1F600.png
deleted file mode 100644
index ba0e4fe..0000000
Binary files a/public/images/emoji/1F600.png and /dev/null differ
diff --git a/public/images/emoji/1F641.png b/public/images/emoji/1F641.png
deleted file mode 100644
index 0dd4e5b..0000000
Binary files a/public/images/emoji/1F641.png and /dev/null differ
diff --git a/public/images/emoji/1F642.png b/public/images/emoji/1F642.png
deleted file mode 100644
index b37115f..0000000
Binary files a/public/images/emoji/1F642.png and /dev/null differ
diff --git a/public/images/emoji/2764.png b/public/images/emoji/2764.png
deleted file mode 100644
index 2c6c24a..0000000
Binary files a/public/images/emoji/2764.png and /dev/null differ
diff --git a/public/images/emoji/LICENSE.md b/public/images/emoji/LICENSE.md
deleted file mode 100644
index 87b04e9..0000000
--- a/public/images/emoji/LICENSE.md
+++ /dev/null
@@ -1,5 +0,0 @@
-OpenMoji
-https://openmoji.org
-
-Licensed under Attribution-ShareAlike 4.0 International
-https://creativecommons.org/licenses/by-sa/4.0/
diff --git a/src/animations/Reveal.jsx b/src/animations/Reveal.jsx
deleted file mode 100644
index 5ef2a40..0000000
--- a/src/animations/Reveal.jsx
+++ /dev/null
@@ -1,30 +0,0 @@
-import { useRef, useEffect } from "react";
-import { motion, useInView, useAnimation } from "framer-motion";
-
-export default function Reveal({ children }) {
- const ref = useRef(null);
- const isInView = useInView(ref, { once: true });
- const mainControls = useAnimation();
-
- useEffect(() => {
- if (isInView) {
- mainControls.start("visible");
- }
- }, [isInView, mainControls]);
-
- return (
-
-
- {children}
-
-
- );
-}
\ No newline at end of file
diff --git a/src/assets/bot.png b/src/assets/bot.png
deleted file mode 100644
index 6e5776c..0000000
Binary files a/src/assets/bot.png and /dev/null differ
diff --git a/src/assets/chat.png b/src/assets/chat.png
deleted file mode 100644
index 42543a0..0000000
Binary files a/src/assets/chat.png and /dev/null differ
diff --git a/src/assets/google.png b/src/assets/google.png
deleted file mode 100644
index fa72a27..0000000
Binary files a/src/assets/google.png and /dev/null differ
diff --git a/src/assets/group.png b/src/assets/group.png
deleted file mode 100644
index 3cc74c0..0000000
Binary files a/src/assets/group.png and /dev/null differ
diff --git a/src/assets/logo_dark_46.png b/src/assets/logo_dark_46.png
deleted file mode 100644
index bb96779..0000000
Binary files a/src/assets/logo_dark_46.png and /dev/null differ
diff --git a/src/assets/logo_light_46.png b/src/assets/logo_light_46.png
deleted file mode 100644
index 966ffac..0000000
Binary files a/src/assets/logo_light_46.png and /dev/null differ
diff --git a/src/components/Chat.jsx b/src/components/Chat.jsx
deleted file mode 100644
index 1203560..0000000
--- a/src/components/Chat.jsx
+++ /dev/null
@@ -1,64 +0,0 @@
-import { useContext, useState } from "react";
-import { Button, Input, Tag, Avatar } from "@douyinfe/semi-ui";
-import { IconSend } from "@douyinfe/semi-icons";
-import { socket } from "../data/socket";
-import { MessageContext } from "../pages/Editor";
-
-export default function Chat() {
- const [message, setMessage] = useState("");
- const { messages } = useContext(MessageContext);
-
- return (
-
-
- {messages.map((m, i) =>
- m.type === "note" ? (
-
-
- {m.message}
-
-
- ) : messages[i + 1].id !== m.id ? (
-
-
- {m.name.split(" ").map((c) => c[0])}
-
-
-
{m.name}
-
{m.message}
-
-
- ) : (
-
- {m.message}
-
- )
- )}
-
-
-
- );
-}
diff --git a/src/components/DrawBot.jsx b/src/components/DrawBot.jsx
deleted file mode 100644
index 5ca27d5..0000000
--- a/src/components/DrawBot.jsx
+++ /dev/null
@@ -1,47 +0,0 @@
-import { useContext, useState } from "react";
-import { Button, Input, Avatar } from "@douyinfe/semi-ui";
-import { IconSend } from "@douyinfe/semi-icons";
-import { BotMessageContext } from "../pages/Editor";
-import botIcon from "../assets/bot.png";
-
-export default function DrawBot() {
- const [message, setMessage] = useState("");
- const { botMessages } = useContext(BotMessageContext);
-
- return (
-
-
- {botMessages.map((m, i) => (
-
-
- {m.sender === "bot" ? "drawBOT" : "You"}
-
-
-
- {m.sender === "bot" ? "drawBOT" : "You"}
-
-
{m.message}
-
-
- ))}
-
-
-
- );
-}
diff --git a/src/data/editor_config.js b/src/data/editorConfig.js
similarity index 100%
rename from src/data/editor_config.js
rename to src/data/editorConfig.js
diff --git a/src/data/signupDiagram.js b/src/data/signupDiagram.js
deleted file mode 100644
index d3ca800..0000000
--- a/src/data/signupDiagram.js
+++ /dev/null
@@ -1,71 +0,0 @@
-const xOffset = window.innerWidth * 0.42 * 0.15;
-export const diagram = {
- tables: [
- {
- name: "galactic_users",
- x: xOffset + 101,
- y: window.innerHeight * 0.75 - (4 * 36 + 50 + 7) * 0.5,
- fields: [
- {
- name: "id",
- type: "INT",
- },
- {
- name: "username",
- type: "VARCHAR",
- },
- {
- name: "email",
- type: "VARCHAR",
- },
- {
- name: "password",
- type: "VARCHAR",
- },
- ],
- color: "#7d9dff",
- },
- {
- name: "celestial_data",
- x: xOffset,
- y: window.innerHeight * 0.32 - (5 * 36 + 50 + 7) * 0.5,
- fields: [
- {
- name: "id",
- type: "INT",
- },
- {
- name: "user_id",
- type: "INT",
- },
- {
- name: "type",
- type: "ENUM",
- },
- {
- name: "time",
- type: "TIMESTAMP",
- },
- {
- name: "content",
- type: "VARCHAR",
- },
- ],
- color: "#89e667",
- },
- ],
- relationships: [
- {
- startTableId: 1,
- startFieldId: 1,
- endTableId: 0,
- endFieldId: 0,
- startX: xOffset + 16,
- startY:
- window.innerHeight * 0.32 - (4 * 36 + 50 + 7) * 0.5 + (50 + 18 * 2),
- endX: xOffset + 115,
- endY: window.innerHeight * 0.75 - (4 * 36 + 50 + 7) * 0.5 + (50 + 18 * 1),
- cardinality: "Many to one",
- },
- ],
-};
\ No newline at end of file
diff --git a/src/data/socket.js b/src/data/socket.js
deleted file mode 100644
index d2dc753..0000000
--- a/src/data/socket.js
+++ /dev/null
@@ -1,7 +0,0 @@
-import { io } from "socket.io-client";
-
-const URL = "http://localhost:5000";
-
-export const socket = io(URL, {
- autoConnect: false,
-});
diff --git a/src/pages/BugReport.jsx b/src/pages/BugReport.jsx
index 477af8f..d2b0647 100644
--- a/src/pages/BugReport.jsx
+++ b/src/pages/BugReport.jsx
@@ -10,7 +10,7 @@ import {
} from "@douyinfe/semi-icons";
import RichEditor from "../components/RichEditor";
import { LexicalComposer } from "@lexical/react/LexicalComposer";
-import { editorConfig } from "../data/editor_config";
+import { editorConfig } from "../data/editorConfig";
import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext";
import { $generateHtmlFromNodes } from "@lexical/html";
import { CLEAR_EDITOR_COMMAND } from "lexical";
diff --git a/src/pages/Dashboard.jsx b/src/pages/Dashboard.jsx
deleted file mode 100644
index cfe25f8..0000000
--- a/src/pages/Dashboard.jsx
+++ /dev/null
@@ -1,92 +0,0 @@
-import { useEffect, useState } from "react";
-import { useCookies } from "react-cookie";
-import logo_light from "../assets/logo_light_160.png";
-import logo_dark from "../assets/logo_dark_160.png";
-
-const Page = {
- MY_FILES: 0,
- SHARED: 1,
- TEMPLATES: 2,
- TODOS: 3,
- SETTINGS: 4,
-};
-
-export default function Dashboard() {
- const [cookies] = useCookies(["username"]);
- const [theme, setTheme] = useState("");
- const [currentPage, setCurrentPage] = useState(Page.MY_FILES);
-
- const buttons = [
- {
- icon: "fa-regular fa-folder-closed",
- label: "My files",
- onClick: () => setCurrentPage(Page.MY_FILES),
- },
- {
- icon: "fa-solid fa-share-from-square",
- label: "Shared",
- onClick: () => setCurrentPage(Page.SHARED),
- },
- {
- icon: "fa-solid fa-book",
- label: "Templates",
- onClick: () => setCurrentPage(Page.TEMPLATES),
- },
- {
- icon: "fa-solid fa-list",
- label: "My to-dos",
- onClick: () => setCurrentPage(Page.TODOS),
- },
- {
- icon: "fa-solid fa-diagram-project",
- label: "Editor",
- onClick: () => window.open("/editor"),
- },
- {
- icon: "bi bi-gear",
- label: "Settings",
- onClick: () => setCurrentPage(Page.SETTINGS),
- },
- ];
-
- const pages = [
- My files
,
- Shared
,
- Templates
,
- Todos
,
- Settings
,
- ];
-
- useEffect(() => {
- const t = localStorage.getItem("theme");
- setTheme(t);
- if (t) document.body.setAttribute("theme-mode", t);
- document.title = cookies.username + "'s Dashboard | drawDB";
- document.body.setAttribute("class", "theme");
- }, [setTheme, cookies]);
-
- return (
-
-
-

-
- {buttons.map((b, i) => (
-
- ))}
-
-
-
{pages[currentPage]}
-
- );
-}
diff --git a/src/pages/Home.jsx b/src/pages/Home.jsx
deleted file mode 100644
index 6cb7288..0000000
--- a/src/pages/Home.jsx
+++ /dev/null
@@ -1,8 +0,0 @@
-import LandingPage from "./LandingPage";
-import Dashboard from "./Dashboard";
-import { useCookies } from "react-cookie";
-
-export default function Home() {
- const [cookies] = useCookies(["logged_in"]);
- return {cookies.logged_in ? : }
;
-}
diff --git a/src/pages/Login.jsx b/src/pages/Login.jsx
deleted file mode 100644
index 90a42d1..0000000
--- a/src/pages/Login.jsx
+++ /dev/null
@@ -1,141 +0,0 @@
-import { useEffect, useState } from "react";
-import { Link, useNavigate } from "react-router-dom";
-import logo from "../assets/icon_dark_64.png";
-import google_logo from "../assets/google.png";
-import github_logo from "../assets/github.png";
-import axios from "axios";
-import Canvas from "../components/SimpleCanvas";
-import { diagram } from "../data/loginDiagram";
-
-import { useCookies } from "react-cookie";
-
-export default function Login() {
- const [formValues, setFormValues] = useState({
- email: "",
- password: "",
- });
- const [showPassword, setShowPassword] = useState(false);
- const [, setCookie] = useCookies(["logged_in", "username"]);
- const navigate = useNavigate();
-
- const handleChange = (e) =>
- setFormValues((prev) => ({
- ...prev,
- [e.target.name]: e.target.value,
- }));
-
- const onSubmit = async () => {
- await axios
- .post(
- `${import.meta.env.VITE_API_BACKEND_URL}/login`,
- {
- email: formValues.email,
- password: formValues.password,
- },
- { withCredentials: true }
- )
- .then((res) => {
- setCookie("logged_in", true, {
- path: "/",
- expires: new Date(Date.parse(res.data.session.cookie.expires)),
- });
- setCookie("username", res.data.username, {
- path: "/",
- expires: new Date(Date.parse(res.data.session.cookie.expires)),
- });
- navigate("/");
- })
- .catch(() => {});
- };
-
- useEffect(() => {
- document.title = "Log in | drawDB";
- });
-
- return (
-
-
-
-
- Welcome back!
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Already have an account?
-
- Sign up here.
-
-
-
-
-
-
-
-
-

-
-
-
- );
-}
diff --git a/src/pages/Signup.jsx b/src/pages/Signup.jsx
deleted file mode 100644
index 16ade34..0000000
--- a/src/pages/Signup.jsx
+++ /dev/null
@@ -1,202 +0,0 @@
-import { useEffect, useState } from "react";
-import { Link } from "react-router-dom";
-import logo from "../assets/icon_dark_64.png";
-import google_logo from "../assets/google.png";
-import github_logo from "../assets/github.png";
-import axios from "axios";
-import { Toast } from "@douyinfe/semi-ui";
-import Canvas from "../components/SimpleCanvas";
-import { diagram } from "../data/signupDiagram";
-
-export default function SignUp() {
- const [formValues, setFormValues] = useState({
- username: "",
- email: "",
- password: "",
- });
- const [showPassword, setShowPassword] = useState(false);
- const [showVerified, setShowVerified] = useState(false);
- const [resendCounter, setResendCounter] = useState(0);
-
- const handleChange = (e) =>
- setFormValues((prev) => ({
- ...prev,
- [e.target.name]: e.target.value,
- }));
-
- const onSubmit = async () => {
- await axios
- .post(`${import.meta.env.VITE_API_BACKEND_URL}/signup`, {
- username: formValues.username,
- email: formValues.email,
- password: formValues.password,
- })
- .then(() => setShowVerified(true))
- .catch(() => {});
- };
-
- const resendEmail = async () => {
- await axios
- .post(`${import.meta.env.VITE_API_BACKEND_URL}/resend`, {
- username: formValues.username,
- email: formValues.email,
- password: formValues.password,
- })
- .then(() => setResendCounter((prev) => prev + 1))
- .catch((e) => {
- if (e.response.status === 400)
- Toast.error("Account has already been verified.");
- });
- };
-
- useEffect(() => {
- document.title = "Create account | drawDB";
- });
-
- return (
-
-
-
-
-

-
-
-
-
- {!showVerified ? (
- <>
-
- Create Account
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Already have an account?
-
- Log in here.
-
-
-
- >
- ) : (
- <>
-
- Verify Account
-
-
-
- We {resendCounter == 0 ? "sent" : "resent"} a verification
- email to{" "}
-
- {formValues.email}
-
- .
-
-
Please check your inbox and verify your email.
-
-
-
Don't see the email?
- {resendCounter < 4 ? (
-
- If you haven't recieved the email after a few minutes,
- make sure to check your junk mail or{" "}
-
- .
-
- ) : (
-
- Looks like we're having trouble signing you up. Please
- try again in a little bit or contact us at{" "}
-
- drawdb@gmail.com
-
-
- )}
-
- >
- )}
-
-
-
- );
-}
diff --git a/src/pages/Survey.jsx b/src/pages/Survey.jsx
index 4fb2e62..c3239e1 100644
--- a/src/pages/Survey.jsx
+++ b/src/pages/Survey.jsx
@@ -15,7 +15,7 @@ import {
import { IconSun, IconMoon } from "@douyinfe/semi-icons";
import RichEditor from "../components/RichEditor";
import { LexicalComposer } from "@lexical/react/LexicalComposer";
-import { editorConfig } from "../data/editor_config";
+import { editorConfig } from "../data/editorConfig";
import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext";
import { $generateHtmlFromNodes } from "@lexical/html";
import { CLEAR_EDITOR_COMMAND } from "lexical";