Giter Site home page Giter Site logo

nilcianyribeiro / discord-clone Goto Github PK

View Code? Open in Web Editor NEW

This project forked from guilospanck/discord-clone

0.0 0.0 0.0 6.23 MB

Frontend Discord Clone made with TypeScript and React

JavaScript 5.08% HTML 1.18% TypeScript 93.35% Shell 0.14% CSS 0.25%

discord-clone's Introduction

Discord Clone

This is the frontend part of the attempt of cloning Discord just looking at the source code for information about the dimensions, colors and fonts.

image image image image image Testing-Library Dependabot GitHub Actions

โžก๏ธ ๐Ÿ‘ท๐Ÿšง Under Construction...

You can find it @ Discord Clone

Technologies

  • React v18 with TypeScript from scratch
  • Webpack, Babel, ESLint
  • Jest and React Testing Library for tests
  • Husky as Git Hooks
  • Styled Components

Concepts

  • Clean Code Architecture
  • React Best Practices
  • SOLID principles
  • Design Patterns

Tree Architecture

.
โ”œโ”€โ”€ assets
โ”‚   โ””โ”€โ”€ images
โ”œโ”€โ”€ components
โ”‚   โ””โ”€โ”€ Link
โ”œโ”€โ”€ pages
โ”‚   โ””โ”€โ”€ Home
โ”‚       โ”œโ”€โ”€ context
โ”‚       โ”œโ”€โ”€ types
โ”‚       โ”œโ”€โ”€ useCases
โ”‚       โ”œโ”€โ”€ viewModels
โ”‚       โ”‚   โ”œโ”€โ”€ channels
โ”‚       โ”‚   โ”œโ”€โ”€ chat
โ”‚       โ”‚   โ””โ”€โ”€ sidebar
โ”‚       โ””โ”€โ”€ views
โ”‚           โ”œโ”€โ”€ channels
โ”‚           โ”‚   โ”œโ”€โ”€ channels_section
โ”‚           โ”‚   โ”œโ”€โ”€ channels_server_title
โ”‚           โ”‚   โ””โ”€โ”€ channels_sidebar
โ”‚           โ”œโ”€โ”€ chat
โ”‚           โ”‚   โ”œโ”€โ”€ chat_form
โ”‚           โ”‚   โ”œโ”€โ”€ chat_main
โ”‚           โ”‚   โ””โ”€โ”€ chat_section
โ”‚           โ””โ”€โ”€ sidebar
โ””โ”€โ”€ shared

I'm using Clean Code Architecture. Basically it tells us to divide our code into layers, in order to be more testable and to decouple our logic.

The names may vary from one person to another, but the basic concept is the separation of concerns.

Below it's an overview about the layers I'm using.

  • assets: layer used to comport our images, videos, audios and so on.
  • components: React components that we can use in different parts of the project. This parte could have been inside the shared layer as well.
  • shared: any type of file that can be shared amongst pages and components, like JSON files, configurations, and so on.
  • pages: here resides every single page that our application may have. I define page as something that will change routes. Inside each page we have the separation of concerns of the components of these pages.
    • context: here is where we can use the React.Context API in order to manage the state of your page through different components.
    • types: here are the basic types we're using in the page.
    • useCases: basically every connection with the outside world, like fetch()ing a API or something like that.
    • viewModels: this layer is responsible to manage what the views layer will present. So here resides everything related to data manipulation, like React Hooks and Events.
    • views: finally we have the views layer. It's responsible for showing the elements to the user. Here we retrieve data from the viewModels layer and then show it to the user. Also, here's where we will send events to that layer, like an onClick event, for example.

discord-clone's People

Contributors

guilospanck avatar dependabot[bot] 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.