diff --git a/.all-contributorsrc b/.all-contributorsrc index 16a9459..f0a5f5e 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -3,9 +3,7 @@ "projectOwner": "Blazity", "repoType": "github", "repoHost": "https://github.com", - "files": [ - "README.md" - ], + "files": ["README.md"], "imageSize": 100, "commit": true, "commitConvention": "angular", @@ -15,27 +13,21 @@ "name": "Bart Stefanski", "avatar_url": "https://avatars.githubusercontent.com/u/28964599?v=4", "profile": "https://bstefanski.com/", - "contributions": [ - "code" - ] + "contributions": ["code"] }, { "login": "jjablonski-it", "name": "Jakub Jab艂o艅ski", "avatar_url": "https://avatars.githubusercontent.com/u/51968772?v=4", "profile": "https://github.com/jjablonski-it", - "contributions": [ - "infra" - ] + "contributions": ["infra"] }, { "login": "neg4n", "name": "Igor Klepacki", "avatar_url": "https://avatars.githubusercontent.com/u/57688858?v=4", "profile": "https://neg4n.dev/", - "contributions": [ - "doc" - ] + "contributions": ["doc"] } ], "contributorsPerLine": 7, diff --git a/.eslintignore b/.eslintignore index db5ddae..bd4be1a 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,2 +1,2 @@ -.next +.next node_modules \ No newline at end of file diff --git a/.gitignore b/.gitignore index eeae0b6..777d05e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,35 +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/ -build - -# misc -.DS_Store -*.pem - -# debug -npm-debug.log* -yarn-debug.log* -yarn-error.log* -.pnpm-debug.log* - -# local env files -.env.local -.env.development.local -.env.test.local -.env.production.local -/test-results/ -/playwright-report/ -/playwright/.cache/ - +# 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/ +build + +# misc +.DS_Store +*.pem + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* +.pnpm-debug.log* + +# local env files +.env.local +.env.development.local +.env.test.local +.env.production.local +/test-results/ +/playwright-report/ +/playwright/.cache/ + /.npm-only-allow \ No newline at end of file diff --git a/.prettierignore b/.prettierignore index db5ddae..bd4be1a 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,2 +1,2 @@ -.next +.next node_modules \ No newline at end of file diff --git a/.releaserc b/.releaserc index b8f05bc..8f30bb6 100644 --- a/.releaserc +++ b/.releaserc @@ -1,12 +1,12 @@ -{ - branches: ["main"], - "plugins": - [ - ["@semantic-release/npm", { "npmPublish": false }], - "@semantic-release/release-notes-generator", - "@semantic-release/github", - "@semantic-release/commit-analyzer", - "@semantic-release/git", - "@semantic-release/changelog", - ], -} +{ + branches: ["main"], + "plugins": + [ + ["@semantic-release/npm", { "npmPublish": false }], + "@semantic-release/release-notes-generator", + "@semantic-release/github", + "@semantic-release/commit-analyzer", + "@semantic-release/git", + "@semantic-release/changelog", + ], +} diff --git a/LICENSE b/LICENSE index 5c308ea..c5d252a 100644 --- a/LICENSE +++ b/LICENSE @@ -1,21 +1,21 @@ -MIT License - -Copyright (c) 2023 Blazity - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +MIT License + +Copyright (c) 2023 Blazity + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index 31ad3fb..f2240c3 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,10 @@ -# Next.js Enterprise Boilerplate
[![GitHub Actions Workflow Status][check-workflow-badge]][check-workflow-badge-link] [![GitHub License][github-license-badge]][github-license-badge-link] [![GitHub contributors][github-contributors-badge]][github-contributors-badge-link] [![Discord][discord-badge]][discord-badge-link] [![Blazity][made-by-blazity-badge]][made-by-blazity-badge-link] +# Next.js Enterprise Boilerplate
[![GitHub Actions Workflow Status][check-workflow-badge]][check-workflow-badge-link] [![GitHub License][github-license-badge]][github-license-badge-link] [![GitHub contributors][github-contributors-badge]][github-contributors-badge-link] [![Discord][discord-badge]][discord-badge-link] [![Blazity][made-by-blazity-badge]][made-by-blazity-badge-link] Welcome to the _Next.js Enterprise Boilerplate_, an open-source template for enterprise projects! It's loaded with features that'll help you build a high-performance, maintainable, and enjoyable app. We've done all the heavy lifting for you, so sit back, relax, and get ready to conquer the world with your incredible app! 馃實 -> [!NOTE] -> **Blazity** is a group of Next.js/Headless experts. Contact us at [contact@blazity.com](https://blazity.com) if you鈥檇 like to talk about your project or just to have a chat with us +> [!NOTE] > **Blazity** is a group of Next.js/Headless experts. Contact us at [contact@blazity.com](https://blazity.com) if you鈥檇 like to talk about your project or just to have a chat with us ## Features @@ -273,7 +272,6 @@ If you're looking for help or simply want to share your thoughts about the proje
- ## 馃摐 License This project is licensed under the MIT License. For more information, see the [LICENSE](./LICENSE) file. @@ -314,7 +312,6 @@ This project is licensed under the MIT License. For more information, see the [L [github-contributors-badge]: https://img.shields.io/github/contributors/blazity/next-enterprise?link=https%3A%2F%2Fgithub.com%2FBlazity%2Fnext-enterprise%2Fgraphs%2Fcontributors [discord-badge]: https://img.shields.io/discord/1111676875782234175?color=7b8dcd&link=https%3A%2F%2Fblazity.com%2Fdiscord [made-by-blazity-badge]: https://img.shields.io/badge/made_by-Blazity-blue?color=FF782B&link=https://blazity.com/ - [check-workflow-badge-link]: https://github.com/Blazity/next-enterprise/actions/workflows/check.yml [github-license-badge-link]: https://github.com/Blazity/next-enterprise/blob/main/LICENSE [github-contributors-badge-link]: https://github.com/Blazity/next-enterprise/graphs/contributors diff --git a/app/account/controller/AuthController.tsx b/app/account/controller/AuthController.tsx new file mode 100644 index 0000000..3a30ae6 --- /dev/null +++ b/app/account/controller/AuthController.tsx @@ -0,0 +1,28 @@ +import { BASE_URL_AUTHENTICATION } from "@package/config/ApiPath" +import { FetchData } from "@package/config/FetchData" + +async function auth(ae_user: string, ae_password: string): Promise { + const options: RequestInit = { + method: "POST", + // mode: 'cors', + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify({ + username: ae_user, + password: ae_password, + }), + } + + const data = await FetchData<{ token: string }>(BASE_URL_AUTHENTICATION, "login", options) + + console.log(data) + if (data.correct) { + return data.object.token + } else { + console.error("Error en la autenticaci贸n:", data.message) + return "error en la autenticaci贸n" + } +} + +export { auth } diff --git a/app/account/login/page.tsx b/app/account/login/page.tsx new file mode 100644 index 0000000..ad0e900 --- /dev/null +++ b/app/account/login/page.tsx @@ -0,0 +1,26 @@ +"use client" +import LoginForm from "@organisms/LoginForm" +import React from "react" + +const LoginPage: React.FC = () => { + return ( +
+
+

