A Flask-based web application for generating and managing digital versions of key Indian identity cards: Aadhar, PAN, Driving License, and Voter ID.
E-Card-Generator streamlines the process of requesting and managing digital versions of essential Indian identity documents. The application provides a complete workflow from user registration to card generation, with an admin interface for verification and approval.
- User Authentication: Secure registration and login system
- Multiple Card Types: Support for Aadhar, PAN, Driving License, and Voter ID cards
- Request Management: Complete lifecycle tracking from request to generation
- Admin Dashboard: Tools for managing users and card requests
- Automated Key Generation: Unique algorithms for each card type
- Status Tracking: Monitor progress (requested, under verification, verified, generated)
- File Upload: Support for user images and documents
- Search Functionality: Find users and filter by card status
Each identity card uses a unique algorithm for generating its identifier:
Card Type | Format | Example | Generation Logic |
---|---|---|---|
Aadhar | 12-digit number | 123456789012 | Random 12-digit integer |
PAN | XJHQR3842P | XJHQR3842P | 5 uppercase letters, 4 digits, 1 uppercase letter |
Voter ID | ABC1234567 | ABC1234567 | 3 uppercase letters + 7 digits |
Driving License | DL-01-2025-1234567 | DL-01-2025-1234567 | 2 letters (state) + 2 digits (RTO) + year + 7 digits |
E-Card-Generator/
βββ README.md
βββ app.py # Main application entry point
βββ key_generator.py # Card number generation algorithms
βββ test.txt
βββ Application/ # Core application modules
β βββ controllers.py # Route handlers and business logic
β βββ database.py # Database connection and utilities
β βββ models.py # Data models
β βββ __pycache__/
βββ instance/
β βββ ecard.sqlite # SQLite database
βββ static/ # Static assets
β βββ pan.webp
β βββ style.css
βββ templates/ # HTML templates
βββ Aadhar.html
βββ admin_dashboard.html
βββ card_requirements.txt
βββ driving-license.html
βββ login.html
βββ pan-card.html
βββ Register.html
βββ results.html
βββ select.html
βββ summary.html
βββ update_status.html
βββ user_dashboard.html
βββ view_aadhar.html
βββ view_driving.html
βββ view_pan.html
βββ view_voterid.html
βββ voter-id.html
-
Clone the repository:
git clone https://github.com/yourusername/E-Card-Generator.git cd E-Card-Generator
-
Create and activate a virtual environment (recommended):
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Set up the environment variables (if needed):
# Example for development export FLASK_APP=app.py export FLASK_ENV=development
Start the application with:
python app.py
The application will be available at http://127.0.0.1:5000/
-
Registration and Login:
- Register with a valid email and password
- Log in using your credentials
-
Requesting Cards:
- Select the card type you need (Aadhar, PAN, Driving License, or Voter ID)
- Fill in the required personal information
- Upload necessary documents and photos
- Submit your request
-
Tracking Status:
- View all your card requests on your dashboard
- Check the status of each request (requested, under verification, verified, generated)
- Download generated cards once approved
-
Admin Dashboard:
- Access the admin interface via
/admin
(login with admin credentials) - View all user requests across the system
- Access the admin interface via
-
Request Management:
- Review pending requests
- Verify user information and uploaded documents
- Update request status (under verification, verified, rejected)
- Generate card numbers for approved requests
-
User Management:
- View and search for users
- Manage user accounts and permissions
The application does not currently expose a public API, but internal endpoints are available for the web interface.
- Python 3.6+
- Flask and its dependencies
- SQLite
Follow the installation instructions above, then:
-
Enable debug mode:
export FLASK_DEBUG=1
-
Make code changes as needed
-
Run tests:
# Test command (if tests are implemented)
- Fork the repository
- Create a feature branch:
git checkout -b feature-name
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin feature-name
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- Flask documentation and community
- SQLite for database support
- All contributors and users of the application
For questions or support, please contact work.aayushkotwani@gmail.com