Skip to content

Gr3atWh173/domain-finder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Domain Finder

A utility to find unregistered domains.

Setup

  1. Clone the repo
git clone https://github.com/Gr3atWh173/domain_finder.git
cd domain_finder
  1. Install it
poetry install
  1. Setup your Postgres database.
  2. Create an .env file with the following keys:
DJANGO_SECRET_KEY = django-secret-key
DJANGO_DEBUG = True || False
DATABASE_HOST = address-where-database-hosted
DATABASE_PORT = port-where-database-hosted
DATABASE_NAME = name-of-the-database
DATABASE_USER = user-which-accesses-database
DATABASE_PASSWORD = password-of-above-user
DATABASE_NAME_TEST = database-for-testing
  1. Run it
poetry run python manage.py runserver

Endpoints

Domain Finding

  1. GET /api/v1/registrationStatus

    • Required parameters:
      • domain containing the domain name to check
    • Optional headers:
      • Authorization with the format JWT ACCESS_TOKEN

    Sample response:

    {
        "name": "google",
        "tld": "com",
        "registered": true
    }
  2. GET /api/v1/similarDomains

    • Required parameters:
      • domain containing the domain name to find similars to

    Sample response:

    {
        "domain": {
            "name": "randeepsingh",
            "tld": "com",
            "registered": true  | false,
        },
        "similar": [
            {
                "name": "randeepsingh",
                "tld": "jp",
                "registered": true | false,
            },
            (...)
        ]
    }

User Authentication

The app uses JWT based auth with access and refresh tokens having lifetimes of 5 and 360 minutes respectively. Auth endpoints are provided by Djoser.

  1. CREATE USER

    POST /api/v1/auth/users
    
    {
        "email": "[email protected]",
        "password": "passwordpassword",
        "username": "someuser"
    }
    
  2. LOGIN USER

    POST /api/v1/auth/jwt/create
    
    {
        "password": "passwordpassword",
        "username": "someuser"
    }
    

    Sample response:

    {
        "refresh": "...",
        "access": "..."
    }
  3. GET USER

    GET /api/v1/auth/users/me
    
    • Required headers:
      • Authorization with the format JWT ACCESS_TOKEN

    Sample response:

    {
        "email": "[email protected]",
        "history": [
            "google"
        ],
        "id": 1,
        "username": "someuser"
    }

About

Find a domain name that you like.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published