Skip to content

Back end API endpoint for the Face Recognition CRUD App utilizing the Clarifai API hosted on heroku.

Notifications You must be signed in to change notification settings

SivaramPg/Face-Recognition-App-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Face-Recognition-App-API

Built using Node.js as an API endpoint for the main Face-Recognition-App containing the front-end faceapp.sivaramp.com

It provides all the functionality that the front end is expecting on fetching data from the Clarifai API.

It takes care of the various functions associated with different requests and routes the requests and responses accordingly. It is also built with security in focus so as to ensure no sensitive information is exposed in requests or responses or even the console.

Steps to start:

  1. Clone this repo

  2. Go to Face-Recognition-App-API This is the main project folder for the front end.

  3. Run npm install This will install all the dependencies.

  4. You must add your own API key in the controllers/image.js file to connect to Clarifai.

You can grab Clarifai API key here

  1. Run npm start This will run the server, on port 3000

  2. Go to Face-Recognition-App & Clone the repo. This is the Main App i.e. the front-end for the application

  3. Run npm install This will install all the dependencies.

  4. Then run npm start Press Y when prompted for using another port (Since 3000 is default for create-react-app module and it is occupied) It will use the port 3001

Configuring Database:

** Make sure you use postgreSQL instead of mySQL for this code base.

  1. Create a database face-recog

  2. Create table users and login, with following structure: (Generated using \d tb_name in psql)

                                    Table "public.users"
    
Column Type Modifiers
id integer not null default nextval('users_id_seq'::regclass)
name character varying(100)
email text not null
entries bigint default 0
joined timestamp without time zone not null

Indexes: "users_pkey" PRIMARY KEY, btree (id) "users_email_key" UNIQUE CONSTRAINT, btree (email)

                             Table "public.login"
Column Type Modifiers
id integer not null default nextval('login_id_seq'::regclass)
hash character varying(100) not null
email text not null

Indexes: "login_pkey" PRIMARY KEY, btree (id) "login_email_key" UNIQUE CONSTRAINT, btree (email)

  1. Enter user and password for the database in server.js

Modules used:

  1. clarifai
  2. bcrypt-nodejs
  3. body-parser
  4. cors
  5. express
  6. knex
  7. pg
  8. nodemon (devDependency)

About

Back end API endpoint for the Face Recognition CRUD App utilizing the Clarifai API hosted on heroku.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published