GithubHelp home page GithubHelp logo

lifeisbeautifu1 / discord Goto Github PK

View Code? Open in Web Editor NEW
11.0 6.0 3.0 1.84 MB

Discord clone build with React & Nest.js

JavaScript 0.58% TypeScript 97.97% CSS 1.34% HTML 0.12%
headlessui nestjs postgresql prisma2 reactjs redux-thunk redux-toolkit rest-api tailwindcss typescript webrtc websockets redis nodejs react

discord's Introduction

Made With Love

Discord

Note, this project is under construction ๐Ÿšง ๐Ÿ—๏ธ โ›”

Photos of the project

Installation & Setup

Setting up the Backend

  1. Clone the repository.
  2. Change directory to backend
  3. Run npm install to install dependencies.
  4. Install Docker for your operating system.
  5. Install the Docker Compose tool.
  6. Run docker-compose
docker-compose up -d

This will start container with PostgreSQL, Redis and Redis Commander.

  1. Run the following command
npx prisma db push
  1. Create a .env file in the root directory and paste the following:
DATABASE_URL=

SESSION_SECRET=

CLOUDINARY_CLOUD_NAME=

CLOUDINARY_API_KEY=

CLOUDINARY_API_SECRET=

MAILGUN_API_KEY=

MAILGUN_DOMAIN=

PREFIX=

CLIENT_URL=http://localhost:5173
  • DATABASE_URL The hostname for your PostgreSQL database server (you can use the one from the example file)
  • SESSION_SECRET Can be any string that can be used to encrypt & decrypt your cookie for sessions.
  • CLOUDINARY_CLOUD_NAME Cloudinary API Credentials
  • CLOUDINARY_API_KEY Cloudinary API Credentials
  • CLOUDINARY_API_SECRET Cloudinary API Credentials
  • MAILGUN_API_KEY Mailgun API Credentials
  • MAILGUN_DOMAIN Mailgun API Credentials
  • PREFIX Can be any string that can be used to encrypt & decrypt your redis data
  1. Run npm run start:dev to start the project in development mode.

Setting up the Frontend

  1. Change directory to frontend
  2. Run npm install to install dependencies.
  3. Run npm run dev to start the project in development mode.

MVP

As a user, I can

  • sign up / sign in / sign out / reset pwd / confirm email
  • search for friends / add them / delete them
  • create conversations with other users / create group conversations
  • send messages to other user(s)
  • call other users
  • see incoming messages live
  • see notifications / friends requests / calls live
  • see online users live
  • see typing indicator
  • maintain privacy (can't read others chats/msgs)

Stack

BE

  • Node + Nest + TS
  • WS + WebRTC
  • express-session + Redis
  • PostgreSQL + Prisma

FE

  • React 18.2+
  • Redux Toolkit
  • HeadlessUI / TailwindCSS

DevOps

  • Docker + docker-compose

Current list of TODO's

  • Switch to ReactQuery
  • Update dependencies
  • Switch to yarn
  • Add commitizen
  • Cover app with tests (Playwright, Jest, etc.)
  • Add husky to run linters and tests before commit
  • Frontend portion need performance improvement, add useCallback, memo, useMemo etc.
  • Implement custom servers
  • Implement file upload (avatars, attachments)
  • Check app for vulnerabilities (OWASP Top 10)

discord's People

Contributors

lifeisbeautifu1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  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.