Tiny Trims
Overview
Welcome to TinyTrims, an advanced URL shortener project built with Next.js, MongoDB, NextAuth, and Shadcn UI. 🌐 This project allows you to swiftly and securely shorten URLs, providing a sleek and intuitive user interface.
Project Structure
This project is structured as a Next.js application with server-side functionality. The technologies and libraries used include:Next.js - MongoDB - shadcn - Next API routes - next-auth - Tailwind CSS
Next.js API routes
With App router , the database work is done with Next.js API routes. Auth.js or next-auth provides function for protected api routes with session data. Except some public routes all rest routes are protected with next-auth `auth() function to protect api routes`.
Usage
Start with signing in to app with Google provider (as of now), then directly paste your long url to the input box to trim your link. All links will be grouped if you re-use same url to trim.
Installation
To get started, clone the repository and install the dependencies: git clone https://github.com/milinddhamu/tiny-trims.git cd mini-games npm install
Database
MongoDB powers the app, the data structure for this app is not efficient for scale. As it stores links within the user , so to find it later we have to deep search into the whole database.
Explore the [TinyTrims](https://github.com/milinddhamu/tinytrims) to dive into the code and learn more about the intricate mechanics that drive this innovative Clash of Clans companion.