Getting Started with Reduced.to: A Step-by-Step Guide

Oct 17, 2023 | Programming

Welcome to the world of Reduced.to, a modern web application designed to simplify and optimize URL sharing. By shortening URLs, it makes them easier to remember, share, and track. In this guide, we will walk you through the process of setting up Reduced.to on your own system.

Table of Contents

About The Project

Reduced.to is all about making web links brief and manageable. It aims to enhance your sharing experience.

Getting Started

Prerequisites

To get started, ensure you have:

  • NPM installed: npm install npm@latest -g
  • Docker installed: Follow instructions at Docker Documentation

Installation

Follow these steps to install Reduced.to:

  1. Fork the repository and clone it.
  2. Install NPM packages by running:
    npm install
  3. Copy .example.env to .env and configure as necessary.
  4. Make sure PostgreSQL is running on port 5432. To set it up via Docker, execute:
    docker run --name reduced_to_db -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres -e POSTGRES_DB=reduced_to_db -p 5432:5432 -d postgres
  5. Run migrations:
    npx nx migrate-dev prisma --name=init
  6. Run the backend:
    npx nx serve backend
  7. Run the frontend:
    npx nx serve frontend

Development

The structure of the project includes:

  • apps: Contains both backend and frontend applications.
  • libs: For configuration and Prisma libraries.

Docker

To build Docker images, execute the following command:

npx nx run-many -t docker-build

Docker Compose

If Docker is installed, you can deploy quickly using:

docker compose -f docker/local/docker-compose.yml -p reduced-to up
Make sure to update the .env file as needed. Once set up, you can view the app at http://localhost:5000.

Configuration

To configure the application, rename .example.env to .env and fill in the necessary environment variables. The essential variables include:

  • BACKEND_APP_PORT: Set the backend port.
  • FRONTEND_APP_PORT: Set the frontend port.
  • NODE_ENV: Specify the environment (development or production).

Usage

Simply paste a URL into the input field provided by Reduced.to and click “shorten URL”. The link will be shortened, making it easier to share. Here’s a visual representation:

Usage Example

Roadmap

Future enhancements include:

  • Improved front-end components.
  • Support for Kubernetes deployment.
  • Statistics page and user statistics.

Contributing

Curious about contributing? Here’s a quick overview:

  1. Fork the project.
  2. Create your feature branch: git checkout -b featureAmazingFeature
  3. Commit your changes.
  4. Push your branch: git push origin featureAmazingFeature
  5. Open a pull request.

Contact

For any inquiries, visit the project link: Reduced.to GitHub.

Troubleshooting

If you encounter issues during setup or usage, here are a few helpful tips:

  • Ensure you have the correct versions of Node.js and Docker installed.
  • Verify that your PostgreSQL instance is running and properly configured.
  • Double-check your .env configuration for any missing values.
  • Consult the issues page on GitHub for similar problems and solutions.

For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.

At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.

Stay Informed with the Newest F(x) Insights and Blogs

Tech News and Blog Highlights, Straight to Your Inbox