Skip to content

Binary-Brigades/portfolio-cms

Repository files navigation

Portfoliocms-Backend

This is a portfolio CMS backened for dynamic portfolio project update

alt text

Getting started

  1. clone the respository
    $ git clone https://github.com/Binary-Brigades/portfolio-cms.git
    $ cd portfolio-cms
    $ touch .env
  2. Add the following variables to the .env file
    PORT = [port your that your will run on]
    mongoDbUrl = [mongodburl]
    mongoDbName = [name of the database]
    AccessTokenSecretKey = [random string ]
    AccessTokenExpires = 0
    CLOUDINARY_CLOUD_NAME=
    CLOUDINARY_API_KEY=
    CLOUDINARY_API_SECRET=
    CLOUDINARY_URL=
    

Login

request

   "status": "success",
   "access_token": "<user access token >",

Get Profile

request

response

  • status code: 200
  • example of a response body:
   "username": "maich",
   "email": "mainamaich@gmail.com",

Edit Profile

request

  • request body:
    username: string optional
    email: string optional
    password: string optional
    confirm_password: ref(password)
    

response

  • status code: 200
  • response body:
   "first_name": "maich",
   "last_name": "magode",
   "email": "mainamaich@gmail.com",

projects

get all user projects

request

  • request headers(token):
    authorization:`Bearer token`
    

response

  • status code: 200
  • response body:
[
  {
    "title": "",
    "description": "",
    "createdBy": "",
    "duration": "",
    "githublink": "",
    "livelink": "",
    "time": "",
    "tabs": [],
    "imageUrls": []
  }
]

get project byid

request

response

  • status code: 200
  • response body:
{
  "title": "",
  "description": "",
  "createdBy": "",
  "duration": "",
  "githublink": "",
  "livelink": "",
  "time": "",
  "tabs": [],
  "imageUrls": []
}

create a projects

request

  • request headers(token):
    authorization:`Bearer token`
  • request body:
{
  "title": "",
  "description": "",
  "createdBy": "",
  "duration": "",
  "githublink": "",
  "livelink": "",
  "time": "",
  "tabs": [],
  "imageUrls": []
}

response

  • status code: 201
  • message :"project created successfully"
  • response body:
{
  "title": "",
  "description": "",
  "createdBy": "",
  "duration": "",
  "githublink": "",
  "livelink": "",
  "time": "",
  "tabs": [],
  "imageUrls": []
}

update a projects

request

  • request headers(token):
    authorization:`Bearer token`
    
  • request body:
{
  "title": "",
  "description": "",
  "createdBy": "",
  "duration": "",
  "githublink": "",
  "livelink": "",
  "time": "",
  "tabs": [],
  "imageUrls": []
}

response

  • status code: 200
  • message :"Project updated successfully"
  • response body:
{
  "title": "",
  "description": "",
  "createdBy": "",
  "duration": "",
  "githublink": "",
  "livelink": "",
  "time": "",
  "tabs": [],
  "imageUrls": []
}

delete a projects

request

  • request headers(token):
    authorization:`Bearer token`
    

response

  • status code: 200
  • message :"Project deleted successfully"
  • response body:

Releases

No releases published

Packages

No packages published