Exploring TON Web IDE and writing a simple smart contract

Some time ago we at TON Society India conducted a poll wherein we asked the community whether they know about TON Web IDE or not and we saw that some of the people didn't know about it. So why not write a dedicated article on it
In short it is a web based IDE designed to eliminate the need for complex local setups, software downloads, or specialized hardware, allowing developers to write and manage smart contracts directly from their web browsers. We also had a dev tour where we made all the attendees write their first smart contract using TACT on TON Web IDE and their response was super amazing throughout.
Now how to use the IDE, come on let's see
If you've used any web based IDE previously be it Remix or Replit you know exactly what's happening here.
Step 1: Go to your web browser and type ide.ton.org (not a very big url๐)
Step 2: If you're using the IDE for the first time you will see a lot of TACT templates displayed on the screen which you can use to learn TACT and strengthen your knowledge in the language

I'll personally suggest you to go through these templates before starting to write your first smart contract. You can also refer to https://tact-by-example.org/all for more detailed code templates and examples
Step 3: If you're using the IDE for the first time, you'll see a button for creating a new project, click on it then a dialog box like this will appear

Step 4: Now select the required options and click on the Create button
Now you're all set for writing your smart contracts on TON. If you see on the left hand side then by default the environment will be Sandbox and there are three environments in the IDE as listed below in the picture.

Sandbox is like Localhost where you write the code and debug it. Testnet is for deploying your contract on Testnet chain and test it using testnet tokens. If you're not familiar with the concept of testnet coins on TON or how to get them, you can refer to the Episode 2 of the Learning and Building on TON video series on my handle.
And mainnet is the main character haha that is where you finally deploy your contract on the blockchain.
Now why not we test out by writing a small code of taking a number as input and increasing it through a loop. All the attendees of our dev tour have already done this๐
import "@stdlib/deploy";
message IncreaseNumber {
value: Int as uint32;
}
contract LoopProcessor with Deployable
{
receive(msg: IncreaseNumber)
{
let number: Int = msg.value;
let i: Int = 0;
repeat(10) {
number = number + 1;
i = i + 1;
}
dump(number);
}
}
Try this code in the sandbox environment, build it, deploy it and finally enter the number of your choice and see the result in the console log.
So this was it for now folks. Providing the doc for all the relevant resources
TON Developers 101 : https://ton-org.notion.site/TON-Developers-101-1755274bd2cf80489572fee89158ddbe
Let's keep learning and building on TON ๐



