> For the complete documentation index, see [llms.txt](https://docs.facephi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.facephi.com/docs.facephi-en/sdks/sdk-web/introduccion/buenas-practicas.md).

# Best practices

Recommendations for better implementation and maintenance of SDK Web components

### Always use an HTTPS connection.

It ensures the security of data transmitted between the client and server, protecting against man-in-the-middle attacks.

***

### Update the SDK to the latest stable version.

Take advantage of the security and feature improvements that SDK developers regularly introduce.

***

### Keep your code clean and organized.

Follow best practices during implementation and keep your code organized for better configuration management and easier maintenance.

For implementations with multiple components, it is recommended to place each component in a separate file to maintain modularity and scalability.

***

### Handle potential errors and component flows correctly.

Implement robust error management to ensure the system can recover from failures and report them correctly.

***

### Make the most of the framework you use.

Use the tools provided by the framework to optimize the implementation.

* Use the syntax provided by the framework.
* Use routers to switch components during the SDK Web flow.
* Store sensitive data securely.

***

### Protect your  `apiKey` and avoid exposing it publicly.

Keep access credentials confidential to prevent unauthorized use of the SDK.

***

### Do not minify or obfuscate Facephi SDK code.

Facephi products (SDK Web and biometric engines) are already distributed in an optimized form and **must not be minified, transpiled, or obfuscated again** during the integration build process. Altering the bundle can break anti-fraud detection (antispoof) and engine startup. Configure your bundler to exclude the packages `@facephi/*` from these steps.

***

### Perform thorough testing in a Sandbox environment before moving to production.

Make sure all components work as expected without affecting the production environment.

***

If you have any further questions, contact Facephi Technical Support.<br>
