Skip to content

martin-iliew/egn-generator

Repository files navigation

image

EGN Generator

A modern web application for validating, generating, and batch processing Bulgarian personal identification numbers (ЕГН - Единен граждански номер).

About

This application provides comprehensive tools for working with Bulgarian EGN numbers, including real-time validation, intelligent generation based on custom parameters, and bulk processing capabilities. Built with a focus on user experience and accuracy.

Features

EGN Validator

  • Real-time validation of Bulgarian personal identification numbers
  • Detailed breakdown of EGN components (birth date, region, gender, checksum)
  • URL-based validation support for easy sharing
  • Clear error messaging for invalid numbers

EGN Generator

  • Generate valid EGN numbers based on specific criteria
  • Customizable parameters: birth date, gender, region
  • Instant generation with complete number breakdown
  • Copy-to-clipboard functionality

Batch Processing

  • Generate multiple valid EGN numbers at once
  • Configurable batch size and generation parameters
  • Export results for further use
  • Efficient processing for large datasets

Tech Stack

  • React 18 - Modern UI library with hooks
  • TypeScript - Type-safe development
  • Vite - Next-generation frontend tooling
  • React Router - Client-side routing
  • Tailwind CSS - Utility-first styling
  • shadcn/ui - High-quality UI components
  • React Hook Form - Performant form management
  • Zod - Schema validation
  • date-fns - Modern date utilities

Getting Started

Prerequisites

Node.js 18+ and pnpm installed on your system.

Installation

# Clone the repository
git clone https://github.com/Martin13111/egn-generator.git

# Navigate to project directory
cd egn-generator

# Install dependencies
pnpm install

Development

# Start development server
pnpm dev

# Build for production
pnpm build

# Preview production build
pnpm preview

# Run linter
pnpm lint

The application will be available at http://localhost:5173

Project Structure

egn-generator/
├── src/
│   ├── components/      # Reusable UI components
│   ├── pages/           # Page components (Validator, Generator, Batch)
│   ├── lib/             # Utilities and helpers
│   └── App.tsx          # Main application component
├── public/              # Static assets
└── index.html           # Entry HTML file

Understanding Bulgarian EGN

A Bulgarian EGN (Единен граждански номер) is a 10-digit unique personal identification number with the following structure:

  • Digits 1-2: Year of birth (last two digits)
  • Digits 3-4: Month of birth (01-12 for 1900-1999, 21-32 for 1800-1899, 41-52 for 2000-2099)
  • Digits 5-6: Day of birth
  • Digits 7-9: Regional code and sequential number
  • Digit 10: Checksum for validation

License

This project is open source and available under the MIT License.

Contributing

Contributions are welcome. Please feel free to submit a Pull Request.

About

Validate, generate, and batch-process Bulgarian EGN numbers with detailed breakdowns and configurable rules.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors