From 66dc6dbc1a8a52ceb39f427bb05845cb40ba5c26 Mon Sep 17 00:00:00 2001 From: Caio Cabral Date: Thu, 12 Dec 2024 00:09:41 -0500 Subject: [PATCH 01/22] refactor: extracting routes to own component --- Client/src/App.jsx | 199 +--------------------------------- Client/src/Routes/index.jsx | 209 ++++++++++++++++++++++++++++++++++++ 2 files changed, 213 insertions(+), 195 deletions(-) create mode 100644 Client/src/Routes/index.jsx diff --git a/Client/src/App.jsx b/Client/src/App.jsx index 82c8203a8..b27373071 100644 --- a/Client/src/App.jsx +++ b/Client/src/App.jsx @@ -1,37 +1,9 @@ import { useEffect } from "react"; -import { Routes, Route, Navigate } from "react-router-dom"; import { useSelector } from "react-redux"; import { useDispatch } from "react-redux"; import "react-toastify/dist/ReactToastify.css"; import { ToastContainer } from "react-toastify"; -import NotFound from "./Pages/NotFound"; -import Login from "./Pages/Auth/Login"; -import Register from "./Pages/Auth/Register/Register"; -import Account from "./Pages/Account"; -import Monitors from "./Pages/Monitors/Home"; -import CreateMonitor from "./Pages/Monitors/CreateMonitor"; -import CreateInfrastructureMonitor from "./Pages/Infrastructure/CreateMonitor"; -import Incidents from "./Pages/Incidents"; -import Status from "./Pages/Status"; -import Integrations from "./Pages/Integrations"; -import Settings from "./Pages/Settings"; -import ForgotPassword from "./Pages/Auth/ForgotPassword"; -import CheckEmail from "./Pages/Auth/CheckEmail"; -import SetNewPassword from "./Pages/Auth/SetNewPassword"; -import NewPasswordConfirmed from "./Pages/Auth/NewPasswordConfirmed"; -import ProtectedRoute from "./Components/ProtectedRoute"; -import Details from "./Pages/Monitors/Details"; -import AdvancedSettings from "./Pages/AdvancedSettings"; -import Maintenance from "./Pages/Maintenance"; -import Configure from "./Pages/Monitors/Configure"; -import PageSpeed from "./Pages/PageSpeed"; -import CreatePageSpeed from "./Pages/PageSpeed/CreatePageSpeed"; -import CreateNewMaintenanceWindow from "./Pages/Maintenance/CreateMaintenance"; -import PageSpeedDetails from "./Pages/PageSpeed/Details"; -import PageSpeedConfigure from "./Pages/PageSpeed/Configure"; -import HomeLayout from "./Components/Layouts/HomeLayout"; -import withAdminCheck from "./Components/HOC/withAdminCheck"; -import withAdminProp from "./Components/HOC/withAdminProp"; + import { ThemeProvider } from "@emotion/react"; import lightTheme from "./Utils/Theme/lightTheme"; import darkTheme from "./Utils/Theme/darkTheme"; @@ -39,18 +11,9 @@ import { CssBaseline, GlobalStyles } from "@mui/material"; import { getAppSettings } from "./Features/Settings/settingsSlice"; import { logger } from "./Utils/Logger"; // Import the logger import { networkService } from "./main"; -import { Infrastructure } from "./Pages/Infrastructure"; -import InfrastructureDetails from "./Pages/Infrastructure/Details"; +import { Routes } from "./Routes"; + function App() { - const AdminCheckedRegister = withAdminCheck(Register); - const MonitorsWithAdminProp = withAdminProp(Monitors); - const MonitorDetailsWithAdminProp = withAdminProp(Details); - const PageSpeedWithAdminProp = withAdminProp(PageSpeed); - const PageSpeedDetailsWithAdminProp = withAdminProp(PageSpeedDetails); - const MaintenanceWithAdminProp = withAdminProp(Maintenance); - const SettingsWithAdminProp = withAdminProp(Settings); - const AdvancedSettingsWithAdminProp = withAdminProp(AdvancedSettings); - const InfrastructureDetailsWithAdminProp = withAdminProp(InfrastructureDetails); const mode = useSelector((state) => state.ui.mode); const { authToken } = useSelector((state) => state.auth); const dispatch = useDispatch(); @@ -82,161 +45,7 @@ function App() { }; }} /> - {/* Extract Routes to Routes */} - - } - > - } - /> - } - /> - } - /> - } - /> - } - /> - } - /> - } - /> - } - /> - } - /> - } - /> - } - /> - } - /> - - } - /> - - } - /> - } - /> - } - /> - } - /> - } - /> - } - /> - - } - /> - - } - /> - - } - /> - - - } - /> - - } - /> - - } - /> - - } - /> - - } - /> - } - /> - } - /> - } - /> - + ); diff --git a/Client/src/Routes/index.jsx b/Client/src/Routes/index.jsx new file mode 100644 index 000000000..8397729ca --- /dev/null +++ b/Client/src/Routes/index.jsx @@ -0,0 +1,209 @@ +import { Navigate, Route, Routes as LibRoutes } from "react-router"; +import HomeLayout from "../Components/Layouts/HomeLayout"; +import { Infrastructure } from "../Pages/Infrastructure"; +import InfrastructureDetails from "../Pages/Infrastructure/Details"; +import NotFound from "../Pages/NotFound"; +import Login from "../Pages/Auth/Login"; +import Register from "../Pages/Auth/Register/Register"; +import Account from "../Pages/Account"; +import Monitors from "../Pages/Monitors/Home"; +import CreateMonitor from "../Pages/Monitors/CreateMonitor"; +import CreateInfrastructureMonitor from "../Pages/Infrastructure/CreateMonitor"; +import Incidents from "../Pages/Incidents"; +import Status from "../Pages/Status"; +import Integrations from "../Pages/Integrations"; +import Settings from "../Pages/Settings"; +import ForgotPassword from "../Pages/Auth/ForgotPassword"; +import CheckEmail from "../Pages/Auth/CheckEmail"; +import SetNewPassword from "../Pages/Auth/SetNewPassword"; +import NewPasswordConfirmed from "../Pages/Auth/NewPasswordConfirmed"; +import ProtectedRoute from "../Components/ProtectedRoute"; +import Details from "../Pages/Monitors/Details"; +import AdvancedSettings from "../Pages/AdvancedSettings"; +import Maintenance from "../Pages/Maintenance"; +import Configure from "../Pages/Monitors/Configure"; +import PageSpeed from "../Pages/PageSpeed"; +import CreatePageSpeed from "../Pages/PageSpeed/CreatePageSpeed"; +import CreateNewMaintenanceWindow from "../Pages/Maintenance/CreateMaintenance"; +import PageSpeedDetails from "../Pages/PageSpeed/Details"; +import PageSpeedConfigure from "../Pages/PageSpeed/Configure"; +import withAdminCheck from "../Components/HOC/withAdminCheck"; +import withAdminProp from "../Components/HOC/withAdminProp"; + +const Routes = () => { + const AdminCheckedRegister = withAdminCheck(Register); + const MonitorsWithAdminProp = withAdminProp(Monitors); + const MonitorDetailsWithAdminProp = withAdminProp(Details); + const PageSpeedWithAdminProp = withAdminProp(PageSpeed); + const PageSpeedDetailsWithAdminProp = withAdminProp(PageSpeedDetails); + const MaintenanceWithAdminProp = withAdminProp(Maintenance); + const SettingsWithAdminProp = withAdminProp(Settings); + const AdvancedSettingsWithAdminProp = withAdminProp(AdvancedSettings); + const InfrastructureDetailsWithAdminProp = withAdminProp(InfrastructureDetails); + return ( + + } + > + } + /> + } + /> + } + /> + } + /> + } + /> + } + /> + } + /> + } + /> + } + /> + } + /> + } + /> + } + /> + + } + /> + + } + /> + } + /> + } + /> + } + /> + } + /> + } + /> + + } + /> + + } + /> + + } + /> + + + } + /> + + } + /> + + } + /> + + } + /> + + } + /> + } + /> + } + /> + } + /> + + ); +}; + +export { Routes }; + +/* import { createBrowserRouter } from "react-router-dom"; + +const router = createBrowserRouter({ + { + path: "/", + } +}); + +export { router }; */ From a70e96f1f3f32513ca0829c504f146d392e19693 Mon Sep 17 00:00:00 2001 From: Caio Cabral Date: Thu, 12 Dec 2024 08:24:10 -0500 Subject: [PATCH 02/22] refactor: avoid repetition of the protected routes component --- .../src/Components/ProtectedRoute/index.jsx | 2 +- Client/src/Pages/Auth/Login.jsx | 1 + Client/src/Routes/index.jsx | 55 ++++++++----------- 3 files changed, 26 insertions(+), 32 deletions(-) diff --git a/Client/src/Components/ProtectedRoute/index.jsx b/Client/src/Components/ProtectedRoute/index.jsx index 5b1032ab8..c10ebba7f 100644 --- a/Client/src/Components/ProtectedRoute/index.jsx +++ b/Client/src/Components/ProtectedRoute/index.jsx @@ -15,7 +15,7 @@ import PropTypes from "prop-types"; const ProtectedRoute = ({ Component, ...rest }) => { const authState = useSelector((state) => state.auth); - + console.log("Protected"); return authState.authToken ? ( ) : ( diff --git a/Client/src/Pages/Auth/Login.jsx b/Client/src/Pages/Auth/Login.jsx index 6329835ef..89992b109 100644 --- a/Client/src/Pages/Auth/Login.jsx +++ b/Client/src/Pages/Auth/Login.jsx @@ -367,6 +367,7 @@ StepTwo.propTypes = { }; const Login = () => { + console.log("login"); const dispatch = useDispatch(); const navigate = useNavigate(); const theme = useTheme(); diff --git a/Client/src/Routes/index.jsx b/Client/src/Routes/index.jsx index 8397729ca..76c90784e 100644 --- a/Client/src/Routes/index.jsx +++ b/Client/src/Routes/index.jsx @@ -44,7 +44,7 @@ const Routes = () => { } + element={} > { /> } + element={} /> } + element={} /> } + element={} /> } + element={} /> } + element={} /> } + element={} /> } + element={} /> } + element={} /> } + element={} /> } + element={} /> } + element={} /> } + element={} /> } + element={} /> } + element={} /> } + element={} /> { /> } + element={} /> } + element={} /> - } + element={} /> { } /> } /> @@ -171,11 +164,6 @@ const Routes = () => { element={} /> - } - /> - } @@ -192,6 +180,11 @@ const Routes = () => { path="/new-password-confirmed" element={} /> + + } + /> ); }; From 910080820bf339290dcc7c9c43cdb0c7e38cb840 Mon Sep 17 00:00:00 2001 From: Caio Cabral Date: Thu, 12 Dec 2024 09:07:11 -0500 Subject: [PATCH 03/22] refactor: removed withAdminProps HOC and changed for custom hook reducing component wrapping --- Client/src/Components/HOC/withAdminProp.jsx | 25 ---------- .../src/Components/ProtectedRoute/index.jsx | 1 - Client/src/Pages/AdvancedSettings/index.jsx | 5 +- Client/src/Pages/Maintenance/index.jsx | 7 +-- Client/src/Pages/Monitors/Details/index.jsx | 4 +- Client/src/Pages/Monitors/Home/index.jsx | 4 +- Client/src/Pages/PageSpeed/Details/index.jsx | 4 +- Client/src/Pages/PageSpeed/index.jsx | 5 +- Client/src/Pages/Settings/index.jsx | 4 +- Client/src/Routes/index.jsx | 50 ++++--------------- 10 files changed, 32 insertions(+), 77 deletions(-) delete mode 100644 Client/src/Components/HOC/withAdminProp.jsx diff --git a/Client/src/Components/HOC/withAdminProp.jsx b/Client/src/Components/HOC/withAdminProp.jsx deleted file mode 100644 index b55893119..000000000 --- a/Client/src/Components/HOC/withAdminProp.jsx +++ /dev/null @@ -1,25 +0,0 @@ -import { useSelector } from "react-redux"; - -const withAdminProp = (WrappedComponent) => { - const WithAdminProp = (props) => { - const { user } = useSelector((state) => state.auth); - const isAdmin = - (user?.role?.includes("admin") ?? false) || - (user?.role?.includes("superadmin") ?? false); - - return ( - - ); - }; - - const wrappedComponentName = - WrappedComponent.displayName || WrappedComponent.name || "Component"; - WithAdminProp.displayName = `WithAdminProp(${wrappedComponentName})`; - - return WithAdminProp; -}; - -export default withAdminProp; diff --git a/Client/src/Components/ProtectedRoute/index.jsx b/Client/src/Components/ProtectedRoute/index.jsx index c10ebba7f..1a8cf9aa0 100644 --- a/Client/src/Components/ProtectedRoute/index.jsx +++ b/Client/src/Components/ProtectedRoute/index.jsx @@ -15,7 +15,6 @@ import PropTypes from "prop-types"; const ProtectedRoute = ({ Component, ...rest }) => { const authState = useSelector((state) => state.auth); - console.log("Protected"); return authState.authToken ? ( ) : ( diff --git a/Client/src/Pages/AdvancedSettings/index.jsx b/Client/src/Pages/AdvancedSettings/index.jsx index 90bcf21d6..14ecb6f8f 100644 --- a/Client/src/Pages/AdvancedSettings/index.jsx +++ b/Client/src/Pages/AdvancedSettings/index.jsx @@ -14,10 +14,11 @@ import { useState, useEffect } from "react"; import Select from "../../Components/Inputs/Select"; import { advancedSettingsValidation } from "../../Validation/validation"; import { buildErrors, hasValidationErrors } from "../../Validation/error"; +import { useIsAdmin } from "../../Hooks/useIsAdmin"; -const AdvancedSettings = ({ isAdmin }) => { +const AdvancedSettings = () => { const navigate = useNavigate(); - + const isAdmin = useIsAdmin; useEffect(() => { if (!isAdmin) { navigate("/"); diff --git a/Client/src/Pages/Maintenance/index.jsx b/Client/src/Pages/Maintenance/index.jsx index fd0d7edc3..5c2930294 100644 --- a/Client/src/Pages/Maintenance/index.jsx +++ b/Client/src/Pages/Maintenance/index.jsx @@ -8,13 +8,14 @@ import { useSelector } from "react-redux"; import { networkService } from "../../main"; import Breadcrumbs from "../../Components/Breadcrumbs"; import { useNavigate } from "react-router-dom"; +import { useIsAdmin } from "../../Hooks/useIsAdmin"; -const Maintenance = ({ isAdmin }) => { +const Maintenance = () => { const theme = useTheme(); const navigate = useNavigate(); const { authToken } = useSelector((state) => state.auth); const { rowsPerPage } = useSelector((state) => state.ui.maintenance); - + const isAdmin = useIsAdmin(); const [maintenanceWindows, setMaintenanceWindows] = useState([]); const [maintenanceWindowCount, setMaintenanceWindowCount] = useState(0); const [page, setPage] = useState(0); @@ -99,7 +100,7 @@ const Maintenance = ({ isAdmin }) => { "Stop sending alerts in maintenance windows", ]} link="/maintenance/create" - isAdmin={true} + isAdmin={isAdmin} /> )} diff --git a/Client/src/Pages/Monitors/Details/index.jsx b/Client/src/Pages/Monitors/Details/index.jsx index ebb664b79..68d21903c 100644 --- a/Client/src/Pages/Monitors/Details/index.jsx +++ b/Client/src/Pages/Monitors/Details/index.jsx @@ -32,14 +32,16 @@ import SkeletonLayout from "./skeleton"; import "./index.css"; import useUtils from "../utils"; import { formatDateWithTz } from "../../../Utils/timeUtils"; +import { useIsAdmin } from "../../../Hooks/useIsAdmin"; /** * Details page component displaying monitor details and related information. * @component */ -const DetailsPage = ({ isAdmin }) => { +const DetailsPage = () => { const theme = useTheme(); const { statusColor, statusStyles, statusMsg, determineState } = useUtils(); + const isAdmin = useIsAdmin(); const [monitor, setMonitor] = useState({}); const { monitorId } = useParams(); const { authToken } = useSelector((state) => state.auth); diff --git a/Client/src/Pages/Monitors/Home/index.jsx b/Client/src/Pages/Monitors/Home/index.jsx index 167fd1e67..15dc814df 100644 --- a/Client/src/Pages/Monitors/Home/index.jsx +++ b/Client/src/Pages/Monitors/Home/index.jsx @@ -12,10 +12,12 @@ import StatusBox from "./StatusBox"; import Breadcrumbs from "../../../Components/Breadcrumbs"; import Greeting from "../../../Utils/greeting"; import { CurrentMonitoring } from "./CurrentMonitoring"; +import { useIsAdmin } from "../../../Hooks/useIsAdmin"; -const Monitors = ({ isAdmin }) => { +const Monitors = () => { const theme = useTheme(); const navigate = useNavigate(); + const isAdmin = useIsAdmin(); const monitorState = useSelector((state) => state.uptimeMonitors); const authState = useSelector((state) => state.auth); const dispatch = useDispatch({}); diff --git a/Client/src/Pages/PageSpeed/Details/index.jsx b/Client/src/Pages/PageSpeed/Details/index.jsx index ca852e124..d25848ff2 100644 --- a/Client/src/Pages/PageSpeed/Details/index.jsx +++ b/Client/src/Pages/PageSpeed/Details/index.jsx @@ -21,10 +21,12 @@ import Checkbox from "../../../Components/Inputs/Checkbox"; import PieChart from "./Charts/PieChart"; import useUtils from "../../Monitors/utils"; import "./index.css"; +import { useIsAdmin } from "../../../Hooks/useIsAdmin"; -const PageSpeedDetails = ({ isAdmin }) => { +const PageSpeedDetails = () => { const theme = useTheme(); const navigate = useNavigate(); + const isAdmin = useIsAdmin(); const { statusColor, pagespeedStatusMsg, determineState } = useUtils(); const [monitor, setMonitor] = useState({}); const [audits, setAudits] = useState({}); diff --git a/Client/src/Pages/PageSpeed/index.jsx b/Client/src/Pages/PageSpeed/index.jsx index 9b84b0286..b18148aa8 100644 --- a/Client/src/Pages/PageSpeed/index.jsx +++ b/Client/src/Pages/PageSpeed/index.jsx @@ -12,11 +12,12 @@ import SkeletonLayout from "./skeleton"; import Card from "./card"; import { networkService } from "../../main"; import { Heading } from "../../Components/Heading"; -const PageSpeed = ({ isAdmin }) => { +import { useIsAdmin } from "../../Hooks/useIsAdmin"; +const PageSpeed = () => { const theme = useTheme(); const dispatch = useDispatch(); const navigate = useNavigate(); - + const isAdmin = useIsAdmin(); const { user, authToken } = useSelector((state) => state.auth); const [isLoading, setIsLoading] = useState(true); const [monitors, setMonitors] = useState([]); diff --git a/Client/src/Pages/Settings/index.jsx b/Client/src/Pages/Settings/index.jsx index 8a5e73bc3..aab9fa537 100644 --- a/Client/src/Pages/Settings/index.jsx +++ b/Client/src/Pages/Settings/index.jsx @@ -23,11 +23,13 @@ import { networkService } from "../../main"; import { settingsValidation } from "../../Validation/validation"; import { useNavigate } from "react-router"; import Dialog from "../../Components/Dialog"; +import { useIsAdmin } from "../../Hooks/useIsAdmin"; const SECONDS_PER_DAY = 86400; -const Settings = ({ isAdmin }) => { +const Settings = () => { const theme = useTheme(); + const isAdmin = useIsAdmin(); const { user, authToken } = useSelector((state) => state.auth); const { checkTTL } = user; const { isLoading } = useSelector((state) => state.uptimeMonitors); diff --git a/Client/src/Routes/index.jsx b/Client/src/Routes/index.jsx index 76c90784e..d3e14a02d 100644 --- a/Client/src/Routes/index.jsx +++ b/Client/src/Routes/index.jsx @@ -28,18 +28,9 @@ import CreateNewMaintenanceWindow from "../Pages/Maintenance/CreateMaintenance"; import PageSpeedDetails from "../Pages/PageSpeed/Details"; import PageSpeedConfigure from "../Pages/PageSpeed/Configure"; import withAdminCheck from "../Components/HOC/withAdminCheck"; -import withAdminProp from "../Components/HOC/withAdminProp"; const Routes = () => { const AdminCheckedRegister = withAdminCheck(Register); - const MonitorsWithAdminProp = withAdminProp(Monitors); - const MonitorDetailsWithAdminProp = withAdminProp(Details); - const PageSpeedWithAdminProp = withAdminProp(PageSpeed); - const PageSpeedDetailsWithAdminProp = withAdminProp(PageSpeedDetails); - const MaintenanceWithAdminProp = withAdminProp(Maintenance); - const SettingsWithAdminProp = withAdminProp(Settings); - const AdvancedSettingsWithAdminProp = withAdminProp(AdvancedSettings); - const InfrastructureDetailsWithAdminProp = withAdminProp(InfrastructureDetails); return ( { /> } + element={} /> { /> } + element={
} /> { /> } + element={} /> { /> } + element={} /> { /> } + element={} /> - } @@ -110,7 +100,7 @@ const Routes = () => { /> } + element={} /> { /> } + element={} /> } + element={} /> { /> - } + element={} /> - } + element={} /> @@ -190,13 +170,3 @@ const Routes = () => { }; export { Routes }; - -/* import { createBrowserRouter } from "react-router-dom"; - -const router = createBrowserRouter({ - { - path: "/", - } -}); - -export { router }; */ From cce1ed610c92b1b1ec4c09c14f92166d7da4ef6e Mon Sep 17 00:00:00 2001 From: Caio Cabral Date: Thu, 12 Dec 2024 09:11:08 -0500 Subject: [PATCH 04/22] chore: delete console --- Client/src/Pages/Auth/Login.jsx | 1 - 1 file changed, 1 deletion(-) diff --git a/Client/src/Pages/Auth/Login.jsx b/Client/src/Pages/Auth/Login.jsx index 89992b109..6329835ef 100644 --- a/Client/src/Pages/Auth/Login.jsx +++ b/Client/src/Pages/Auth/Login.jsx @@ -367,7 +367,6 @@ StepTwo.propTypes = { }; const Login = () => { - console.log("login"); const dispatch = useDispatch(); const navigate = useNavigate(); const theme = useTheme(); From ee4ef158748aacd62738cfa4f5f3155fc75cff42 Mon Sep 17 00:00:00 2001 From: Caio Cabral Date: Thu, 12 Dec 2024 09:20:24 -0500 Subject: [PATCH 05/22] resolving conflicts --- .../Infrastructure/CreateMonitor/index.jsx | 1 - .../Pages/PageSpeed/CreatePageSpeed/index.jsx | 2 +- Client/src/Routes/index.jsx | 18 +++++++++--------- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/Client/src/Pages/Infrastructure/CreateMonitor/index.jsx b/Client/src/Pages/Infrastructure/CreateMonitor/index.jsx index df7829930..56162d2a5 100644 --- a/Client/src/Pages/Infrastructure/CreateMonitor/index.jsx +++ b/Client/src/Pages/Infrastructure/CreateMonitor/index.jsx @@ -397,7 +397,6 @@ const CreateInfrastructureMonitor = () => { label="Check frequency" value={infrastructureMonitor.interval || 15} onChange={handleChange} - onBlur={} items={SELECT_VALUES} /> diff --git a/Client/src/Pages/PageSpeed/CreatePageSpeed/index.jsx b/Client/src/Pages/PageSpeed/CreatePageSpeed/index.jsx index ccab3442f..30592e2eb 100644 --- a/Client/src/Pages/PageSpeed/CreatePageSpeed/index.jsx +++ b/Client/src/Pages/PageSpeed/CreatePageSpeed/index.jsx @@ -20,7 +20,7 @@ import LoadingButton from "@mui/lab/LoadingButton"; import Breadcrumbs from "../../../Components/Breadcrumbs"; import TextInput from "../../../Components/Inputs/TextInput"; import { HttpAdornment } from "../../../Components/Inputs/TextInput/Adornments"; -import { ConfigBox } from "../../Monitors/styled"; +import { ConfigBox } from "../../Uptime/styled"; import { createToast } from "../../../Utils/toastUtils"; import Radio from "../../../Components/Inputs/Radio"; diff --git a/Client/src/Routes/index.jsx b/Client/src/Routes/index.jsx index d3e14a02d..ba7822fa7 100644 --- a/Client/src/Routes/index.jsx +++ b/Client/src/Routes/index.jsx @@ -6,8 +6,8 @@ import NotFound from "../Pages/NotFound"; import Login from "../Pages/Auth/Login"; import Register from "../Pages/Auth/Register/Register"; import Account from "../Pages/Account"; -import Monitors from "../Pages/Monitors/Home"; -import CreateMonitor from "../Pages/Monitors/CreateMonitor"; +import Monitors from "../Pages/Uptime/Home"; +import CreateMonitor from "../Pages/Uptime/CreateUptime"; import CreateInfrastructureMonitor from "../Pages/Infrastructure/CreateMonitor"; import Incidents from "../Pages/Incidents"; import Status from "../Pages/Status"; @@ -18,10 +18,10 @@ import CheckEmail from "../Pages/Auth/CheckEmail"; import SetNewPassword from "../Pages/Auth/SetNewPassword"; import NewPasswordConfirmed from "../Pages/Auth/NewPasswordConfirmed"; import ProtectedRoute from "../Components/ProtectedRoute"; -import Details from "../Pages/Monitors/Details"; +import Details from "../Pages/Uptime/Details"; import AdvancedSettings from "../Pages/AdvancedSettings"; import Maintenance from "../Pages/Maintenance"; -import Configure from "../Pages/Monitors/Configure"; +import Configure from "../Pages/Uptime/Configure"; import PageSpeed from "../Pages/PageSpeed"; import CreatePageSpeed from "../Pages/PageSpeed/CreatePageSpeed"; import CreateNewMaintenanceWindow from "../Pages/Maintenance/CreateMaintenance"; @@ -39,22 +39,22 @@ const Routes = () => { > } + element={} /> } /> } /> } /> } /> Date: Thu, 12 Dec 2024 14:43:57 -0500 Subject: [PATCH 06/22] refactor: simplify protected route component --- Client/src/Components/ProtectedRoute/index.jsx | 18 +++++++++--------- Client/src/Routes/index.jsx | 6 +++++- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/Client/src/Components/ProtectedRoute/index.jsx b/Client/src/Components/ProtectedRoute/index.jsx index 1a8cf9aa0..7a71aef7e 100644 --- a/Client/src/Components/ProtectedRoute/index.jsx +++ b/Client/src/Components/ProtectedRoute/index.jsx @@ -3,20 +3,20 @@ import { useSelector } from "react-redux"; import PropTypes from "prop-types"; /** - * ProtectedRoute is a higher-order component that wraps the `Route` component from `react-router-dom` - * to create a protected route. It uses Redux to check if the user is authenticated. If the user is - * authenticated, it renders the component passed to it; otherwise, it redirects the user to the login page. + * ProtectedRoute is a wrapper component that ensures only authenticated users + * can access the wrapped content. It checks authentication status (e.g., from Redux or Context). + * If the user is authenticated, it renders the children; otherwise, it redirects to the login page. * * @param {Object} props - The props passed to the ProtectedRoute component. - * @param {React.ComponentType} props.Component - The component to render if the user is authenticated. - * @param {Object} rest - The remaining props passed to the Route component. - * @returns {React.ReactElement} A Route component that conditionally renders the passed Component or redirects to the login page. + * @param {React.ReactNode} props.children - The children to render if the user is authenticated. + * @returns {React.ReactElement} The children wrapped in a protected route or a redirect to the login page. */ -const ProtectedRoute = ({ Component, ...rest }) => { +const ProtectedRoute = ({ children }) => { const authState = useSelector((state) => state.auth); + return authState.authToken ? ( - + children ) : ( { }; ProtectedRoute.propTypes = { - Component: PropTypes.elementType.isRequired, + children: PropTypes.elementType.isRequired, }; export default ProtectedRoute; diff --git a/Client/src/Routes/index.jsx b/Client/src/Routes/index.jsx index ba7822fa7..5fc764b6a 100644 --- a/Client/src/Routes/index.jsx +++ b/Client/src/Routes/index.jsx @@ -35,7 +35,11 @@ const Routes = () => { } + element={ + + + + } > Date: Fri, 13 Dec 2024 13:19:47 +0000 Subject: [PATCH 07/22] chore(deps): update dependency nodemon to v3.1.9 --- Server/package-lock.json | 14 +++++++------- Server/package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Server/package-lock.json b/Server/package-lock.json index b07bda668..fc10b69f6 100644 --- a/Server/package-lock.json +++ b/Server/package-lock.json @@ -36,7 +36,7 @@ "chai": "5.1.2", "esm": "3.2.25", "mocha": "11.0.1", - "nodemon": "3.1.7", + "nodemon": "3.1.9", "prettier": "^3.3.3", "sinon": "19.0.2" } @@ -4758,9 +4758,9 @@ } }, "node_modules/nodemon": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.7.tgz", - "integrity": "sha512-hLj7fuMow6f0lbB0cD14Lz2xNjwsyruH251Pk4t/yIitCFJbmY1myuLlHm/q06aST4jg6EgAh74PIBBrRqpVAQ==", + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.9.tgz", + "integrity": "sha512-hdr1oIb2p6ZSxu3PB2JWWYS7ZQ0qvaZsc3hK8DR8f02kRzc8rjYmxAIvdz+aYC+8F2IjNaB7HMcSDg8nQpJxyg==", "dev": true, "license": "MIT", "dependencies": { @@ -4787,9 +4787,9 @@ } }, "node_modules/nodemon/node_modules/debug": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", - "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", "dev": true, "license": "MIT", "dependencies": { diff --git a/Server/package.json b/Server/package.json index 154f67437..f8a8b5f1a 100644 --- a/Server/package.json +++ b/Server/package.json @@ -39,7 +39,7 @@ "chai": "5.1.2", "esm": "3.2.25", "mocha": "11.0.1", - "nodemon": "3.1.7", + "nodemon": "3.1.9", "prettier": "^3.3.3", "sinon": "19.0.2" } From 7bef37f8c8a51076a5b940fdd05483043d30c1ad Mon Sep 17 00:00:00 2001 From: "Gorkem Cetin (BWL)" <167266851+gorkem-bwl@users.noreply.github.com> Date: Fri, 13 Dec 2024 11:11:40 -0500 Subject: [PATCH 08/22] Add coolify option --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d8bc39703..1ad7c6672 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ Usage instructions can be found [here](https://bluewavelabs.gitbook.io/checkmate ## 🛠️ Installation -See installation instructions in [Checkmate documentation portal](https://bluewavelabs.gitbook.io/checkmate/quickstart). +See installation instructions in [Checkmate documentation portal](https://bluewavelabs.gitbook.io/checkmate/quickstart). Alternatively, you can also use [Coolify](https://coolify.io/) for a one click Docker deployment. ## 💚 Questions & ideas From fb127f5ba280dd8127cbeb9734e7ac4435e7a739 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Fri, 13 Dec 2024 17:31:01 +0000 Subject: [PATCH 09/22] fix(deps): update dependency mongoose to v8.9.0 --- Server/package-lock.json | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/Server/package-lock.json b/Server/package-lock.json index b07bda668..f1651cb87 100644 --- a/Server/package-lock.json +++ b/Server/package-lock.json @@ -660,9 +660,10 @@ } }, "node_modules/@mongodb-js/saslprep": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.1.7.tgz", - "integrity": "sha512-dCHW/oEX0KJ4NjDULBo3JiOaK5+6axtpBbS+ao2ZInoAL9/YRQLhXzSNAFz7hP4nzLkIqsfYAK/PDE3+XHny0Q==", + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.1.9.tgz", + "integrity": "sha512-tVkljjeEaAhCqTzajSdgbQ6gE6f3oneVwa3iXR6csiEwXXOFsiC6Uh9iAjAhXPtqa/XMDHWjjeNH/77m/Yq2dw==", + "license": "MIT", "dependencies": { "sparse-bitfield": "^3.0.3" } @@ -1169,9 +1170,10 @@ } }, "node_modules/bson": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/bson/-/bson-6.7.0.tgz", - "integrity": "sha512-w2IquM5mYzYZv6rs3uN2DZTOBe2a0zXLj53TGDqwF4l6Sz/XsISrisXOJihArF9+BZ6Cq/GjVht7Sjfmri7ytQ==", + "version": "6.10.1", + "resolved": "https://registry.npmjs.org/bson/-/bson-6.10.1.tgz", + "integrity": "sha512-P92xmHDQjSKPLHqFxefqMxASNq/aWJMEZugpCjf+AF/pgcUpMMQCg7t7+ewko0/u8AapvF3luf/FoehddEK+sA==", + "license": "Apache-2.0", "engines": { "node": ">=16.20.1" } @@ -3641,7 +3643,8 @@ "node_modules/memory-pager": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz", - "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==" + "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==", + "license": "MIT" }, "node_modules/mensch": { "version": "0.3.4", @@ -4431,13 +4434,13 @@ } }, "node_modules/mongodb": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.10.0.tgz", - "integrity": "sha512-gP9vduuYWb9ZkDM546M+MP2qKVk5ZG2wPF63OvSRuUbqCR+11ZCAE1mOfllhlAG0wcoJY5yDL/rV3OmYEwXIzg==", + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.12.0.tgz", + "integrity": "sha512-RM7AHlvYfS7jv7+BXund/kR64DryVI+cHbVAy9P61fnb1RcWZqOW1/Wj2YhqMCx+MuYhqTRGv7AwHBzmsCKBfA==", "license": "Apache-2.0", "dependencies": { - "@mongodb-js/saslprep": "^1.1.5", - "bson": "^6.7.0", + "@mongodb-js/saslprep": "^1.1.9", + "bson": "^6.10.1", "mongodb-connection-string-url": "^3.0.0" }, "engines": { @@ -4445,7 +4448,7 @@ }, "peerDependencies": { "@aws-sdk/credential-providers": "^3.188.0", - "@mongodb-js/zstd": "^1.1.0", + "@mongodb-js/zstd": "^1.1.0 || ^2.0.0", "gcp-metadata": "^5.2.0", "kerberos": "^2.0.1", "mongodb-client-encryption": ">=6.0.0 <7", @@ -4486,14 +4489,14 @@ } }, "node_modules/mongoose": { - "version": "8.8.4", - "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-8.8.4.tgz", - "integrity": "sha512-yJbn695qCsqDO+xyPII29x2R7flzXhxCDv09mMZPSGllf0sm4jKw3E9s9uvQ9hjO6bL2xjU8KKowYqcY9eSTMQ==", + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-8.9.0.tgz", + "integrity": "sha512-b58zY3PLNBcoz6ZXFckr0leJcVVBMAOBvD+7Bj2ZjghAwntXmNnqwlDixTKQU3UYoQIGTv+AQx/0ThsvaeVrCA==", "license": "MIT", "dependencies": { - "bson": "^6.7.0", + "bson": "^6.10.1", "kareem": "2.6.3", - "mongodb": "~6.10.0", + "mongodb": "~6.12.0", "mpath": "0.9.0", "mquery": "5.0.0", "ms": "2.1.3", @@ -6175,6 +6178,7 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", "integrity": "sha512-kvzhi7vqKTfkh0PZU+2D2PIllw2ymqJKujUcyPMd9Y75Nv4nPbGJZXNhxsgdQab2BmlDct1YnfQCguEvHr7VsQ==", + "license": "MIT", "dependencies": { "memory-pager": "^1.0.2" } From 0cfb08d03a51d2dc406db338ada61070bdbf59e1 Mon Sep 17 00:00:00 2001 From: "Gorkem Cetin (BWL)" <167266851+gorkem-bwl@users.noreply.github.com> Date: Fri, 13 Dec 2024 13:20:33 -0500 Subject: [PATCH 10/22] Mention good-first-issue --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1ad7c6672..080efe0d3 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,7 @@ We pride ourselves on building strong connections with contributors at every lev Here's how you can contribute: 0. Star this repo :) -1. Check [Contributor's guideline](https://github.com/bluewave-labs/bluewave-uptime/blob/master/CONTRIBUTING.md). +1. Check [Contributor's guideline](https://github.com/bluewave-labs/bluewave-uptime/blob/master/CONTRIBUTING.md). First timers are encouraged to check `good-first-issue` tag. 2. Have a look at our Figma designs [here](https://www.figma.com/design/RPSfaw66HjzSwzntKcgDUV/Uptime-Genie?node-id=0-1&t=WqOFv9jqNTFGItpL-1). We encourage you to copy to your own Figma page, then work on it as it is read-only. 3. Open an issue if you believe you've encountered a bug 4. Check for good-first-issue's if you are a newcomer From 2e970f6f845427915667068538e6700d52766dca Mon Sep 17 00:00:00 2001 From: "Gorkem Cetin (BWL)" <167266851+gorkem-bwl@users.noreply.github.com> Date: Fri, 13 Dec 2024 15:18:23 -0500 Subject: [PATCH 11/22] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 080efe0d3..34f408182 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ If you have any questions, suggestions or comments, please use our [Discord chan ## 🤝 Contributing -We pride ourselves on building strong connections with contributors at every level. Despite being a young project, Checkmate has already earned 1500 stars and attracted 35+ contributors from around the globe. So, don’t hold back — jump in, contribute and learn with us! +We pride ourselves on building strong connections with contributors at every level. Despite being a young project, Checkmate has already earned 1900 stars and attracted 35+ contributors from around the globe. So, don’t hold back — jump in, contribute and learn with us! Here's how you can contribute: From 946e74aeab8d4dc53a38e6329e86d1049936ae5d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 13 Dec 2024 21:15:02 +0000 Subject: [PATCH 12/22] chore(deps): bump nanoid from 3.3.7 to 3.3.8 in /Server Bumps [nanoid](https://github.com/ai/nanoid) from 3.3.7 to 3.3.8. - [Release notes](https://github.com/ai/nanoid/releases) - [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md) - [Commits](https://github.com/ai/nanoid/compare/3.3.7...3.3.8) --- updated-dependencies: - dependency-name: nanoid dependency-type: indirect ... Signed-off-by: dependabot[bot] --- Server/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Server/package-lock.json b/Server/package-lock.json index b07bda668..60f5718ff 100644 --- a/Server/package-lock.json +++ b/Server/package-lock.json @@ -4627,9 +4627,9 @@ "optional": true }, "node_modules/nanoid": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", - "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz", + "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==", "funding": [ { "type": "github", From 2628f2ae3280fd40dce37158206d1df61d68489e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mert=20=C5=9Ei=C5=9Fmano=C4=9Flu?= Date: Sat, 14 Dec 2024 00:27:26 +0300 Subject: [PATCH 13/22] chore(renovate): Add 'labels' to renovate.json for adding 'dependencies' label on automated PRs --- renovate.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/renovate.json b/renovate.json index 5db72dd6a..adfd80a40 100644 --- a/renovate.json +++ b/renovate.json @@ -2,5 +2,6 @@ "$schema": "https://docs.renovatebot.com/renovate-schema.json", "extends": [ "config:recommended" - ] + ], + "labels": ["dependencies"] } From 7d7c616a739b6e11305fffae052f34064ce03585 Mon Sep 17 00:00:00 2001 From: Caio Cabral Date: Fri, 13 Dec 2024 17:56:37 -0500 Subject: [PATCH 14/22] fix: function not called --- Client/src/Pages/AdvancedSettings/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Client/src/Pages/AdvancedSettings/index.jsx b/Client/src/Pages/AdvancedSettings/index.jsx index 14ecb6f8f..433829f28 100644 --- a/Client/src/Pages/AdvancedSettings/index.jsx +++ b/Client/src/Pages/AdvancedSettings/index.jsx @@ -18,7 +18,7 @@ import { useIsAdmin } from "../../Hooks/useIsAdmin"; const AdvancedSettings = () => { const navigate = useNavigate(); - const isAdmin = useIsAdmin; + const isAdmin = useIsAdmin(); useEffect(() => { if (!isAdmin) { navigate("/"); From 528bc0b1e0dbc4b9252cb40b9a06dcfac52fec40 Mon Sep 17 00:00:00 2001 From: "Gorkem Cetin (BWL)" <167266851+gorkem-bwl@users.noreply.github.com> Date: Fri, 13 Dec 2024 19:04:29 -0500 Subject: [PATCH 15/22] Update pull_request_template.md --- .github/PULL_REQUEST_TEMPLATE/pull_request_template.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md b/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md index 55d456545..c6383fbe2 100644 --- a/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md +++ b/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md @@ -8,7 +8,8 @@ Mention the issue number(s) this PR addresses (e.g., #123). ## Please ensure all items are checked off before requesting a review: -- [ ] I have performed a self-review of my code. +- [ ] I deployed the application locally. +- [ ] I have performed a self-review and testing of my code. - [ ] I have included the issue # in the PR. - [ ] I have labelled the PR correctly. - [ ] The issue I am working on is assigned to me. @@ -17,5 +18,3 @@ Mention the issue number(s) this PR addresses (e.g., #123). - [ ] My PR is granular and targeted to one specific feature. - [ ] I took a screenshot or a video and attached to this PR if there is a UI change. - - From ab0d1ab469eb3c91da5d77aee8d09a13f80f5e40 Mon Sep 17 00:00:00 2001 From: "Gorkem Cetin (BWL)" <167266851+gorkem-bwl@users.noreply.github.com> Date: Fri, 13 Dec 2024 21:04:21 -0500 Subject: [PATCH 16/22] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 34f408182..868689af8 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ **Need support or have a suggestion? Check our [Discord channel](https://discord.gg/NAb6H3UTjK)** +**Checkmate is on [GitHub trending](https://github.com/trending) and #1 trending for JavaScript apps on Fri Dec 13!** + ![](https://img.shields.io/github/license/bluewave-labs/bluewave-uptime) ![](https://img.shields.io/github/repo-size/bluewave-labs/bluewave-uptime) ![](https://img.shields.io/github/commit-activity/w/bluewave-labs/bluewave-uptime) From 09644dfcfeafa17faeca8223c9798cfb9c8b1675 Mon Sep 17 00:00:00 2001 From: "Gorkem Cetin (BWL)" <167266851+gorkem-bwl@users.noreply.github.com> Date: Fri, 13 Dec 2024 22:45:50 -0500 Subject: [PATCH 17/22] Add links to 2 documents for contributors --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 868689af8..1371e203d 100644 --- a/README.md +++ b/README.md @@ -82,10 +82,11 @@ Here's how you can contribute: 0. Star this repo :) 1. Check [Contributor's guideline](https://github.com/bluewave-labs/bluewave-uptime/blob/master/CONTRIBUTING.md). First timers are encouraged to check `good-first-issue` tag. -2. Have a look at our Figma designs [here](https://www.figma.com/design/RPSfaw66HjzSwzntKcgDUV/Uptime-Genie?node-id=0-1&t=WqOFv9jqNTFGItpL-1). We encourage you to copy to your own Figma page, then work on it as it is read-only. -3. Open an issue if you believe you've encountered a bug -4. Check for good-first-issue's if you are a newcomer -5. Make a pull request to add new features/make quality-of-life improvements/fix bugs. +2. Optionally, read [project structure](https://bluewavelabs.gitbook.io/checkmate/developers-guide/general-project-structure) and [high level overview](https://bluewavelabs.gitbook.io/checkmate/developers-guide/high-level-overview). +3. Have a look at our Figma designs [here](https://www.figma.com/design/RPSfaw66HjzSwzntKcgDUV/Uptime-Genie?node-id=0-1&t=WqOFv9jqNTFGItpL-1) if you are going to use one of our designs. We encourage you to copy to your own Figma page, then work on it as it is read-only. +4. Open an issue if you believe you've encountered a bug. +5. Check for good-first-issue's if you are a newcomer. +6. Make a pull request to add new features/make quality-of-life improvements/fix bugs. From 425358e1e3477f4545658e41ca5aefd6decc83d1 Mon Sep 17 00:00:00 2001 From: "Gorkem Cetin (BWL)" <167266851+gorkem-bwl@users.noreply.github.com> Date: Sat, 14 Dec 2024 10:12:22 -0500 Subject: [PATCH 18/22] Thank you for 2000 stars! --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 1371e203d..5435b3429 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,9 @@ **Checkmate is on [GitHub trending](https://github.com/trending) and #1 trending for JavaScript apps on Fri Dec 13!** +![1](https://github.com/user-attachments/assets/a4f9842e-c9d9-4672-badb-79a5eccbbf3a) + + ![](https://img.shields.io/github/license/bluewave-labs/bluewave-uptime) ![](https://img.shields.io/github/repo-size/bluewave-labs/bluewave-uptime) ![](https://img.shields.io/github/commit-activity/w/bluewave-labs/bluewave-uptime) From c6ce6274957a80f9de5acd3491d2edd8b7c933ce Mon Sep 17 00:00:00 2001 From: "Gorkem Cetin (BWL)" <167266851+gorkem-bwl@users.noreply.github.com> Date: Sat, 14 Dec 2024 11:53:53 -0500 Subject: [PATCH 19/22] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5435b3429..8ef740dbb 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -**Need support or have a suggestion? Check our [Discord channel](https://discord.gg/NAb6H3UTjK)** +**Need support or have a suggestion? Check our [Discord channel](https://discord.gg/NAb6H3UTjK) or [Discussions](https://github.com/bluewave-labs/checkmate/discussions) forum.** **Checkmate is on [GitHub trending](https://github.com/trending) and #1 trending for JavaScript apps on Fri Dec 13!** From 1b0e7ddd500ce43b402aa8af16af57c7f9d18280 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Sat, 14 Dec 2024 21:10:32 +0000 Subject: [PATCH 20/22] fix(deps): update dependency bullmq to v5.34.2 --- Server/package-lock.json | 8 ++++---- Server/package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Server/package-lock.json b/Server/package-lock.json index b07bda668..4637f5c81 100644 --- a/Server/package-lock.json +++ b/Server/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "axios": "^1.7.2", "bcrypt": "^5.1.1", - "bullmq": "5.34.0", + "bullmq": "5.34.2", "cors": "^2.8.5", "dockerode": "4.0.2", "dotenv": "^16.4.5", @@ -1221,9 +1221,9 @@ } }, "node_modules/bullmq": { - "version": "5.34.0", - "resolved": "https://registry.npmjs.org/bullmq/-/bullmq-5.34.0.tgz", - "integrity": "sha512-TyzeYDkIGkooYUn/P1CeiJW3Am1TboC3unwhlg1cJIwKksoyuRp97TkHyCZcwLchXbYCUtsGBZFUYf/lTAhdSg==", + "version": "5.34.2", + "resolved": "https://registry.npmjs.org/bullmq/-/bullmq-5.34.2.tgz", + "integrity": "sha512-eUzeCswrKbQDE1WY8h4ZTBtynOzCU5qx9felFdYOmIJrsy0warDahHKUiCZ6dUCs6ZxYMGtcaciIMcAf1L54yw==", "license": "MIT", "dependencies": { "cron-parser": "^4.6.0", diff --git a/Server/package.json b/Server/package.json index 154f67437..b1fbe27ea 100644 --- a/Server/package.json +++ b/Server/package.json @@ -14,7 +14,7 @@ "dependencies": { "axios": "^1.7.2", "bcrypt": "^5.1.1", - "bullmq": "5.34.0", + "bullmq": "5.34.2", "cors": "^2.8.5", "dockerode": "4.0.2", "dotenv": "^16.4.5", From cd2076ff16dc211fbb1f1956684aaad618fd7855 Mon Sep 17 00:00:00 2001 From: "Gorkem Cetin (BWL)" <167266851+gorkem-bwl@users.noreply.github.com> Date: Sat, 14 Dec 2024 20:50:03 -0500 Subject: [PATCH 21/22] Update: stress testing for 1000+ servers at the same time --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8ef740dbb..1462bbd3a 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,9 @@ Checkmate is an open source uptime manager, server & Docker monitoring tool used to track the operational status and performance of servers and websites. It regularly checks whether a server/website is accessible and performs optimally, providing real-time alerts and reports on the monitored services' availability, downtime, and response time. -Checkmate also has an agent, called [Capture](https://github.com/bluewave-labs/capture), to retrieve data from remote servers. While Capture is not required to run Checkmate, it provides additional insigths about your servers' CPU, RAM, disk and temperature status. +Checkmate also has an agent, called [Capture](https://github.com/bluewave-labs/capture), to retrieve data from remote servers. While Capture is not required to run Checkmate, it provides additional insigths about your servers' CPU, RAM, disk and temperature status. + +We've run stress tests with 1000+ active monitors without any particular issues or performance bottlenecks. We **love** what we are building here, and learn a few things about Reactjs, Nodejs, MongoDB and Docker while building Checkmate. **If you would like to support us, please consider giving it a ⭐, think about contributing or providing feedback.** Please note that we do not operate a monetary donation program, make money by deploying servers, or run a SaaS business. From a0289d1893fee018fbe6a06d0b56b75d3bc2f0a8 Mon Sep 17 00:00:00 2001 From: "Gorkem Cetin (BWL)" <167266851+gorkem-bwl@users.noreply.github.com> Date: Sat, 14 Dec 2024 20:55:51 -0500 Subject: [PATCH 22/22] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 1462bbd3a..92866185f 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,7 @@ If you have any questions, suggestions or comments, please use our [Discord chan - Incidents at a glance - E-mail notifications - Scheduled maintenance +- Can monitor 1000+ servers at the same time on a moderate server **Short term roadmap:**