From cbc48cfe2664124209f36cb659a21981c565418c Mon Sep 17 00:00:00 2001 From: Consultoria AS Date: Thu, 22 Jan 2026 01:56:17 +0000 Subject: [PATCH] feat: add Next.js frontend base structure Co-Authored-By: Claude Opus 4.5 --- apps/web/app/globals.css | 59 +++++++++++++++++++++++++++++++++++ apps/web/app/layout.tsx | 22 +++++++++++++ apps/web/app/page.tsx | 61 +++++++++++++++++++++++++++++++++++++ apps/web/next.config.js | 9 ++++++ apps/web/package.json | 45 +++++++++++++++++++++++++++ apps/web/postcss.config.js | 6 ++++ apps/web/tailwind.config.ts | 56 ++++++++++++++++++++++++++++++++++ apps/web/tsconfig.json | 21 +++++++++++++ 8 files changed, 279 insertions(+) create mode 100644 apps/web/app/globals.css create mode 100644 apps/web/app/layout.tsx create mode 100644 apps/web/app/page.tsx create mode 100644 apps/web/next.config.js create mode 100644 apps/web/package.json create mode 100644 apps/web/postcss.config.js create mode 100644 apps/web/tailwind.config.ts create mode 100644 apps/web/tsconfig.json diff --git a/apps/web/app/globals.css b/apps/web/app/globals.css new file mode 100644 index 0000000..da05f6a --- /dev/null +++ b/apps/web/app/globals.css @@ -0,0 +1,59 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; + +@layer base { + :root { + --background: 0 0% 100%; + --foreground: 222.2 84% 4.9%; + --card: 0 0% 100%; + --card-foreground: 222.2 84% 4.9%; + --primary: 221.2 83.2% 53.3%; + --primary-foreground: 210 40% 98%; + --secondary: 210 40% 96.1%; + --secondary-foreground: 222.2 47.4% 11.2%; + --muted: 210 40% 96.1%; + --muted-foreground: 215.4 16.3% 46.9%; + --accent: 210 40% 96.1%; + --accent-foreground: 222.2 47.4% 11.2%; + --destructive: 0 84.2% 60.2%; + --destructive-foreground: 210 40% 98%; + --success: 142.1 76.2% 36.3%; + --success-foreground: 355.7 100% 97.3%; + --border: 214.3 31.8% 91.4%; + --input: 214.3 31.8% 91.4%; + --ring: 221.2 83.2% 53.3%; + --radius: 0.5rem; + } + + .dark { + --background: 0 0% 3.9%; + --foreground: 0 0% 98%; + --card: 0 0% 3.9%; + --card-foreground: 0 0% 98%; + --primary: 187.2 85.7% 53.3%; + --primary-foreground: 222.2 84% 4.9%; + --secondary: 0 0% 14.9%; + --secondary-foreground: 0 0% 98%; + --muted: 0 0% 14.9%; + --muted-foreground: 0 0% 63.9%; + --accent: 0 0% 14.9%; + --accent-foreground: 0 0% 98%; + --destructive: 0 62.8% 30.6%; + --destructive-foreground: 0 0% 98%; + --success: 142.1 70.6% 45.3%; + --success-foreground: 144.9 80.4% 10%; + --border: 0 0% 14.9%; + --input: 0 0% 14.9%; + --ring: 187.2 85.7% 53.3%; + } +} + +@layer base { + * { + @apply border-border; + } + body { + @apply bg-background text-foreground; + } +} diff --git a/apps/web/app/layout.tsx b/apps/web/app/layout.tsx new file mode 100644 index 0000000..30bd37a --- /dev/null +++ b/apps/web/app/layout.tsx @@ -0,0 +1,22 @@ +import type { Metadata } from 'next'; +import { Inter } from 'next/font/google'; +import './globals.css'; + +const inter = Inter({ subsets: ['latin'] }); + +export const metadata: Metadata = { + title: 'Horux360 - Análisis Financiero', + description: 'Plataforma de análisis financiero y gestión fiscal para empresas mexicanas', +}; + +export default function RootLayout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + + {children} + + ); +} diff --git a/apps/web/app/page.tsx b/apps/web/app/page.tsx new file mode 100644 index 0000000..cae82ae --- /dev/null +++ b/apps/web/app/page.tsx @@ -0,0 +1,61 @@ +import Link from 'next/link'; + +export default function Home() { + return ( +
+ + +
+

+ Controla tus finanzas con{' '} + inteligencia +

+

+ La plataforma de análisis financiero para empresas mexicanas más moderna. + Dashboard en tiempo real, control de IVA/ISR, y mucho más. +

+ + Prueba gratis 14 días + +
+ +
+
+ {[ + { title: 'Dashboard', desc: 'KPIs en tiempo real' }, + { title: 'Control IVA/ISR', desc: 'Cálculo automático' }, + { title: 'Conciliación', desc: 'Bancaria inteligente' }, + { title: 'Alertas', desc: 'Fiscales proactivas' }, + ].map((feature) => ( +
+

{feature.title}

+

{feature.desc}

+
+ ))} +
+
+
+ ); +} diff --git a/apps/web/next.config.js b/apps/web/next.config.js new file mode 100644 index 0000000..94efb82 --- /dev/null +++ b/apps/web/next.config.js @@ -0,0 +1,9 @@ +/** @type {import('next').NextConfig} */ +const nextConfig = { + transpilePackages: ['@horux/shared'], + experimental: { + typedRoutes: true, + }, +}; + +module.exports = nextConfig; diff --git a/apps/web/package.json b/apps/web/package.json new file mode 100644 index 0000000..919ae8c --- /dev/null +++ b/apps/web/package.json @@ -0,0 +1,45 @@ +{ + "name": "@horux/web", + "version": "0.0.1", + "private": true, + "scripts": { + "dev": "next dev", + "build": "next build", + "start": "next start", + "lint": "next lint" + }, + "dependencies": { + "@horux/shared": "workspace:*", + "@radix-ui/react-avatar": "^1.1.0", + "@radix-ui/react-dialog": "^1.1.0", + "@radix-ui/react-dropdown-menu": "^2.1.0", + "@radix-ui/react-label": "^2.1.0", + "@radix-ui/react-select": "^2.1.0", + "@radix-ui/react-separator": "^1.1.0", + "@radix-ui/react-slot": "^1.1.0", + "@radix-ui/react-tabs": "^1.1.0", + "@radix-ui/react-toast": "^1.2.0", + "@radix-ui/react-tooltip": "^1.1.0", + "@tanstack/react-query": "^5.60.0", + "axios": "^1.7.0", + "class-variance-authority": "^0.7.0", + "clsx": "^2.1.0", + "lucide-react": "^0.460.0", + "next": "^14.2.0", + "react": "^18.3.0", + "react-dom": "^18.3.0", + "react-hook-form": "^7.53.0", + "tailwind-merge": "^2.5.0", + "zod": "^3.23.0", + "zustand": "^5.0.0" + }, + "devDependencies": { + "@types/node": "^22.0.0", + "@types/react": "^18.3.0", + "@types/react-dom": "^18.3.0", + "autoprefixer": "^10.4.0", + "postcss": "^8.4.0", + "tailwindcss": "^3.4.0", + "typescript": "^5.3.0" + } +} diff --git a/apps/web/postcss.config.js b/apps/web/postcss.config.js new file mode 100644 index 0000000..12a703d --- /dev/null +++ b/apps/web/postcss.config.js @@ -0,0 +1,6 @@ +module.exports = { + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, +}; diff --git a/apps/web/tailwind.config.ts b/apps/web/tailwind.config.ts new file mode 100644 index 0000000..c5b2b94 --- /dev/null +++ b/apps/web/tailwind.config.ts @@ -0,0 +1,56 @@ +import type { Config } from 'tailwindcss'; + +const config: Config = { + darkMode: ['class'], + content: [ + './app/**/*.{js,ts,jsx,tsx,mdx}', + './components/**/*.{js,ts,jsx,tsx,mdx}', + ], + theme: { + extend: { + colors: { + border: 'hsl(var(--border))', + input: 'hsl(var(--input))', + ring: 'hsl(var(--ring))', + background: 'hsl(var(--background))', + foreground: 'hsl(var(--foreground))', + primary: { + DEFAULT: 'hsl(var(--primary))', + foreground: 'hsl(var(--primary-foreground))', + }, + secondary: { + DEFAULT: 'hsl(var(--secondary))', + foreground: 'hsl(var(--secondary-foreground))', + }, + destructive: { + DEFAULT: 'hsl(var(--destructive))', + foreground: 'hsl(var(--destructive-foreground))', + }, + muted: { + DEFAULT: 'hsl(var(--muted))', + foreground: 'hsl(var(--muted-foreground))', + }, + accent: { + DEFAULT: 'hsl(var(--accent))', + foreground: 'hsl(var(--accent-foreground))', + }, + card: { + DEFAULT: 'hsl(var(--card))', + foreground: 'hsl(var(--card-foreground))', + }, + success: { + DEFAULT: 'hsl(var(--success))', + foreground: 'hsl(var(--success-foreground))', + }, + }, + borderRadius: { + lg: 'var(--radius)', + md: 'calc(var(--radius) - 2px)', + sm: 'calc(var(--radius) - 4px)', + }, + }, + }, + plugins: [], +}; + +export default config; diff --git a/apps/web/tsconfig.json b/apps/web/tsconfig.json new file mode 100644 index 0000000..ff1edba --- /dev/null +++ b/apps/web/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "target": "ES2022", + "lib": ["dom", "dom.iterable", "ES2022"], + "allowJs": true, + "skipLibCheck": true, + "strict": true, + "noEmit": true, + "esModuleInterop": true, + "module": "esnext", + "moduleResolution": "bundler", + "resolveJsonModule": true, + "isolatedModules": true, + "jsx": "preserve", + "incremental": true, + "plugins": [{"name": "next"}], + "paths": {"@/*": ["./*"]} + }, + "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], + "exclude": ["node_modules"] +}