Coder Social home page Coder Social logo

instagram-influencer's Introduction

INSTAGRAM INFLUENCER SEARCH PORTAL

build Coverage Status

Features

  • Users can create account with just email and password
  • Authenticated users can create profile, providing username, followers count and bio
  • One user is liable to have a single profile, that means a user cannot create multiple profiles
  • visitors can use the search endpoint to search text in username and bio, minimum followers count and maximum followers count
  • search result returns a list of profiles that meets the search criterial

API Documentation

API allows visitors to search for profile username and bio, and profile counts which can either be minimum or maximum followers count, and also allows only authorized users to create profile.

Models

Users

field data_type constraints validation
id Object required None
email string required unique, email must conform to email (example: [email protected])
password string required pasword must contain at least one uppercase, one lowercase, one number, and must be at least 8 characters
created_at timestamp automatically set None

Profile

field data_type constraints validation
id integer required None
username string required None
followers Integer required None
bio String(100) optional, default value set to None None
created_at timestamp required, automatically set None
owner_id Integer required, ForeignKey, Unique None

Home Page

  • Route: /
  • Method: GET
  • Header
    • Authorization: None
  • Response: Success
{
  "message": "Welcome to Instagram Influencer search portal"
}

Signup User

  • Route: /account/signup
  • Method: POST
  • Header
    • Authorization: None
  • Body:
{
  "email": "[email protected]",
  "password": "Password123"
}
  • Response: Success
{
  "id": 1,
  "email": "[email protected]",
  "created_at": "2023-02-05T15:29:24.712Z"
}

Login User

  • Route: /login
  • Method: POST
  • Body:
{
  "email": "[email protected]",
  "password": "Password123"
}
  • Response: Success
{
  "email":"[email protected]",
  "access_token": "accesstokenexample&8ofiwhb.fburu276r4ufhwu4.o82uy3rjlfwebj",
  "token_type": "Bearer"
}

Create Profile

  • Route: /profile
  • Method: POST
  • Header
    • Authorization: Bearer {token}
  • Body:
{
  "username": "string",
  "followers": 100,
  "bio": "I am a software developer"
}
  • Response: Success
{
  "username": "string",
  "followers": 100,
  "bio": "I am a software developer",
  "id": 1,
  "created_at": "2023-02-05T19:02:41.204Z",
  "owner": {
    "id": 1,
    "email": "[email protected]",
  }
}

Search Route

  • Route: /search

  • Method: GET

  • Header

    • Authorization: None
  • Body:

  • Response: Success

[
    {
    "username": "string",
    "followers": 100,
    "bio": "I am a software developer",
    "id": 1,
    "created_at": "2023-02-05T19:02:41.204Z",
    "owner": {
        "id": 1,
        "email": "[email protected]",
    }
    },

    {
    "username": "user",
    "followers": 10,
    "bio": "I am a devOps Engineer",
    "id": 2,
    "created_at": "2023-02-05T19:02:41.204Z",
    "owner": {
        "id": 2,
        "email": "[email protected]",
    }
    },

    {
    "username": "example",
    "followers": 100,
    "bio": "I am a Technical writer",
    "id": 3,
    "created_at": "2023-02-05T19:02:41.204Z",
    "owner": {
        "id": 3,
        "email": "[email protected]",
    }
    },
]

Search Route with query

  • Route: /search?text=Engineer&min_followers=100

  • Method: GET

  • Header

    • Authorization: None
  • Body:

  • Response: Success

[
    {
  "username": "string",
  "followers": 100,
  "bio": "I am a software developer",
  "id": 1,
  "created_at": "2023-02-05T19:02:41.204Z",
  "owner": {
    "id": 1,
    "email": "[email protected]",
  }
}
]

Getting Started

Prerequisites

In order to run this project locally, you would need to have the following installed on your local machine.

  • Python ^3.10,
  • PostgreSQL
  • Docker (Optional)

Installation

  • Clone this repository
git clone [https://github.com/Nkasi-e/instagram-influencer.git]
  • update env with .env.example.txt
  • Download all dependecies using pip install -r requirements.txt or poetry install that's if you have poetry installed already on your machine

to start up server

  • run uvicorn app.main:app --reload

to start up container in detached mode

  • run docker-compose -f decker-compose-dev.yml up -d

instagram-influencer's People

Contributors

nkasi-e avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.