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 <[email protected]>
This commit is contained in:
Emmanuel RojasandCopilot committed 2026-10-02 15:47:34 -05:00
1 parent efba699905
commit 794a659369
73 files changed
+172 -172

No files matched your search

+2 -2
View File
@@ -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 },
+3 -3
View File
@@ -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) => {
+2 -2
View File
@@ -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';
+1 -1
View File
@@ -1,4 +1,4 @@
import Loader from '../../components/Loader';
import Loader from '@/app/components/Loader';
export default function Loading() {
return (
@@ -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<BlogPost[]>({
+12
View File
@@ -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;
}
@@ -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';
File renamed without changes.
@@ -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';
@@ -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);
@@ -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';
@@ -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";
File renamed without changes.
@@ -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);
File renamed without changes.
File renamed without changes.
@@ -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;
@@ -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 },
);
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -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[] = [
{
File renamed without changes.
File renamed without changes.
@@ -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';
@@ -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();
@@ -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';
@@ -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 = () => {
@@ -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<number | null>(null);
@@ -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;
@@ -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<number | null>(null);
@@ -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();
@@ -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 (
@@ -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();
@@ -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';
@@ -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';
@@ -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';
@@ -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 (
@@ -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();
@@ -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';
File renamed without changes.
@@ -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();
@@ -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<Company[]>({
@@ -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<TechPartner[]>({
@@ -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<Testimonial[]>({
queryKey: ['testimonials'],
+6
View File
@@ -0,0 +1,6 @@
export interface Company {
id: string;
name: string;
logoUrl?: string;
showInLanding?: boolean;
}
+9
View File
@@ -0,0 +1,9 @@
export interface TechPartner {
id: string;
name: string;
logoUrl?: string;
category?: string;
websiteUrl?: string;
displayOrder: number;
isActive: boolean;
}
+5
View File
@@ -0,0 +1,5 @@
export interface Testimonial {
quote: string;
author: string;
company: string;
}
File renamed without changes.
+1 -1
View File
@@ -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'),
+1 -1
View File
@@ -1,4 +1,4 @@
import Loader from '../components/Loader';
import Loader from '@/app/components/Loader';
export default function Loading() {
return (
+1 -1
View File
@@ -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',
+3 -3
View File
@@ -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';
+1 -1
View File
@@ -1,4 +1,4 @@
import Loader from '../../components/Loader';
import Loader from '@/app/components/Loader';
export default function Loading() {
return (
+11
View File
@@ -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<PortfolioProject[]>({
queryKey: ['portfolio'],
queryFn: () => apiFetch<PortfolioProject[]>('/api/portfolio/public'),
staleTime: 1000 * 60 * 5,
});
}
@@ -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<PortfolioProject[]>({
queryKey: ['portfolio'],
queryFn: () => apiFetch<PortfolioProject[]>('/api/portfolio/public'),
staleTime: 1000 * 60 * 5,
});
}
+1 -1
View File
@@ -1,4 +1,4 @@
import Loader from '../../components/Loader';
import Loader from '@/app/components/Loader';
export default function Loading() {
return (
+3 -3
View File
@@ -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 },
+1 -1
View File
@@ -1,4 +1,4 @@
import Loader from '../../components/Loader';
import Loader from '@/app/components/Loader';
export default function Loading() {
return (
@@ -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<Product[]>({
+8
View File
@@ -0,0 +1,8 @@
export interface Product {
id: string;
name: string;
description?: string;
imageUrl?: string;
badges: string[];
isActive: boolean;
}
File renamed without changes.
+2 -2
View File
@@ -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;
+3 -3
View File
@@ -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';
+1 -1
View File
@@ -1,4 +1,4 @@
import Loader from '../../components/Loader';
import Loader from '@/app/components/Loader';
export default function Loading() {
return (
@@ -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<TeamMember[]>({
+15
View File
@@ -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[];
}
File renamed without changes.