This is a Telegram Mini App built with React, TypeScript, Tailwind CSS, and GSAP. It features interactive components like Game, Mining, Profile, Guild, and Dungeon, providing an engaging experience for users. The app is designed to be highly responsive, visually appealing, and optimized for mobile devices within the Telegram WebApp environment.
Here is a demo of the app in action:
Note: This is the frontend part of the project. The backend is not included in this demo.
To set up and run the project locally, follow these steps:
git clone https://github.com/yourusername/gremlin-hunter.git
cd gremlin-hunter
npm install
oryarn install
npm run dev
oryarn dev
π gremlin-hunter
βββ π src
β βββ π components # Reusable UI components
β βββ π pages # Individual pages for the app
β βββ π assets # Images, icons, and other assets
β βββ App.tsx # Main application component
β βββ main.tsx # Application entry point
βββ π package.json # Dependencies and scripts
βββ π tailwind.config.js # Tailwind CSS configuration
βββ π tsconfig.json # TypeScript configuration
βββ π README.md # Documentation
The app communicates with a backend server to send and retrieve user data. The backend is built with Express.js and MongoDB, ensuring efficient data handling. Below is an example of how user data is sent to the server:
const sendUserData = async (userData: UserData) => {
try {
const response = await fetch("https://XXX.herokuapp.com/api/user-data", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(userData),
});
if (!response.ok) throw new Error("Failed to send user data");
console.log("User data sent successfully");
} catch (error) {
console.error("Error sending user data:", error);
}
};
The backend exposes several endpoints for various functionalities:
POST /api/user-data
: Save user details to the database.GET /api/user/:id
: Fetch user data by ID.PUT /api/user/:id
: Update user information.POST /api/invite
: Track and register invited users.The project is hosted on Heroku, but it can be deployed to other cloud platforms like Vercel, AWS, or DigitalOcean. To deploy your own version on Heroku:
npm run build
heroku create your-app-name
heroku git:remote -a your-app-name
git push heroku main
We welcome contributions to the project! Follow these steps to contribute:
git checkout -b feature-branch-name
.git commit -m "Add new feature"
.git push origin feature-branch-name
.This project is licensed under the MIT License, allowing for open-source use and modification.
Made with β€οΈ by S.O.S.