Coder Social home page Coder Social logo

messenger's Introduction

메신저 웹 페이지

메신저 대표 이미지

👏 프로젝트 소개

json-server 로 만든 가상의 서버에서 대화 목록을 가져와 대화 목록을 화면에 출력한 후 대화에 참여한 사용자가 메시지를 전송할 수 있도록 하는 페이지 제작.

🚀 스택


⚙ 설치

# clone the project
$ git clone https://github.com/console-lo9/messenger.git

# install modules
$ cd messenger
$ npm ci || yarn

# start
$ npm run start:dev || yarn start:dev

⠀
⠀  You can now view this project in the browser.
⠀  http://localhost:3000/
⠀

🔗 의존성

"dependencies": {
    "@reduxjs/toolkit": "^1.7.2",
    "@testing-library/jest-dom": "^5.16.2",
    "@testing-library/react": "^12.1.2",
    "@testing-library/user-event": "^13.5.0",
    "concurrently": "^7.0.0",
    "cross-env": "^7.0.3",
    "json-server": "^0.17.0",
    "nanoid": "^3.2.0",
    "polished": "^4.1.4",
    "react": "^17.0.2",
    "react-dom": "^17.0.2",
    "react-icons": "^4.3.1",
    "react-redux": "^7.2.6",
    "react-router-dom": "^6.2.1",
    "react-scripts": "5.0.0",
    "styled-components": "^5.3.3",
    "web-vitals": "^2.1.4"
}

📂 파일 구조

├── public
├── server
└── src
    ├── assets
    ├── components
    │   ├── Header
    │   ├── Login
    │   ├── Messages
    │   ├── Modal
    │   ├── NewMessage
    │   └── SideNav
    ├── hooks
    ├── layout
    ├── models
    ├── pages
    ├── store
    │   ├── action
    │   └── reducer
    └── utils
    │   └── constants
    ├── App.js
    ├── GlobalStyle.js
    └── index.js

✨ 구현 사항

맡은 역할
메시지 삭제 기능 구현, 메시지 입력 관련 기능 구현, 헤더 및 사이드Nav, 메인페이지 UI 최적화

  • 입력창
    • 엔터 키로 전송 가능
    • 컨텐츠 입력 시 전송 버튼 즉시 활성화
    • 컨텐츠 미입력 시 전송 불가
    • 멀티 라인 입력 가능
  • 대화 목록
    • 과거부터 최신 순으로 정렬
    • 메시지를 보낼 때 대화 목록은 항상 가장 아래로 스크롤
    • 미리 생성된 데이터로 3명이 5건의 메시지 주고받는 내용 출력
  • 메시지
    • 내가 전송한 메시지의 경우 이름 옆에 * 문자 출력
    • 보낸 날짜의 경우 yyyy-mm-dd hh:MM:ss 포멧으로 출력
    • 사용자가 보낸 시간대로 출력
    • 답장을 클릭하면 "사용자 이름\n" + "메시지 내용\n" + "(회신)\n" 문자가 입력창에 자동으로 삽입
    • 삭제 버튼을 클릭하면 "*** 메시지를 삭제하시겠습니까?" 메시지 출력되고 응답시 삭제
    • ***는 메시지 내용 중 최대 10자 출력, 나머지는 ... 처리
    • hover 시 배경 스타일 변경 & 답장, 삭제 버튼 표시
  • 로그인
    • 간단한 로그인 localStorage로 구현
  • 레이아웃
    • 재사용 가능 Button Component
  • 리덕스를 통한 상태 관리
    • 메시지 데이터 모델, 현재 유저, 답장 input, 모달 창

🗺 한 눈으로 보는 구현 기능

  1. 메시지 삭제 기능 구현

gif

  1. 메시지 입력 관련 기능 구현

gif

messenger's People

Contributors

ubermensch0608 avatar ttaerrim avatar crucial-sub avatar

Stargazers

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