An addictive idle/grinding game for Slack! Earn Hack Coins (HC), rob other players, gamble on slots, and build your empire.
- /work - Grind and earn HC with daily streaks (5min cooldown)
- /bal - Check wallet & bank balance & Deposit/withdrawwithdraw
- /shop - Buy items that boost your earnings
- π° /pitch - Animated slot machine with 4 symbols
- π« /rob @user - Steal from other players (50% success, 2x penalty if caught)
- πͺ /coinflip - Solo 50/50 gambling
- βοΈ /coinflip @user - Challenge others to PvP duels
- Daily Streaks - Earn bonus HC for consecutive work days
- Shop Items - 7 items with passive bonuses:
- Coffee Machine: -1min cooldown
- MacBook Pro: +15% earnings
- Herman Miller Chair: +5% rare chance
- 4K Monitor: +10% earnings
- Standing Desk: +25% streak bonuses
- AirPods Max: +5% slot luck
- Mechanical Keyboard: +50 HC flat bonus
- Node.js 20+
- A Slack workspace where you have admin access
-
Clone and Install
git cloneyour-repo>gt; cd HackTycoon npm installl -
Set up Slack App
- Go to https://api.slack.com/apps β Create New App
- Enable Socket Mode
- Add Bot Token Scopes:
chat:write,commands,users:read - Create slash commands:
/work,/bal,/shop,/pitch,/rob,/coinflip,/help - Install to workspace
-
Environment Variables Create
.envfile:SLACK_BOT_TOKEN=xoxb-your-bot-token SLACK_SIGNING_SECRET=your-signing-secret SLACK_APP_TOKEN=xapp-your-app-token DATABASE_URL="file:./dev.db"
-
Database Setup
npx prisma migrate dev --name init npx prisma generatee
-
Run
npm run dev
See DEPLOY.md for complete Fly.io deployment instructions.
TL;DR:
# Install Fly CLI
fly auth login
# Launch app
fly launch --no-deploy
# Create volume
fly volumes create hack_tycoon_data --size 1 --region sjc
# Set secrets
fly secrets set SLACK_BOT_TOKEN="..." SLACK_SIGNING_SECRET="..." SLACK_APP_TOKEN="..."
# Deploy
fly deployy- 5-minute cooldown (4min with Coffee Machine)
- Rarity tiers: Common (70%), Uncommon (20%), Rare (8%), Epic (1.5%), Legendary (0.5%)
- Earnings: 50-15,000 HC based on rarity
- Streak bonuses: Day 7 (+500 HC), Day 30 (+5,000 HC), Day 100 (+50,000 HC)
- 50% success rate
- 10-minute cooldown
- Can't rob same person for 1 hour
- If caught: lose 2x the amount
- Only steals from wallet (bank is safe!)
- 4 symbols: Diamond (2x), Trophy (3x), Heart (1.5x), Star (5x/10x jackpot)
- 3 matching = full multiplier
- 2 matching = half multiplier
- Animated reels (1.8s spin)
- Solo: Pure 50/50 odds, 10s cooldown
- PvP: Winner takes pot minus 5% house fee, requires acceptance
HackTycoon/
βββ src/
β βββ commands/ # Slash command handlers
β β βββ work.ts
β β βββ balance.ts
β β βββ shop.ts
β β βββ pitch.ts # Slot machine
β β βββ rob.ts
β β βββ coinflip.ts
β β βββ banking.ts # Deposit/withdraw
β βββ database/
β β βββ queries.ts # Prisma helpers
β βββ utils/
β β βββ itemEffects.ts # Shop item bonuses
β βββ app.ts # Main app entry
βββ prisma/
β βββ schema.prisma # Database schema
β βββ dev.db # SQLite database
βββ fly.toml # Fly.io config
βββ Dockerfile # Container config
βββ package.json
ββ package.json
- Runtime: Node.js + TypeScript
- Framework: Slack Bolt
- Database: SQLite + Prisma ORM
- Deployment: Fly.io (free tier)
- UI: Slack Block Kit
Enjoy the grind!