✨ Stay updated with the latest news and updates: Join Clicker Game News / Updates ✨
You'll need the following environment variables in your .env file:
DATABASE_URL="your MongoDB database URL"
BOT_TOKEN="your Telegram bot token" # Optional if BYPASS_TELEGRAM_AUTH is true
BYPASS_TELEGRAM_AUTH=true # Set to true during testsAnd these variables in your .env.local file:
NEXT_PUBLIC_BYPASS_TELEGRAM_AUTH=true # Set to true during tests
NEXT_PUBLIC_BOT_USERNAME="yout Telegram bot username like MyBot_bot"
NEXT_PUBLIC_APP_URL_SHORT_NAME="your app short name" # the short name of your app, which you provide to BotFather when creating a Telegram mini app, is given lastFollow these steps to see the app in test mode on your local machine:
-
Navigate to the project directory
cd your-project-directory -
Install dependencies
npm install
-
Set up your environment variables
# In .env DATABASE_URL="your MongoDB database URL" BYPASS_TELEGRAM_AUTH=true # For tests # In .env.local NEXT_PUBLIC_BYPASS_TELEGRAM_AUTH=true # For tests
-
Generate Prisma schema
npx prisma generate
-
Seed the database with test data
npx prisma db seed
-
Run the app
npm run dev
-
Check and customize the code
- Files to review:
prisma/seed.ts,utils/tasks-data.ts,utils/game-mechanics.ts,utils/consts.ts
- Files to review:
📺 Instruction Video Released! Check out the detailed video on my YouTube channel where I walk you through:
- Running the code on Vercel
- Creating a Telegram Mini App
👉 Watch the video now and get started: YouTube Instructions Video
You need to provide only the following environment variables while deploying to Vercel:
DATABASE_URL
BOT_TOKEN
NEXT_PUBLIC_BOT_USERNAME
NEXT_PUBLIC_APP_URL_SHORT_NAME