Skip to content

SzymonHarajda/smart-brain-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Smart Brain API

This is the backend API for the Smart Brain web application. Smart Brain is a face detection application that allows users to detect faces in images by providing a URL to the image. This API is responsible for handling user authentication, image processing, and database interactions.

Features

  • User Authentication: Provides endpoints for user registration, login, and authentication using JWT tokens.
  • Image Processing: Offers endpoints for handling image uploads and processing using Clarifai API for face detection.
  • Database Interaction: Interacts with the PostgreSQL database to store user information and image data.

Technologies Used

  • Node.js: JavaScript runtime environment for building server-side applications.
  • Express.js: Web application framework for Node.js used for building RESTful APIs.
  • PostgreSQL: Open-source relational database management system used for data storage.
  • Clarifai API: Used for face detection in images.

Installation

  1. Clone the repository:

git clone https://github.com/SzymonHarajda/smart-brain-api.git

  1. Install dependencies:

npm install

  1. Set up environment variables:

    • Create a .env file in the root directory.
    • Define the following environment variables:
      PORT=3001
      DATABASE_URL=your_database_url
      CLARIFAI_API_KEY=your_clarifai_api_key
      JWT_SECRET=your_jwt_secret
      
  2. Run the application:

npm start

  1. Access the API at http://localhost:3001.

API Endpoints

  • POST /register: Register a new user.
  • POST /signin: Sign in with existing credentials and receive a JWT token.
  • GET /profile/:id: Get user profile information.
  • PUT /image: Update user's image count.
  • POST /imageurl: Detect faces in an image from a provided URL.

Contributors

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published