A comprehensive platform for secure digital document issuance and verification, designed for universities, employers, and government offices.
This system provides a trusted environment for issuing and verifying digital documents with role-based access control. It features automated document expiration, QR code generation for easy verification, and detailed analytics dashboards for different user roles.
- JWT-based authentication
- Role-based access control (Admin, Issuer, Verifier)
- Secure password hashing with bcrypt
- Document issuance with metadata
- QR code generation for verification
- Document status tracking (Active, Expired, Revoked)
- Automated expiration via cron jobs
- PDF generation and export capabilities
- User management and approval
- System-wide analytics
- Document oversight and logs
- Issue digital documents
- Track issued documents
- Analytics on document usage
- Verify document authenticity via QR codes
- View verification history
- Access to verification logs
- Real-time charts and statistics
- Document status pie charts
- Upload activity line charts
- Comprehensive logging system
- Responsive React frontend
- RESTful API backend
- MongoDB database
- Automated document expiration
- CORS enabled for cross-origin requests
- React 19 - UI framework
- Vite - Build tool and dev server
- React Router - Client-side routing
- Axios - HTTP client
- Framer Motion - Animations
- Recharts - Data visualization
- Lucide React - Icons
- HTML5 QR Code - QR code scanning
- jsPDF - PDF generation
- Node.js - Runtime environment
- Express.js - Web framework
- MongoDB - Database
- Mongoose - ODM
- JWT - Authentication
- bcryptjs - Password hashing
- QRCode - QR code generation
- node-cron - Scheduled tasks
secure-docs/
├── client/ # React frontend
│ └── secure-docReactapp/
│ ├── public/ # Static assets
│ ├── src/
│ │ ├── components/ # Reusable UI components
│ │ │ ├── Hero/ # Landing page hero section
│ │ │ ├── LoginSignup/ # Authentication components
│ │ │ ├── Navbar/ # Navigation
│ │ │ └── ... # Other components
│ │ ├── pages/ # Page components
│ │ │ ├── AdminDashboard/ # Admin-specific pages
│ │ │ ├── IssuerDashboard/# Issuer pages
│ │ │ ├── VerifyDashboard/# Verifier pages
│ │ │ └── Dashboard.jsx # Main dashboard
│ │ ├── routes/ # Route configurations
│ │ ├── Axios/ # HTTP client setup
│ │ └── assets/ # Images and media
│ ├── package.json
│ └── vite.config.js
└── server/ # Node.js backend
├── config/
│ └── db.js # Database configuration
├── controllers/ # Route handlers
│ ├── authcontroller.js # Authentication logic
│ ├── documentController.js # Document operations
│ ├── userController.js # User management
│ └── analyticsController.js # Analytics
├── middleware/ # Express middleware
│ ├── errorHandler.js # Error handling
│ ├── rolemiddleware.js # Role-based access
│ └── validateToken.js # JWT validation
├── models/ # Mongoose schemas
│ ├── User.js # User model
│ └── documentSchema.js # Document model
├── routes/ # API routes
│ ├── authRoutes.js # Auth endpoints
│ ├── userRoutes.js # User endpoints
│ ├── documentRoute.js # Document endpoints
│ └── analyticsRoutes.js # Analytics endpoints
├── utils/ # Utility functions
├── package.json
└── index.js # Server entry point
- Node.js (v16 or higher)
- MongoDB
- npm or yarn
-
Navigate to the server directory:
cd server -
Install dependencies:
npm install
-
Create a
.envfile in the server directory with the following variables:PORT=3000 MONGODB_URI=mongodb://localhost:27017/secure-docs JWT_SECRET=your_jwt_secret_key -
Start the MongoDB service on your system
-
Start the server:
npm run dev
The server will run on http://localhost:3000
-
Navigate to the client directory:
cd client/secure-docReactapp -
Install dependencies:
npm install
-
Start the development server:
npm run dev
The frontend will run on http://localhost:5173
- Registration: Users can register with different roles (Admin, Issuer, Verifier)
- Login: Authenticate using email and password
- Document Issuance: Issuers can upload and issue documents with metadata
- Verification: Verifiers can scan QR codes or enter document IDs to verify authenticity
- Analytics: Each role has access to relevant dashboards and analytics
POST /api/auth/register- User registrationPOST /api/auth/login- User loginPOST /api/auth/logout- User logout
GET /api/user/profile- Get user profilePUT /api/user/profile- Update user profile
POST /api/document/issue- Issue a new documentGET /api/document/list- Get user's documentsGET /api/document/verify/:id- Verify a documentPUT /api/document/status- Update document status
GET /api/analytics/overview- Get system analyticsGET /api/analytics/documents- Document statistics
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the ISC License.
For questions or support, please contact the development team.