Introducing 10 Minute Endpoint: Webhook Testing Made Easy

Introducing 10 Minute Endpoint: Webhook Testing Made Easy

10 Minute Endpoint generates a temporary endpoint to test and inspect your webhooks and HTTP requests.

Introduction

Have you ever needed to integrate software to a server, where you do not have access to the server logs, and no control over what the external API sends to the server? What if you are learning to make HTTP requests and need to confirm that you send the correct data? In both these cases, it could be convenient to be able to inspect the data being sent. That's where 10 Minute Endpoint can help.

10 Minute Endpoint is an open-source service that generates a temporary endpoint for a developer to test and inspect HTTP requests sent to it. This way, they can easily practice making HTTP (or fetch) requests by sending them to this url, or they can use this url in a third party service to easily see the data it sends to their endpoint, which can be useful when developing their APIs that may need certain fields of data.

Why 10 Minute Endpoint?

Existing services store an exhausting amount of information per request, and the records are publicly available. If a third party gets access to the endpoint link, they can view all request logs, which can contain private information of that developer. Additionally, these services allow options to register and log in, storing more data about its users.

Benefits for developers

10 Minute Endpoint addresses all these concerns by:

  • Recording as little data as necessary. Only a request's method name, query data, and body data.
  • Allowing anonymous users. It does not need to store user information.
  • Making all logs private by default. Only the user that received the endpoint link can view the logs sent to that link.
  • Deleting data as quickly as possible. The endpoints as well as the associated logs are all deleted after 10 minutes.

Features roadmap

10 Minute Endpoint prioritizes simplicity and minimalism. For that, the feature list is minimal, with enhancements possibly planned for the future:

  • [x] v 0.1

    • [x] Set up NodeJS application
    • [x] Add readme and license
    • [x] Create test server
    • [x] Set up managed routes
    • [x] Set up github repo
  • [x] v 0.2

    • [x] Track anonymous users by session
    • [x] Generate endpoint for random user
    • [x] Let endpoint expire after 10 minutes
    • [x] Show expiry countdown on client
  • [x] v 0.5

    • [x] Set up database
    • [x] Start recording endpoint requests
    • [x] Store endpoint data in database
    • [x] Display endpoint data to client
    • [x] Delete expired data from database
  • [x] v 0.7

    • [x] Style frontend client
    • [x] Add favicon and meta tags
    • [x] Add 404 page for all other requests
    • [x] Block bots and web crawlers from using service
  • [x] v 1.0

    • [x] Deploy to Linode
    • [x] Configure nginx proxies for public use
    • [x] Enable cors to allow requests to endpoints form anywhere
  • [ ] v 1.1
    • [ ] Limit requests logged per endpoint
    • [ ] Allow extending expiry date
    • [ ] Allow renewing expired endpoint
    • [ ] Allow filtering logs by method
    • [ ] Implement custom DDoS protection (currently handled by Linode)
    • [ ] Allow user to send default json responses from requests
    • [ ] Allow user to view request source (IP)

Built With

10ME was developed with the PLEB stack:

  • Database/storage with Prisma (MongoDB)
  • DevOps/deployed on Linode
  • Backend/API with Express (NodeJS)
  • Frontend/design using BulmaCSS

Prerequisites

Mongodb

Either install MongoDB locally to your environment, or use one online (through Mongo Atlas for example)

Prisma

Prisma requires a replica set instead of standalone database.

Note - Run prisma generate after installing the packages to generate the MongoDB schemas internally.

Running and Deployment

  1. Clone the repo:

    git clone https://github.com/danidre14/10-minute-endpoint-nodejs.git
    
  2. Set environment variables for the following (using the .env file, for example):

    • NODE_ENV
    • PORT
    • SESSION_SECRET
    • DATABASE_URL Rename the .env.sample file to .env and use actual credentials obtained in the Prerequisites.
  3. Install all dependencies:

    cd /path/to/project
    npm install
    # or yarn install, or other depending on your package manager
    
  4. Generate dev dependencies:

    prisma generate
    
  5. Run the project:

    npm start
    

    Open a browser and hit http://localhost:5000

Conclusion

10 Minute Endpoint logs requests as minimally as possible, does not store user data, deletes endpoint data as quickly as possible, and aims to be used as easily as possible, prioritizing simplicity and smooth intuitive usage flow.

See the links below to support me or check out the project yourself: