What’s the best way to integrate daml backend code to a frontend website?
The easiest way to do that is to use the JSON API, as illustrated in our getting started guide. The JSON API may not fit all use-cases, though.
If it doesn’t fit yours, you may have to just build your own server to put in-between browsers and the gRPC ledger API. If you do get to that point, the recommended path is to write said server in a JVM language using the Java bindings & codegen. You can use any language with gRPC support, but we only provide codegen and bindings for Java.
(We also have codegen and bindings for TypeScript, which you can use in your browser code if the JSON API is a good fit for you.)
If you do want to get started with the JSON API, you should definitely use it with the TypeScript codegen/bindings too, as the getting started guide illustrates. Using the JSON API directly will be more bug-prone boilerplate for your application; the codegen especially hides the complexities of interpreting Daml types’ representations from you, so you can focus on the data.