A mini-game built for Revi’s technical challenge where users can create custom monsters and make them battle based on their attributes.
- ⚛️ React + TypeScript
- 🎨 TailwindCSS
- 🧩 Shadcn/ui
- 🧠 Custom battle logic in plain TS classes
- Clone the repository
git clone [email protected]:josecls/revi-challenge.git
cd revi-challenge- Install dependencies
npm install- Start the development server
npm run devThen finally access it at http://localhost:5173 or by following the link provided in your terminal.
- 🧬 Create monsters with attributes: Attack, Defense, Speed, and HP
- ⚔️ Battle simulator with real-time UI and logs
- 💡 Attribute-based turn system with dynamic damage calculation
- 💻 Responsive layout for desktop and mobile
- 🖱️ Hover-to-preview attributes
- 📜 Scroll-following battle log
- 🧹 Clean and modern UI using Tailwind + Shadcn
- Battlefield logic is encapsulated in a pure TypeScript class for testability and separation of concerns
- Functional component structure with hooks for reactivity
- Animation + auto-scroll for battle logs using
useRef+useEffect - State managed entirely in component-level React hooks
/src
├── components/ # UI Components (Cards, Sections, Lists)
├── contexts/ # React Context for shared state
├── core/ # Battle logic and Monster entity
├── lib/ # Useful shareable pieces of code
├── pages/ # App views
└── App.tsx # Main app entry and Routing- Add Pagination/Search to the Monster Listing page — scrolling endlessly isn’t fun, right?
- Include sound effects and animations during battles to enhance excitement
- Introduce themed scenarios that change the background for a more immersive experience
- Persist monster roster using local storage so users don't lose progress
- Implement critical hits and abilities for a richer combat system
- Add unit tests to ensure battle logic works as expected
- Improve the UX on mobile views
Made with ☕ by josecls