Instagram-Clone-Coding / React_instagram_clone

Instagram Clone Coding - Frontend using React
http://ec2-52-79-71-191.ap-northeast-2.compute.amazonaws.com
13 stars 6 forks source link
axios frontend instagram instagram-clone interceptor naver-map-api react reactjs redux-toolkit refresh-token side-project styled-components typescript


Logo

FE-Instagram-Clone

인스타그램 클론코딩 프로젝트의 frontend 부분 github입니다.
Explore the Organization

Report Bug · Request Feature

Table of Contents
  1. Getting Started
  2. Usage
  3. Roadmap
  4. Contributing
  5. License
  6. Contact
  7. Acknowledgments

Built With

Frontend

(back to top)

Getting Started

convention

  1. Event Handler 네이밍: ~handler

    const exampleHandler = (): void => {};
  2. Handler Function Prop 네이밍: on~

    return <ExampleComponent onSubmit={exampleHandler} />;
  3. Interface 네이밍: Pascal Case +

    • props으로 넘길 때 ~Props
    interface ExampleProps {
        name: string;
    }
    • 다른 모든 경우, ~Type
  4. styled-components 구조: 최상위 태그에만 한 번

    const StyledTag = styled.div``;
    
    return (
        <StyledTag>
            <div>Not</div>
            <div>There</div>
        </StyledTag>
    );
  5. 타입 관리

  1. 파일(폴더) 네이밍 : Pascal Case(components, pages 제외)

    ExampleFileName;
  2. 컴포넌트 폴더 구조 관리

    /SomeComponent
    │ index.js
    │ SomeComponent.tsx
    ├── /SomeChildrenComponent
    │ ├── index.js
    │ └── SomeChildrenComponent.tsx
    /SomeComponent2
    │ index.js
    │ SomeComponent2.tsx

    index.tsx를 자주 사용하게 되면 파일 이름으로 검색해 작업에 용이하지 못하므로 컴포넌트이름.tsx 사용을 지향하고 index.jsimport를 쉽게 할 수 있게한다.

  3. 관심사 분리 UI와 로직을 분리합니다.

Commit Convention

feat: 새로운 기능에 대한 커밋
fix: 버그 수정에 대한 커밋
build: 빌드 관련 파일 수정에 대한 커밋
etc: 그 외 자잘한 수정에 대한 커밋
docs: README.md 수정에 대한 커밋
style: 코드 스타일 혹은 포맷 등에 관한 커밋(prettier 등)
refactor: 코드 리팩토링에 대한 커밋

Directory Structure

/src
│ App.tsx
│ Index.tsx
│ react-app-env.d.ts
│ Routes.tsx
├── /@type
│ └── index.d.ts
├── /app/store
│ ├── /ducks
│ │ └── /각 기능 단위 폴더 이름
│ │   └── ...Slice.ts
│ │   └── ...Thunk.ts
│ ├── hooks.ts
│ └── store.ts
├── /assets
│ ├── Images
│ └── Svgs
├── /components
│ ├── /Commmon
│ ├── /Direct
│ ├── /Home
│ ├── /Login
│ └── /Signup
├── /pages
│ ├── /Direct
│ ├── /Home
│ └── /Login
├── /styles
│ ├── /UI
│ ├── globalStyles.ts
│ ├── styled.d.ts
│ └── theme.ts

Prerequisites

This is an example of how to list things you need to use the software and how to install them.

Installation

Below is an example of how you can instruct your audience on installing and setting up your app. This template doesn't rely on any external dependencies or services.

  1. Get a free API Key at https://example.com
  2. Clone the repo
    git clone https://github.com/your_username_/Project-Name.git
  3. Install NPM packages
    npm install
  4. Enter your API in config.js
    const API_KEY = "ENTER YOUR API";

(back to top)

Usage

Use this space to show useful examples of how a project can be used. Additional screenshots, code examples and demos work well in this space. You may also link to more resources.

For more examples, please refer to the Documentation

(back to top)

Roadmap

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Your Name - @your_twitter - email@example.com

Project Link: https://github.com/your_username/repo_name

(back to top)

Acknowledgments

Use this space to list resources you find helpful and would like to give credit to. I've included a few of my favorites to kick things off!

(back to top)