diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..1cc55b9 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,14 @@ +{ + "plugins": ["prettier-plugin-tailwindcss"], + + "printWidth": 120, + "tabWidth": 4, + "useTabs": false, + "semi": true, + "singleQuote": false, + "trailingComma": "es5", + "bracketSpacing": true, + "jsxBracketSameLine": false, + "arrowParens": "always", + "endOfLine": "crlf" +} diff --git a/README.Docker.md b/README.Docker.md index e69de29..5ade044 100644 --- a/README.Docker.md +++ b/README.Docker.md @@ -0,0 +1 @@ +Hello from docker ReadMe diff --git a/docker-compose.yaml b/docker-compose.yaml index 035c945..1f1a010 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,16 +1,16 @@ -services: - witelflix-front: - image: witelflix:${VERSION} - container_name: witelflix - # build: #just if we have internet uncomment - # context: . - # dockerfile: Dockerfile - ports: - - "3000:3000" - env_file: - - .env - restart: unless-stopped - # volumes: - # - .:/app # کل پروژه mount شده به /app در کانتینر - # - /app/node_modules # node_modules داخل کانتینر بماند تا با host override نشود - # - /app/.next # next داخل کانتینر بماند تا با host override نشود +services: + witelflix-front: + image: witelflix:${VERSION} + container_name: witelflix + # build: #just if we have internet uncomment + # context: . + # dockerfile: Dockerfile + ports: + - "3000:3000" + env_file: + - .env + restart: unless-stopped + # volumes: + # - .:/app # کل پروژه mount شده به /app در کانتینر + # - /app/node_modules # node_modules داخل کانتینر بماند تا با host override نشود + # - /app/.next # next داخل کانتینر بماند تا با host override نشود diff --git a/messages/fa.json b/messages/fa.json new file mode 100644 index 0000000..24e9065 --- /dev/null +++ b/messages/fa.json @@ -0,0 +1,4 @@ +{ + "loading": "درحال دریافت داده", + "error_fetch_data": "مشکلی در دریافت داده رخ داده است." +} diff --git a/next-env.d.ts b/next-env.d.ts index c4b7818..9edff1c 100644 --- a/next-env.d.ts +++ b/next-env.d.ts @@ -1,6 +1,6 @@ /// /// -import "./.next/dev/types/routes.d.ts"; +import "./.next/types/routes.d.ts"; // NOTE: This file should not be edited // see https://nextjs.org/docs/app/api-reference/config/typescript for more information. diff --git a/next.config.ts b/next.config.ts new file mode 100644 index 0000000..9027e79 --- /dev/null +++ b/next.config.ts @@ -0,0 +1,25 @@ +// next.config.ts +import type { NextConfig } from "next"; +import createNextIntlPlugin from "next-intl/plugin"; + +// @ts-ignore – no types for next-pwa +const withPWA = require("next-pwa")({ + dest: "public", + disable: process.env.NODE_ENV === "development", + register: true, + skipWaiting: true, + navigateFallback: "/offline.html", // fallback page +}); + +const withNextIntl = createNextIntlPlugin(); + +const nextConfig: NextConfig = { + // output : "standalone", + images: { + remotePatterns: [], + }, +}; + +const configWithIntl = withNextIntl(nextConfig); + +export default withPWA(configWithIntl); diff --git a/package.json b/package.json index 0883285..9b32e57 100644 --- a/package.json +++ b/package.json @@ -1,47 +1,48 @@ -{ - "name": "witelflix", - "private": true, - "scripts": { - "dev": "next dev", - "build": "next build", - "start": "next start" - }, - "dependencies": { - "@types/js-cookie": "^3.0.6", - "axios": "^1.15.0", - "clsx": "^2.1.1", - "date-fns": "^4.1.0", - "date-fns-jalali": "4.1.0-0", - "embla-carousel": "^8.6.0", - "embla-carousel-autoplay": "^8.6.0", - "embla-carousel-react": "^8.6.0", - "framer-motion": "^12.38.0", - "js-cookie": "^3.0.5", - "lucide-react": "^1.8.0", - "next": "16.1.6", - "next-intl": "^4.9.1", - "next-pwa": "^5.6.0", - "next-sitemap": "^4.2.3", - "next-themes": "^0.4.6", - "nextjs-toploader": "^3.9.17", - "prettier": "^3.8.2", - "prettier-plugin-tailwindcss": "^0.7.2", - "radix-ui": "^1.4.3", - "react": "19.2.4", - "react-dom": "19.2.4", - "react-hook-form": "^7.72.1", - "react-hot-toast": "^2.6.0", - "tailwind-merge": "^3.5.0", - "tailwind-scrollbar": "^4.0.2", - "zustand": "^5.0.12" - }, - "devDependencies": { - "@tailwindcss/postcss": "^4.1.18", - "@types/node": "25.0.10", - "@types/react": "19.2.10", - "@types/react-dom": "19.2.3", - "postcss": "8.5.6", - "tailwindcss": "4.1.18", - "typescript": "5.9.3" - } -} \ No newline at end of file +{ + "name": "witelflix", + "private": true, + "scripts": { + "dev": "next dev", + "build": "next build", + "start": "next start", + "format": "npx prettier . --write" + }, + "dependencies": { + "@types/js-cookie": "^3.0.6", + "axios": "^1.15.0", + "clsx": "^2.1.1", + "date-fns": "^4.1.0", + "date-fns-jalali": "4.1.0-0", + "embla-carousel": "^8.6.0", + "embla-carousel-autoplay": "^8.6.0", + "embla-carousel-react": "^8.6.0", + "framer-motion": "^12.38.0", + "js-cookie": "^3.0.5", + "lucide-react": "^1.8.0", + "next": "16.1.6", + "next-intl": "^4.9.1", + "next-pwa": "^5.6.0", + "next-sitemap": "^4.2.3", + "next-themes": "^0.4.6", + "nextjs-toploader": "^3.9.17", + "prettier": "^3.8.2", + "prettier-plugin-tailwindcss": "^0.7.2", + "radix-ui": "^1.4.3", + "react": "19.2.4", + "react-dom": "19.2.4", + "react-hook-form": "^7.72.1", + "react-hot-toast": "^2.6.0", + "tailwind-merge": "^3.5.0", + "tailwind-scrollbar": "^4.0.2", + "zustand": "^5.0.12" + }, + "devDependencies": { + "@tailwindcss/postcss": "^4.1.18", + "@types/node": "25.0.10", + "@types/react": "19.2.10", + "@types/react-dom": "19.2.3", + "postcss": "8.5.6", + "tailwindcss": "4.1.18", + "typescript": "5.9.3" + } +} diff --git a/postcss.config.mjs b/postcss.config.mjs index fa4a1da..e2116ae 100644 --- a/postcss.config.mjs +++ b/postcss.config.mjs @@ -1,6 +1,5 @@ -export default { - plugins: { - "@tailwindcss/postcss": {}, - }, -}; - +export default { + plugins: { + "@tailwindcss/postcss": {}, + }, +}; diff --git a/public/logo/144px.png b/public/logo/144px.png new file mode 100644 index 0000000..dbaf7a0 Binary files /dev/null and b/public/logo/144px.png differ diff --git a/public/logo/152px.png b/public/logo/152px.png new file mode 100644 index 0000000..0b03d70 Binary files /dev/null and b/public/logo/152px.png differ diff --git a/public/logo/192px.png b/public/logo/192px.png new file mode 100644 index 0000000..61e8a30 Binary files /dev/null and b/public/logo/192px.png differ diff --git a/public/logo/384px.png b/public/logo/384px.png new file mode 100644 index 0000000..d99e54b Binary files /dev/null and b/public/logo/384px.png differ diff --git a/public/logo/512px.png b/public/logo/512px.png new file mode 100644 index 0000000..065df8b Binary files /dev/null and b/public/logo/512px.png differ diff --git a/public/manifest.json b/public/manifest.json new file mode 100644 index 0000000..426125a --- /dev/null +++ b/public/manifest.json @@ -0,0 +1,38 @@ +{ + "id": "/", + "name": "Theater of dreams", + "short_name": "Theater of dreams", + "description": "Theater of dreams", + "start_url": "/", + "display": "standalone", + "orientation": "portrait", + "theme_color": "#283618", + "background_color": "#ffffff", + "icons": [ + { + "src": "logo/144px.png", + "sizes": "144x144", + "type": "image/png" + }, + { + "src": "logo/152px.png", + "sizes": "152x152", + "type": "image/png" + }, + { + "src": "logo/192px.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "logo/384px.png", + "sizes": "384x384", + "type": "image/png" + }, + { + "src": "logo/512px.png", + "sizes": "512x512", + "type": "image/png" + } + ] +} diff --git a/src/app/layout.tsx b/src/app/layout.tsx index bc0a13e..e06c8d3 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -1,38 +1,59 @@ -import { ClientAppProvider } from '@/providers/ClientAppProvider' -import '@/styles/globals.css' -import type { Metadata } from 'next' - -export const metadata: Metadata = { - title: 'Theater of dreams', -} - -export default function RootLayout({ - children, -}: { - children: React.ReactNode -}) { - return ( - - - {/* Prevent theme flicker before hydration */} -