user5844: and cant figure out what Endpoint do (why are they in the code) and most important of all how should I code them. What are the best practices?

user2897: In Plutus apps, the mechanism for requesting inputs is called "endpoints".
All endpoints that an app wants to use must be declared as part of the type of the app. The set of all endpoints of an app is called the schema of the app. The schema is defined as a Haskell type. You can build a schema using the Endpoint type family to construct individual endpoint types, and the .\/ operator to combine them.
I suggest you design your Plutus app based on the idea that endpoints are the only possible way to interact with the smart contract from a user perspective.

5844: <p>and cant figure out what Endpoint do (why are they in the code) and most important of all how should I code them. What are the best practices?</p>
 2897: <p>In Plutus apps, the mechanism for requesting inputs is called &quot;endpoints&quot;.</p>
<p>All endpoints that an app wants to use must be declared as part of the type of the app. The set of all endpoints of an app is called the schema of the app. The schema is defined as a Haskell type. You can build a schema using the <code>Endpoint</code> type family to construct individual endpoint types, and the <code>.\/</code> operator to combine them.</p>
<p>I suggest you design your Plutus app based on the idea that endpoints are the only possible way to interact with the smart contract from a user perspective.</p>
