Merge branch 'develop' into fix/nodemailer_relay

This commit is contained in:
Cahit Atilgan committed 2025-05-14 09:33:04 +02:00
commit e40b1f9c5b
14 files changed
+95 -41

No files matched your search

+14 -4
View File
@@ -11,6 +11,9 @@ jobs:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry - name: Log in to GitHub Container Registry
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
@@ -20,7 +23,8 @@ jobs:
- name: Build Client Docker image - name: Build Client Docker image
run: | run: |
docker build \ docker buildx build \
--platform linux/amd64,linux/arm64 \
-t ghcr.io/bluewave-labs/checkmate:frontend-dist \ -t ghcr.io/bluewave-labs/checkmate:frontend-dist \
-f ./docker/dist/client.Dockerfile \ -f ./docker/dist/client.Dockerfile \
--label org.opencontainers.image.source=https://github.com/bluewave-labs/checkmate \ --label org.opencontainers.image.source=https://github.com/bluewave-labs/checkmate \
@@ -36,6 +40,9 @@ jobs:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry - name: Log in to GitHub Container Registry
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
@@ -45,7 +52,8 @@ jobs:
- name: Build Server Docker image - name: Build Server Docker image
run: | run: |
docker build \ docker buildx build \
--platform linux/amd64,linux/arm64 \
-t ghcr.io/bluewave-labs/checkmate:backend-dist \ -t ghcr.io/bluewave-labs/checkmate:backend-dist \
-f ./docker/dist/server.Dockerfile \ -f ./docker/dist/server.Dockerfile \
--label org.opencontainers.image.source=https://github.com/bluewave-labs/checkmate \ --label org.opencontainers.image.source=https://github.com/bluewave-labs/checkmate \
@@ -56,7 +64,8 @@ jobs:
- name: Build Mongo Docker image - name: Build Mongo Docker image
run: | run: |
docker build \ docker buildx build \
--platform linux/amd64,linux/arm64 \
-t ghcr.io/bluewave-labs/checkmate:mongo-dist \ -t ghcr.io/bluewave-labs/checkmate:mongo-dist \
-f ./docker/dist/mongoDB.Dockerfile \ -f ./docker/dist/mongoDB.Dockerfile \
--label org.opencontainers.image.source=https://github.com/bluewave-labs/checkmate \ --label org.opencontainers.image.source=https://github.com/bluewave-labs/checkmate \
@@ -67,7 +76,8 @@ jobs:
- name: Build Redis Docker image - name: Build Redis Docker image
run: | run: |
docker build \ docker buildx build \
--platform linux/amd64,linux/arm64 \
-t ghcr.io/bluewave-labs/checkmate:redis-dist \ -t ghcr.io/bluewave-labs/checkmate:redis-dist \
-f ./docker/dist/redis.Dockerfile \ -f ./docker/dist/redis.Dockerfile \
--label org.opencontainers.image.source=https://github.com/bluewave-labs/checkmate \ --label org.opencontainers.image.source=https://github.com/bluewave-labs/checkmate \
+9
View File
@@ -123,9 +123,15 @@ If one or more of these are missing, we may ask you to update your pull request
## Branching model ## Branching model
- Code contributions should go to the `develop` branch. - Code contributions should go to the `develop` branch.
- `master` is used for stable releases. - `master` is used for stable releases.
- Use descriptive branch names, like `fix/login-error` or `feat/add-alerts`. - Use descriptive branch names, like `fix/login-error` or `feat/add-alerts`.
- Make sure that you are using the latest version.
- Make sure you run the code locally. The Checkmate [documentation](https://docs.checkmate.so) covers it.
- Find out if the functionality is already covered, maybe by an individual configuration.
- Perform a [search](/issues) to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one.
- Find out whether your idea fits with the scope and aims of the project. It's up to you to make a strong case to convince the project's developers of the merits of this feature. Keep in mind that we want features that will be useful to the majority of our users and not just a small subset. If you're just targeting a minority of users, consider writing an add-on/plugin library.
--- ---
@@ -133,8 +139,11 @@ If one or more of these are missing, we may ask you to update your pull request
Thanks for making Checkmate better. We mean it. Whether it’s your first pull request or your 50th, we’re excited to build with you. Thanks for making Checkmate better. We mean it. Whether it’s your first pull request or your 50th, we’re excited to build with you.
PS: feel free to introduce yourself on [Discord](https://discord.gg/YOUR-DISCORD-LINK) and say hi. PS: feel free to introduce yourself on [Discord](https://discord.gg/YOUR-DISCORD-LINK) and say hi.
-- Checkmate team -- Checkmate team
Also make sure you read the [document about how to make a good pull request](/PULLREQUESTS.md).
+4 -3
View File
@@ -8,6 +8,7 @@
![](https://img.shields.io/github/issues/bluewave-labs/checkmate) ![](https://img.shields.io/github/issues/bluewave-labs/checkmate)
![](https://img.shields.io/github/issues-pr/bluewave-labs/checkmate) ![](https://img.shields.io/github/issues-pr/bluewave-labs/checkmate)
[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/9901/badge)](https://www.bestpractices.dev/projects/9901) [![OpenSSF Best Practices](https://www.bestpractices.dev/projects/9901/badge)](https://www.bestpractices.dev/projects/9901)
[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/bluewave-labs/checkmate)
<h1 align="center"><a href="https://bluewavelabs.ca" target="_blank">Checkmate</a></h1> <h1 align="center"><a href="https://bluewavelabs.ca" target="_blank">Checkmate</a></h1>
@@ -29,11 +30,11 @@ You can see the latest build of [Checkmate](https://checkmate-demo.bluewavelabs.
## 🔗 User's guide ## 🔗 User's guide
Usage instructions can be found [here](https://docs.checkmate.so/). It's still WIP and some of the information there might be outdated as we continuously add features weekly. Rest assured, we are doing our best! :) Usage instructions can be found [here](https://docs.checkmate.so/checkmate-2.1). It's still WIP and some of the information there might be outdated as we continuously add features weekly. Rest assured, we are doing our best! :)
## 🛠️ Installation ## 🛠️ Installation
See installation instructions in [Checkmate documentation portal](https://docs.checkmate.so/quickstart). Alternatively, you can also use [Coolify](https://coolify.io/) or [Elestio](https://elest.io/open-source/checkmate) for a one-click Docker deployment. If you would like to monitor your server infrastructure, you'll need [Capture agent](https://github.com/bluewave-labs/capture). Capture repository also contains the installation instructions. See installation instructions in [Checkmate documentation portal](https://docs.checkmate.so/checkmate-2.1/users-guide/quickstart). Alternatively, you can also use [Coolify](https://coolify.io/) or [Elestio](https://elest.io/open-source/checkmate) for a one-click Docker deployment. If you would like to monitor your server infrastructure, you'll need [Capture agent](https://github.com/bluewave-labs/capture). Capture repository also contains the installation instructions.
## 🏁 Translations ## 🏁 Translations
@@ -117,7 +118,7 @@ Here's how you can contribute:
0. Star this repo :) 0. Star this repo :)
1. Check [Contributor's guideline](https://github.com/bluewave-labs/Checkmate/blob/develop/CONTRIBUTING.md). First timers are encouraged to check `good-first-issue` tag. 1. Check [Contributor's guideline](https://github.com/bluewave-labs/Checkmate/blob/develop/CONTRIBUTING.md). First timers are encouraged to check `good-first-issue` tag.
2. Check [project structure](https://docs.checkmate.so/developers-guide/general-project-structure) and [high level overview](https://bluewavelabs.gitbook.io/checkmate/developers-guide/high-level-overview). 2. Check [project structure](https://docs.checkmate.so/checkmate-2.1/developers-guide/general-project-structure) and [high level overview](https://bluewavelabs.gitbook.io/checkmate/developers-guide/high-level-overview).
3. Read a detailed structure of [Checkmate](https://deepwiki.com/bluewave-labs/Checkmate) if you would like to deep dive into the architecture. 3. Read a detailed structure of [Checkmate](https://deepwiki.com/bluewave-labs/Checkmate) if you would like to deep dive into the architecture.
4. Open an issue if you believe you've encountered a bug. 4. Open an issue if you believe you've encountered a bug.
5. Check for good-first-issue's if you are a newcomer. 5. Check for good-first-issue's if you are a newcomer.
+1 -1
View File
@@ -111,7 +111,7 @@ const Alert = ({ variant, title, body, isToast, hasIcon = true, onClick }) => {
Alert.propTypes = { Alert.propTypes = {
variant: PropTypes.oneOf(["info", "error", "warning"]).isRequired, variant: PropTypes.oneOf(["info", "error", "warning"]).isRequired,
title: PropTypes.string, title: PropTypes.string,
body: PropTypes.string, body: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),
isToast: PropTypes.bool, isToast: PropTypes.bool,
hasIcon: PropTypes.bool, hasIcon: PropTypes.bool,
onClick: function (props, propName, componentName) { onClick: function (props, propName, componentName) {
+38 -24
View File
@@ -11,7 +11,8 @@ import { useSelector } from "react-redux";
import Alert from "../Alert"; import Alert from "../Alert";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import "./index.css"; import "./index.css";
import { useFetchSettings } from "../../Hooks/useFetchSettings";
import { useState } from "react";
/** /**
* Fallback component to display a fallback UI with a title, a list of checks, and a navigation button. * Fallback component to display a fallback UI with a title, a list of checks, and a navigation button.
* *
@@ -24,17 +25,26 @@ import "./index.css";
* @returns {JSX.Element} The rendered fallback UI. * @returns {JSX.Element} The rendered fallback UI.
*/ */
const Fallback = ({ title, checks, link = "/", isAdmin, vowelStart = false, showPageSpeedWarning = false }) => { const Fallback = ({
title,
checks,
link = "/",
isAdmin,
vowelStart = false,
showPageSpeedWarning = false,
}) => {
const theme = useTheme(); const theme = useTheme();
const navigate = useNavigate(); const navigate = useNavigate();
const mode = useSelector((state) => state.ui.mode); const mode = useSelector((state) => state.ui.mode);
const { t } = useTranslation(); const { t } = useTranslation();
const [settingsData, setSettingsData] = useState(undefined);
const [isLoading, error] = useFetchSettings({ setSettingsData });
// Custom warning message with clickable link // Custom warning message with clickable link
const renderWarningMessage = () => { const renderWarningMessage = () => {
return ( return (
<> <>
{t("pageSpeedWarning")} {" "} {t("pageSpeedWarning")}{" "}
<Link <Link
component={RouterLink} component={RouterLink}
to="/settings" to="/settings"
@@ -44,12 +54,12 @@ const Fallback = ({ title, checks, link = "/", isAdmin, vowelStart = false, show
fontWeight: "inherit", fontWeight: "inherit",
"&:hover": { "&:hover": {
textDecoration: "underline", textDecoration: "underline",
} },
}} }}
> >
{t("pageSpeedLearnMoreLink")} {t("pageSpeedLearnMoreLink")}
</Link> </Link>{" "}
{" "}{t("pageSpeedAddApiKey")} {t("pageSpeedAddApiKey")}
</> </>
); );
}; };
@@ -120,7 +130,7 @@ const Fallback = ({ title, checks, link = "/", isAdmin, vowelStart = false, show
</Button> </Button>
{/* Bulk create of uptime monitors */} {/* Bulk create of uptime monitors */}
{title === "uptime monitor" && ( {title === "uptime monitor" && (
<Button <Button
variant="contained" variant="contained"
color="accent" color="accent"
sx={{ alignSelf: "center" }} sx={{ alignSelf: "center" }}
@@ -131,25 +141,29 @@ const Fallback = ({ title, checks, link = "/", isAdmin, vowelStart = false, show
)} )}
{/* Warning box for PageSpeed monitor */} {/* Warning box for PageSpeed monitor */}
{(title === "pagespeed monitor" && showPageSpeedWarning) && ( {title === "pagespeed monitor" && showPageSpeedWarning && (
<Box sx={{ width: "80%", maxWidth: "600px", zIndex: 1 }}> <Box sx={{ width: "80%", maxWidth: "600px", zIndex: 1 }}>
<Box sx={{ <Box
'& .alert.row-stack': { sx={{
backgroundColor: theme.palette.warningSecondary.main, "& .alert.row-stack": {
borderColor: theme.palette.warningSecondary.lowContrast, backgroundColor: theme.palette.warningSecondary.main,
'& .MuiTypography-root': { borderColor: theme.palette.warningSecondary.lowContrast,
color: theme.palette.warningSecondary.contrastText "& .MuiTypography-root": {
color: theme.palette.warningSecondary.contrastText,
},
"& .MuiBox-root > svg": {
color: theme.palette.warningSecondary.contrastText,
},
}, },
'& .MuiBox-root > svg': { }}
color: theme.palette.warningSecondary.contrastText >
} {settingsData?.pagespeedKeySet === false && (
} <Alert
}}> variant="warning"
<Alert hasIcon={true}
variant="warning" body={renderWarningMessage()}
hasIcon={true} />
body={renderWarningMessage()} )}
/>
</Box> </Box>
</Box> </Box>
)} )}
+1 -1
View File
@@ -185,7 +185,7 @@ const ForgotPassword = () => {
value={form.email} value={form.email}
onChange={handleChange} onChange={handleChange}
error={errors.email ? true : false} error={errors.email ? true : false}
helperText={errors.email} helperText={t(errors.email)}
/> />
<Button <Button
variant="contained" variant="contained"
@@ -71,7 +71,7 @@ function StepTwo({ form, errors, onSubmit, onChange, onBack }) {
helperText={errors.email && ( helperText={errors.email && (
errors.email.includes("required") ? t("authRegisterEmailRequired") : errors.email.includes("required") ? t("authRegisterEmailRequired") :
errors.email.includes("valid email") ? t("authRegisterEmailInvalid") : errors.email.includes("valid email") ? t("authRegisterEmailInvalid") :
errors.email t(errors.email)
)} )}
ref={inputRef} ref={inputRef}
/> />
+1 -1
View File
@@ -15,7 +15,7 @@ const SettingsAbout = () => {
<Typography component="h1">{t("settingsAbout")}</Typography> <Typography component="h1">{t("settingsAbout")}</Typography>
</Box> </Box>
<Box> <Box>
<Typography component="h2">Checkmate {2.0}</Typography> <Typography component="h2">Checkmate {2.1}</Typography>
<Typography sx={{ mt: theme.spacing(2), mb: theme.spacing(6), opacity: 0.6 }}> <Typography sx={{ mt: theme.spacing(2), mb: theme.spacing(6), opacity: 0.6 }}>
{t("settingsDevelopedBy")} {t("settingsDevelopedBy")}
</Typography> </Typography>
+12 -1
View File
@@ -15,6 +15,17 @@ const nameSchema = joi
"Name must contain only letters, spaces, apostrophes, or hyphens", "Name must contain only letters, spaces, apostrophes, or hyphens",
}); });
const lastnameSchema = joi
.string()
.max(50)
.trim()
.pattern(/^[\p{L}\p{M}''\- ]+$/u)
.messages({
"string.empty": "Surname is required",
"string.max": "Surname must be less than 50 characters",
"string.pattern.base": "Surname must contain only letters, spaces, apostrophes, or hyphens"
});
const passwordSchema = joi const passwordSchema = joi
.string() .string()
.trim() .trim()
@@ -54,7 +65,7 @@ const passwordSchema = joi
const credentials = joi.object({ const credentials = joi.object({
firstName: nameSchema, firstName: nameSchema,
lastName: nameSchema, lastName: lastnameSchema,
email: joi email: joi
.string() .string()
.trim() .trim()
+4 -3
View File
@@ -11,11 +11,12 @@ declare -A services=(
["bluewaveuptime/uptime_server"]="./docker/dist/server.Dockerfile" ["bluewaveuptime/uptime_server"]="./docker/dist/server.Dockerfile"
) )
# Loop through each service and build the corresponding image
for service in "${!services[@]}"; do for service in "${!services[@]}"; do
docker build -f "${services[$service]}" -t "$service" . docker buildx build \
--platform linux/amd64,linux/arm64 \
-f "${services[$service]}" \
-t "$service" \
# Check if the build succeeded
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "Error building $service image. Exiting..." echo "Error building $service image. Exiting..."
exit 1 exit 1
+2 -1
View File
@@ -3,7 +3,7 @@ services:
image: ghcr.io/bluewave-labs/checkmate:frontend-dist image: ghcr.io/bluewave-labs/checkmate:frontend-dist
restart: always restart: always
environment: environment:
UPTIME_APP_API_BASE_URL: "http://localhost:5000/api/v1" UPTIME_APP_API_BASE_URL: "http://localhost:52345/api/v1"
UPTIME_APP_CLIENT_HOST: "http://localhost" UPTIME_APP_CLIENT_HOST: "http://localhost"
ports: ports:
- "80:80" - "80:80"
@@ -22,6 +22,7 @@ services:
- DB_CONNECTION_STRING=mongodb://mongodb:27017/uptime_db?replicaSet=rs0 - DB_CONNECTION_STRING=mongodb://mongodb:27017/uptime_db?replicaSet=rs0
- REDIS_URL=redis://redis:6379 - REDIS_URL=redis://redis:6379
- CLIENT_HOST=http://localhost - CLIENT_HOST=http://localhost
- JWT_SECRET=my_secret
# volumes: # volumes:
# - /var/run/docker.sock:/var/run/docker.sock:ro # - /var/run/docker.sock:/var/run/docker.sock:ro
redis: redis:
+1 -1
View File
@@ -13,6 +13,7 @@ class SettingsController {
getAppSettings = async (req, res, next) => { getAppSettings = async (req, res, next) => {
const dbSettings = await this.settingsService.getDBSettings(); const dbSettings = await this.settingsService.getDBSettings();
const sanitizedSettings = { ...dbSettings }; const sanitizedSettings = { ...dbSettings };
delete sanitizedSettings.version;
const returnSettings = { const returnSettings = {
pagespeedKeySet: false, pagespeedKeySet: false,
@@ -27,7 +28,6 @@ class SettingsController {
returnSettings.emailPasswordSet = true; returnSettings.emailPasswordSet = true;
delete sanitizedSettings.systemEmailPassword; delete sanitizedSettings.systemEmailPassword;
} }
returnSettings.settings = sanitizedSettings; returnSettings.settings = sanitizedSettings;
return res.success({ return res.success({
msg: this.stringService.getAppSettings, msg: this.stringService.getAppSettings,
+4
View File
@@ -34,6 +34,10 @@ const AppSettingsSchema = mongoose.Schema(
unique: true, unique: true,
default: true, default: true,
}, },
version: {
type: Number,
default: 1,
},
}, },
{ {
timestamps: true, timestamps: true,
+3
View File
@@ -60,6 +60,9 @@ class SettingsService {
} }
async getDBSettings() { async getDBSettings() {
// Remove any old settings
await this.appSettings.deleteMany({ version: { $exists: false } });
let settings = await this.appSettings let settings = await this.appSettings
.findOne({ singleton: true }) .findOne({ singleton: true })
.select("-__v -_id -createdAt -updatedAt -singleton") .select("-__v -_id -createdAt -updatedAt -singleton")