A full-stack web application for managing identity cards with advanced features, built using the MERN stack (MongoDB, Express.js, React.js, Node.js).
- Create, read, update, and delete identity cards
- Image upload for photos and signatures
- PDF generation and preview
- QR code generation for each card
- Responsive design for all devices
- Multiple view options (Card/Table view)
- Real-time form validation
- Interactive UI with animations
- Secure file upload handling with size restrictions (500KB max)
- Advanced data visualization with charts
- Pagination and dynamic search
- Role-based authentication
- Admin dashboard with statistics
- Image compression and optimization
- Responsive design across all devices
- JWT-based authentication
- Protected routes and API endpoints
- File upload validation and sanitization
- Input data validation
- Rate limiting protection
- Secure password handling
- Activity trends visualization
- Gender distribution charts
- Religion distribution analytics
- Age group statistics
- Real-time data updates
- Customizable time ranges
- Clean and intuitive dashboard layout
- Responsive card detail view
- Professional PDF export design
- Dark/Light mode support
- Mobile-friendly interfaces
- Interactive data tables
- Modern form controls
- React.js with Vite
- Redux Toolkit for state management
- Bootstrap 5 with custom animations
- Chart.js for data visualization
- Axios for API integration
- jsPDF for document generation
- QR Code generation
- FontAwesome icons
- Custom CSS with responsive design
- Node.js & Express.js
- MongoDB with Mongoose
- Multer for file handling
- CORS enabled
- Rate limiting
- Environment variables
- Frontend: https://identity-card-system.vercel.app
- Updated Backend: https://identity-card-system-u48c.vercel.app
identity-card-system/
βββ backend/
β βββ routes/
β βββ models/
β βββ middleware/
β βββ uploads/
β βββ .env
β βββ .env.production
β βββ db.js
β βββ index.js
β βββ README.md
β
βββ frontend/
β βββ src/
β β βββ components/
β β βββ pages/
β β βββ redux/
β β βββ services/
β β βββ styles/
β β βββ utils/
β β βββ App.jsx
β β βββ App.css
β β βββ index.css
β β βββ main.jsx
β βββ .env
β βββ .env.production
β βββ public/
β βββ index.html
β βββ README.md
β βββ vercel.json
β βββ vite.config.js
β
βββ docs/
β
βββ .gitignore
βββ package-lock.json # Project locked dependencies
βββ package.json # Project dependencies
βββ README.md
- Node.js (v14+)
- MongoDB
- npm/yarn
git clone https://github.com/QaiserEjaz/identity-card-system.git
cd identity-card-system- Backend Setup
cd backend
npm installMONGODB_URI=your_mongodb_connection_string
PORT=5000
- Frontend Setup
cd ../frontend
npm installVITE_API_URL=http://localhost:5000
You can deploy the frontend and backend to Vercel. There are two recommended approaches:
- Separate projects (recommended)
-
Create two Vercel projects:
- Frontend: point to the
frontendfolder. This is a static site built by Vite. - Backend: point to the
backendfolder. The backend exposes a Serverless Function atbackend/api/index.js.
- Frontend: point to the
-
For the backend project set the Root Directory to
backendin the Vercel project settings. Vercel will install dependencies frombackend/package.jsonand build the function. -
Ensure the following environment variables are set in the backend project (Vercel > Settings > Environment Variables):
MONGODB_URIβ your MongoDB connection stringNODE_ENV=production
- Single monorepo project
- You can also deploy the whole repo as a monorepo, but you must configure two separate projects in Vercel or use monorepo settings to build each part. For simplicity, creating two projects is easier.
Notes:
- The backend uses
serverless-httpand exports a serverless handler. The backendvercel.json(located inbackend/vercel.json) maps incoming requests toapi/index.jsso API routes like/api/cardswill work. - Locally you can continue to run the frontend and backend concurrently with
npm run devfrom the repository root.
-
Design Inspiration
- Material Design Guidelines
- Bootstrap Documentation & Examples
- Dribbble ID Card Designs
-
Technical Resources
- React.js Documentations
- MongoDB University Tutorials
- Express.js Official Guides
- Redux Toolkit Best Practices
- Chart.js Examples Gallery
-
Libraries & Tools
- Bootstrap Themes
- FontAwesome Icons
- jsPDF Documentation
- QRCode.react Examples
- Axios HTTP Client
- Multer File Upload
- JWT Authentication
- Vite Build Tool
-
Development Tools
- GitHub Version Control
- Vercel Deployment
- Vercel (current backend hosting)
- MongoDB Atlas
- VS Code Editor
- Chrome DevTools







