This React application allows users to upload driver's license and selfie images for ID verification purposes.
Before you begin, ensure you have the following installed:
- Node.js (v14.0.0 or later)
- npm (v6.0.0 or later)
You will also need:
- A deployment of the Amazon Rekognition Identity Verification sample repository first. You'll use the output from this to feed the
.env
file for credentials. - An AWS account
-
Clone the repository:
git clone https://github.com/your-username/anycompany-id-verification.git cd anycompany-id-verification
-
Install dependencies:
npm install
-
Set up environment variables:
- Copy the
.env.example
file to a new file named.env
:cp .env.example .env
- Open the
.env
file and replace the placeholder values with your actual AWS credentials and S3 bucket information:REACT_APP_API_URL=https://example.execute-api.REGION.amazonaws.com/api REACT_APP_API_KEY=xyz123
- Copy the
To start the development server:
npm start
This will run the app in development mode. Open http://localhost:3000 to view it in your browser.
To create a production build:
npm run build
This command builds the app for production to the build
folder. It correctly bundles React in production mode and optimizes the build for the best performance.
To serve the production build locally:
npm install -g serve
serve -s build
- Open the application in a web browser.
- You will see two upload boxes: one for the driver's license and one for the selfie.
- Click "Choose File" to select an image for each category.
- Click the "Verify Identity" button at the bottom for it to be processed.
- Check that your AWS credentials in the
.env
file are correct and have the necessary permissions. - If the application isn't picking up your environment variables, try restarting the development server.
This application handles sensitive information. Ensure that you follow best practices for securing your AWS credentials and protecting user data. Never commit your .env
file to version control.
If you'd like to contribute, please fork the repository and use a feature branch. Pull requests are warmly welcome.
The code in this project is licensed under MIT license.