Skip to content

This codebase supports an image recognition app server, which features registration and sign in. It incorporates a PostgreSQL database to handle users and logins.

Notifications You must be signed in to change notification settings

IAnderson-rgb/smart-brain-app-api

Repository files navigation

magic-brain-app-api - v1

  1. Clone this repo
  2. Run npm install
  3. Run nodemon server.js

Create a .env on your local. Use these environmental variables in your .env from the .env.example file or just change the values in the .env file to be what you want and then source ./.env to get the variables.

API_CLARIFAI= 'Key + yourApiKeyHere'
DATABASE_URL= 'yourDatabaseUrl'
DATABASE_HOST= 'yourDatabaseHost'
DATABASE_USER= 'yourDatabaseUser'
DATABASE_PW= 'yourDatabasePassword'
DATABASE_DB= 'yourDatabaseName'
PORT= 5432

The ORM for the application is Knex.js. For now please use the following schema to setup a PostgreSQL database for the application to run locally.

Users:

CREATE TABLE users (
	ID serial PRIMARY KEY,
	name VARCHAR (100) NOT NULL,
	email text UNIQUE NOT NULL,
	entries bigint DEFAULT 0,
	joined timestamp NOT NULL
);

Login:

CREATE TABLE login (
	ID serial PRIMARY KEY,
	hash VARCHAR (100) NOT NULL,
	email text UNIQUE NOT NULL
);

About

This codebase supports an image recognition app server, which features registration and sign in. It incorporates a PostgreSQL database to handle users and logins.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published