> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bbrands.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Customer portal

> Internal manual of the customer portal: what it is, who it serves, which sections it has and how to use this manual to train the team.

> [!NOTE]
>
> This manual is **internal**. It trains the B Brands Lab and Maihue team and helps answer customer
> questions. Each page first explains in plain words what the customer does, then why the portal works that
> way: rules, states, errors, diagrams and the technical detail.

## What the customer portal is

The customer portal is the website where a Maihue customer manages their relationship with us without calling
anyone: they see a home page with news, review their payment methods, use Club Maihue benefits, manage their
account and, when invited, activate their account or sign their digital contract.

| Fact | Value |
| - | - |
| Production address | `https://portal.maihuego.com` |
| Languages | Spanish (default), English, French, Italian and Portuguese |
| Sign-in | With the B Brands account (single sign-on in `horizon-authenticate`) |
| Devices | Desktop and mobile browsers; on mobile the sidebar becomes a drop-down menu |
| Application | `frontend/portal-customer` (Next.js) |

## Who it serves

| Who | Why they come |
| - | - |
| **Person** with a personal account | See their service, payments, benefits and account |
| **Legal representative** or **administrator** of a company | The same, acting on behalf of the company with **Act as** |
| **Invited customer** | Activate their account (onboarding) from the invitation e-mail link |
| **Customer signing up** | Sign their digital contract from the link they receive by e-mail |

What each of them may do is in [Roles and permissions](https://docs.bbrands.io/portal-customer/roles-and-permissions.md).

## Portal sections

The sidebar groups sections the same way this manual does. Each section can be switched on or off per
environment with a feature flag, without a deploy; when it is off it disappears from the menu and its address
leads to the home page.

| Group | Section | Status in the code today | Feature flag (default) |
| - | - | - | - |
| — | Home | Available | `portal-customer-home` (always on) |
| My service | My products | Coming soon | `portal-customer-products` (off) |
| My service | Schedule maintenance | Coming soon | `portal-customer-scheduling` (off) |
| My service | Documents | Coming soon | `portal-customer-documents` (off) |
| Payments | Subscriptions | Preview with fixture data | `portal-customer-subscriptions` (off) |
| Payments | Payment methods | Available | `portal-customer-payment-methods` (off) |
| Payments | History | Coming soon | `portal-customer-history` (off) |
| Rewards | Benefits | Available | `portal-customer-benefits` (off) |
| Rewards | Coupons | Available | `portal-customer-coupons` (off) |
| Rewards | Invite a friend | Preview with fixture data | `portal-customer-invite` (off) |
| My account | Account | Available | `portal-customer-account` (on) |
| My account | Support | Coming soon | `portal-customer-support` (off) |

Outside the menu are sign-in, the invitation **onboarding** and the **digital contract**. The actual value of
each flag in development, certification and production is in Horizon Enterprise; see
[Feature flags](https://docs.bbrands.io/portal-customer/reference/feature-flags.md).

> [!NOTE]
>
> **Section status in this manual.** *Available*: works with real data. *Preview*: the screen exists but
> shows fixture data. *Coming soon*: the customer sees a notice that the section is on its way; the manual
> page also describes the planned behaviour.

## How this manual is organised

> [card] [Getting started](https://docs.bbrands.io/portal-customer/navigation-map.md)
>
> Navigation map, training path, glossary and roles.

> [card] [Access](https://docs.bbrands.io/portal-customer/access/sign-in.md)
>
> Sign-in, Act as, onboarding and digital contract.

> [card] [Home](https://docs.bbrands.io/portal-customer/home.md)
>
> News, featured items, shortcuts and benefits.

> [card] [My service](https://docs.bbrands.io/portal-customer/products.md)
>
> My products, schedule maintenance and documents.

> [card] [Payments](https://docs.bbrands.io/portal-customer/payment-methods/overview.md)
>
> Subscriptions, payment methods and history.

> [card] [Rewards](https://docs.bbrands.io/portal-customer/club/overview.md)
>
> Club Maihue and invite a friend.

> [card] [My account](https://docs.bbrands.io/portal-customer/account/profile.md)
>
> Profile, security, devices, language, theme and support.

> [card] [Reference](https://docs.bbrands.io/portal-customer/reference/states-and-errors.md)
>
> Feature flags, states and errors, support cases, checklist and what's new.

Each group has one page per portal section, with the same twelve-part structure.

### The twelve parts of every section page

Every section page has the same structure, so you always know where to look:

| # | Part | What you find |
| - | - | - |
| 1 | At a glance | Status, route, feature flag, who sees it and the date it was last verified |
| 2 | What it is for | One paragraph in plain words |
| 3 | How to get there | Where it is entered from, with a navigation diagram |
| 4 | What the customer sees | A screenshot with every element numbered and explained |
| 5 | Step by step | Each task with desktop and mobile screenshots |
| 6 | Business rules | The numbered rules (R-01, R-02…) |
| 7 | States and messages | What the customer sees in each state, why and what to do |
| 8 | Errors | Exact message, cause, backend code and what support does |
| 9 | Why it works this way | Process diagram and the reason behind it |
| 10 | Technical detail | Feature flags, endpoints, components and data |
| 11 | FAQ and support cases | Typical questions and how to diagnose them |
| 12 | Related and history | Links and the page's change list |

## How it stays current

This manual always describes the portal as it is on `develop`. Every change to the portal code updates its
section's page in the same pull request, in Spanish and English, with new screenshots and diagrams if they
changed; when a change does not alter anything the manual says, the pull request states it with the line
`Manual: sin impacto — <reason>`. An automatic check reviews it on every pull request (ADR 0140), and a
monthly audit detects outdated screenshots.

If something does not match what you see in the portal, tell the Frontend Platform team.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.