Skip to content
← Back to projects

2024

Entescultor

Web application for the sculptor Indalecio Pérez Entrena.

Entescultor is the second version of sculptor Indalecio Pérez Entrena’s website. It replaces the original PHP site with a Next.js frontend and a custom Express API, and adds an admin panel to manage series, works, articles, events and reviews without touching code.

Client
Indalecio Pérez Entrena, sculptor
My role
Frontend design and full-stack development

Screenshots

entescultor.com home page: the sculptor’s name over a pencil drawing on a dark background, with a “Start tour” button.
Home. A guided tour walks through the artist’s series and works.
Series page showing the Fragmentos series: a marble and steel sculpture next to the series name.
Series. Each series fills a screen and you scroll through them.
The work Victoria from the Fragmentos series: carved pine and steel, with its material and dimensions, 180 × 60 × 80.
Work. A card with material and dimensions, and a carousel with several photos of the piece.
entescultor.com home page on a phone, with the navigation collapsed into a menu.
Mobile. Navigation collapses into a menu.

Architecture

Two projects deployed separately on Vercel: the frontend and the API. Data lives in MongoDB and images in Cloudinary.

  1. 01

    Frontend · Vercel

    • Next.js 13 (App Router) and React 18

      Route groups for the public site, the admin panel and password recovery.

    • Axios

      One service per resource talking to the API.

  2. 02

    API · serverless function on Vercel

    • Express 4

      One router per resource: series, works, author, articles, events, reviews, users and login.

    • JWT and bcrypt

      Admin login and a middleware that protects write routes.

  3. 03

    Services

    • MongoDB with Mongoose

      One model per resource; works reference their series.

    • Cloudinary

      Storage and CDN for every image.

    • Gmail SMTP with Nodemailer

      Password recovery email.

How data flows

  1. The browser fetches content from the API as JSON and renders it with React.
  2. The admin panel sends creates and updates with the JWT in the Authorization header.
  3. Images are uploaded from the browser straight to Cloudinary; the API only stores the URL.
  4. The API reads and writes MongoDB through Mongoose, and joins each work with its series using populate.
  5. To recover a password, the API emails a link with a token that expires in one hour.

Technical challenges

Images on a server without a disk

The first version stored images with Multer in a folder of the API. Once deployed as a serverless function on Vercel, that disk does not persist between requests. I moved storage to Cloudinary and the upload to the browser, so the API never receives heavy files and only stores URLs.

Content that can be maintained without coding

An admin panel with login (bcrypt passwords and a one-day JWT) to create, edit and delete every type of content. Write routes go through a middleware that checks the token, and the password can be recovered by email.

Relations in a document database

Works belong to series and each work has different attributes. MongoDB gives that flexibility, and Mongoose’s populate brings each work with its series’ name and image, the equivalent of a JOIN.

Replacing a site that already existed

The previous site had its own URLs. A permanent redirect from /inicio.php to the home page avoids broken links and keeps search ranking.

What I’d do differently today

  • TypeScript in the frontend and the API, and every request validated against a schema (for example, Zod).
  • A single PATCH per resource instead of one PUT per field (title, height, width…).
  • Unambiguous routes: GET /obras/:serie and GET /obras/:id share a pattern, so Express never reaches the second one.
  • API tests with Supertest, end-to-end tests with Playwright and CI from day one.
  • Server Components and next/image to load content on the server and serve optimised images.

Stack

  • React
  • Next.js
  • Node.js
  • Express
  • MongoDB
  • Mongoose
  • npm
← Back to projects