Tinie.link is a modern, performant link shortening application built for scale and performance.
Tinie utilizes the following technologies and services:
- Bun as main TypeScript runtime
- ElysiaJS as bun compatible, fast http framework
- AWS DynamoDB as primary row storage
- Redis as cache layer
- Cloudflare Workers as Range distributor
- Cloudflare D1 to store used ranges
- TurboRepo as mono-repository orchestrator
- Docker for local development setups
- Render to host the web server container
- Hono as http framework for the Cloudflare worker
- Drizzle ORM as ORM for interacting with the Cloudflare D1 Db
- Nørd.js as Frontend Framework for the Client
To develop or test Tinie locally, follow this guide:
- Install workspace dependencies: Install Bun & Docker.
- Clone the repository: Run
git clone https://github.com/IamSebastianDev/tinie.link.git
to clone the repository. - Install package dependencies: Run
bun install
to install dependencies. - Add the environment file: Create a
.env.local
file in the workspace root and set the environment variables as shown in the.env.example
file. - Start the cloudflare workers: Run
bun run start:worker
to start the worker. You might need to log in to yourCloudflare
account. After authenticating, you can terminate this process again. (This step is only necessary the first time.) - Start the Databases: Run
bun db:up
&bun db:migrate:local
to initialize the databases. - Start the Dev Mode using Turbo: Run
bun dev
to start all applications in dev mode. - Connect: Use Postman or the Browser to connect to the different services running on their respective ports.
You can find the architecture diagram as well as the design document here: Excalidraw.