From 6efbf030a734358aa5ea41bc061a43df6d713a4d Mon Sep 17 00:00:00 2001 From: Marukome0743 Date: Wed, 23 Jul 2025 08:49:58 +0900 Subject: [PATCH 01/34] chore: add biome settings for vscode editor --- .vscode/extensions.json | 3 +++ .vscode/settings.json | 8 ++++++++ 2 files changed, 11 insertions(+) create mode 100644 .vscode/extensions.json create mode 100644 .vscode/settings.json diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 000000000..16e8e6664 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,3 @@ +{ + "recommendations": ["biomejs.biome"] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 000000000..99357f236 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,8 @@ +{ + "editor.formatOnSave": true, + "editor.defaultFormatter": "biomejs.biome", + "editor.codeActionsOnSave": { + "source.fixAll.biome": "explicit", + "source.organizeImports.biome": "explicit" + } +} From 329db1fd1a1a6a9d997ab6fc581d2b5b9833241b Mon Sep 17 00:00:00 2001 From: Abdulhakeem Adetunji Mustapha Date: Wed, 23 Jul 2025 19:30:47 +0100 Subject: [PATCH 02/34] fix: wrap user prompt in ai modal to prevent text stretch --- apps/dokploy/components/dashboard/project/ai/step-two.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/dokploy/components/dashboard/project/ai/step-two.tsx b/apps/dokploy/components/dashboard/project/ai/step-two.tsx index 7b4deb30e..fc64638f1 100644 --- a/apps/dokploy/components/dashboard/project/ai/step-two.tsx +++ b/apps/dokploy/components/dashboard/project/ai/step-two.tsx @@ -199,7 +199,7 @@ export const StepTwo = ({ templateInfo, setTemplateInfo }: StepProps) => {

Generating template suggestions based on your input...

-
{templateInfo.userInput}
+
{templateInfo.userInput}
); } From c178234e53b0d808abcb291963f4aea1b81b6f8e Mon Sep 17 00:00:00 2001 From: masesisaac Date: Thu, 24 Jul 2025 17:41:51 +0300 Subject: [PATCH 03/34] fix(dashboard): hide basic auth password by default --- .../advanced/security/show-security.tsx | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/apps/dokploy/components/dashboard/application/advanced/security/show-security.tsx b/apps/dokploy/components/dashboard/application/advanced/security/show-security.tsx index 92439f511..5762d21f2 100644 --- a/apps/dokploy/components/dashboard/application/advanced/security/show-security.tsx +++ b/apps/dokploy/components/dashboard/application/advanced/security/show-security.tsx @@ -11,6 +11,9 @@ import { api } from "@/utils/api"; import { LockKeyhole, Trash2 } from "lucide-react"; import { toast } from "sonner"; import { HandleSecurity } from "./handle-security"; +import { Label } from "@/components/ui/label"; +import { ToggleVisibilityInput } from "@/components/shared/toggle-visibility-input"; +import { Input } from "@/components/ui/input"; interface Props { applicationId: string; @@ -58,19 +61,18 @@ export const ShowSecurity = ({ applicationId }: Props) => {
{data?.security.map((security) => (
-
-
-
- Username - - {security.username} - +
+
+
+ +
-
- Password - - {security.password} - +
+ +
From cda33eb291e73738fd7eab56b45edfbbfcf7dbba Mon Sep 17 00:00:00 2001 From: masesisaac Date: Thu, 24 Jul 2025 17:45:26 +0300 Subject: [PATCH 04/34] refactor(dashboard): reorder imports in show-security.tsx for consistency --- .../application/advanced/security/show-security.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/dokploy/components/dashboard/application/advanced/security/show-security.tsx b/apps/dokploy/components/dashboard/application/advanced/security/show-security.tsx index 5762d21f2..552a186a1 100644 --- a/apps/dokploy/components/dashboard/application/advanced/security/show-security.tsx +++ b/apps/dokploy/components/dashboard/application/advanced/security/show-security.tsx @@ -7,13 +7,13 @@ import { CardHeader, CardTitle, } from "@/components/ui/card"; +import { Label } from "@/components/ui/label"; +import { ToggleVisibilityInput } from "@/components/shared/toggle-visibility-input"; +import { Input } from "@/components/ui/input"; import { api } from "@/utils/api"; import { LockKeyhole, Trash2 } from "lucide-react"; import { toast } from "sonner"; import { HandleSecurity } from "./handle-security"; -import { Label } from "@/components/ui/label"; -import { ToggleVisibilityInput } from "@/components/shared/toggle-visibility-input"; -import { Input } from "@/components/ui/input"; interface Props { applicationId: string; From d3a54172b5df4f9a68a94622146879baa92e3354 Mon Sep 17 00:00:00 2001 From: Jhon Date: Sat, 26 Jul 2025 13:53:28 -0300 Subject: [PATCH 05/34] feat(ux): add conditional server selection functionality to application forms --- .../dashboard/project/add-application.tsx | 468 +++---- .../dashboard/project/add-compose.tsx | 534 ++++---- .../dashboard/project/add-database.tsx | 1072 +++++++++-------- .../dashboard/project/add-template.tsx | 966 +++++++-------- .../dashboard/project/ai/step-one.tsx | 65 +- 5 files changed, 1562 insertions(+), 1543 deletions(-) diff --git a/apps/dokploy/components/dashboard/project/add-application.tsx b/apps/dokploy/components/dashboard/project/add-application.tsx index 9ed31464a..bdf010dc5 100644 --- a/apps/dokploy/components/dashboard/project/add-application.tsx +++ b/apps/dokploy/components/dashboard/project/add-application.tsx @@ -1,256 +1,260 @@ -import { AlertBlock } from "@/components/shared/alert-block"; -import { Button } from "@/components/ui/button"; -import { - Dialog, - DialogContent, - DialogDescription, - DialogFooter, - DialogHeader, - DialogTitle, - DialogTrigger, -} from "@/components/ui/dialog"; -import { DropdownMenuItem } from "@/components/ui/dropdown-menu"; -import { - Form, - FormControl, - FormField, - FormItem, - FormLabel, - FormMessage, -} from "@/components/ui/form"; -import { Input } from "@/components/ui/input"; -import { - Select, - SelectContent, - SelectGroup, - SelectItem, - SelectLabel, - SelectTrigger, - SelectValue, -} from "@/components/ui/select"; -import { Textarea } from "@/components/ui/textarea"; -import { - Tooltip, - TooltipContent, - TooltipProvider, - TooltipTrigger, -} from "@/components/ui/tooltip"; -import { slugify } from "@/lib/slug"; -import { api } from "@/utils/api"; import { zodResolver } from "@hookform/resolvers/zod"; import { Folder, HelpCircle } from "lucide-react"; import { useState } from "react"; import { useForm } from "react-hook-form"; import { toast } from "sonner"; import { z } from "zod"; +import { AlertBlock } from "@/components/shared/alert-block"; +import { Button } from "@/components/ui/button"; +import { + Dialog, + DialogContent, + DialogDescription, + DialogFooter, + DialogHeader, + DialogTitle, + DialogTrigger, +} from "@/components/ui/dialog"; +import { DropdownMenuItem } from "@/components/ui/dropdown-menu"; +import { + Form, + FormControl, + FormField, + FormItem, + FormLabel, + FormMessage, +} from "@/components/ui/form"; +import { Input } from "@/components/ui/input"; +import { + Select, + SelectContent, + SelectGroup, + SelectItem, + SelectLabel, + SelectTrigger, + SelectValue, +} from "@/components/ui/select"; +import { Textarea } from "@/components/ui/textarea"; +import { + Tooltip, + TooltipContent, + TooltipProvider, + TooltipTrigger, +} from "@/components/ui/tooltip"; +import { slugify } from "@/lib/slug"; +import { api } from "@/utils/api"; const AddTemplateSchema = z.object({ - name: z.string().min(1, { - message: "Name is required", - }), - appName: z - .string() - .min(1, { - message: "App name is required", - }) - .regex(/^[a-z](?!.*--)([a-z0-9-]*[a-z])?$/, { - message: - "App name supports lowercase letters, numbers, '-' and can only start and end letters, and does not support continuous '-'", - }), - description: z.string().optional(), - serverId: z.string().optional(), + name: z.string().min(1, { + message: "Name is required", + }), + appName: z + .string() + .min(1, { + message: "App name is required", + }) + .regex(/^[a-z](?!.*--)([a-z0-9-]*[a-z])?$/, { + message: + "App name supports lowercase letters, numbers, '-' and can only start and end letters, and does not support continuous '-'", + }), + description: z.string().optional(), + serverId: z.string().optional(), }); type AddTemplate = z.infer; interface Props { - projectId: string; - projectName?: string; + projectId: string; + projectName?: string; } export const AddApplication = ({ projectId, projectName }: Props) => { - const utils = api.useUtils(); - const { data: isCloud } = api.settings.isCloud.useQuery(); - const [visible, setVisible] = useState(false); - const slug = slugify(projectName); - const { data: servers } = api.server.withSSHKey.useQuery(); + const utils = api.useUtils(); + const { data: isCloud } = api.settings.isCloud.useQuery(); + const [visible, setVisible] = useState(false); + const slug = slugify(projectName); + const { data: servers } = api.server.withSSHKey.useQuery(); - const { mutateAsync, isLoading, error, isError } = - api.application.create.useMutation(); + const hasServers = servers && servers.length > 0; - const form = useForm({ - defaultValues: { - name: "", - appName: `${slug}-`, - description: "", - }, - resolver: zodResolver(AddTemplateSchema), - }); + const { mutateAsync, isLoading, error, isError } = + api.application.create.useMutation(); - const onSubmit = async (data: AddTemplate) => { - await mutateAsync({ - name: data.name, - appName: data.appName, - description: data.description, - projectId, - serverId: data.serverId, - }) - .then(async () => { - toast.success("Service Created"); - form.reset(); - setVisible(false); - await utils.project.one.invalidate({ - projectId, - }); - }) - .catch(() => { - toast.error("Error creating the service"); - }); - }; + const form = useForm({ + defaultValues: { + name: "", + appName: `${slug}-`, + description: "", + }, + resolver: zodResolver(AddTemplateSchema), + }); - return ( - - - e.preventDefault()} - > - - Application - - - - - Create - - Assign a name and description to your application - - - {isError && {error?.message}} -
- - ( - - Name - - { - const val = e.target.value?.trim() || ""; - const serviceName = slugify(val); - form.setValue("appName", `${slug}-${serviceName}`); - field.onChange(val); - }} - /> - - - - )} - /> - ( - - - - - - Select a Server {!isCloud ? "(Optional)" : ""} - - - - - - If no server is selected, the application will be - deployed on the server where the user is logged in. - - - - + const onSubmit = async (data: AddTemplate) => { + await mutateAsync({ + name: data.name, + appName: data.appName, + description: data.description, + projectId, + serverId: data.serverId, + }) + .then(async () => { + toast.success("Service Created"); + form.reset(); + setVisible(false); + await utils.project.one.invalidate({ + projectId, + }); + }) + .catch(() => { + toast.error("Error creating the service"); + }); + }; - - - - )} - /> - ( - - App Name - - - - - - )} - /> - ( - - Description - -