Nuclear Codes is a simple facial recognition mac app. Heavily inspired by Donald Trump taking office in 2017 and him gaining access to the nuclear codes. The app takes a snapshot of the person in front of the screen, compares it with an image that is allowed to access the nuclear codes, either lets them view the codes or not.
This was a simple task to develop further skills in React and a chance to try out the AWS AI services.
- ElectronJS - Used for the mac interface.
- React - My JS framework of choice.
- AWS Rekognition - used for comparing the given face with the "presidents" face.
- AWS Polly - used for the voice prompts.
-
Create an AWS account and make sure your user has S3, Rekognition and Polly read and write access. See this and this if you are unsure how to get this set up.
-
In the AWS console create an S3 bucket with the name of
rekognitionnn-{mysecret}
. Changemysecret
to be unique to your account. -
Upload your "president" image. Make sure you change the
president.jpg
file in the repo to be a clear picture of your face. Then from the root directory, run:
s3 cp ./president.jpg s3://{your_bucket_name}/nuclear-codes/president.jpg
(Make sure your CLI is using the details for the account you are using for this application. I use Named Profiles to do this.)
- Copy the
aws_config.json.example
intoaws_config.json
and update the details to be the security credential of the user you are using in theaws_config.json
file.
aws cp aws_config.json.example aws_config.json
-
The bucket name is kept as a constant in our
AWSUtil
module. So go over there and make sure you update this line with the bucket name you created in point two. -
That should be everything, lets install the dependencies and spin up the app.
npm install && npm build && npm run app