Skip to content

Latest commit

 

History

History
76 lines (61 loc) · 2.95 KB

README.md

File metadata and controls

76 lines (61 loc) · 2.95 KB

shorte.live

  • An open-source url-shortener.

Info

  • Build with:
    • Golang
    • Mux (Gorilla)
    • MongoDB
    • Redis
    • React
    • Typescript
    • TailwindCSS
    • Shadcn/UI

Setup Locally

  1. Clone the project locally with

    git clone https://github.com/ivinayakg/shorte.live.git
    
  2. Setup env files

    • for frontend env variables, run the following command from the repo root, in the terminal.
      cp client/sample.env client/.env
      
    • for backend env variables, run the following command from the repo root, in the terminal.
      cp api/sample.env api/.env
      
  3. Setup Google Oauth keys

    • Currently, the service only has one primary means of authentication, and that is with Google OAuth. Read in detail here
    • You need to obtain your secret key and client ID to make this work.
      1. Login to your Google console here.
      2. Create a new project here.
      3. Open the API dashboard, and go to OAuth consent screen here. Once there configure your screen, read more here
      4. Now navigate to credentials and create a new one.
        • add http://localhost:3100 into Authorized JavaScript origins
        • add http://localhost:3100/user/google/callback into Authorized redirect URIs
        • Read more here
      5. Once done copy your client id and your client secret, and paste into your api/.env file for the variable GOOGLE_OAUTH_CLIENT_ID, GOOGLE_OAUTH_CLIENT_SECRET and done.
  4. Setup Local DB and Local Redis

    • You need Docker Desktop installed for this on your system. check here
    • Once verified, open your Docker Desktop and keep it running in the background.
    • Run the following command from the repo terminal
      docker-compose -f config/compose.yml up
      
    • If you want it to be running in the background add the -d flag.
      docker-compose -f config/compose.yml up -d
      
  5. Test

    • Open client directory in your terminal and run yarn dev
    • Open api directory in your terminal and run go run .
    • and done

Deploy

  • Coming soon...

Contribution

  • Hey, thank you for wanting to contribute to this project. This project is really special to me, so my sincere gratitude to you for interacting with this project to whatever extent you have. Thank you.
  • You can start with contributing from here

Note

  • You can reach out to me for discussion or help. (Please keep things professional and straight, don't waste my time)
  • Discord: ivinayakg
  • Email: [email protected]