Git Product home page Git Product logo

reduced.to's Introduction

Contributors Forks Stargazers Issues


logo

Reduced.to is a modern web application that reduces the length of link URL. So it's easier to remember, share and track.

App ยท Report Bug ยท Request Feature


๐Ÿ“š Table of Contents
  1. ๐ŸŒ About The Project
  2. ๐Ÿš€ Getting Started
  3. ๐Ÿฑโ€๐Ÿ’ป Usage
  4. ๐Ÿงฑ Roadmap
  5. ๐Ÿฅ‡ Contributing
  6. ๐Ÿ† Contributors
  7. ๐Ÿ“ License
  8. ๐Ÿ’Œ Contact

๐ŸŒ About The Project

๐Ÿ”ฅ Built With

List of frameworks/libraries used to bootstrap the project.

  • Nest
  • Qwik
  • Tailwindcss
  • Novu

(back to top)

๐Ÿš€ Getting Started

๐Ÿ“ƒ Prerequisites

List of things you need to run the project locally and how to install them.

  • npm
    npm install npm@latest -g
  • docker
    https://docs.docker.com/get-docker/

๐Ÿ’ป Installation

  1. Fork / Clone this repository
  2. Install NPM packages
    npm install && npm run install:all
  3. Navigate to backend folder, copy .example.env to .env and fill it properly (see below).
  4. Navigate to frontend folder, copy .example.env to .env and fill it properly (see below).
  5. Make sure you have a local instance of PostgreSQL running on port 5432. If not, you can run it using docker:
    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
  6. Run Prisma migration inside the backend folder:
    npx prisma migrate dev --name init
  7. Run the backend:
    npm run start:backend
  8. Run the frontend:
    npm run start:frontend

๐Ÿ‘ฉโ€๐Ÿ’ป Development

The project is structured in the following way:

  • ๐Ÿš€ root
  • ๐ŸŽจ /apps/frontend
  • ๐Ÿ“ฆ /apps/backend

Running the frontend in dev mode

  1. Move to the frontend folder
    cd ./apps/frontend
  2. Run the project (it will open a new window)
    npm run dev
  3. Vite will be now listening for changes in the code and reloading the solution

Running the backend in dev mode

  1. Move to the backend folder
    cd ./apps/backend
  2. Run the project (be sure that you built the frontend before)
    npm run start:dev
  3. Nest will be now listening for changes in the code and reloading the solution

๐Ÿณ Docker

  • You can easily build your application using docker. Just run the following commands:

  • Build and run frontend instance

    docker build apps/frontend/ -t reduced.to-front
    docker run -p 5000:5000 reduced.to-front
  • Build and run backend instance

    docker build apps/backend/ -t reduced.to-back
    docker run -p 3000:3000 reduced.to-back
  • Make sure to have a local instance of PostgreSQL running on port 5432. If not, you can run it using docker:

    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
  • Simply go to your favourite browser and visit http://localhost:5000/ to see your application.

๐Ÿ™ Docker compose

  • In case you have docker installed, you can single-click deploy and test your changes by running the following and going to http://localhost:5000/ on your browser.

  • When you run the command below, don't forget to change the .env file with the correct values.

    docker compose -f docker/local/docker-compose.yml -p reduced-to up

    NOTE: There is a known issue with the local docker-compose deployment. Because of the way the containers are communicating with each other, the frontend container will not be able to send requests to the backend container. This is because the backend container is accessible only from within the docker network. To overcome this issue, you can run only the backend locally and the other services using docker-compose.

๐Ÿ‘ท Configuration

For the minimal configuration the following settings have to be changed in their .env file:

Backend configuration

App
  • APP_PORT: Backend port
  • NODE_ENV: Node environment (development / production)
Database
  • DATABASE_URL: Database connection string
Rate Limit
  • RATE_LIMIT_TTL: Rate limt TTL (time to live)
  • RATE_LIMIT_COUNT: Number of requests within the ttl
Logger
  • LOGGER_CONSOLE_THRESHOLD: Threshold level of the console transporter.
Frontend
  • FRONT_DOMAIN: Frontend instance domain
Redis
  • REDIS_ENABLE: Whether to use external redis store or not
  • REDIS_HOST: Redis instnace host
  • REDIS_PORT: Redis instance port
  • REDIS_PASSWORD: Redis instance password
  • REDIS_TTL: Redis ttl (in seconds)
Auth
  • JWT_SECRET: Jwt secret string
Novu
  • NOVU_API_KEY: Get it from https://novu.co/ (Not required for local development)

Frontend configuration

  • DOMAIN: Domain of your frontend app (used for cookies)

  • API_DOMAIN: Domain of your backend instance

Happy Hacking !

(back to top)

๐Ÿฑโ€๐Ÿ’ป Usage

Simply copy and paste a URL into the provided area. Then click shorten URL! Your URL has now been shortened!

(back to top)

๐Ÿงฑ Roadmap

  • Migrate backend to NestJS
  • Migrate frontend to Qwik
  • Better README
  • Generate QRCode
  • Split front-end into components
  • Better UI
    • Animations
    • Logo
    • Dark/Light mode
  • Improve front-end components
  • Backend tests
  • Front-end Tests
  • Logs
  • Add a statistics page
  • Add more ideas

Just create a Pull request already ๐Ÿ˜ƒ

See the open issues for a full list of proposed features (and known issues).

(back to top)

๐Ÿฅ‡ Contributing

Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star โญ!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

๐Ÿ† Contributors

(back to top)

๐Ÿ“ License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

๐Ÿ’Œ Contact

Project Link: https://github.com/origranot/reduced.to

(back to top)

reduced.to's People

Contributors

origranot avatar guillempm avatar dlibis avatar eduardconstantin avatar dependabot[bot] avatar aliabbasjaffri avatar dev-code24 avatar timoransky avatar owengaspard avatar vidishaag avatar aigdonia avatar theshonuff avatar achiyahb avatar sarthakk24 avatar detronetdip avatar xarielah avatar febriadj avatar naandalist avatar saurabhcodes25 avatar ibrahimtelman avatar jgoerner avatar goldenpheonix02 avatar biancam5 avatar brandon-t84 avatar mau211 avatar olumarshal avatar kymppi avatar this-mkhy avatar mohd-adil-jmi avatar omaximani0 avatar

Stargazers

Omar Nagy 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.