Code Monkey home page Code Monkey logo

short_url's Introduction

Short URL React + Golang app

Deployment pipeline

image image image image image image image

121shots_so

Description

Short url application done with React, Zustand, React Query, Typescript and Tailwind running with Golang api using PostgreSQL database and OAuth authentication.

In testing, unit tests with Vitest, React Testing Library and Playwright for end-to-end tests.

System Design

This short URL application simplifies the process of creating and managing short URLs. Users input their desired URLs, and the app generates a concise, user-friendly short URL based on a predefined format. The shortened URL is then displayed to the user, enabling efficient storage and easy retrieval.

A key feature of the app is the ability for users to personalize their experience by managing titles associated with each URL. This customization ensures a clear and organized overview of the user's stored URLs within their profile.

Moreover, the application seamlessly handles redirections. When a user accesses a short URL, the app queries the database to retrieve the original URL associated with it, effortlessly redirecting users to the intended destination. This robust redirection mechanism ensures a smooth and expected user experience.

A simple layout of the system design:

Captura de pantalla 2024-01-31 a las 8 25 28

Getting Started

To run the app locally, follow the steps below:

Backend Environment Variables

Create a .env file in the backend directory using the provided example (backend/.env.example). Adjust the values according to your local environment.

PORT=xxx
HOST=xxx
DB_URL=xxx
SECRET=xxx

// For OAuth tokens
GOOGLE_CLIENT_ID=xxx
GOOGLE_CLIENT_SECRET=xxx

GITHUB_CLIENT_ID=xxx
GITHUB_CLIENT_SECRET=xxx

Install dependencies

Run the following command to install the necessary dependencies:

make install_app

Run the application

Start the frontend and backend servers using the following commands:

make start_f
make start_b

Api spec

Navigate to the api_spec directory and open the API documentation using:

cd api_spec && make serve

short_url's People

Contributors

oscarprdev avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.