CoolFrog Documentation
CoolFrog Documentation
1
Summary
What is CoolFrog Tap2Earn? .......................................................................................... 3
How to setup Cool Frog game frontend........................................................................... 4
How to setup Cool Frog API ............................................................................................ 5
How to setup Cool Frog Telegram bot............................................................................. 7
How to run the game locally ............................................................................................ 8
How to add/customize levels, missions and tasks ........................................................... 9
2
What is CoolFrog Tap2Earn?
CoolFrog Tap2Earn is an exciting and addictive Telegram mini app clicker game where
tapping isn't just fun—it's rewarding! Step into the world of CoolFrog, where every tap
brings you closer to earning coins, leveling up, and dominating the leaderboard.
Features include:
Tap to Earn Coins: Tap your way to wealth by earning coins with every click.
The faster you tap, the more you earn!
Buy Boosters: Supercharge your tapping power with a variety of boosters.
Maximize your earnings and dominate the competition.
Refer Friends: Invite your friends to join the fun and get bonus coins for each
referral. The more friends you refer, the richer you become!
Complete Tasks: Take on daily tasks and challenges to earn extra coins. Each
task completed brings you closer to your next big reward.
Upgrade Missions: Invest in upgrades to earn coins passively, even when
you’re not tapping. Let your frog work for you around the clock!
Level Up: Use your coins to level up and unlock new features, bonuses, and
more powerful upgrades.
Leaderboard: Compete against players worldwide to claim your spot at the top.
Show everyone who the ultimate CoolFrog is!
Whether you're in it for fun, competition, or just to see your name on the leaderboard,
CoolFrog Tap2Earn is the game for you!
3
How to setup Cool Frog game frontend
First let’s setup the frontend of the game, this is the telegram mini app that the bot will
open.
8. If you want to run the game locally, you need to run `npm run dev`, otherwise you
need to put the contents of the generated `dist` folder on your hosting
4
How to setup Cool Frog API
Next let’s setup the API of the game, this is where the frontend makes requests to get
and save data of the game.
7. Make sure you have a mysql server running on your hosting or local environment
8. Run `php artisan migrate` (this will create the database)
9. Run `php artisan db:seed` (this will seed the database with data – levels,
missions etc.)
5
10. Run `php artisan key:generate`
11. Run `php artisan storage:link`
12. Now your API is ready to go, if you want to run it locally run `php artisan serve`,
otherwise you need to put this code on your hosting
6
How to setup Cool Frog Telegram bot
Last but not least, let’s setup the Telegram bot of the game so we can actually access it
through Telegram.
8. If you want to run the bot locally, you need to run `npm run dev`, otherwise you
need to run the index.js file located in the generated `dist` folder on your hosting
server (this can be done with pm2: https://pm2.keymetrics.io/)
That is all. Now you should be able to access your bot by sending the `/start` command
to your bot and pressing the Play Game button!
7
How to run the game locally
Note that you can run the game locally (without bot, just game and api), but if you want
it to be launchable through telegram, the game needs to be hosted on domain with SSL
(https).
You can leave the VITE_BOT_URL empty, since we won't be using the bot
locally.
Also please note, that you may have different ports, change them accordingly.
4. After you have set up both frontend and API, you should be able to access it by
visiting the frontend URL in your browser.
8
How to add/customize levels, missions and tasks
The customization/adding of levels, missions and tasks is done in the API, because they
are saved in the database. So, if you want to change them, please follow these steps:
5. Following the provided example, you can add your own missions and customize
their level cost and production per hour.
9
6. If you want to add levels, open the `LevelSeeder.php` file, it should look like this:
7. Following the provided example, you can add your own levels and customize
their required balance.
8. If you want to add tasks, open the `TaskSeeder.php` file, it should look like this:
10
9. Following the provided example, you can add your tasks and customize their
rewarded coin amount.
10. The same goes for referral tasks (ReferralTaskSeeder.php), daily tasks
(DailyTaskSeeder.php), popups (PopupSeeder.php) and mission types
(MissionTypeSeeder.php).
11