Skip to content

uchemukolo/smsManagementApplicationAPI

Repository files navigation

smsManagementApplicationAPI

An sms application that allows users send and receive messages.

Project Structure

The project structure follows the MVC (Model-View-Controller) pattern.

├── src
│   ├── config
│   │   └── config.js
│   ├── controllers
│   │   └── ContactController
│   │   │      └── ContactController.js
│   │   └── SmsController
│   │   │      └── SmsController.js
│   ├── helpers
│   │   └── errorHandler.js
│   ├── app.js
│   ├── middlewares
│   │   └── ContactValidator.js
│   │   └── SmsValidator.js
│   │   └── Authentication.js
│   ├── database
│   │   └── migrations
│   │   │     └── 20190821232415-create-contact.js
│   │   │     └── 20190821232739-create-sms.js
│   │   └── seeders
│   │   └── models
│   │        └── index.js
│   │        └── contact.js
│   │        └── sms.js
│   │   └── ContactController
│   │   │      └── contactRoute.js
│   │   │           └── index.js
│   │   └── SmsController
│   │   │      └── smsRoute.js
│   │   │           └── index.js

Requirements

  • Node.js
  • npm
  • PostgresDB
  • Sequelize

Getting Started

$ git clone https://github.com/uchemukolo/smsManagementApplicationAPI.git
$ cd smsManagementApplicationAPI
$ npm install
$ npm start                 # For development purpose

You should now be able to access the API via http://localhost:port/api/v1/

NOTE: Create a .env file configuration following the .env.sample.

Project Details

SMS:

  • person sending sms
  • person receiving sms
  • message of sms
  • sms status

Contact:

  • name of person
  • phone number of person

The following relationships are represented in the model:

  • All sms sent by a Contact are linked to them
  • All sms sent to a Contact are linked to them
  • Deleting a contact removes the messages they sent and references to messages they received.

API Endpoints

HTTP VERBENDPOINTSDESCRIPTIONQUERY
GET/api/v1/contacts/:contactIdGets a contact
POST/api/v1/contacts/signupCreates a contact
POST/api/v1/contacts/loginlogins a contact
DELETE/api/v1/contacts/delete/:contactIdDeletes a contact
GET/api/v1/messages/sentGets a contact sent sms
GET/api/v1/messages/receivedGets a contact received sms
GET/api/v1/message/:messageIdGets a particular contact sms
POST/api/v1/messages/:phoneNumberSends sms to a contact

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published