Iniciar Sesi贸n

+ + + +
+ +
+
+
+ ) +} + +export default LoginPage diff --git a/app/api/health/route.ts b/app/api/health/route.ts index e8fd8c5..d737218 100644 --- a/app/api/health/route.ts +++ b/app/api/health/route.ts @@ -1,3 +1,5 @@ export async function GET() { - return Response.json({ status: "ok" }) + return new Response(JSON.stringify({ status: "ok" }), { + headers: { "Content-Type": "application/json" }, + }) } diff --git a/app/home/page.tsx b/app/home/page.tsx new file mode 100644 index 0000000..3795f24 --- /dev/null +++ b/app/home/page.tsx @@ -0,0 +1,14 @@ +import CheckoutScreen from "@app/selfcheckout/CheckoutScreen" +import LoyaltyProgramScreen from "@app/selfcheckout/LoyaltyProgramScreen" +import PreCheckoutScreen from "@app/selfcheckout/PreCheckoutScreen" +import React from "react" + +const HomeAfterLogin: React.FC = () => { + return ( +
+ +
+ ) +} + +export default HomeAfterLogin diff --git a/app/layout.tsx b/app/layout.tsx index a872374..022117c 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -1,9 +1,15 @@ -import "styles/tailwind.css" +import "@package/styles/tailwind.css"; +import Navbar from "@organisms/Navbar"; +import React from "react"; + export default function RootLayout({ children }: { children: React.ReactNode }) { return ( - {children} + + +
{children}
+ - ) + ); } diff --git a/app/page.tsx b/app/page.tsx index 52ce217..bdb071d 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -1,65 +1,68 @@ -import { Metadata } from "next" -import { Button } from "components/Button/Button" -import { LP_GRID_ITEMS } from "lp-items" +"use client" +import Grid from "@mui/material/Grid2" +import Image from "next/image" +import { useRouter } from "next/navigation" +import Button from "@package/components/atoms/Button" -export const metadata: Metadata = { - title: "Next.js Enterprise Boilerplate", - twitter: { - card: "summary_large_image", - }, - openGraph: { - url: "https://next-enterprise.vercel.app/", - images: [ - { - width: 1200, - height: 630, - url: "https://raw.githubusercontent.com/Blazity/next-enterprise/main/.github/assets/project-logo.png", - }, - ], - }, -} +const HomePage: React.FC = () => { + const router = useRouter() + + const handleLoginClick = () => { + router.push("/account/login") + } + + const handleFeaturesClick = () => { + router.push("/features") + } -export default function Web() { return ( - <> -
-
-
-

- Next.js Enterprise Boilerplate -

-

- Jumpstart your enterprise project with our feature-packed, high-performance Next.js boilerplate! - Experience rapid UI development, AI-powered code reviews, and an extensive suite of tools for a smooth and - enjoyable development process. -

- + + + Checkout + + + +

SELF CHECKOUT

+ +

Mejorando la experiencia en tienda

+ + + -
-
-
-
-
-
- {LP_GRID_ITEMS.map((singleItem) => ( -
-
- {singleItem.icon} -
-

{singleItem.title}

-

{singleItem.description}

-
- ))} -
-
-
- + label="Iniciar Sesi贸n" + onClick={handleLoginClick} + className="rounded-lg bg-blue-600 px-6 py-3 text-lg text-white transition hover:bg-blue-700" + /> + + +