A comprehensive Pokemon discovery platform where users can search, explore, and collect their favorite Pokemon. Built with modern web technologies and featuring advanced search capabilities, detailed Pokemon information, personalized favorites management, and an interactive battle arena system.
- Features
- Technologies Used
- Project Structure
- Installation & Setup
- Running the Application
- API Endpoints
- Middleware
- Database Structure
- How to Use
- Team
- License
- Advanced Pokemon Search - Search by ID, name, type, or ability
- Detailed Pokemon Information - Comprehensive Pokemon stats and information
- Personal Favorites Collection - Save and manage your favorite Pokemon
- User Authentication & Registration - Secure user accounts with session management
- Data Export Functionality - Download your favorites as JSON
- Interactive Battle Arena - Real-time Pokemon battles
- Player vs Bot Battles - Fight against AI opponents
- Player vs Player Battles - Challenge other online players
- Battle History Tracking - Complete record of all your battles
- Competitive Leaderboard - Global rankings and statistics
- Player Statistics & Rankings - Track wins, losses, and draws
- Real-time Battle Results - Live battle outcome processing
- Responsive Design - Works on desktop, tablet, and mobile
- Session-based Security - Secure authentication system
- Real-time Online Players - See who's currently online
- Node.js - Runtime environment
- Express.js - Web application framework
- express-session - Session management middleware
- node-fetch - HTTP client for API requests
- File-based Database - JSON file storage system
- HTML5 - Markup language
- CSS3 - Styling with modern features (Grid, Flexbox, Animations)
- JavaScript (ES6+) - Modern JavaScript with async/await
- PokeAPI - RESTful Pokemon API providing comprehensive Pokemon data
- YouTube API - For Pokemon-related video content (optional)
PokemonFinalProject/
├── Server.js # Main server file
├── package.json # Dependencies and scripts
├── README.md # Project documentation
│
├── Client/ # Frontend files
│ ├── index.html # Landing page
│ ├── index.js # Landing page logic
│ ├── index.css # Landing page styles
│ │
│ ├── login.html # Login page
│ ├── login.js # Login functionality
│ ├── login.css # Login styles
│ │
│ ├── register.html # Registration page
│ ├── register.js # Registration functionality
│ ├── register.css # Registration styles
│ │
│ ├── pokemonSearch.html # Pokemon search page
│ ├── pokemonSearch.js # Search functionality
│ ├── pokemonSearch.css # Search page styles
│ │
│ ├── pokemonFavorites.html # Favorites page
│ ├── pokemonFavorites.js # Favorites functionality
│ ├── pokemonFavorites.css # Favorites styles
│ │
│ ├── arena.html # Arena main page
│ ├── arena.js # Arena functionality
│ ├── arena.css # Arena styles
│ │
│ ├── arenaVsBot.html # Bot battle page
│ ├── arenaVsBot.js # Bot battle logic
│ ├── arenaVsBot.css # Bot battle styles
│ │
│ ├── arenaRandomVsPlayer.html # Player vs Player battle
│ ├── arenaRandomVsPlayer.js # PvP battle logic
│ ├── arenaRandomVsPlayer.css # PvP battle styles
│ │
│ ├── arenaFightHistory.html # Battle history page
│ ├── arenaFightHistory.js # History functionality
│ ├── arenaFightHistory.css # History styles
│ │
│ ├── arenaLeaderboard.html # Leaderboard page
│ ├── arenaLeaderboard.js # Leaderboard functionality
│ ├── arenaLeaderboard.css # Leaderboard styles
│ │
│ ├── navbar.js # Navigation functionality
│ └── navbar.css # Navigation styles
│
└── Data/ # Data storage
├── users.json # User accounts
├── arena.json # Arena data and stats
├── project-info.json # Project metadata
│
└── [user_email]/ # User-specific folders
├── favorites.json # User's favorite Pokemon
└── battle-history.json # User's battle history
- Node.js (version 18.x or higher)
- npm (Node Package Manager)
# If using Git
git clone https://github.com/eliran17e/pokemon-final-project.git
cd pokemon-final-project
# Or download and extract the project files to your desired directorynpm installIf you don't have a package.json file, create one with these dependencies:
npm init -y
npm install express express-session node-fetchCreate a .env file in the root directory for any environment variables:
NODE_ENV=development
YOUTUBE_API_KEY=your_youtube_api_key_here
PORT=3000The application will automatically create the necessary data directories and files on first run. No additional setup required.
npm start
# or
node Server.jsThe server will start and you'll see output similar to:
Server running on http://localhost:3000
Data folder initialized
Available routes:
GET / - Welcome page
GET /login - Login page
GET /register - Register page
GET /search - Search page (protected)
GET /favorites - Favorites page (protected)
GET /arena - Arena page (protected)
...
Open your web browser and navigate to: http://localhost:3000
GET /- Landing pageGET /login- Login pageGET /register- Registration pageGET /search- Pokemon search (protected)GET /favorites- User favorites (protected)GET /arena- Battle arena main page (protected)GET /arena/vs-bot- Bot battles (protected)GET /arena/random-vs-player- Player battles (protected)GET /arena/fight-history- Battle history (protected)GET /arena/leaderboard- Leaderboard (protected)
POST /login- User loginPOST /register- User registrationPOST /logout- User logoutGET /api/user- Get current user info
GET /api/favorites- Get user's favoritesPOST /api/favorites- Save user's favoritesPOST /api/favorites/add- Add single Pokemon to favorites
GET /api/arena/online-players- Get online playersGET /api/arena/stats- Get player statisticsGET /api/arena/rank- Get player rankGET /api/arena/battle-history- Get battle historyGET /api/arena/leaderboard- Get leaderboardPOST /api/arena/save-battle-result- Save battle resultPOST /api/arena/sync-stats- Synchronize arena statistics
GET /api/project-info- Get project information
GET /api/youtube/:pokemonName- Get YouTube videos for Pokemon
- express.urlencoded() - Parse URL-encoded bodies (limit: 10mb)
- express.json() - Parse JSON bodies (limit: 10mb)
- express.static() - Serve static files from Client folder
express-session({
secret: 'pokemon-secret-key-2025',
resave: false,
saveUninitialized: false,
cookie: {
secure: false,
maxAge: 24 * 60 * 60 * 1000 // 24 hours
}
})- Route protection for authenticated pages
- Automatic redirection to login for unauthenticated users
- Session-based user tracking
- Automatic online status updates
- Cleanup of offline players (5-minute timeout)
- Real-time player statistics synchronization
[
{
"id": "unique_user_id",
"name": "User Name",
"email": "user@email.com",
"password": "hashed_password"
}
]{
"players": {
"user_id": {
"wins": 0,
"losses": 0,
"draws": 0
}
},
"battles": [],
"onlinePlayers": [
{
"id": "user_id",
"name": "User Name",
"email": "user@email.com",
"lastSeen": "2025-01-01T00:00:00.000Z",
"wins": 0,
"losses": 0,
"draws": 0
}
]
}favorites.json- Optimized Pokemon data for display and battlesbattle-history.json- Complete battle records
- Start the server with
node Server.js - Visit
http://localhost:3000in your browser - Register a new account or login with existing credentials
- Start searching for Pokemon in the search page
- Add Pokemon to your favorites collection
- Enter the Arena for exciting battles!
- VS Bot: Practice against AI opponents to improve your skills
- VS Player: Challenge other online players in real-time battles
- View History: Check your complete battle records and statistics
- Leaderboard: See global rankings and compete for the top spot
- Search Pokemon by ID, name, type, or ability
- Save favorites with optimized data for quick access
- Real-time multiplayer battle system
- Comprehensive statistics and battle history tracking
- Export your favorite Pokemon data as JSON
| Name | GitHub | Role | |
|---|---|---|---|
| Tomer Harari | tomerdb@gmail.com | @tomerdb | Full-Stack Developer |
| Eliran Elisha | eliran17eli@gmail.com | @eliran17e | Full-Stack Developer |
- Course: Web Development Course
- Institution: Tel-Hai Academic College
- Semester: Spring 2025
- Project Type: Final Project
This project is developed as part of an academic course at Tel-Hai Academic College.
- PokeAPI: https://pokeapi.co/ - Comprehensive Pokemon data
- Node.js: https://nodejs.org/
- Express.js: https://expressjs.com/
Version: 1.0.0
Last Updated: July 2025