Skip to content

RamiNoodle733/animal-battle-stats

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

693 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Animal Battle Stats

Interactive Fighting Game-Style Animal Statistics Webapp

Live Demo License Animals API

A web application that presents animal statistics in an engaging fighting game-style interface. Compare stats, view animals in a character select screen, and pit them against each other in VS battles!

๐ŸŽฎ Live Demo

https://animalbattlestats.com

โœจ Features

๐ŸŽฎ Fighting Game Interface

  • Character Select Screen: Stats view with centered character display and flanking stat panels
  • VS Battle Mode: Compare two fighters head-to-head with dramatic VS badge
  • Transparent PNG Images: All animals feature clean, background-free images
  • Responsive Design: Optimized for desktop, tablet, and mobile devices

๐Ÿ“Š Comprehensive Stats

  • 225 Animals: From Megalodon to Red-Eyed Tree Frog
  • Combat Stats: Attack, Defense, Agility, Stamina, Intelligence, Special Attack
  • Detailed Substats: Raw Power, Armor, Speed, Tactics, and more
  • Scientific Data: Weight, speed, lifespan, bite force, and more

๐Ÿ” User System

  • Account Creation: Sign up with email and password
  • User Authentication: Secure JWT-based login
  • Future Features: Voting on stats, comments, fight predictions

๐Ÿš€ Backend API

  • MongoDB Database: Persistent storage with MongoDB Atlas
  • RESTful API: Vercel serverless functions
  • Search & Filter: Advanced querying capabilities

๐Ÿš€ Quick Start

Live Site

Visit animalbattlestats.com directly.

Local Development

# Clone the repository
git clone https://github.com/RamiNoodle733/animal-battle-stats.git
cd animal-battle-stats

# Install dependencies
npm install

# Configure environment
cp .env.example .env.local
# Edit .env.local with your MongoDB URI and JWT secret

# Seed database (optional - if starting fresh)
npm run seed

# Start development server
npm run dev

๐Ÿ“ Project Structure

