Skip to content

Latest commit

 

History

History
54 lines (37 loc) · 1.79 KB

learn.md

File metadata and controls

54 lines (37 loc) · 1.79 KB

Project Setup

Fork the repo:

To contribute to this Discord-Clone, you must first fork the Discord-Clone repo.

Clone the repo:

  1. Clone your GitHub forked repo:

    git clone https://github.com/<github_username>/Discord-Clone
  2. Go to the Discord-Clone directory:

    cd discord-clone
  3. To install the dependencies, run:

    npm install
  4. To start the development server, run in terminal:

    npm run dev

Note : The project's backend is based on nodejs, so make sure you have node version 20 or above installed in your machine, if not refer to this: https://nodejs.org/en/download.

Setup environment variables

Supabase setup:

1. Project API setup

  1. Go to Supabase Dashboard (create your account if you have not).
  2. Create a new project.
    Screenshot 2024-05-12 122005
  3. Get your project url and anon api key.
    Note : You should not reveal this api key as this works as a bridge between your database and project.
  4. In your forked repo create a .env.local file, copy the contents from .env.local.example and paste the credentials in it:
    NEXT_PUBLIC_SUPABASE_URL=https(:)//some-string-here.supabase.co
    NEXT_PUBLIC_SUPABASE_ANON_KEY=anon-api-key-here
  5. Setup your tables. Refer to Table Setup Documentation

Supabase is an open source firebase alternative, that provides Postgres database, Authentication, instant APIs, Edge Functions, Realtime subscriptions, Storage, and Vector embeddings.
Refer to this Documentation, for more information.