A simple web application that predicts nationality based on names using real-time API integration.
- Probability-based Results - Shows likelihood percentages for each country
- Clean UI/UX - Modern gradient design with responsive layout
- Error Handling - User-friendly error messages and validation
- Mobile Responsive - Works seamlessly across all devices
- HTML5 - Semantic markup structure
- CSS3 - Custom styling with gradients and animations
- Vanilla JavaScript - API integration and DOM manipulation
- Nationalize.io API - Nationality prediction service
- Font Awesome - Icons for enhanced UI
- Google Fonts - Martian Mono typography
- Modern web browser
- Internet connection (for API calls)
- Clone the repository
git clone https://github.com/arman-develops/nationalizr.git- Navigate to project directory
cd nationalizr- Open
index.htmlin your browser or serve with a local server
# Using Node.js
npm run dev- Visit
http://localhost:5173in your browser
- Enter a name in the search field
- Click the search button or press Enter
- View nationality predictions with probability percentages
- Results display the top 5 most likely countries
This project uses the Nationalize.io API:
GET https://api.nationalize.io/?name={name}
Response Format:
{
"count": 12345,
"name": "example",
"country": [
{
"country_id": "US",
"probability": 0.123
}
]
}Update CSS custom properties in :root:
:root {
--background-color: your-gradient-here;
--secondary-background-color: your-color;
--text-white: #fff;
}Change the font family by updating the Google Fonts import and CSS:
@import url('your-font-url');
--primary-font: "Your Font", monospace;- Nationalize.io for providing the nationality prediction API
- Font Awesome for the beautiful icons
- Google Fonts for the Martian Mono typeface
Victor Amon - LinkedIn - GitHub
Project Link: https://github.com/arman-develops/nationalizr
⭐ Star this repo if you found it helpful!
