From 794a659369301e56e297aefc5ffb7d70e3ed5344 Mon Sep 17 00:00:00 2001 From: Emmanuel Rojas Date: Fri, 2 Oct 2026 15:47:34 -0500 Subject: [PATCH] refactor: reorganizar modulos dentro de app Coloca las secciones, datos, componentes, servicios y tipos dentro de sus dominios de app y normaliza los imports con el alias @. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/app/blog/BlogPage.tsx | 4 +-- src/app/blog/[slug]/ArticlePage.tsx | 6 ++-- src/app/blog/[slug]/page.tsx | 4 +-- src/app/blog/loading.tsx | 2 +- src/{ => app/blog}/services/blog.ts | 16 ++-------- src/app/blog/types/blog.ts | 12 +++++++ src/{ => app}/components/AppShell.tsx | 2 +- src/{ => app}/components/Button.tsx | 0 src/{ => app}/components/ContactModal.tsx | 2 +- src/{ => app}/components/CookieBanner.tsx | 2 +- src/{ => app}/components/FloatingButtons.tsx | 2 +- src/{ => app}/components/Footer.tsx | 4 +-- src/{ => app}/components/Loader.tsx | 0 src/{ => app}/components/Navbar.tsx | 2 +- src/{ => app}/components/ScrollProgress.tsx | 0 src/{ => app}/components/ScrollToTop.tsx | 0 src/{ => app}/contexts/ContactContext.tsx | 2 +- src/app/{ => home}/HomePage.tsx | 32 +++++++++---------- src/{ => app/home}/data/anatomyData.ts | 0 src/{ => app/home}/data/faqData.ts | 0 src/{ => app/home}/data/machineryData.ts | 0 src/{ => app/home}/data/navigationData.ts | 0 .../home}/data/platformAdvantageData.ts | 0 src/{ => app/home}/data/principlesData.ts | 0 src/{ => app/home}/data/processData.ts | 0 src/{ => app/home}/data/servicesData.ts | 2 +- src/{ => app/home}/data/sobreNosotrosData.ts | 0 src/{ => app/home}/data/stackData.ts | 0 src/{ => app/home}/sections/Anatomy.tsx | 4 +-- src/{ => app/home}/sections/Clients.tsx | 8 ++--- .../home}/sections/ContactSection.tsx | 2 +- src/{ => app/home}/sections/CtaBanner.tsx | 4 +-- src/{ => app/home}/sections/FAQ.tsx | 4 +-- src/{ => app/home}/sections/Hero.tsx | 6 ++-- src/{ => app/home}/sections/Machinery.tsx | 4 +-- src/{ => app/home}/sections/Partners.tsx | 8 ++--- .../home}/sections/PlatformAdvantage.tsx | 4 +-- src/{ => app/home}/sections/Portfolio.tsx | 8 ++--- src/{ => app/home}/sections/Principles.tsx | 4 +-- src/{ => app/home}/sections/Problem.tsx | 2 +- src/{ => app/home}/sections/Process.tsx | 4 +-- src/{ => app/home}/sections/Services.tsx | 4 +-- src/{ => app/home}/sections/Showcase.tsx | 8 ++--- src/{ => app/home}/sections/Stack.tsx | 4 +-- src/{ => app/home}/sections/SystemMap.tsx | 0 src/{ => app/home}/sections/Testimonial.tsx | 6 ++-- src/{ => app/home}/services/companies.ts | 10 ++---- src/{ => app/home}/services/techPartners.ts | 13 ++------ src/{ => app/home}/services/testimonials.ts | 9 ++---- src/app/home/types/companies.ts | 6 ++++ src/app/home/types/techPartners.ts | 9 ++++++ src/app/home/types/testimonials.ts | 5 +++ src/{ => app}/hooks/useScrollSnap.ts | 0 src/app/layout.tsx | 2 +- src/app/loading.tsx | 2 +- src/app/page.tsx | 2 +- src/app/portafolio/PortafolioPage.tsx | 6 ++-- src/app/portafolio/loading.tsx | 2 +- src/app/portafolio/services/portfolio.ts | 11 +++++++ .../portafolio/types}/portfolio.ts | 11 ------- src/app/privacidad/loading.tsx | 2 +- src/app/productos/ProductosPage.tsx | 6 ++-- src/app/productos/loading.tsx | 2 +- src/{ => app/productos}/services/products.ts | 12 ++----- src/app/productos/types/products.ts | 8 +++++ src/{ => app}/services/api.ts | 0 src/app/sitemap.ts | 4 +-- src/app/sobre-nosotros/SobreNosotrosPage.tsx | 6 ++-- src/app/sobre-nosotros/loading.tsx | 2 +- src/{ => app/sobre-nosotros}/services/team.ts | 19 ++--------- src/app/sobre-nosotros/types/team.ts | 15 +++++++++ src/{types/index.ts => app/types/ui.ts} | 0 tsconfig.json | 2 +- 73 files changed, 172 insertions(+), 172 deletions(-) rename src/{ => app/blog}/services/blog.ts (63%) create mode 100644 src/app/blog/types/blog.ts rename src/{ => app}/components/AppShell.tsx (92%) rename src/{ => app}/components/Button.tsx (100%) rename src/{ => app}/components/ContactModal.tsx (99%) rename src/{ => app}/components/CookieBanner.tsx (97%) rename src/{ => app}/components/FloatingButtons.tsx (99%) rename src/{ => app}/components/Footer.tsx (98%) rename src/{ => app}/components/Loader.tsx (100%) rename src/{ => app}/components/Navbar.tsx (98%) rename src/{ => app}/components/ScrollProgress.tsx (100%) rename src/{ => app}/components/ScrollToTop.tsx (100%) rename src/{ => app}/contexts/ContactContext.tsx (90%) rename src/app/{ => home}/HomePage.tsx (50%) rename src/{ => app/home}/data/anatomyData.ts (100%) rename src/{ => app/home}/data/faqData.ts (100%) rename src/{ => app/home}/data/machineryData.ts (100%) rename src/{ => app/home}/data/navigationData.ts (100%) rename src/{ => app/home}/data/platformAdvantageData.ts (100%) rename src/{ => app/home}/data/principlesData.ts (100%) rename src/{ => app/home}/data/processData.ts (100%) rename src/{ => app/home}/data/servicesData.ts (96%) rename src/{ => app/home}/data/sobreNosotrosData.ts (100%) rename src/{ => app/home}/data/stackData.ts (100%) rename src/{ => app/home}/sections/Anatomy.tsx (96%) rename src/{ => app/home}/sections/Clients.tsx (92%) rename src/{ => app/home}/sections/ContactSection.tsx (99%) rename src/{ => app/home}/sections/CtaBanner.tsx (95%) rename src/{ => app/home}/sections/FAQ.tsx (97%) rename src/{ => app/home}/sections/Hero.tsx (95%) rename src/{ => app/home}/sections/Machinery.tsx (98%) rename src/{ => app/home}/sections/Partners.tsx (94%) rename src/{ => app/home}/sections/PlatformAdvantage.tsx (97%) rename src/{ => app/home}/sections/Portfolio.tsx (96%) rename src/{ => app/home}/sections/Principles.tsx (96%) rename src/{ => app/home}/sections/Problem.tsx (98%) rename src/{ => app/home}/sections/Process.tsx (95%) rename src/{ => app/home}/sections/Services.tsx (97%) rename src/{ => app/home}/sections/Showcase.tsx (96%) rename src/{ => app/home}/sections/Stack.tsx (96%) rename src/{ => app/home}/sections/SystemMap.tsx (100%) rename src/{ => app/home}/sections/Testimonial.tsx (96%) rename src/{ => app/home}/services/companies.ts (62%) rename src/{ => app/home}/services/techPartners.ts (55%) rename src/{ => app/home}/services/testimonials.ts (84%) create mode 100644 src/app/home/types/companies.ts create mode 100644 src/app/home/types/techPartners.ts create mode 100644 src/app/home/types/testimonials.ts rename src/{ => app}/hooks/useScrollSnap.ts (100%) create mode 100644 src/app/portafolio/services/portfolio.ts rename src/{services => app/portafolio/types}/portfolio.ts (65%) rename src/{ => app/productos}/services/products.ts (56%) create mode 100644 src/app/productos/types/products.ts rename src/{ => app}/services/api.ts (100%) rename src/{ => app/sobre-nosotros}/services/team.ts (67%) create mode 100644 src/app/sobre-nosotros/types/team.ts rename src/{types/index.ts => app/types/ui.ts} (100%) diff --git a/src/app/blog/BlogPage.tsx b/src/app/blog/BlogPage.tsx index 5f1f5f8..3b0e463 100644 --- a/src/app/blog/BlogPage.tsx +++ b/src/app/blog/BlogPage.tsx @@ -2,8 +2,8 @@ import Link from 'next/link'; import { useState, useEffect } from 'react'; import { motion } from 'framer-motion'; -import Loader from '../../components/Loader'; -import { useBlogPosts } from '../../services/blog'; +import Loader from '@/app/components/Loader'; +import { useBlogPosts } from '@/app/blog/services/blog'; const fadeUp = { hidden: { opacity: 0, y: 28 }, diff --git a/src/app/blog/[slug]/ArticlePage.tsx b/src/app/blog/[slug]/ArticlePage.tsx index 2492afe..f0e8495 100644 --- a/src/app/blog/[slug]/ArticlePage.tsx +++ b/src/app/blog/[slug]/ArticlePage.tsx @@ -3,9 +3,9 @@ import { useEffect } from 'react'; import { useParams, useRouter } from 'next/navigation'; import Link from 'next/link'; import { motion } from 'framer-motion'; -import { useBlogPost } from '../../../services/blog'; -import { assetUrl } from '../../../services/api'; -import Loader from '../../../components/Loader'; +import { useBlogPost } from '@/app/blog/services/blog'; +import { assetUrl } from '@/app/services/api'; +import Loader from '@/app/components/Loader'; function renderContent(content: string) { return content.split('\n').map((line, i) => { diff --git a/src/app/blog/[slug]/page.tsx b/src/app/blog/[slug]/page.tsx index c887f67..bc2d48c 100644 --- a/src/app/blog/[slug]/page.tsx +++ b/src/app/blog/[slug]/page.tsx @@ -1,8 +1,8 @@ import type { Metadata } from 'next'; import { notFound } from 'next/navigation'; import ArticlePage from './ArticlePage'; -import { API_URL, assetUrl } from '../../../services/api'; -import type { BlogPost } from '../../../services/blog'; +import { API_URL, assetUrl } from '@/app/services/api'; +import type { BlogPost } from '@/app/blog/types/blog'; const BASE_URL = 'https://rynext.com.mx'; diff --git a/src/app/blog/loading.tsx b/src/app/blog/loading.tsx index 73923f6..ee872bc 100644 --- a/src/app/blog/loading.tsx +++ b/src/app/blog/loading.tsx @@ -1,4 +1,4 @@ -import Loader from '../../components/Loader'; +import Loader from '@/app/components/Loader'; export default function Loading() { return ( diff --git a/src/services/blog.ts b/src/app/blog/services/blog.ts similarity index 63% rename from src/services/blog.ts rename to src/app/blog/services/blog.ts index d751023..6db970d 100644 --- a/src/services/blog.ts +++ b/src/app/blog/services/blog.ts @@ -1,18 +1,6 @@ import { useQuery } from '@tanstack/react-query'; -import { apiFetch } from './api'; - -export interface BlogPost { - id: string; - title: string; - slug: string; - summary: string; - content: string; - category: string; - imageUrl?: string; - authorName?: string; - isPublished: boolean; - publishedAt?: string; -} +import { apiFetch } from '@/app/services/api'; +import type { BlogPost } from '@/app/blog/types/blog'; export function useBlogPosts() { return useQuery({ diff --git a/src/app/blog/types/blog.ts b/src/app/blog/types/blog.ts new file mode 100644 index 0000000..2c7b043 --- /dev/null +++ b/src/app/blog/types/blog.ts @@ -0,0 +1,12 @@ +export interface BlogPost { + id: string; + title: string; + slug: string; + summary: string; + content: string; + category: string; + imageUrl?: string; + authorName?: string; + isPublished: boolean; + publishedAt?: string; +} diff --git a/src/components/AppShell.tsx b/src/app/components/AppShell.tsx similarity index 92% rename from src/components/AppShell.tsx rename to src/app/components/AppShell.tsx index 68a8190..b502882 100644 --- a/src/components/AppShell.tsx +++ b/src/app/components/AppShell.tsx @@ -1,5 +1,5 @@ 'use client'; -import { ContactProvider } from '../contexts/ContactContext'; +import { ContactProvider } from '@/app/contexts/ContactContext'; import { ScrollProgress } from './ScrollProgress'; import { ScrollToTop } from './ScrollToTop'; import { Navbar } from './Navbar'; diff --git a/src/components/Button.tsx b/src/app/components/Button.tsx similarity index 100% rename from src/components/Button.tsx rename to src/app/components/Button.tsx diff --git a/src/components/ContactModal.tsx b/src/app/components/ContactModal.tsx similarity index 99% rename from src/components/ContactModal.tsx rename to src/app/components/ContactModal.tsx index e3eba89..62b03b8 100644 --- a/src/components/ContactModal.tsx +++ b/src/app/components/ContactModal.tsx @@ -1,7 +1,7 @@ 'use client'; import { useState } from 'react'; import { X, Send, CheckCircle, AlertCircle, Loader2 } from 'lucide-react'; -import type { ModalProps } from '../types'; +import type { ModalProps } from '@/app/types/ui'; const API_URL = process.env.NEXT_PUBLIC_API_URL ?? 'https://localhost:7001'; diff --git a/src/components/CookieBanner.tsx b/src/app/components/CookieBanner.tsx similarity index 97% rename from src/components/CookieBanner.tsx rename to src/app/components/CookieBanner.tsx index b90005f..6654e1b 100644 --- a/src/components/CookieBanner.tsx +++ b/src/app/components/CookieBanner.tsx @@ -1,6 +1,6 @@ 'use client'; import { useState, useEffect } from 'react'; -import type { ThemeProps } from '../types'; +import type { ThemeProps } from '@/app/types/ui'; export const CookieBanner = ({ isNavyBg }: ThemeProps) => { const [visible, setVisible] = useState(false); diff --git a/src/components/FloatingButtons.tsx b/src/app/components/FloatingButtons.tsx similarity index 99% rename from src/components/FloatingButtons.tsx rename to src/app/components/FloatingButtons.tsx index d748ada..5a9e2ff 100644 --- a/src/components/FloatingButtons.tsx +++ b/src/app/components/FloatingButtons.tsx @@ -1,7 +1,7 @@ 'use client'; import { ArrowUp } from 'lucide-react'; import { motion, AnimatePresence } from 'framer-motion'; -import type { ThemeProps } from '../types'; +import type { ThemeProps } from '@/app/types/ui'; import { type Dispatch, type SetStateAction, useState, useEffect } from 'react'; const WHATSAPP_NUMBER = '529984814889'; diff --git a/src/components/Footer.tsx b/src/app/components/Footer.tsx similarity index 98% rename from src/components/Footer.tsx rename to src/app/components/Footer.tsx index 23ed057..2837480 100644 --- a/src/components/Footer.tsx +++ b/src/app/components/Footer.tsx @@ -2,8 +2,8 @@ import { Mail, MapPin, MessageCircle } from "lucide-react"; import { FaFacebookF, FaLinkedinIn, FaMapMarkerAlt } from "react-icons/fa"; import Link from "next/link"; -import type { ThemeProps } from "../types"; -import { pageLinks } from "../data/navigationData"; +import type { ThemeProps } from "@/app/types/ui"; +import { pageLinks } from '@/app/home/data/navigationData'; import { FaRegMessage } from "react-icons/fa6"; import { MdEmail } from "react-icons/md"; diff --git a/src/components/Loader.tsx b/src/app/components/Loader.tsx similarity index 100% rename from src/components/Loader.tsx rename to src/app/components/Loader.tsx diff --git a/src/components/Navbar.tsx b/src/app/components/Navbar.tsx similarity index 98% rename from src/components/Navbar.tsx rename to src/app/components/Navbar.tsx index 26f678f..abc03ee 100644 --- a/src/components/Navbar.tsx +++ b/src/app/components/Navbar.tsx @@ -5,7 +5,7 @@ import { Menu, X } from 'lucide-react'; import Link from 'next/link'; import { usePathname } from 'next/navigation'; import { Button } from './Button'; -import { pageLinks } from '../data/navigationData'; +import { pageLinks } from '@/app/home/data/navigationData'; export const Navbar = () => { const [scrolled, setScrolled] = useState(false); diff --git a/src/components/ScrollProgress.tsx b/src/app/components/ScrollProgress.tsx similarity index 100% rename from src/components/ScrollProgress.tsx rename to src/app/components/ScrollProgress.tsx diff --git a/src/components/ScrollToTop.tsx b/src/app/components/ScrollToTop.tsx similarity index 100% rename from src/components/ScrollToTop.tsx rename to src/app/components/ScrollToTop.tsx diff --git a/src/contexts/ContactContext.tsx b/src/app/contexts/ContactContext.tsx similarity index 90% rename from src/contexts/ContactContext.tsx rename to src/app/contexts/ContactContext.tsx index b840c27..daeefa9 100644 --- a/src/contexts/ContactContext.tsx +++ b/src/app/contexts/ContactContext.tsx @@ -1,6 +1,6 @@ 'use client'; import { createContext, useContext, useState } from 'react'; -import { ContactModal } from '../components/ContactModal'; +import { ContactModal } from '@/app/components/ContactModal'; interface ContactCtx { open: () => void; diff --git a/src/app/HomePage.tsx b/src/app/home/HomePage.tsx similarity index 50% rename from src/app/HomePage.tsx rename to src/app/home/HomePage.tsx index 649f526..409e034 100644 --- a/src/app/HomePage.tsx +++ b/src/app/home/HomePage.tsx @@ -1,32 +1,32 @@ "use client"; import { Suspense } from "react"; import dynamic from "next/dynamic"; -import { Hero } from "../sections/Hero"; -import { Problem } from "../sections/Problem"; -import { Machinery } from "../sections/Machinery"; -import { Showcase } from "../sections/Showcase"; -import { PlatformAdvantage } from "../sections/PlatformAdvantage"; -import { Services } from "../sections/Services"; -import { Testimonial } from "../sections/Testimonial"; -import { Anatomy } from "../sections/Anatomy"; -import { Process } from "../sections/Process"; -import { Principles } from "../sections/Principles"; -import { FAQ } from "../sections/FAQ"; -import { CtaBanner } from "../sections/CtaBanner"; -import { ContactSection } from "../sections/ContactSection"; +import { Hero } from '@/app/home/sections/Hero'; +import { Problem } from '@/app/home/sections/Problem'; +import { Machinery } from '@/app/home/sections/Machinery'; +import { Showcase } from '@/app/home/sections/Showcase'; +import { PlatformAdvantage } from '@/app/home/sections/PlatformAdvantage'; +import { Services } from '@/app/home/sections/Services'; +import { Testimonial } from '@/app/home/sections/Testimonial'; +import { Anatomy } from '@/app/home/sections/Anatomy'; +import { Process } from '@/app/home/sections/Process'; +import { Principles } from '@/app/home/sections/Principles'; +import { FAQ } from '@/app/home/sections/FAQ'; +import { CtaBanner } from '@/app/home/sections/CtaBanner'; +import { ContactSection } from '@/app/home/sections/ContactSection'; const Clients = dynamic( - () => import("../sections/Clients").then((m) => ({ default: m.Clients })), + () => import("@/app/home/sections/Clients").then((m) => ({ default: m.Clients })), { ssr: false }, ); const Partners = dynamic( - () => import("../sections/Partners").then((m) => ({ default: m.Partners })), + () => import("@/app/home/sections/Partners").then((m) => ({ default: m.Partners })), { ssr: false }, ); const Portfolio = dynamic( - () => import("../sections/Portfolio").then((m) => ({ default: m.Portfolio })), + () => import("@/app/home/sections/Portfolio").then((m) => ({ default: m.Portfolio })), { ssr: false }, ); diff --git a/src/data/anatomyData.ts b/src/app/home/data/anatomyData.ts similarity index 100% rename from src/data/anatomyData.ts rename to src/app/home/data/anatomyData.ts diff --git a/src/data/faqData.ts b/src/app/home/data/faqData.ts similarity index 100% rename from src/data/faqData.ts rename to src/app/home/data/faqData.ts diff --git a/src/data/machineryData.ts b/src/app/home/data/machineryData.ts similarity index 100% rename from src/data/machineryData.ts rename to src/app/home/data/machineryData.ts diff --git a/src/data/navigationData.ts b/src/app/home/data/navigationData.ts similarity index 100% rename from src/data/navigationData.ts rename to src/app/home/data/navigationData.ts diff --git a/src/data/platformAdvantageData.ts b/src/app/home/data/platformAdvantageData.ts similarity index 100% rename from src/data/platformAdvantageData.ts rename to src/app/home/data/platformAdvantageData.ts diff --git a/src/data/principlesData.ts b/src/app/home/data/principlesData.ts similarity index 100% rename from src/data/principlesData.ts rename to src/app/home/data/principlesData.ts diff --git a/src/data/processData.ts b/src/app/home/data/processData.ts similarity index 100% rename from src/data/processData.ts rename to src/app/home/data/processData.ts diff --git a/src/data/servicesData.ts b/src/app/home/data/servicesData.ts similarity index 96% rename from src/data/servicesData.ts rename to src/app/home/data/servicesData.ts index 9f37bac..c253b23 100644 --- a/src/data/servicesData.ts +++ b/src/app/home/data/servicesData.ts @@ -1,5 +1,5 @@ import { Code, Cloud, ShieldCheck, TrendingUp } from 'lucide-react'; -import type { ServiceItem } from '../types'; +import type { ServiceItem } from '@/app/types/ui'; export const servicesData: ServiceItem[] = [ { diff --git a/src/data/sobreNosotrosData.ts b/src/app/home/data/sobreNosotrosData.ts similarity index 100% rename from src/data/sobreNosotrosData.ts rename to src/app/home/data/sobreNosotrosData.ts diff --git a/src/data/stackData.ts b/src/app/home/data/stackData.ts similarity index 100% rename from src/data/stackData.ts rename to src/app/home/data/stackData.ts diff --git a/src/sections/Anatomy.tsx b/src/app/home/sections/Anatomy.tsx similarity index 96% rename from src/sections/Anatomy.tsx rename to src/app/home/sections/Anatomy.tsx index 4cce7c0..87033c8 100644 --- a/src/sections/Anatomy.tsx +++ b/src/app/home/sections/Anatomy.tsx @@ -1,7 +1,7 @@ 'use client'; import { motion } from 'framer-motion'; -import type { ThemeProps } from '../types'; -import { anatomyLayers as layers } from '../data/anatomyData'; +import type { ThemeProps } from '@/app/types/ui'; +import { anatomyLayers as layers } from '@/app/home/data/anatomyData'; export const Anatomy = ({ isNavyBg }: ThemeProps) => { const bg = isNavyBg ? '#0d1117' : '#f5f5f3'; diff --git a/src/sections/Clients.tsx b/src/app/home/sections/Clients.tsx similarity index 92% rename from src/sections/Clients.tsx rename to src/app/home/sections/Clients.tsx index 11b428f..8dd2e22 100644 --- a/src/sections/Clients.tsx +++ b/src/app/home/sections/Clients.tsx @@ -1,10 +1,10 @@ "use client"; import { useState, useEffect } from "react"; import { motion } from "framer-motion"; -import Loader from "../components/Loader"; -import { useCompanies } from "../services/companies"; -import { assetUrl } from "../services/api"; -import type { ThemeProps } from "../types"; +import Loader from '@/app/components/Loader'; +import { useCompanies } from "@/app/home/services/companies"; +import { assetUrl } from "@/app/services/api"; +import type { ThemeProps } from "@/app/types/ui"; function ClientsInner({ isNavyBg }: ThemeProps) { const { data, isLoading } = useCompanies(); diff --git a/src/sections/ContactSection.tsx b/src/app/home/sections/ContactSection.tsx similarity index 99% rename from src/sections/ContactSection.tsx rename to src/app/home/sections/ContactSection.tsx index 135a561..23f138b 100644 --- a/src/sections/ContactSection.tsx +++ b/src/app/home/sections/ContactSection.tsx @@ -2,7 +2,7 @@ import { useState } from 'react'; import { motion } from 'framer-motion'; import { Send, CheckCircle, AlertCircle, Loader2 } from 'lucide-react'; -import type { ThemeProps } from '../types'; +import type { ThemeProps } from '@/app/types/ui'; const API_URL = process.env.NEXT_PUBLIC_API_URL ?? 'https://localhost:7001'; diff --git a/src/sections/CtaBanner.tsx b/src/app/home/sections/CtaBanner.tsx similarity index 95% rename from src/sections/CtaBanner.tsx rename to src/app/home/sections/CtaBanner.tsx index 8194279..db0e601 100644 --- a/src/sections/CtaBanner.tsx +++ b/src/app/home/sections/CtaBanner.tsx @@ -1,8 +1,8 @@ "use client"; import { motion } from "framer-motion"; import { ArrowRight } from "lucide-react"; -import { Button } from "../components/Button"; -import type { ThemeProps } from "../types"; +import { Button } from '@/app/components/Button'; +import type { ThemeProps } from "@/app/types/ui"; export const CtaBanner = ({ isNavyBg }: ThemeProps) => { const scrollToContact = () => { diff --git a/src/sections/FAQ.tsx b/src/app/home/sections/FAQ.tsx similarity index 97% rename from src/sections/FAQ.tsx rename to src/app/home/sections/FAQ.tsx index 6102e0c..8b40568 100644 --- a/src/sections/FAQ.tsx +++ b/src/app/home/sections/FAQ.tsx @@ -2,8 +2,8 @@ import { useState } from 'react'; import { motion } from 'framer-motion'; import { Plus } from 'lucide-react'; -import type { ThemeProps } from '../types'; -import { faqs } from '../data/faqData'; +import type { ThemeProps } from '@/app/types/ui'; +import { faqs } from '@/app/home/data/faqData'; export const FAQ = ({ isNavyBg }: ThemeProps) => { const [open, setOpen] = useState(null); diff --git a/src/sections/Hero.tsx b/src/app/home/sections/Hero.tsx similarity index 95% rename from src/sections/Hero.tsx rename to src/app/home/sections/Hero.tsx index aed2705..246eced 100644 --- a/src/sections/Hero.tsx +++ b/src/app/home/sections/Hero.tsx @@ -1,10 +1,10 @@ 'use client'; import { motion } from 'framer-motion'; import { ArrowRight } from 'lucide-react'; -import type { ThemeProps } from '../types'; -import { Button } from '../components/Button'; +import type { ThemeProps } from '@/app/types/ui'; +import { Button } from '@/app/components/Button'; import { SystemMap } from './SystemMap'; -import { useContact } from '../contexts/ContactContext'; +import { useContact } from '@/app/contexts/ContactContext'; const ease = [0.22, 1, 0.36, 1] as const; diff --git a/src/sections/Machinery.tsx b/src/app/home/sections/Machinery.tsx similarity index 98% rename from src/sections/Machinery.tsx rename to src/app/home/sections/Machinery.tsx index eb68d47..a117c6e 100644 --- a/src/sections/Machinery.tsx +++ b/src/app/home/sections/Machinery.tsx @@ -1,8 +1,8 @@ 'use client'; import { useState } from 'react'; import { motion } from 'framer-motion'; -import type { ThemeProps } from '../types'; -import { machineryData } from '../data/machineryData'; +import type { ThemeProps } from '@/app/types/ui'; +import { machineryData } from '@/app/home/data/machineryData'; export const Machinery = ({ isNavyBg }: ThemeProps) => { const [hovered, setHovered] = useState(null); diff --git a/src/sections/Partners.tsx b/src/app/home/sections/Partners.tsx similarity index 94% rename from src/sections/Partners.tsx rename to src/app/home/sections/Partners.tsx index 7e04f3f..938a584 100644 --- a/src/sections/Partners.tsx +++ b/src/app/home/sections/Partners.tsx @@ -1,10 +1,10 @@ "use client"; import { useState, useEffect } from "react"; import { motion } from "framer-motion"; -import Loader from "../components/Loader"; -import { useTechPartners } from "../services/techPartners"; -import { assetUrl } from "../services/api"; -import type { ThemeProps } from "../types"; +import Loader from '@/app/components/Loader'; +import { useTechPartners } from "@/app/home/services/techPartners"; +import { assetUrl } from "@/app/services/api"; +import type { ThemeProps } from "@/app/types/ui"; function PartnersInner({ isNavyBg }: ThemeProps) { const { data, isLoading } = useTechPartners(); diff --git a/src/sections/PlatformAdvantage.tsx b/src/app/home/sections/PlatformAdvantage.tsx similarity index 97% rename from src/sections/PlatformAdvantage.tsx rename to src/app/home/sections/PlatformAdvantage.tsx index a8fd31d..097b97b 100644 --- a/src/sections/PlatformAdvantage.tsx +++ b/src/app/home/sections/PlatformAdvantage.tsx @@ -1,8 +1,8 @@ 'use client'; import { motion } from 'framer-motion'; import { X, Check } from 'lucide-react'; -import type { ThemeProps } from '../types'; -import { comparisonRows, proofCards } from '../data/platformAdvantageData'; +import type { ThemeProps } from '@/app/types/ui'; +import { comparisonRows, proofCards } from '@/app/home/data/platformAdvantageData'; export const PlatformAdvantage = ({ isNavyBg }: ThemeProps) => { return ( diff --git a/src/sections/Portfolio.tsx b/src/app/home/sections/Portfolio.tsx similarity index 96% rename from src/sections/Portfolio.tsx rename to src/app/home/sections/Portfolio.tsx index 27aa101..d189577 100644 --- a/src/sections/Portfolio.tsx +++ b/src/app/home/sections/Portfolio.tsx @@ -1,10 +1,10 @@ "use client"; import { useState, useEffect } from "react"; import { motion } from "framer-motion"; -import Loader from "../components/Loader"; -import { usePortfolio } from "../services/portfolio"; -import { assetUrl } from "../services/api"; -import type { ThemeProps } from "../types"; +import Loader from '@/app/components/Loader'; +import { usePortfolio } from "@/app/portafolio/services/portfolio"; +import { assetUrl } from "@/app/services/api"; +import type { ThemeProps } from "@/app/types/ui"; function PortfolioInner({ isNavyBg }: ThemeProps) { const { data, isLoading } = usePortfolio(); diff --git a/src/sections/Principles.tsx b/src/app/home/sections/Principles.tsx similarity index 96% rename from src/sections/Principles.tsx rename to src/app/home/sections/Principles.tsx index 76b229f..c8c88a1 100644 --- a/src/sections/Principles.tsx +++ b/src/app/home/sections/Principles.tsx @@ -1,7 +1,7 @@ 'use client'; import { motion } from 'framer-motion'; -import type { ThemeProps } from '../types'; -import { principles } from '../data/principlesData'; +import type { ThemeProps } from '@/app/types/ui'; +import { principles } from '@/app/home/data/principlesData'; export const Principles = ({ isNavyBg }: ThemeProps) => { const bg = isNavyBg ? '#0d1117' : '#f5f5f3'; diff --git a/src/sections/Problem.tsx b/src/app/home/sections/Problem.tsx similarity index 98% rename from src/sections/Problem.tsx rename to src/app/home/sections/Problem.tsx index a136bef..5b2d703 100644 --- a/src/sections/Problem.tsx +++ b/src/app/home/sections/Problem.tsx @@ -1,6 +1,6 @@ 'use client'; import { motion } from 'framer-motion'; -import type { ThemeProps } from '../types'; +import type { ThemeProps } from '@/app/types/ui'; export const Problem = ({ isNavyBg }: ThemeProps) => { const bg = isNavyBg ? '#0d1117' : '#f5f5f3'; diff --git a/src/sections/Process.tsx b/src/app/home/sections/Process.tsx similarity index 95% rename from src/sections/Process.tsx rename to src/app/home/sections/Process.tsx index 7c27b8b..6a67bdd 100644 --- a/src/sections/Process.tsx +++ b/src/app/home/sections/Process.tsx @@ -1,7 +1,7 @@ 'use client'; import { motion } from 'framer-motion'; -import type { ThemeProps } from '../types'; -import { processSteps as steps } from '../data/processData'; +import type { ThemeProps } from '@/app/types/ui'; +import { processSteps as steps } from '@/app/home/data/processData'; export const Process = ({ isNavyBg }: ThemeProps) => { const bg = isNavyBg ? '#001f5b' : '#ffffff'; diff --git a/src/sections/Services.tsx b/src/app/home/sections/Services.tsx similarity index 97% rename from src/sections/Services.tsx rename to src/app/home/sections/Services.tsx index 4ce2636..ff818c6 100644 --- a/src/sections/Services.tsx +++ b/src/app/home/sections/Services.tsx @@ -1,8 +1,8 @@ 'use client'; import { motion } from 'framer-motion'; import { Check } from 'lucide-react'; -import type { ThemeProps } from '../types'; -import { servicesData } from '../data/servicesData'; +import type { ThemeProps } from '@/app/types/ui'; +import { servicesData } from '@/app/home/data/servicesData'; export const Services = ({ isNavyBg }: ThemeProps) => { return ( diff --git a/src/sections/Showcase.tsx b/src/app/home/sections/Showcase.tsx similarity index 96% rename from src/sections/Showcase.tsx rename to src/app/home/sections/Showcase.tsx index 6f0c526..cb68050 100644 --- a/src/sections/Showcase.tsx +++ b/src/app/home/sections/Showcase.tsx @@ -1,9 +1,9 @@ "use client"; import { motion } from "framer-motion"; -import Loader from "../components/Loader"; -import { useProducts } from "../services/products"; -import { assetUrl } from "../services/api"; -import type { ThemeProps } from "../types"; +import Loader from '@/app/components/Loader'; +import { useProducts } from "@/app/productos/services/products"; +import { assetUrl } from "@/app/services/api"; +import type { ThemeProps } from "@/app/types/ui"; export const Showcase = ({ isNavyBg }: ThemeProps) => { const { data, isLoading } = useProducts(); diff --git a/src/sections/Stack.tsx b/src/app/home/sections/Stack.tsx similarity index 96% rename from src/sections/Stack.tsx rename to src/app/home/sections/Stack.tsx index 630ce3d..4c50577 100644 --- a/src/sections/Stack.tsx +++ b/src/app/home/sections/Stack.tsx @@ -1,7 +1,7 @@ 'use client'; import { motion } from 'framer-motion'; -import type { ThemeProps } from '../types'; -import { stackGroups } from '../data/stackData'; +import type { ThemeProps } from '@/app/types/ui'; +import { stackGroups } from '@/app/home/data/stackData'; export const Stack = ({ isNavyBg }: ThemeProps) => { const bg = isNavyBg ? '#0f1520' : '#f9f9f7'; diff --git a/src/sections/SystemMap.tsx b/src/app/home/sections/SystemMap.tsx similarity index 100% rename from src/sections/SystemMap.tsx rename to src/app/home/sections/SystemMap.tsx diff --git a/src/sections/Testimonial.tsx b/src/app/home/sections/Testimonial.tsx similarity index 96% rename from src/sections/Testimonial.tsx rename to src/app/home/sections/Testimonial.tsx index cd83690..35042f7 100644 --- a/src/sections/Testimonial.tsx +++ b/src/app/home/sections/Testimonial.tsx @@ -1,9 +1,9 @@ "use client"; import { useState, useEffect } from "react"; import { motion, AnimatePresence } from "framer-motion"; -import Loader from "../components/Loader"; -import { useTestimonials } from "../services/testimonials"; -import type { ThemeProps } from "../types"; +import Loader from '@/app/components/Loader'; +import { useTestimonials } from "@/app/home/services/testimonials"; +import type { ThemeProps } from "@/app/types/ui"; export const Testimonial = ({ isNavyBg }: ThemeProps) => { const { data, isLoading } = useTestimonials(); diff --git a/src/services/companies.ts b/src/app/home/services/companies.ts similarity index 62% rename from src/services/companies.ts rename to src/app/home/services/companies.ts index 31a8f31..a2a3d11 100644 --- a/src/services/companies.ts +++ b/src/app/home/services/companies.ts @@ -1,12 +1,6 @@ import { useQuery } from '@tanstack/react-query'; -import { apiFetch } from './api'; - -export interface Company { - id: string; - name: string; - logoUrl?: string; - showInLanding?: boolean; -} +import { apiFetch } from '@/app/services/api'; +import type { Company } from '@/app/home/types/companies'; export function useCompanies() { return useQuery({ diff --git a/src/services/techPartners.ts b/src/app/home/services/techPartners.ts similarity index 55% rename from src/services/techPartners.ts rename to src/app/home/services/techPartners.ts index 4ca909b..fbaa06e 100644 --- a/src/services/techPartners.ts +++ b/src/app/home/services/techPartners.ts @@ -1,15 +1,6 @@ import { useQuery } from '@tanstack/react-query'; -import { apiFetch } from './api'; - -export interface TechPartner { - id: string; - name: string; - logoUrl?: string; - category?: string; - websiteUrl?: string; - displayOrder: number; - isActive: boolean; -} +import { apiFetch } from '@/app/services/api'; +import type { TechPartner } from '@/app/home/types/techPartners'; export function useTechPartners() { return useQuery({ diff --git a/src/services/testimonials.ts b/src/app/home/services/testimonials.ts similarity index 84% rename from src/services/testimonials.ts rename to src/app/home/services/testimonials.ts index f403653..b0a9643 100644 --- a/src/services/testimonials.ts +++ b/src/app/home/services/testimonials.ts @@ -1,5 +1,6 @@ import { useQuery } from '@tanstack/react-query'; -import { apiFetch } from './api'; +import { apiFetch } from '@/app/services/api'; +import type { Testimonial } from '@/app/home/types/testimonials'; interface OnboardingCompleted { clientCompanyName: string; @@ -7,12 +8,6 @@ interface OnboardingCompleted { testimonialAuthor?: string; } -export interface Testimonial { - quote: string; - author: string; - company: string; -} - export function useTestimonials() { return useQuery({ queryKey: ['testimonials'], diff --git a/src/app/home/types/companies.ts b/src/app/home/types/companies.ts new file mode 100644 index 0000000..8da12d9 --- /dev/null +++ b/src/app/home/types/companies.ts @@ -0,0 +1,6 @@ +export interface Company { + id: string; + name: string; + logoUrl?: string; + showInLanding?: boolean; +} diff --git a/src/app/home/types/techPartners.ts b/src/app/home/types/techPartners.ts new file mode 100644 index 0000000..b231864 --- /dev/null +++ b/src/app/home/types/techPartners.ts @@ -0,0 +1,9 @@ +export interface TechPartner { + id: string; + name: string; + logoUrl?: string; + category?: string; + websiteUrl?: string; + displayOrder: number; + isActive: boolean; +} diff --git a/src/app/home/types/testimonials.ts b/src/app/home/types/testimonials.ts new file mode 100644 index 0000000..331b133 --- /dev/null +++ b/src/app/home/types/testimonials.ts @@ -0,0 +1,5 @@ +export interface Testimonial { + quote: string; + author: string; + company: string; +} diff --git a/src/hooks/useScrollSnap.ts b/src/app/hooks/useScrollSnap.ts similarity index 100% rename from src/hooks/useScrollSnap.ts rename to src/app/hooks/useScrollSnap.ts diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 22e3d3e..db09a0e 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -1,7 +1,7 @@ import type { Metadata, Viewport } from 'next'; import './globals.css'; import { Providers } from './providers'; -import { AppShell } from '../components/AppShell'; +import { AppShell } from '@/app/components/AppShell'; export const metadata: Metadata = { metadataBase: new URL('https://rynext.com.mx'), diff --git a/src/app/loading.tsx b/src/app/loading.tsx index 470294b..ee872bc 100644 --- a/src/app/loading.tsx +++ b/src/app/loading.tsx @@ -1,4 +1,4 @@ -import Loader from '../components/Loader'; +import Loader from '@/app/components/Loader'; export default function Loading() { return ( diff --git a/src/app/page.tsx b/src/app/page.tsx index 78e593c..5d53b31 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1,5 +1,5 @@ import type { Metadata } from 'next'; -import { HomePage } from './HomePage'; +import { HomePage } from '@/app/home/HomePage'; export const metadata: Metadata = { title: 'Rynext Technologies | Software Empresarial 100% Mexicano', diff --git a/src/app/portafolio/PortafolioPage.tsx b/src/app/portafolio/PortafolioPage.tsx index b09f81c..47fd774 100644 --- a/src/app/portafolio/PortafolioPage.tsx +++ b/src/app/portafolio/PortafolioPage.tsx @@ -1,9 +1,9 @@ 'use client'; import { useState, useEffect } from 'react'; import { motion } from 'framer-motion'; -import Loader from '../../components/Loader'; -import { usePortfolio } from '../../services/portfolio'; -import { assetUrl } from '../../services/api'; +import Loader from '@/app/components/Loader'; +import { usePortfolio } from '@/app/portafolio/services/portfolio'; +import { assetUrl } from '@/app/services/api'; const bg = '#f9f9f7'; const text = '#0a0a0a'; diff --git a/src/app/portafolio/loading.tsx b/src/app/portafolio/loading.tsx index 73923f6..ee872bc 100644 --- a/src/app/portafolio/loading.tsx +++ b/src/app/portafolio/loading.tsx @@ -1,4 +1,4 @@ -import Loader from '../../components/Loader'; +import Loader from '@/app/components/Loader'; export default function Loading() { return ( diff --git a/src/app/portafolio/services/portfolio.ts b/src/app/portafolio/services/portfolio.ts new file mode 100644 index 0000000..122fa69 --- /dev/null +++ b/src/app/portafolio/services/portfolio.ts @@ -0,0 +1,11 @@ +import { useQuery } from '@tanstack/react-query'; +import { apiFetch } from '@/app/services/api'; +import type { PortfolioProject } from '@/app/portafolio/types/portfolio'; + +export function usePortfolio() { + return useQuery({ + queryKey: ['portfolio'], + queryFn: () => apiFetch('/api/portfolio/public'), + staleTime: 1000 * 60 * 5, + }); +} diff --git a/src/services/portfolio.ts b/src/app/portafolio/types/portfolio.ts similarity index 65% rename from src/services/portfolio.ts rename to src/app/portafolio/types/portfolio.ts index d51379b..08b7f0c 100644 --- a/src/services/portfolio.ts +++ b/src/app/portafolio/types/portfolio.ts @@ -1,6 +1,3 @@ -import { useQuery } from '@tanstack/react-query'; -import { apiFetch } from './api'; - export interface PortfolioImage { id: string; portfolioEntryId: string; @@ -30,11 +27,3 @@ export interface PortfolioProject { technologies: PortfolioTechnology[]; images: PortfolioImage[]; } - -export function usePortfolio() { - return useQuery({ - queryKey: ['portfolio'], - queryFn: () => apiFetch('/api/portfolio/public'), - staleTime: 1000 * 60 * 5, - }); -} diff --git a/src/app/privacidad/loading.tsx b/src/app/privacidad/loading.tsx index 1466cc5..aee4e34 100644 --- a/src/app/privacidad/loading.tsx +++ b/src/app/privacidad/loading.tsx @@ -1,4 +1,4 @@ -import Loader from '../../components/Loader'; +import Loader from '@/app/components/Loader'; export default function Loading() { return ( diff --git a/src/app/productos/ProductosPage.tsx b/src/app/productos/ProductosPage.tsx index f1f8f20..2d4fb75 100644 --- a/src/app/productos/ProductosPage.tsx +++ b/src/app/productos/ProductosPage.tsx @@ -1,9 +1,9 @@ 'use client'; import { useState, useEffect } from 'react'; import { motion } from 'framer-motion'; -import Loader from '../../components/Loader'; -import { useProducts } from '../../services/products'; -import { assetUrl } from '../../services/api'; +import Loader from '@/app/components/Loader'; +import { useProducts } from '@/app/productos/services/products'; +import { assetUrl } from '@/app/services/api'; const fadeUp = { hidden: { opacity: 0, y: 28 }, diff --git a/src/app/productos/loading.tsx b/src/app/productos/loading.tsx index 73923f6..ee872bc 100644 --- a/src/app/productos/loading.tsx +++ b/src/app/productos/loading.tsx @@ -1,4 +1,4 @@ -import Loader from '../../components/Loader'; +import Loader from '@/app/components/Loader'; export default function Loading() { return ( diff --git a/src/services/products.ts b/src/app/productos/services/products.ts similarity index 56% rename from src/services/products.ts rename to src/app/productos/services/products.ts index 3fd9a42..98a3a4e 100644 --- a/src/services/products.ts +++ b/src/app/productos/services/products.ts @@ -1,14 +1,6 @@ import { useQuery } from '@tanstack/react-query'; -import { apiFetch } from './api'; - -export interface Product { - id: string; - name: string; - description?: string; - imageUrl?: string; - badges: string[]; - isActive: boolean; -} +import { apiFetch } from '@/app/services/api'; +import type { Product } from '@/app/productos/types/products'; export function useProducts() { return useQuery({ diff --git a/src/app/productos/types/products.ts b/src/app/productos/types/products.ts new file mode 100644 index 0000000..a135a8c --- /dev/null +++ b/src/app/productos/types/products.ts @@ -0,0 +1,8 @@ +export interface Product { + id: string; + name: string; + description?: string; + imageUrl?: string; + badges: string[]; + isActive: boolean; +} diff --git a/src/services/api.ts b/src/app/services/api.ts similarity index 100% rename from src/services/api.ts rename to src/app/services/api.ts diff --git a/src/app/sitemap.ts b/src/app/sitemap.ts index bb015d8..5fe45a8 100644 --- a/src/app/sitemap.ts +++ b/src/app/sitemap.ts @@ -1,6 +1,6 @@ import type { MetadataRoute } from 'next'; -import { API_URL } from '../services/api'; -import type { BlogPost } from '../services/blog'; +import { API_URL } from '@/app/services/api'; +import type { BlogPost } from '@/app/blog/types/blog'; export const revalidate = 3600; diff --git a/src/app/sobre-nosotros/SobreNosotrosPage.tsx b/src/app/sobre-nosotros/SobreNosotrosPage.tsx index 464bae5..3d25e5b 100644 --- a/src/app/sobre-nosotros/SobreNosotrosPage.tsx +++ b/src/app/sobre-nosotros/SobreNosotrosPage.tsx @@ -1,9 +1,9 @@ 'use client'; import { useState, useEffect } from 'react'; import { motion } from 'framer-motion'; -import Loader from '../../components/Loader'; -import { useTeam, groupByDepartment } from '../../services/team'; -import { valores, porQueRynext } from '../../data/sobreNosotrosData'; +import Loader from '@/app/components/Loader'; +import { useTeam, groupByDepartment } from '@/app/sobre-nosotros/services/team'; +import { valores, porQueRynext } from '@/app/home/data/sobreNosotrosData'; const TEAM_IMAGE = 'https://images.unsplash.com/photo-1522071820081-009f0129c71c?w=1200&q=80'; diff --git a/src/app/sobre-nosotros/loading.tsx b/src/app/sobre-nosotros/loading.tsx index 73923f6..ee872bc 100644 --- a/src/app/sobre-nosotros/loading.tsx +++ b/src/app/sobre-nosotros/loading.tsx @@ -1,4 +1,4 @@ -import Loader from '../../components/Loader'; +import Loader from '@/app/components/Loader'; export default function Loading() { return ( diff --git a/src/services/team.ts b/src/app/sobre-nosotros/services/team.ts similarity index 67% rename from src/services/team.ts rename to src/app/sobre-nosotros/services/team.ts index 5986a7d..1d5413c 100644 --- a/src/services/team.ts +++ b/src/app/sobre-nosotros/services/team.ts @@ -1,21 +1,6 @@ import { useQuery } from '@tanstack/react-query'; -import { apiFetch } from './api'; - -export interface TeamMember { - id: string; - firstName: string; - lastName: string; - positionName?: string; - departmentName?: string; - departmentOrder?: number; - positionOrder?: number; -} - -export interface Department { - name: string; - order: number; - members: TeamMember[]; -} +import { apiFetch } from '@/app/services/api'; +import type { Department, TeamMember } from '@/app/sobre-nosotros/types/team'; export function useTeam() { return useQuery({ diff --git a/src/app/sobre-nosotros/types/team.ts b/src/app/sobre-nosotros/types/team.ts new file mode 100644 index 0000000..c9e0604 --- /dev/null +++ b/src/app/sobre-nosotros/types/team.ts @@ -0,0 +1,15 @@ +export interface TeamMember { + id: string; + firstName: string; + lastName: string; + positionName?: string; + departmentName?: string; + departmentOrder?: number; + positionOrder?: number; +} + +export interface Department { + name: string; + order: number; + members: TeamMember[]; +} diff --git a/src/types/index.ts b/src/app/types/ui.ts similarity index 100% rename from src/types/index.ts rename to src/app/types/ui.ts diff --git a/tsconfig.json b/tsconfig.json index 448acc4..b575f7d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -38,4 +38,4 @@ "exclude": [ "node_modules" ] -} +}