From 893cdcb89c6978ecbf232395d19e8f088ab52437 Mon Sep 17 00:00:00 2001 From: soheil khaledabadi Date: Fri, 24 Apr 2026 16:20:36 +0330 Subject: [PATCH] Init(Coore): add to repo --- .dockerignore | 11 + .env | 4 + .env.example | 11 + .eslintrc.json | 3 + .gitignore | 35 + Dockerfile | 50 + README.md | 34 + app/[lang]/layout.js | 63 + app/[lang]/management/page.js | 128 + app/[lang]/page.js | 20 + app/favicon.ico | Bin 0 -> 8795 bytes app/fonts/Doran-Bold.woff2 | Bin 0 -> 51200 bytes app/fonts/Morabba-Bold.woff2 | Bin 0 -> 21644 bytes app/fonts/Morabba-Heavy.woff2 | Bin 0 -> 20068 bytes app/fonts/Morabba-Regular.woff2 | Bin 0 -> 21524 bytes app/fonts/Morabba-UltraLight.woff2 | Bin 0 -> 19560 bytes app/fonts/dana-bold.woff2 | Bin 0 -> 26908 bytes app/fonts/dana-regular.woff2 | Bin 0 -> 26492 bytes app/fonts/is1.woff2 | Bin 0 -> 33716 bytes app/fonts/is2.woff2 | Bin 0 -> 30344 bytes app/fonts/iy1.woff2 | Bin 0 -> 28820 bytes app/fonts/iy2.woff2 | Bin 0 -> 26292 bytes app/globals.css | 23 + app/providers.js | 11 + components/About.js | 80 + components/BestSellerTitle.js | 13 + components/Blog.js | 15 + components/BlogCard.js | 15 + components/BlogPosts.js | 50 + components/Button.js | 5 + components/Card.js | 18 + components/CartProduct.js | 43 + components/Category.js | 21 + components/ColorPicker.js | 15 + components/Crown.js | 11 + components/DiscountedPrices.js | 14 + components/Footer.js | 124 + components/Header.js | 48 + components/HeaderSearchIcon.js | 8 + components/HeaderUserIcon.js | 8 + components/Hero.js | 117 + components/Input.js | 9 + components/MG.js | 24 + components/MyDropDown.js | 31 + components/PriceDetails.js | 53 + components/ProductCard.js | 15 + components/Production.js | 93 + components/Products.js | 34 + components/SearchBar.js | 17 + components/SeeAll.js | 11 + components/SmartHome.js | 7 + components/SortButton.js | 37 + components/UserOrders.js | 57 + components/UserSidebar.js | 47 + components/UserSidebarItem.js | 8 + components/WhiteLogo.js | 14 + components/‌BlogPostCard.js | 0 docker-compose.yml | 17 + jsconfig.json | 7 + middleware.js | 48 + next.config.js | 28 + package-lock.json | 11795 +++++++++++++++++++++++++++ package.json | 39 + postcss.config.js | 6 + public/AboutBG.png | Bin 0 -> 224825 bytes public/Avatars.png | Bin 0 -> 10500 bytes public/BG.png | Bin 0 -> 1238045 bytes public/BlogCard.png | Bin 0 -> 167525 bytes public/BlogImage.png | Bin 0 -> 168951 bytes public/CategoryImage.png | Bin 0 -> 22999 bytes public/DM_Sans.zip | Bin 0 -> 4776340 bytes public/Doran-Pro-1.2.zip | Bin 0 -> 5480190 bytes public/ImgBlog.webp | Bin 0 -> 18090 bytes public/Pic.png | Bin 0 -> 234771 bytes public/PicAbout.png | Bin 0 -> 12728 bytes public/PicSmall.png | Bin 0 -> 59504 bytes public/Productimage.png | Bin 0 -> 80272 bytes public/Rectangle.png | Bin 0 -> 9112 bytes public/back.png | Bin 0 -> 21191 bytes public/bg.webp | Bin 0 -> 65792 bytes public/envs.txt | 12 + public/img.png | Bin 0 -> 119565 bytes public/managementbg.png | Bin 0 -> 304738 bytes public/map.png | Bin 0 -> 283344 bytes public/productbg.webp | Bin 0 -> 12194 bytes public/productpic.png | Bin 0 -> 35504 bytes public/productpic.webp | Bin 0 -> 2652 bytes public/sh.png | Bin 0 -> 422331 bytes public/team.png | Bin 0 -> 162909 bytes tailwind.config.js | 43 + wd_log.txt | 301 + 91 files changed, 13751 insertions(+) create mode 100644 .dockerignore create mode 100644 .env create mode 100644 .env.example create mode 100755 .eslintrc.json create mode 100755 .gitignore create mode 100644 Dockerfile create mode 100755 README.md create mode 100755 app/[lang]/layout.js create mode 100755 app/[lang]/management/page.js create mode 100755 app/[lang]/page.js create mode 100755 app/favicon.ico create mode 100755 app/fonts/Doran-Bold.woff2 create mode 100755 app/fonts/Morabba-Bold.woff2 create mode 100755 app/fonts/Morabba-Heavy.woff2 create mode 100755 app/fonts/Morabba-Regular.woff2 create mode 100755 app/fonts/Morabba-UltraLight.woff2 create mode 100755 app/fonts/dana-bold.woff2 create mode 100755 app/fonts/dana-regular.woff2 create mode 100755 app/fonts/is1.woff2 create mode 100755 app/fonts/is2.woff2 create mode 100755 app/fonts/iy1.woff2 create mode 100755 app/fonts/iy2.woff2 create mode 100755 app/globals.css create mode 100755 app/providers.js create mode 100755 components/About.js create mode 100755 components/BestSellerTitle.js create mode 100755 components/Blog.js create mode 100755 components/BlogCard.js create mode 100755 components/BlogPosts.js create mode 100755 components/Button.js create mode 100755 components/Card.js create mode 100755 components/CartProduct.js create mode 100755 components/Category.js create mode 100755 components/ColorPicker.js create mode 100755 components/Crown.js create mode 100755 components/DiscountedPrices.js create mode 100755 components/Footer.js create mode 100755 components/Header.js create mode 100755 components/HeaderSearchIcon.js create mode 100755 components/HeaderUserIcon.js create mode 100755 components/Hero.js create mode 100755 components/Input.js create mode 100755 components/MG.js create mode 100755 components/MyDropDown.js create mode 100755 components/PriceDetails.js create mode 100755 components/ProductCard.js create mode 100755 components/Production.js create mode 100755 components/Products.js create mode 100755 components/SearchBar.js create mode 100755 components/SeeAll.js create mode 100755 components/SmartHome.js create mode 100755 components/SortButton.js create mode 100755 components/UserOrders.js create mode 100755 components/UserSidebar.js create mode 100755 components/UserSidebarItem.js create mode 100755 components/WhiteLogo.js create mode 100755 components/‌BlogPostCard.js create mode 100644 docker-compose.yml create mode 100755 jsconfig.json create mode 100755 middleware.js create mode 100755 next.config.js create mode 100644 package-lock.json create mode 100755 package.json create mode 100755 postcss.config.js create mode 100755 public/AboutBG.png create mode 100755 public/Avatars.png create mode 100755 public/BG.png create mode 100755 public/BlogCard.png create mode 100755 public/BlogImage.png create mode 100755 public/CategoryImage.png create mode 100755 public/DM_Sans.zip create mode 100755 public/Doran-Pro-1.2.zip create mode 100755 public/ImgBlog.webp create mode 100755 public/Pic.png create mode 100755 public/PicAbout.png create mode 100755 public/PicSmall.png create mode 100755 public/Productimage.png create mode 100755 public/Rectangle.png create mode 100755 public/back.png create mode 100755 public/bg.webp create mode 100755 public/envs.txt create mode 100755 public/img.png create mode 100755 public/managementbg.png create mode 100755 public/map.png create mode 100755 public/productbg.webp create mode 100755 public/productpic.png create mode 100755 public/productpic.webp create mode 100755 public/sh.png create mode 100755 public/team.png create mode 100755 tailwind.config.js create mode 100755 wd_log.txt diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..1744d98 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,11 @@ +.git +.gitignore +.next +node_modules +npm-debug.log* +README.md +.DS_Store +.env*.local +.dockerignore +Dockerfile +docker-compose.yml diff --git a/.env b/.env new file mode 100644 index 0000000..7b4a416 --- /dev/null +++ b/.env @@ -0,0 +1,4 @@ +NEXT_PUBLIC_API_BASE_URL=http://cms.soheilkhaledabadi.ir +NEXT_PUBLIC_IMAGE_HOSTNAME=axicon-portal.iran.liara.run +ARVAN_NAMESPACE=docker.arvancloud.ir +IMAGE_TAG=latest diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..55886b3 --- /dev/null +++ b/.env.example @@ -0,0 +1,11 @@ +# API base URL (backend CMS) +NEXT_PUBLIC_API_BASE_URL=https://your-api-domain.com + +# Hostname of the image server returned by the API (for Next.js Image optimization) +NEXT_PUBLIC_IMAGE_HOSTNAME=your-image-cdn-domain.com + +# ArvanCloud Container Registry namespace +ARVAN_NAMESPACE=your-arvan-namespace + +# Docker image tag (default: latest) +IMAGE_TAG=latest diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100755 index 0000000..bffb357 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "next/core-web-vitals" +} diff --git a/.gitignore b/.gitignore new file mode 100755 index 0000000..8f322f0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,35 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.js + +# testing +/coverage + +# next.js +/.next/ +/out/ + +# production +/build + +# misc +.DS_Store +*.pem + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# local env files +.env*.local + +# vercel +.vercel + +# typescript +*.tsbuildinfo +next-env.d.ts diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..1c1f732 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,50 @@ +# syntax=docker/dockerfile:1 + +ARG REGISTRY=docker.arvancloud.ir + +# Stage 1: deps +FROM ${REGISTRY}/node:20-alpine AS deps +WORKDIR /app + +# اصلاح mirror برای جلوگیری از TLS error +RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories + +COPY package.json package-lock.json ./ +RUN npm ci --prefer-offline --no-audit + +# Stage 2: builder +FROM ${REGISTRY}/node:20-alpine AS builder +WORKDIR /app + +RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories + +COPY --from=deps /app/node_modules ./node_modules +COPY . . + +ENV NEXT_TELEMETRY_DISABLED=1 + +RUN npm run build + +# Stage 3: runner +FROM ${REGISTRY}/node:20-alpine AS runner +WORKDIR /app + +ENV NODE_ENV=production +ENV NEXT_TELEMETRY_DISABLED=1 + +RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories + +RUN addgroup -S nodejs -g 1001 +RUN adduser -S nextjs -u 1001 + +COPY --from=builder /app/public ./public +COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./ +COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static + +USER nextjs + +EXPOSE 3000 +ENV PORT=3000 +ENV HOSTNAME=0.0.0.0 + +CMD ["node", "server.js"] \ No newline at end of file diff --git a/README.md b/README.md new file mode 100755 index 0000000..e5f733e --- /dev/null +++ b/README.md @@ -0,0 +1,34 @@ +This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). + +## Getting Started + +First, run the development server: + +```bash +npm run dev +# or +yarn dev +# or +pnpm dev +``` + +Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. + +You can start editing the page by modifying `app/page.js`. The page auto-updates as you edit the file. + +This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. + +## Learn More + +To learn more about Next.js, take a look at the following resources: + +- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. +- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. + +You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! + +## Deploy on Vercel + +The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. + +Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. diff --git a/app/[lang]/layout.js b/app/[lang]/layout.js new file mode 100755 index 0000000..6419a38 --- /dev/null +++ b/app/[lang]/layout.js @@ -0,0 +1,63 @@ +import '../globals.css' +import localFont from 'next/font/local' +import Header from '@/components/Header' +import Footer from '@/components/Footer' +import {Providers} from "../providers"; + + +const dana = localFont({ + src: [ + { + style: 'normal', + weight: '2', + path: '../fonts/dana-bold.woff2' + }, + { + style: 'normal', + weight: '1', + path: '../fonts/Doran-Bold.woff2' + }, + { + style: 'normal', + weight: 'bold', + path: '../fonts/Morabba-Bold.woff2' + }, + { + style: 'normal', + weight: 'normal', + path: '../fonts/Morabba-Regular.woff2' + }, + { + style: 'normal', + weight: '4', + path: '../fonts/is1.woff2' + }, + { + style: 'normal', + weight: '5', + path: '../fonts/is2.woff2' + }, + ] +}) + + + +export const metadata = { + title: 'Rahavard | رهاورد', + description: 'شرکت دانش بنیان مهندسی رهاورد منیزیم پارسه', +} +export const dynamic = 'force-dynamic'; + +export default function RootLayout({ params: { lang }, children }) { + return ( + + + +
+ {children} +