diff --git a/.env.development b/.env.development new file mode 100644 index 00000000..161467af --- /dev/null +++ b/.env.development @@ -0,0 +1,3 @@ +NEXT_PUBLIC_TEST="테스트변수입니다. development" + +NEXT_PUBLIC_API_SERVER_PATH="http://localhost:8080" \ No newline at end of file diff --git a/.env.production b/.env.production new file mode 100644 index 00000000..efb12105 --- /dev/null +++ b/.env.production @@ -0,0 +1,3 @@ +NEXT_PUBLIC_TEST="테스트변수입니다. production" + +NEXT_PUBLIC_API_SERVER_PATH="http://localhost:8080" \ No newline at end of file diff --git a/Nextjs 14 컴포넌트에 대해서....pdf b/Nextjs 14 컴포넌트에 대해서....pdf new file mode 100644 index 00000000..fe9072f1 Binary files /dev/null and b/Nextjs 14 컴포넌트에 대해서....pdf differ diff --git a/Qcast coding convention.pdf b/Qcast coding convention.pdf new file mode 100644 index 00000000..0ab0e190 Binary files /dev/null and b/Qcast coding convention.pdf differ diff --git a/Qcast development guilde.pdf b/Qcast development guilde.pdf new file mode 100644 index 00000000..d991663d Binary files /dev/null and b/Qcast development guilde.pdf differ diff --git a/README.md b/README.md index 24eddc59..c4033664 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,36 @@ -# 점 갯수 별 타입 +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). -## 점 6개 +## Getting Started -### type1 +First, run the development server: -![type1](https://devgrr-bucket.s3.ap-northeast-2.amazonaws.com/qcast-type/point6+-+type1.png) +```bash +npm run dev +# or +yarn dev +# or +pnpm dev +# or +bun dev +``` -### type2 +Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. -![type2](https://devgrr-bucket.s3.ap-northeast-2.amazonaws.com/qcast-type/point6-+type2.png) +You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. -### type3 +This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. -![type3](https://devgrr-bucket.s3.ap-northeast-2.amazonaws.com/qcast-type/point6-type3.png) +## Learn More -### type4 +To learn more about Next.js, take a look at the following resources: -![type4](https://devgrr-bucket.s3.ap-northeast-2.amazonaws.com/qcast-type/point6-type4.png) +- [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/next.config.mjs b/next.config.mjs index 8cc4c040..80649ef9 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -1,15 +1,18 @@ /** @type {import('next').NextConfig} */ const nextConfig = { - reactStrictMode: false, + reactStrictMode: true, webpack: (config) => { config.externals.push({ - "utf-8-validate": "commonjs utf-8-validate", - bufferutil: "commonjs bufferutil", - canvas: "commonjs canvas", - }); + 'utf-8-validate': 'commonjs utf-8-validate', + bufferutil: 'commonjs bufferutil', + canvas: 'commonjs canvas', + }) // config.infrastructureLogging = { debug: /PackFileCache/ }; - return config; + return config }, -}; + sassOptions: { + includePaths: ['./src/styles'], + }, +} -export default nextConfig; +export default nextConfig diff --git a/package.json b/package.json index a5c429a7..b4af1ba6 100644 --- a/package.json +++ b/package.json @@ -11,12 +11,15 @@ "dependencies": { "@nextui-org/react": "^2.4.2", "@prisma/client": "^5.17.0", + "axios": "^1.7.3", "fabric": "^5.3.0", "framer-motion": "^11.2.13", "mathjs": "^13.0.2", "mongodb": "^6.8.0", "next": "14.2.3", + "next-international": "^1.2.4", "react": "^18", + "react-datepicker": "^7.3.0", "react-dom": "^18", "recoil": "^0.7.7", "uuid": "^9.0.1" @@ -25,6 +28,7 @@ "postcss": "^8", "prettier": "^3.3.3", "prisma": "^5.17.0", + "sass": "^1.77.8", "tailwindcss": "^3.4.1" } } diff --git a/postcss.config.mjs b/postcss.config.mjs index 1a69fd2a..0dc456ad 100644 --- a/postcss.config.mjs +++ b/postcss.config.mjs @@ -3,6 +3,6 @@ const config = { plugins: { tailwindcss: {}, }, -}; +} -export default config; +export default config diff --git a/shape-type.md b/shape-type.md new file mode 100644 index 00000000..24eddc59 --- /dev/null +++ b/shape-type.md @@ -0,0 +1,19 @@ +# 점 갯수 별 타입 + +## 점 6개 + +### type1 + +![type1](https://devgrr-bucket.s3.ap-northeast-2.amazonaws.com/qcast-type/point6+-+type1.png) + +### type2 + +![type2](https://devgrr-bucket.s3.ap-northeast-2.amazonaws.com/qcast-type/point6-+type2.png) + +### type3 + +![type3](https://devgrr-bucket.s3.ap-northeast-2.amazonaws.com/qcast-type/point6-type3.png) + +### type4 + +![type4](https://devgrr-bucket.s3.ap-northeast-2.amazonaws.com/qcast-type/point6-type4.png) diff --git a/src/app/[locale]/LocaleProvider.js b/src/app/[locale]/LocaleProvider.js new file mode 100644 index 00000000..b4649135 --- /dev/null +++ b/src/app/[locale]/LocaleProvider.js @@ -0,0 +1,11 @@ +'use client' + +import { I18nProviderClient } from '@/locales/client' + +export function LocaleProvider({ locale, children }) { + return ( + Loading...

}> + {children} +
+ ) +} diff --git a/src/app/[locale]/changelog copy/changelog.module.css b/src/app/[locale]/changelog copy/changelog.module.css new file mode 100644 index 00000000..273a4a34 --- /dev/null +++ b/src/app/[locale]/changelog copy/changelog.module.css @@ -0,0 +1,4 @@ +.test { + @apply bg-red-500; + @apply text-2xl; +} diff --git a/src/app/[locale]/changelog copy/page.jsx b/src/app/[locale]/changelog copy/page.jsx new file mode 100644 index 00000000..ad626beb --- /dev/null +++ b/src/app/[locale]/changelog copy/page.jsx @@ -0,0 +1,73 @@ +'use client' + +import { Button, Table, TableBody, TableCell, TableColumn, TableHeader, TableRow } from '@nextui-org/react' +import Hero from '@/components/Hero' +import QSelect from '@/components/ui/QSelect' +import styles from './changelog.module.css' +import { get } from '@/lib/Axios' + +export default function changelogPage() { + const testVar = process.env.NEXT_PUBLIC_TEST + + const handleUsers = async () => { + const users = await get('/api/user/find-all') + console.log(users) + } + + const data = [ + { + id: 1, + author: 'SWYOO', + contents: '버튼 정리(템플릿 적용)', + date: '2024.07.16', + }, + { + id: 2, + author: 'SWYOO', + contents: 'README.md 파일 이미지 경로 수정', + date: '2024.07.17', + }, + { + id: 3, + author: 'SWYOO', + contents: '', + date: '', + }, + ] + return ( + <> + +
이 영역은 테스트입니다.
+
+ + + DATE + NAME + CONTENTS + + + {data.map((item) => ( + + {item.date} + {item.author} + {item.contents} + + ))} + +
+
+
+ +
+
{testVar}
+
+
+ +
+
+
+

Sass 테스트입니다.

+
+ + ) +} diff --git a/src/app/[locale]/changelog/changelog.module.css b/src/app/[locale]/changelog/changelog.module.css new file mode 100644 index 00000000..273a4a34 --- /dev/null +++ b/src/app/[locale]/changelog/changelog.module.css @@ -0,0 +1,4 @@ +.test { + @apply bg-red-500; + @apply text-2xl; +} diff --git a/src/app/[locale]/changelog/page.jsx b/src/app/[locale]/changelog/page.jsx new file mode 100644 index 00000000..ad626beb --- /dev/null +++ b/src/app/[locale]/changelog/page.jsx @@ -0,0 +1,73 @@ +'use client' + +import { Button, Table, TableBody, TableCell, TableColumn, TableHeader, TableRow } from '@nextui-org/react' +import Hero from '@/components/Hero' +import QSelect from '@/components/ui/QSelect' +import styles from './changelog.module.css' +import { get } from '@/lib/Axios' + +export default function changelogPage() { + const testVar = process.env.NEXT_PUBLIC_TEST + + const handleUsers = async () => { + const users = await get('/api/user/find-all') + console.log(users) + } + + const data = [ + { + id: 1, + author: 'SWYOO', + contents: '버튼 정리(템플릿 적용)', + date: '2024.07.16', + }, + { + id: 2, + author: 'SWYOO', + contents: 'README.md 파일 이미지 경로 수정', + date: '2024.07.17', + }, + { + id: 3, + author: 'SWYOO', + contents: '', + date: '', + }, + ] + return ( + <> + +
이 영역은 테스트입니다.
+
+ + + DATE + NAME + CONTENTS + + + {data.map((item) => ( + + {item.date} + {item.author} + {item.contents} + + ))} + +
+
+
+ +
+
{testVar}
+
+
+ +
+
+
+

Sass 테스트입니다.

+
+ + ) +} diff --git a/src/app/[locale]/community/archive/page.jsx b/src/app/[locale]/community/archive/page.jsx new file mode 100644 index 00000000..06971385 --- /dev/null +++ b/src/app/[locale]/community/archive/page.jsx @@ -0,0 +1,15 @@ +'use client' + +import Hero from '@/components/Hero' +import Archive from '@/components/community/Archive' + +export default function CommunityArchivePage() { + return ( + <> + +
+ +
+ + ) +} diff --git a/src/app/intro/page.jsx b/src/app/[locale]/community/faq/page.jsx similarity index 57% rename from src/app/intro/page.jsx rename to src/app/[locale]/community/faq/page.jsx index d26257fb..63992da8 100644 --- a/src/app/intro/page.jsx +++ b/src/app/[locale]/community/faq/page.jsx @@ -1,14 +1,14 @@ 'use client' import Hero from '@/components/Hero' -import Intro from '@/components/Intro' +import Faq from '@/components/community/Faq' -export default function IntroPage() { +export default function CommunityFaqPage() { return ( <> - +
- +
) diff --git a/src/app/[locale]/community/notice/page.jsx b/src/app/[locale]/community/notice/page.jsx new file mode 100644 index 00000000..5c5d0559 --- /dev/null +++ b/src/app/[locale]/community/notice/page.jsx @@ -0,0 +1,15 @@ +'use client' + +import Hero from '@/components/Hero' +import Notice from '@/components/community/Notice' + +export default function CommunityNoticePage() { + return ( + <> + +
+ +
+ + ) +} diff --git a/src/app/[locale]/error.jsx b/src/app/[locale]/error.jsx new file mode 100644 index 00000000..07d75e7e --- /dev/null +++ b/src/app/[locale]/error.jsx @@ -0,0 +1,15 @@ +'use client' + +export default function ServerError() { + return ( +
+
+
+

500

+

Internal Server Error.

+

We are already working to solve the problem.

+
+
+
+ ) +} diff --git a/src/app/[locale]/intro/page.jsx b/src/app/[locale]/intro/page.jsx new file mode 100644 index 00000000..64a7c6ab --- /dev/null +++ b/src/app/[locale]/intro/page.jsx @@ -0,0 +1,14 @@ +'use client' + +import Hero from '@/components/Hero' +import Intro from '@/components/Intro' + +export default function IntroPage() { + return ( + <> +
+ +
+ + ) +} diff --git a/src/app/[locale]/layout.js b/src/app/[locale]/layout.js new file mode 100644 index 00000000..00f84991 --- /dev/null +++ b/src/app/[locale]/layout.js @@ -0,0 +1,13 @@ +'use client' + +import { useCurrentLocale } from '@/locales/client' +import { LocaleProvider } from './LocaleProvider' + +export default function LocaleLayout({ children }) { + const locale = useCurrentLocale() + return ( + <> + {children} + + ) +} diff --git a/src/app/login/page.jsx b/src/app/[locale]/login/page.jsx similarity index 100% rename from src/app/login/page.jsx rename to src/app/[locale]/login/page.jsx diff --git a/src/app/[locale]/management/plan/page.jsx b/src/app/[locale]/management/plan/page.jsx new file mode 100644 index 00000000..45afb7fa --- /dev/null +++ b/src/app/[locale]/management/plan/page.jsx @@ -0,0 +1,15 @@ +'use client' + +import Hero from '@/components/Hero' +import Plan from '@/components/management/Plan' + +export default function ManagementPlanPage() { + return ( + <> + +
+ +
+ + ) +} diff --git a/src/app/[locale]/management/stuff/page.jsx b/src/app/[locale]/management/stuff/page.jsx new file mode 100644 index 00000000..a548be92 --- /dev/null +++ b/src/app/[locale]/management/stuff/page.jsx @@ -0,0 +1,15 @@ +'use client' + +import Hero from '@/components/Hero' +import Stuff from '@/components/management/Stuff' + +export default function ManagementStuffPage() { + return ( + <> + +
+ +
+ + ) +} diff --git a/src/app/[locale]/master/company/page.jsx b/src/app/[locale]/master/company/page.jsx new file mode 100644 index 00000000..18be29e2 --- /dev/null +++ b/src/app/[locale]/master/company/page.jsx @@ -0,0 +1,15 @@ +'use client' + +import Hero from '@/components/Hero' +import Company from '@/components/master/Company' + +export default function MasterCompanyPage() { + return ( + <> + +
+ +
+ + ) +} diff --git a/src/app/[locale]/master/price/page.jsx b/src/app/[locale]/master/price/page.jsx new file mode 100644 index 00000000..e60210fb --- /dev/null +++ b/src/app/[locale]/master/price/page.jsx @@ -0,0 +1,15 @@ +'use client' + +import Hero from '@/components/Hero' +import Price from '@/components/master/Price' + +export default function MasterPricePage() { + return ( + <> + +
+ +
+ + ) +} diff --git a/src/app/[locale]/not-found.jsx b/src/app/[locale]/not-found.jsx new file mode 100644 index 00000000..8127943b --- /dev/null +++ b/src/app/[locale]/not-found.jsx @@ -0,0 +1,25 @@ +'use client' + +import Link from 'next/link' + +export default function NotFound() { + return ( +
+
+
+

404

+

Something's missing.

+

+ Sorry, we can't find that page. You'll find lots to explore on the home page.{' '} +

+ + Back to Homepage + +
+
+
+ ) +} diff --git a/src/app/[locale]/page.js b/src/app/[locale]/page.js new file mode 100644 index 00000000..ab223428 --- /dev/null +++ b/src/app/[locale]/page.js @@ -0,0 +1,19 @@ +import MainPage from '@/components/Main' +import { getCurrentLocale } from '@/locales/server' + +export default function page() { + const currentLocale = getCurrentLocale() + + const mainPageProps = { + currentLocale, + } + + return ( + <> +
+

Main

+ +
+ + ) +} diff --git a/src/app/roof/page.jsx b/src/app/[locale]/roof/page.jsx similarity index 100% rename from src/app/roof/page.jsx rename to src/app/[locale]/roof/page.jsx diff --git a/src/app/roof2/page.jsx b/src/app/[locale]/roof2/page.jsx similarity index 100% rename from src/app/roof2/page.jsx rename to src/app/[locale]/roof2/page.jsx diff --git a/src/app/changelog/page.jsx b/src/app/changelog/page.jsx deleted file mode 100644 index 821254ec..00000000 --- a/src/app/changelog/page.jsx +++ /dev/null @@ -1,40 +0,0 @@ -'use client' - -import Hero from '@/components/Hero' -import { - Table, - TableBody, - TableCell, - TableColumn, - TableHeader, - TableRow, -} from '@nextui-org/react' - -export default function changelogPage() { - return ( - <> - -
- - - DATE - NAME - CONTENTS - - - - 2024.07.17 - SWYOO - ` * README.md 파일 이미지 경로 수정 ` - - - 2024.07.16 - SWYOO - ` * 버튼 정리(템플릿 적용) ` - - -
-
- - ) -} diff --git a/src/app/globals.css b/src/app/globals.css index 1c95a542..33e09403 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -30,10 +30,11 @@ body { .text-balance { text-wrap: balance; } -} */ +} .archivo-black-regular { font-family: 'Archivo Black', sans-serif; font-weight: 400; font-style: normal; } +*/ diff --git a/src/app/layout.js b/src/app/layout.js index 55cb11f3..d9dd77d0 100644 --- a/src/app/layout.js +++ b/src/app/layout.js @@ -1,5 +1,6 @@ import { Inter } from 'next/font/google' import './globals.css' +import '../styles/style.scss' import Headers from '@/components/Headers' import RecoilRootWrapper from './RecoilWrapper' import UIProvider from './UIProvider' diff --git a/src/app/page.js b/src/app/page.js index feb99992..9c905040 100644 --- a/src/app/page.js +++ b/src/app/page.js @@ -1,5 +1,5 @@ -import Hero from '@/components/Hero' +import Main from '@/components/Main' export default function Home() { - return + return
} diff --git a/src/components/Headers.jsx b/src/components/Headers.jsx index 12d36144..a5503b8c 100644 --- a/src/components/Headers.jsx +++ b/src/components/Headers.jsx @@ -2,7 +2,7 @@ import Link from 'next/link' export default function Headers() { return ( -
+