README
Closed source
2 min read · 5 months ago

Send-To


    Node.jsFastifyPrismaPostgreSQLTypescript

The “why”?

During a presentation at the end of a university term, my group and I were preparing to pass on the content we had acquired to our colleagues. As I entered my Google Drive credentials and waited for the authentication process to go through, I thought about how many steps I needed to take to simply open a link on a computer that wasn’t mine. After all, with Firefox, I could send the website that was open on my cell phone directly to the computer, but I would need to be logged in or go through the same process of opening the website, entering the password, getting what I wanted, and then exiting. Soon, the thought of “What if…” came to my mind and formed the idea for Send-To: a web application where I can send a link or text to open it or copy it on any device by simply typing a short address.

Its definition

Before we get into the technical details, let’s define what this application actually is:

It’s a service for sending and receiving links and texts between platforms quickly and without the need to log in.

How does it work?

Step 1:

The user accesses the application’s sender address to enter the URL or text they want to access or receive on another device.

And

Step 2:

The user accesses the application’s receiving address to be automatically redirected or copy its content to their clipboard.

This process should be simple and should not require a long login process.

Engineering

The basic operation of the application consists of simple database management, so I only need to add a line and read it afterwards. Thus, the chosen stack is composed of:

Stack

  • Typescript;
  • Fastify;
  • Prisma;
  • PostgreSQL;

Overview

img

Functional requirements

  • It must be possible to submit content;
  • It must be possible to receive content on any device;
  • The content must be a url or text;

Non-functional requirements

  • Runs on Node.js;
  • The application data must be stored in a PostgreSQL database;
  • An ORM must be used;

Business rules

  • Mailings must contain a time to live (TTL);
  • Expired mailings must not be returned;