A cross-platform incremental game built with Next.js, Tailwind CSS, and Prisma. Supports Web, PC, Mobile, and Discord Activity.
- Incremental Gameplay: Click to earn gold, buy upgrades, and earn passive income.
- Cross-Platform Sync: Progress is saved to the database and synced across devices via Discord Login.
- Discord Activity: Ready to be embedded as a Discord Activity.
- Responsive Design: Works on Desktop and Mobile.
-
Install Dependencies:
npm install
-
Environment Variables: Create a
.envfile (or use the existing one) with the following:DATABASE_URL="file:./dev.db" NEXTAUTH_SECRET="your_secret_key" NEXTAUTH_URL="http://localhost:3000" DISCORD_CLIENT_ID="your_discord_client_id" DISCORD_CLIENT_SECRET="your_discord_client_secret" NEXT_PUBLIC_DISCORD_CLIENT_ID="your_discord_client_id"
-
Database Setup:
npx prisma db push
-
Run Development Server:
npm run dev
To use Discord Login and Activity features:
- Go to the Discord Developer Portal.
- Create a new Application.
- Get the Client ID and Client Secret.
- Add
http://localhost:3000/api/auth/callback/discordto the Redirects. - For Activity: Enable "Activities" and set the URL Mapping to your deployed URL (or tunnel for local dev).
- Web: Deploy to Vercel or any Node.js host.
- PC/Mobile: This web app is PWA-ready. You can also wrap it using Electron (PC) or Capacitor (Mobile) for native app stores.