v-1.1 A full-stack working web application using Clarifai Web API for face detection in an image, with website designed using REACTjs, server using NODE with EXPRESS.js and PostgreSQL for database. The server, the database and the front-end are all deployed on Heroku.
Check out the application here
-
Clone this repo
-
Go to face-recognition-web-app/face-recognition-webapp This is the main project folder for the front end.
-
Run npm install This will install all the dependencies.
-
You must add your own API key in the
src/App.js
file to connect to Clarifai.
You can grab Clarifai API key here
-
Go to face-recognition-web-app/face-recognition-webapp-api This is the server i.e. the back-end for the application
-
Run npm install This will install all the dependencies.
-
Run npm start This will run the server, on port 3000
-
Go to face-recognition-web-app/face-recognition-webapp and 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
** Make sure you use postgreSQL instead of mySQL for this code base.
-
Create a database face-recog
-
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) | |
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 |
text | not null | |
Indexes: |
"login_pkey" PRIMARY KEY, btree (id)
"login_email_key" UNIQUE CONSTRAINT, btree (email)
- Enter user and password for the database in server.js