How claudiosalazar/blog-fotografo works
Main Components
• Frontend Application (Next.js/React):
• Contains the user interface divided into several areas:
▪ Authentication section ((auth)) – for login and session management.
▪ Dashboard section ((dashboard)) – where administrative functions such as managing biografia, blog content, galleries, and a general summary are handled.
▪ Public site section ((sitio-publico)) – where end users access the published blog posts, galleries, biografía and the home page.
• Shared components (found in src/app/components) for reusable UI elements like Header, Footer, Loading component, and other specialized widgets (e.g., carousels, modals, image galleries).
• Styles and theme files using SCSS, Tailwind, and PostCSS.
• Backend Server (Node.js based):
• Acts as a RESTful (or possibly GraphQL) API server listening on port 3001 (as indicated in the README).
• Responsible for interfacing with the MySQL database to serve dynamic content to the frontend.
• Database (MySQL):
• Manages the persistent storage of blog posts, images, user data and other necessary content.
Relationships and Interactions
• Client Browser ↔ Frontend (Next.js):
• Users access the public site (and authenticate via the auth route) via their web browsers.
• In the dashboard, administrators interact with the system to update or manage content.
• Frontend ↔ Backend (Node.js API):
• The Next.js application makes API calls (e.g., via fetchData.tsx) to the backend running at http://localhost:3001 for dynamic content retrieval and data manipulation.
• Backend ↔ MySQL Database:
• The backend server communicates with the MySQL database, executing queries to load or update blog content, images, and related details.
Architectural Patterns & Design Principles
• Modular Design – Separation between concerns:
• Clear separation between public site, authentication, and dashboard modules within the frontend.
• The use of components to promote reusability (as seen in the src/app/components folders).
• MVC/Component-Based UI (React’s declarative components) in the frontend.
• RESTful API layer between the frontend and backend.
• Responsive design principles using Next.js and Tailwind/PostCSS for styling.
Relevant Technologies, Frameworks, and Libraries
• Frontend:
• Next.js (v15) and React (v19)
• SCSS for styling, Tailwind CSS, PostCSS
• Utility components for common functions such as date formatting (FormatoFecha.tsx) and URL handling.
• Backend:
• Node.js (runtime environment for JavaScript)
• Likely an Express.js or similar framework to handle HTTP requests.
• Database:
• MySQL
• Libraries/drivers for interfacing with MySQL (e.g., mysql2 or sequelize if using an ORM).