Coder Social home page Coder Social logo

shieldpay-home-test-sst's Introduction

Shieldpay SST Example

Summary

Project developed as infrastructure as code (IaaS) with serverless stack to publish any message to phone numbers which are exists in AWS SNS Sandbox.

  • Project developed with Typescript.
  • User need to add phone number as verified, then user can send sms to phone number.
  • AWS automatically sends all phone numbers that exists in SNS Sandbox.
  • All Project can build and run with any AWS free tier account.
  • Default stack is dev for local.

Do not forget to set REGION parameter on environment files and on sst.json file

Used Technologies

  • Serverless Stack (AWS Serverless Framework)
  • AWS API Gateway
  • AWS SQS
  • AWS SNS
  • AWS Lambda
  • Vitest (Similar to Jest)

Project Steps

  • Installing Project
  • Starting Project
  • Add phone number to AWS SNS Sandbox via addPhoneNumber API (/phone/add)
  • Verify your phone number via verifyPhoneNumber API (phone/verify)
  • Publish your message with phone number via sendSmsToUser API (sms/send)

Base Url will be visible when project starts as Api url

Installation

Project tested with typescript's last version. (4.9.4)

Install the dependencies and devDependencies for start the project.

yarn
yarn start

For production environments...

npm install --production
REGION=YOUR_AWS_REGION

Endpoints

API GATEWAY Endpoints Table:

Endpoint Body Method Response
/phone GET 200 - Phone List
/phone/add { phoneNumber } POST 201
/phone/verify { phoneNumber, OneTimePassword } POST 200
/sms/send { phoneNumber, message } POST 200

Testing

To test it locally, please run project paralelly at the second terminal. Provide testing variables on general.test.ts Run test on first terminal.

yarn test

License

MIT

shieldpay-home-test-sst's People

Contributors

furkan-34 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.