Annmary12 / sms-management-api

SMS MANAGEMENT

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status Coverage Status

SMS MANAGEMENT

SMS MANAGEMENT is a API the enables users to create contact, send, recieve, read, and get message/s.

Technology Stack Used

  • Node Js
  • Express Js
  • MogonDB
  • Mongoose
  • Mocha
  • Chai

Feactures

  • Users can register
  • Users can SignUp
  • Users can send a message
  • Users can recieve a message
  • Users can get all sent messages
  • Users can get all recieved messages
  • Users can get all read messages
  • Users can get all unread messages
  • Users can get both sent and recieved messages
  • You can delete a user which will delete messages the user sent and recieved.

Project Structure

├── src/
    ├── __test__
    |   └── App.test.js
    |   └── Contact.test.js
    |   └── Message.test.js
    ├── bin
    │   └── www.js
    ├── controllers
    │   └── ContactController.js
    |   └── MessageController.js
    ├── middlewares
    |   └── auth.js
    |   └── checkContact.js
    │   └── validateInput.js
    ├── models
    │   └── Contact.js
    |   └── Message.js
    ├── repository
    │   └── BaseRepository.js
    ├── routes
    │   └── contact.js
    │   └── index.js
    │   └── message.js
    ├── utils
    │   └── auth.js
    │   └── data.js
    │   └── errorHandler.js
    ├── app.js

Setup

  • Clone the project
> $ git clone https://github.com/Annmary12/sms-management-api.git
  • Install dependencies by running
> $ npm install

Running the app

To get the app up and running (and really see if it worked), run:

> $ npm run dev

Running the tests

  • To run the tests
> $ npm test

NOTE: Create a .env following the .env.example configuration

Link to the documentation

Docs

API Endpoints

HTTP VERBENDPOINTSDESCRIPTION
POST/api/v1/contacts/Creates a contact
POST/api/v1/contacts/sign-inSignin a contact
GET/api/v1/contacts/Gets all contact
GET/api/v1/contacts/:idGets one contact
DELETE/api/v1/contacts/Deletes a contact
POST/api/v1/message/Sends message to a contact
GET/api/v1/message/read/:messageIdReads a message
GET/api/v1/message/sentGets all sent messages
GET/api/v1/message/recievedGets all received messages
GET/api/v1/message/Gets all messages
GET/api/v1/message/unreadGets all unread messages
GET/api/v1/message/readGets all read messages

About

SMS MANAGEMENT


Languages

Language:JavaScript 100.0%