Every authenticated user has a profile page atDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Avendaosander/Plataforma-social/llms.txt
Use this file to discover all available pages before exploring further.
/home/my-profile that surfaces their avatar, stats, and published components. From the same page users can open the EditProfile modal to update their photo, username, and bio. A dedicated settings page at /home/my-profile/settings provides account management controls including password changes, account deletion, privacy toggles, and granular notification preferences — all backed by the Setting model in the database.
My Profile Page (/home/my-profile)
The profile page is composed of two main components: InfoProfile (static display) and EditProfile (modal overlay). The page queries the GraphQL API for the current user’s data using GET_USER with the session’s user.id as the variable:
InfoProfile Component
InfoProfile renders the user’s public-facing information. The avatar falls back to a placeholder image when the avatar field is an empty string:
Username
Displayed as an
<h2> alongside Editar Perfil (opens EditProfile modal), a share button (ShareRightIcon), and an options button (DotsIcon).Stats Row
Three counters side by side: Seguidores (followers), Seguidos (following), and Componentes (total published components).
Description
Free-text bio paragraph (
max-w-[60ch]) from the description field, displayed as-is with no truncation on the profile page.Profile Tabs (Badge)
BelowInfoProfile the Badge component renders two tab-style buttons: Componentes (active by default, highlighted with a top border) and Guardados (bookmarked posts). These filter which posts are listed beneath the profile header.
Editing Your Profile
Clicking Editar Perfil setsisEditMode to true, which renders EditProfile inside a full-screen dark overlay. The modal can be dismissed via the × button in the header or the Cancelar button in the footer.
EditProfile Fields
Profile photo upload
Profile photo upload
The file input (
type="file", id="avatar") is hidden and triggered via its <label>. When a file is selected, URL.createObjectURL generates a local preview URL rendered immediately in the <Image> component — no upload occurs until the form is saved.Username field
Username field
A standard text
<Input> pre-populated with the current username. The value must be unique across the platform — the server returns an error if the chosen name is already taken.Description textarea (250-char limit)
Description textarea (250-char limit)
A
<textarea> with a live character counter. When the character count exceeds 250 the textarea ring turns red (ring-2 ring-maroon-800) and the counter label turns red as well, providing immediate visual feedback without blocking submission until the mutation enforces the limit.PUT_USER GraphQL Mutation
Clicking Guardar in theEditProfile footer fires the PUT_USER mutation with the updated fields:
handleSubmit function in EditProfile calls the mutation with the three editable fields:
username, description, avatar) are optional — only fields whose values have changed need to be sent. The mutation returns the full updated user object including the hashed password field.
Following System
Users can follow and unfollow each other from two surfaces: the inline Seguir / Siguiendo button on everyCardPost card in the feed, and profile pages. Follow state is managed by a Follower join table in the database:
CardPost component toggles between Seguir (outline style) and Siguiendo (solid style) using local state:
InfoProfile as part of the stats row.
Settings Page (/home/my-profile/settings)
The settings page is accessed via the Configuraciones menu item in the Navbar’s “Mas” dropdown. The page is structured with a left sidebar of anchor links and a right content panel that scrolls through three sections. The Navbar is hidden on this route (pathname === '/home/my-profile/settings').
Section 1 — Administrar cuenta
Contains two sub-sections:- Control de cuenta: a destructive Eliminar button to permanently delete the account.
- Datos de la cuenta: a navigation arrow button to the Change Password flow.
Section 2 — Privacidad
Contains a Visibilidad sub-section with a single Cuenta privada toggle (SwitchButton) backed by the private boolean on the Setting model. When enabled, the user’s posts and profile are not visible to users who do not follow them.
Section 3 — Notificaciones
Notification preferences are split into Notificaciones de escritorio and Notificaciones al correo, each controlled by individualSwitchButton toggles that map directly to fields on the Setting model.
Notificaciones de escritorio is further divided into two groups:
| Sub-group | Toggle label | Setting field | Type | Default |
|---|---|---|---|---|
| Interacciones | Calificaciones | n_ratings | Boolean | true |
| Interacciones | Comentarios | n_comments | Boolean | true |
| Interacciones | Nuevos seguidores | n_followers | Boolean | true |
| Del sistema | Componentes populares | n_populates | Boolean | true |
| Toggle label | Setting field | Type | Default |
|---|---|---|---|
| Calificaciones | n_email_ratings | Boolean | true |
| Comentarios | n_email_comments | Boolean | true |
| Nuevos seguidores | n_email_followers | Boolean | true |
Setting model from the Prisma schema: