There are a couple templates that we offer to allow you to get started without any heavy lifting. The steps to get started are simple and easy to test in a few minutes.
{% hint style="info" %}
Make sure you have Docker Desktop or OrbStack started before you begin. {% endhint %}
{% tabs %} {% tab title="next.js Template" %}
Clone the template repo.
git clone https://github.com/Phala-Network/nextjs-viem-tee-sim-template.gitBuild the docker image.
docker build -t my-dapp:latest .Now that the docker image is built, let's start testing against the TEE Simulator. First we must pull the latest TEE Simulator in docker, and run it with the following commands.
docker pull phalanetwork/tappd-simulator:latest
docker run --rm -p 8090:8090 phalanetwork/tappd-simulator:latestWith the simulator up and running, we can now start our docker app to test out the functionality.
docker run --rm -p 3000:3000 my-dapp:latestNow we can go to http://localhost:3000 and see our deployed application.
We can test to see if our functions work by calling the API calls with
- http://localhost:3000/api/tdxquote
- http://localhost:3000/api/account/address
- http://localhost:3000/api/signMessage
- http://localhost:3000/api/signTypedData
- http://localhost:3000/api/signTransaction
We should see the results similar to the following screenshots.
/api/tdxQuote
/api/account/address
/api/signMessage
/api/signTypedData
/api/sendTransaction
{% endtab %}{% tab title="Python Template" %}
Clone the template repo.
git clone https://github.com/Phala-Network/python-tee-sim-template.gitBuild the docker image.
docker build -t my-dapp:latest .Now that the docker image is built, let's start testing against the TEE Simulator. First we must pull the latest TEE Simulator in docker, and run it with the following commands.
docker pull phalanetwork/tappd-simulator:latest
docker run --rm -p 8090:8090 phalanetwork/tappd-simulator:latestWith the simulator up and running, we can now start our docker app to test out the functionality.
docker run --rm -p 3000:3000 my-dapp:latestNow we can go to http://localhost:3000 and see our deployed application.
/
We can test to see if our functions work by calling the API calls with
We should see the results similar to the following screenshots.
/derivekey
/tdxquote
{% endtab %} {% endtabs %}The last 2 tutorials were key to understanding the basics of deploying a Docker app on a TEE Server. Now you are ready to start building on Dstack! For more info on the design of Dstack, check out the Design Documents.


.png)