animal-battle-stats/
โ”œโ”€โ”€ index.html              # Main HTML (single-page app)
โ”œโ”€โ”€ manifest.json           # PWA manifest
โ”œโ”€โ”€ vercel.json             # Vercel deployment config
โ”‚
โ”œโ”€โ”€ css/                    # Stylesheets (modular architecture)
โ”‚   โ”œโ”€โ”€ main.css            # Import manifest
โ”‚   โ”œโ”€โ”€ legacy.css          # Original styles (being migrated)
โ”‚   โ”œโ”€โ”€ variables.css       # Design tokens
โ”‚   โ”œโ”€โ”€ base.css            # Reset & utilities
โ”‚   โ”œโ”€โ”€ components/         # Reusable UI components
โ”‚   โ”‚   โ”œโ”€โ”€ buttons.css
โ”‚   โ”‚   โ”œโ”€โ”€ cards.css
โ”‚   โ”‚   โ”œโ”€โ”€ modals.css
โ”‚   โ”‚   โ””โ”€โ”€ stat-bars.css
โ”‚   โ”œโ”€โ”€ layout/             # Layout components
โ”‚   โ”‚   โ”œโ”€โ”€ header.css
โ”‚   โ”‚   โ””โ”€โ”€ grid.css
โ”‚   โ””โ”€โ”€ pages/              # Page-specific styles
โ”‚       โ”œโ”€โ”€ compare.css
โ”‚       โ”œโ”€โ”€ community.css
โ”‚       โ”œโ”€โ”€ rankings.css
โ”‚       โ”œโ”€โ”€ stats.css
โ”‚       โ””โ”€โ”€ tournament.css
โ”‚
โ”œโ”€โ”€ js/                     # Client-side JavaScript
โ”‚   โ”œโ”€โ”€ core.js             # Shared utilities & config
โ”‚   โ”œโ”€โ”€ main.js             # Core app + Stats page (~2,500 lines)
โ”‚   โ”œโ”€โ”€ rankings.js         # Rankings page (~1,850 lines)
โ”‚   โ”œโ”€โ”€ tournament.js       # Tournament system (~1,900 lines)
โ”‚   โ”œโ”€โ”€ community-manager.js # Community page (~1,300 lines)
โ”‚   โ”œโ”€โ”€ router.js           # Client-side routing
โ”‚   โ”œโ”€โ”€ auth.js             # Authentication UI
โ”‚   โ”œโ”€โ”€ compare.js          # Compare page enhancements
โ”‚   โ””โ”€โ”€ community.js        # Community page enhancements
โ”‚
โ”œโ”€โ”€ api/                    # Serverless API functions (Vercel)
โ”‚   โ”œโ”€โ”€ animals.js          # Animals CRUD
โ”‚   โ”œโ”€โ”€ animals/[id].js     # Single animal operations
โ”‚   โ”œโ”€โ”€ auth.js             # Authentication
โ”‚   โ”œโ”€โ”€ battles.js          # Battle results
โ”‚   โ”œโ”€โ”€ chat.js             # Community chat
โ”‚   โ”œโ”€โ”€ comments.js         # Animal comments
โ”‚   โ”œโ”€โ”€ community.js        # Community features
โ”‚   โ”œโ”€โ”€ rankings.js         # Power rankings
โ”‚   โ”œโ”€โ”€ search.js           # Search API
โ”‚   โ”œโ”€โ”€ stats.js            # Site statistics
โ”‚   โ””โ”€โ”€ votes.js            # Voting system
โ”‚
โ”œโ”€โ”€ lib/                    # Shared backend utilities
โ”‚   โ”œโ”€โ”€ mongodb.js          # Database connection
โ”‚   โ”œโ”€โ”€ auth.js             # JWT utilities
โ”‚   โ”œโ”€โ”€ discord.js          # Discord integration
โ”‚   โ”œโ”€โ”€ xpSystem.js         # XP/leveling system
โ”‚   โ””โ”€โ”€ models/             # Mongoose models
โ”‚       โ”œโ”€โ”€ Animal.js
โ”‚       โ”œโ”€โ”€ BattleStats.js
โ”‚       โ”œโ”€โ”€ ChatMessage.js
โ”‚       โ”œโ”€โ”€ Comment.js
โ”‚       โ”œโ”€โ”€ RankHistory.js
โ”‚       โ”œโ”€โ”€ SiteStats.js
โ”‚       โ”œโ”€โ”€ User.js
โ”‚       โ”œโ”€โ”€ Vote.js
โ”‚       โ””โ”€โ”€ XpClaim.js
โ”‚
โ”œโ”€โ”€ scripts/                # Admin/development scripts
โ”‚   โ”œโ”€โ”€ migrations/         # Database migrations
โ”‚   โ”œโ”€โ”€ data-tools/         # Data manipulation tools
โ”‚   โ””โ”€โ”€ image-tools/        # Image processing tools
โ”‚
โ”œโ”€โ”€ images/                 # Static images
โ””โ”€โ”€ animal_stats.json       # Backup animal data

๐Ÿ“ก API Endpoints

Endpoint Method Description
/api/animals GET Get all animals
/api/animals POST Create new animal
/api/animals/[id] GET/PUT/DELETE Single animal operations
/api/search GET/POST Search animals
/api/random GET Random animal(s)
/api/stats GET Database statistics
/api/health GET Health check
/api/auth/signup POST Create account
/api/auth/login POST Login
/api/auth/me GET Get current user

๐Ÿ› ๏ธ Technologies

Frontend: HTML5, CSS3, JavaScript, Chart.js, Font Awesome
Backend: Vercel Serverless Functions, MongoDB Atlas, Mongoose
Auth: JWT, bcryptjs

๏ฟฝ Documentation

๏ฟฝ๐Ÿ“ License

MIT License - see LICENSE for details.

About

Animal Battle Stats: The animal powerscaling database. Compare matchups, rank the roster, and run tournaments to see who comes out on top.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors