Project INCA Game

Table of Contents

- [Introduction](#introduction) - [Overview](#overview) - [Prerequisites](#prerequisites) - [Set DNS Domain](#set-dns-domain) - [Set HTTPS](#set-https) - [Set a Telegram Bot](#set-a-telegram-bot) - [Start the Game](#start-the-game) - [References](#references) --- ## Introduction This repository contains the proof-of-concept for the INCA Game, a mini app on Telegram with a Solana wallet support. We provide the steps necessary to deploy the game on a Telegram bot. The bot is hosted first on a Full VM running on the ThreeFold Grid. ## Overview This project is a clone of the popular Telegram mini app, Hamster Kombat, that has been adapted for the INCA Project. ## Prerequisites To run on a 3Node on the ThreeFold Grid with a Full VM, you will need to prepare the VM: ``` apt update wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion nvm install 18 npm install -g yarn ``` ## Set DNS Domain Make sure the IPv4 address is pointing to your domain name (DNS A Record). ## Set HTTPS Set HTTPS by using a reverse proxy with Caddy. Adjust with your own domain. ``` caddy reverse-proxy -r --from --to :5173 ``` ## Set a Telegram Bot You can use the [Bot Father](https://t.me/BotFather) to create your bot. - Create a bot ``` /newbot ``` - Create a mini app ``` /newapp ``` - Make sure to put the URL of your domain when asked for an HTTPS URL ## Start the Game To get started with either the initial setup or the final version, follow these instructions: 1. **Clone the Repository**: ```bash git clone https://git.ourworld.tf/tfgrid/projectinca_game cd projectinca_game ``` 2. **Install Dependencies**: ```bash npm install ``` 3. **Run the Development Server**: ```bash npm run dev -- --host ``` 4. **Open Your Browser**: Navigate to localhost to see the final version of the application. ## References This repository is based on [the amazing work of nikandr-surkov](https://github.com/nikandr-surkov/Hamster-Kombat-Telegram-Mini-App-Clone).