Solana Gateway

January 28, 2022

A SaaS inspired by Stripe that lets you accept payments using the solana cryptocurrency. Register

Where can I find this website?

Primary Website - solanagateway.com

Documentation Website - docs.solanagateway.com

Scroll down to view some screenshots of the website.


What problem does it solve?

This whole project aims to solve the problem of accepting payments using the Solana cryptocurrency easily. Using modern web technologies like Webhooks and GraphQl and being fully documented. It achieves this by continuously polling the blockchain for new transactions the number of transactions can range from 2000 to 10000 it checks if the transaction belongs to a specific account and if it does it will notify the user by triggering the user's webhook.


What did I learn?

I learned a ton both on the tech side and the startup side. I will begin with the startup side. The most important thing I learned is to do a lot of research before writing the first line of code. You don't want to make a solution in search of a problem. You want to make a solution that people actually need. I also learned that user data and feedback are gold the more feedback you get the better, you end up making a better product for your customers. This was the first project I installed Google Analytics and it was very helpful I was able to see how many people are visiting my website and how they are interacting with it. It made me realize how valuable user data and feedback are. Now I understand why it's so important to ask the people you think would be interested in your product, what do they think, and if they would be interested before writing the first line of code.

On the tech side, I learned how to make API key authentication for the graphql api and how to secure webhooks by using simple sha256 hashing and verification. I also learned how to design better UI/UX when making the Web App you see currently, I had to do 2 revisions of the design I just didn't feel it was good-looking and professional enough. So after two revisions, I was able to make a design I felt was good-looking and professional and it is the one you see currently. I learned about a new GraphQL library which makes it really easy to integrate a GraphQL backend into your frontend It's the simplest and the most powerful one I have used so far. It makes querying GraphQl data feel like an RPC call.


The Tech Stack

  • Web App

    • Next.js
    • GraphQl Zeus
    • Framer Motion (animations)
    • Redux Toolkit (state management)
    • Styled Components (styling)
  • Backend

    • Apollo Server (graphql)
    • Json Web Token (authentication)
    • Dynamoose (dynamodb client)
  • Databases

    • AWS DynamoDB (Main)
    • AWS Elasticache (Redis Cache)

Project status

The project was created 16 November 2021 and finished Feburary 28 2022.


Project Structure

  • api
    • The GraphQl API which is deployed to AWS Lambda.
  • docs
    • The Web App and the GraphQl API documentation made using Docusaurus 2.0.
  • gowalker
    • A prototype blockchain walker written in Go.
  • npm
    • A npm packages for people who want to confirm that the request came from solana gateway and calculate the fee.
  • runner
    • Node.js blockchain walker written in typescript.
  • sg
    • The Web App made using Next.js.
  • shared
    • A place where all the shared code between packages is stored.
  • test
    • A place where I can manually test my code.

Handling 3000+ transactions per second

This is why we have a Redis cache server. All the user temporary deposit addresses are stored in Redis. For set amount of time. When user generates a deposit address the GraphQL api we add that deposit address to the Redis database. And then the blockchain walker will check if the address is in the Redis database.


Where can I find the Source Code?

You can find the Github repository by scrolling up and clicking the GitHub icon or click here


Web App Screenshots

Home Login Register Explorer Transaction Transaction1 Webhooks Settings