Compare commits

..

8 commits
dev ... main

Author SHA1 Message Date
smfahim25
acb8103ba6 update docker file 2025-03-20 11:58:26 +06:00
smfahim25
5cc945be6b update docker file 2025-03-20 11:51:57 +06:00
smfahim25
3bb860957b added docker compose file 2025-03-20 11:47:34 +06:00
smfahim25
5bf01f3078 added docker compose file 2025-03-20 11:44:07 +06:00
smfahim25
632c2fef0c added docker compose file 2025-03-20 11:37:36 +06:00
a4846621fb Merge pull request 'dev' (#1) from dev into main
Reviewed-on: #1
2025-03-01 08:47:52 +00:00
6d05517c25 Delete .env 2025-03-01 08:22:44 +00:00
474c832896 Update .gitignore 2025-03-01 08:22:33 +00:00
6 changed files with 1657 additions and 2808 deletions

1
.gitignore vendored
View file

@ -8,6 +8,7 @@ pnpm-debug.log*
lerna-debug.log* lerna-debug.log*
# local env files # local env files
.env
.env.local .env.local
.env.development.local .env.development.local
.env.test.local .env.test.local

15
Dockerfile Normal file
View file

@ -0,0 +1,15 @@
# Build stage
FROM node:22-alpine AS builder
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
COPY . .
RUN npm run build
# Production stage - simple option
FROM node:22-alpine
WORKDIR /app
COPY --from=builder /app/dist /app/dist
RUN npm install -g serve
EXPOSE 80
CMD ["serve", "-s", "dist", "-l", "80"]

8
docker-compose.yaml Normal file
View file

@ -0,0 +1,8 @@
services:
frontend:
build:
context: .
dockerfile: Dockerfile
# ports:
# - 80:80
restart: unless-stopped

4419
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,4 +1,3 @@
import { Button } from "../ui/Button";
import { X } from "lucide-react"; import { X } from "lucide-react";
import { ScrollArea } from "../ui/scroll-area"; import { ScrollArea } from "../ui/scroll-area";
import { useContext, useEffect, useRef, useState } from "react"; import { useContext, useEffect, useRef, useState } from "react";
@ -8,6 +7,7 @@ import { fabric } from "fabric";
import CommonPanel from "./CommonPanel"; import CommonPanel from "./CommonPanel";
import useProject from "@/hooks/useProject"; import useProject from "@/hooks/useProject";
import { useParams } from "react-router-dom"; import { useParams } from "react-router-dom";
import { Button } from "../ui/button";
export default function TextPanel() { export default function TextPanel() {
const { canvas, setSelectedPanel } = useContext(CanvasContext); const { canvas, setSelectedPanel } = useContext(CanvasContext);
@ -20,7 +20,8 @@ export default function TextPanel() {
function isUUID(value) { function isUUID(value) {
if (typeof value !== "string") return false; if (typeof value !== "string") return false;
const uuidRegex = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i; const uuidRegex =
/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
return uuidRegex.test(value); return uuidRegex.test(value);
} }
@ -62,7 +63,7 @@ export default function TextPanel() {
setActiveObject(text); setActiveObject(text);
canvas.renderAll(); canvas.renderAll();
const object = canvas.toJSON(['id', 'selectable']); const object = canvas.toJSON(["id", "selectable"]);
const updateData = { ...projectData?.data, object }; const updateData = { ...projectData?.data, object };
// Wait for the project update before continuing // Wait for the project update before continuing
projectUpdate({ id, updateData }); projectUpdate({ id, updateData });

View file

@ -1,6 +1,6 @@
import { defineConfig } from 'vite' import { defineConfig } from "vite";
import react from '@vitejs/plugin-react-swc' import react from "@vitejs/plugin-react-swc";
import path from "path" import path from "path";
// https://vite.dev/config/ // https://vite.dev/config/
export default defineConfig({ export default defineConfig({
@ -11,9 +11,6 @@ export default defineConfig({
}, },
}, },
server: { server: {
port: 5175 port: 5175,
}, },
esbuild: { });
target: "esnext",
}
})