Welcome to the Fruit Clicker Game! This is a simple clicker game I built as a Telegram Mini App using React and TypeScript. The purpose of this project is to explore the capabilities of Telegram Mini Apps while having fun with a basic game.
- Click on fruits to earn points.
- Simple and engaging user interface.
- Built with React and TypeScript.
- Designed for Telegram Mini Apps.
Before you begin, ensure you have the following installed:
- Node.js (version 14 or higher)
- npm (Node package manager)
-
Clone the repository:
git clone https://github.com/Whitelistedd/tma-clicker.git cd fruit-clicker-game -
Install the dependencies:
npm install
To run the application in development mode, execute:
npm run devYou should see output similar to:
VITE v5.2.12 ready in 237 ms
➜ Local: http://localhost:5173/fruit-clicker-game
➜ Network: http://172.18.16.1:5173/fruit-clicker-game
Open the Local link in your browser (e.g., http://localhost:5173/fruit-clicker-game).
For testing your app in Telegram:
-
Open
vite.config.ts. -
add the
basicSslfunction to enable HTTPS:import { defineConfig } from "vite"; import react from "@vitejs/plugin-react"; import basicSsl from "@vitejs/plugin-basic-ssl"; export default defineConfig({ plugins: [react(), basicSsl()], server: { https: true, }, });
-
Run the development script again:
npm run dev- Use the HTTPS link generated in your terminal to test your app within Telegram.
You can use the following scripts to manage your application:
- Development Mode:
npm run dev
- Build for Production:
npm run build
- Lint Code:
npm run lint
- Deploy to GitHub Pages:
npm run deploy
Feel free to fork this repository and make changes as you see fit! Contributions, issues, and feature requests are welcome.
This project is licensed under the MIT License.