Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sc luis fe v1 #310

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 4 additions & 12 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
"projectOwner": "Blazity",
"repoType": "github",
"repoHost": "https://github.com",
"files": [
"README.md"
],
"files": ["README.md"],
"imageSize": 100,
"commit": true,
"commitConvention": "angular",
Expand All @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
.next
.next
node_modules
68 changes: 34 additions & 34 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
.next
.next
node_modules
24 changes: 12 additions & 12 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -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",
],
}
42 changes: 21 additions & 21 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -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.
7 changes: 2 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<img align="right" width="360px" height="410px" src="./.github/assets/project-logo-vertical.png">

# Next.js Enterprise Boilerplate </br> [![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 </br> [![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 [[email protected]](https://blazity.com) if you’d 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 [[email protected]](https://blazity.com) if you’d like to talk about your project or just to have a chat with us

## Features

Expand Down Expand Up @@ -273,7 +272,6 @@ If you're looking for help or simply want to share your thoughts about the proje
</a>
<br />


## 📜 License

This project is licensed under the MIT License. For more information, see the [LICENSE](./LICENSE) file.
Expand Down Expand Up @@ -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
Expand Down
85 changes: 85 additions & 0 deletions app/Dashboard/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
"use client";
import Grid from "@mui/material/Grid2"; // Usamos Grid2 según tu versión avanzada
import React from "react";
import Chart from "@organisms/Dashboard/Chart";
import DashboardHeader from "@organisms/Dashboard/DashboardHeader";
import RecentTransactions from "@organisms/Dashboard/RecentTransactions";
import Sidebar from "@organisms/Dashboard/Sidebar";
import StatCard from "@organisms/Dashboard/StatCard";

const salesData = [
{ name: "Ene", total: 4000 },
{ name: "Feb", total: 3000 },
{ name: "Mar", total: 5000 },
{ name: "Abr", total: 4500 },
{ name: "May", total: 6000 },
{ name: "Jun", total: 5500 },
];

const recentTransactions = [
{ id: 1, customer: "Cliente 1", products: 3, total: 150.5, date: "2023-06-01" },
{ id: 2, customer: "Cliente 2", products: 2, total: 75.2, date: "2023-06-02" },
{ id: 3, customer: "Cliente 3", products: 5, total: 220.0, date: "2023-06-03" },
{ id: 4, customer: "Cliente 4", products: 1, total: 30.99, date: "2023-06-04" },
{ id: 5, customer: "Cliente 5", products: 4, total: 180.75, date: "2023-06-05" },
];

const Dashboard: React.FC = () => {
return (
<div className="flex">
<Sidebar />
<div className="flex-1">
<DashboardHeader />
<div className="p-4">
<Grid container spacing={3}>
{/* Tarjetas de Estadísticas */}
<Grid size={{ xs: 12, sm: 6, md: 3 }}>
<StatCard
title="Ventas Totales"
value="$45,231.89"
change="+20.1% respecto al mes anterior"
icon="AttachMoney"
/>
</Grid>
<Grid size={{ xs: 12, sm: 6, md: 3 }}>
<StatCard
title="Transacciones"
value="2,350"
change="+180.1% respecto al mes anterior"
icon="ShoppingCart"
/>
</Grid>
<Grid size={{ xs: 12, sm: 6, md: 3 }}>
<StatCard
title="Clientes Activos"
value="573"
change="+201 desde la última semana"
icon="People"
/>
</Grid>
<Grid size={{ xs: 12, sm: 6, md: 3 }}>
<StatCard
title="Tasa de Conversión"
value="88.6%"
change="+2.2% respecto al mes anterior"
icon="TrendingUp"
/>
</Grid>

{/* Gráfico */}
<Grid size={{ xs: 12, md: 8 }}>
<Chart data={salesData} />
</Grid>

{/* Transacciones Recientes */}
<Grid size={{ xs: 12, md: 8 }}>
<RecentTransactions transactions={recentTransactions} />
</Grid>
</Grid>
</div>
</div>
</div>
);
};

export default Dashboard;
46 changes: 46 additions & 0 deletions app/account/login/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
"use client";
import React, { useState } from "react";
import { useTranslation } from "react-i18next";
import ForgotPasswordForm from "@organisms/Auth/ForgotPasswordForm";
import LoginForm from "@organisms/Auth/LoginForm";

const LoginPage: React.FC = () => {
const { t } = useTranslation();
const [showForgotPassword, setShowForgotPassword] = useState(false); // Nuevo estado para alternar entre Login y Recuperación de contraseña

return (
<div className="flex min-h-screen items-center justify-center bg-gradient-to-r from-blue-900 to-blue-700">
<div className="w-full max-w-md rounded-lg bg-white p-10 shadow-lg">
{showForgotPassword ? (
<>
<h2 className="mb-8 text-center text-4xl font-bold text-blue-900">{t("lbl_reset_password")}</h2>
<ForgotPasswordForm />
<div className="mt-4 text-center">
<button
onClick={() => setShowForgotPassword(false)} // Permitir volver al formulario de Login
className="text-sm text-blue-600 hover:underline"
>
{t("msj_back_to_login")}
</button>
</div>
</>
) : (
<>
<h2 className="mb-8 text-center text-4xl font-bold text-blue-900">{t("lbl_login")}</h2>
<LoginForm />
<div className="mt-4 text-center">
<button
onClick={() => setShowForgotPassword(true)} // Mostrar el formulario de recuperación de contraseña
className="text-sm text-blue-600 hover:underline"
>
{t("msj_forgot_password")}
</button>
</div>
</>
)}
</div>
</div>
);
};

export default LoginPage;
4 changes: 3 additions & 1 deletion app/api/health/route.ts
Original file line number Diff line number Diff line change
@@ -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" },
})
}
12 changes: 12 additions & 0 deletions app/home/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import React from "react"
import PreCheckout from "@app/selfcheckout/precheckout/page"

const HomeAfterLogin: React.FC = () => {
return (
<div className="min-h-screen bg-gray-100 p-6">
<PreCheckout />
</div>
)
}

export default HomeAfterLogin
12 changes: 9 additions & 3 deletions app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
import "styles/tailwind.css"
import React from "react";
import "@package/styles/tailwind.css";
import Navbar from "@organisms/Navbar";


export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html lang="en">
<body>{children}</body>
<body>
<Navbar />
<main>{children}</main>
</body>
</html>
)
);
}
Loading