A full-stack roguelike web game where players earn gacha rolls by solving LeetCode problems.
Frontend: https://leetcode-gacha.vercel.app/
LeetCode Gacha is a turn-based roguelike game designed to encourage coding practice through game progression.
Players connect a LeetCode account, earn rolls by solving new problems, recruit characters through a gacha system, build a party, and attempt dungeon runs featuring turn-based combat, rewards, progression, and permadeath.
- User registration and login
- JWT authentication
- Persistent user progress
- LeetCode GraphQL API integration
- Track solved problems
- Award rolls for newly completed problems
- Prevent duplicate rewards
- Spend rolls to obtain characters
- Multiple character classes and rarities
- Persistent character inventory
- Select a lineup of 4 characters
- View character stats and abilities
- Save and update team compositions
- Speed-based turn order
- Character-specific abilities
- Target selection
- Buff and healing mechanics
- Battle log system
- Encounter progression
- Reward selection between battles
- Permanent character death
- Run management and scoring
- Responsive React interface
- Character and enemy sprites
- Combat animations
- Inventory management
- Battle UI with skill descriptions
- React
- Vite
- JavaScript
- HTML
- CSS
- Node.js
- Express.js
- JWT Authentication
- REST APIs
- MongoDB Atlas
- Mongoose
- LeetCode GraphQL API
- Vercel
- Render
- GitHub
git clone https://github.com/EdmondLee958/leetcode-gacha.git
cd leetcode-gachanpm installcd frontend
npm installCreate a .env file in the project root:
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secretCreate a .env file inside frontend:
VITE_API_URL=http://localhost:5000npm startThe backend is hosted on Render's free tier and may take up to a minute to wake up after periods of inactivity.
cd frontend
npm run devEdmond Lee