Skip to content

Commit

Permalink
Merge pull request #310 from boostcampwm-2021/release0.0.3
Browse files Browse the repository at this point in the history
Release0.0.3
  • Loading branch information
jin-Pro authored Aug 18, 2022
2 parents d7c580f + 10ae236 commit 3600c82
Show file tree
Hide file tree
Showing 282 changed files with 71,779 additions and 37,054 deletions.
7 changes: 7 additions & 0 deletions .github/PULL_REQUEST_TEMP
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## Related Issue

## WorkList

### [ Title ]

### [ Problem ]
14 changes: 14 additions & 0 deletions .github/workflows/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: 'Error, :sos: help'
assignees: jin-Pro

---

## What happened

## How Solved it

## I Think...
12 changes: 12 additions & 0 deletions .github/workflows/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: FE, Feature
assignees: jin-Pro

---

## Description

## Todo
27 changes: 27 additions & 0 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Workflow name
name: "Chromatic Deployment"

# Event for the workflow
on:
push:
branches: [dev]

env:
client-directory: ./client

# List of jobs
jobs:
test:
# Operating System
runs-on: ubuntu-latest
# Job steps
steps:
- uses: actions/checkout@v1

- name: Client npm install
working-directory: ${{env.client-directory}}
run: npm install

- name: Storybook Deploy
working-directory: ${{env.client-directory}}
run: npm run
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

cd client && npm run lint-staged
4 changes: 4 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

cd client && npm run test
44 changes: 28 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
## 👨 팀원소개

| J039 | J080 | J154 | J220 |
| :------------------------------------------: | :---------------------------------------------: | :---------------------------------------------: | :-----------------------------------------------: |
| [김영진](https://github.com/jin-Pro) | [민태홍](https://github.com/taehong0-0) | [이윤성](https://github.com/ddaynew365) | [홍한솔](https://github.com/Noelsky-code) |
| <img src="https://github.com/jin-Pro.png" /> | <img src="https://github.com/taehong0-0.png" /> | <img src="https://github.com/ddaynew365.png" /> | <img src="https://github.com/Noelsky-code.png" /> |

## [기술 스택](https://github.com/boostcampwm-2021/web10-CowDogTing/wiki/%EA%B8%B0%EC%88%A0-%EC%8A%A4%ED%83%9D)

![image](https://user-images.githubusercontent.com/64246267/142752437-7bb13285-946d-47df-ac42-90afad950ed8.png)

# CowDogTing

<p align="center" >
<img src="https://user-images.githubusercontent.com/64246267/138801849-61178d29-1a9a-4723-bcb9-ac3f5d2ce4a7.png" align="center"/>
</p>

<p align="center" >
COWDOGTING
</p>

---

### 주의할 점
Expand All @@ -27,20 +34,25 @@ COWDOGTING

---

## [기술 스택](https://github.com/boostcampwm-2021/web10-CowDogTing/wiki/%EA%B8%B0%EC%88%A0-%EC%8A%A4%ED%83%9D)

![image](https://user-images.githubusercontent.com/64246267/142752437-7bb13285-946d-47df-ac42-90afad950ed8.png)

## Resources

### Backlog
- ### Backlog
- [v0.0.1 Backlog](https://docs.google.com/spreadsheets/d/167yJb78hPknp7S7JK_qtHvbFZXPQ6wmps1iL3sgt1es/edit#gid=1761511684)
- [v0.0.2 Backlog](https://docs.google.com/spreadsheets/d/1KEDtPdyq-6ktoalXyqvbzD71V4ZJRgGZdSqqrwF8L4g/edit#gid=0)
- [v0.0.3 Backlog](https://docs.google.com/spreadsheets/d/1iHp0oGUdseSQMF6j1ngycMOpkKxyRaUgIkAEP47pWUE/edit#gid=0)
- ### StoryBook URL
- [배포](https://www.chromatic.com/build?appId=62f3c06c73a375912ca8d9be&number=1)
- [repo](https://github.com/jin-Pro/CowDogTing_Storybook)
- ### API 문서
- [API](https://github.com/boostcampwm-2021/web10-CowDogTing/wiki/API-%EB%AC%B8%EC%84%9C)
- ### Test 문서

- [v0.0.1 Backlog](https://docs.google.com/spreadsheets/d/167yJb78hPknp7S7JK_qtHvbFZXPQ6wmps1iL3sgt1es/edit#gid=1761511684)
- [v0.0.2 Backlog](https://docs.google.com/spreadsheets/d/1KEDtPdyq-6ktoalXyqvbzD71V4ZJRgGZdSqqrwF8L4g/edit#gid=0)
- [Jest](https://github.com/boostcampwm-2021/web10-CowDogTing/wiki/Jest-%EB%AC%B8%EC%84%9C)

## 👨 팀원소개
- ### Type 문서

| J039 | J080 | J154 | J220 |
| :------------------------------------------: | :---------------------------------------------: | :---------------------------------------------: | :-----------------------------------------------: |
| [김영진](https://github.com/jin-Pro) | [민태홍](https://github.com/taehong0-0) | [이윤성](https://github.com/ddaynew365) | [홍한솔](https://github.com/Noelsky-code) |
| <img src="https://github.com/jin-Pro.png" /> | <img src="https://github.com/taehong0-0.png" /> | <img src="https://github.com/ddaynew365.png" /> | <img src="https://github.com/Noelsky-code.png" /> |
- [Type](https://github.com/boostcampwm-2021/web10-CowDogTing/wiki/Type-%EB%AC%B8%EC%84%9C)

- ### 개선사항
- [Infinity Scroll 비교 분석](https://velog.io/@0_jin/%EB%AC%B4%ED%95%9C%EC%8A%A4%ED%81%AC%EB%A1%A4-%EC%84%B1%EB%8A%A5-%EA%B0%9C%EC%84%A0)
- [Code splitting 적용](https://velog.io/@0_jin/WebVitals-10-%EB%8B%A8%EC%B6%95%EC%8B%9C%ED%82%A4%EA%B8%B0)
34 changes: 19 additions & 15 deletions client/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
},
"plugins": ["react", "@typescript-eslint"],
"rules": {
"camelcase":1,
"no-undef" : 1,
"react/require-default-props" : 0,
"no-nested-ternary" : 0,
"react/jsx-props-no-spreading" : 0,
"react/jsx-no-useless-fragment" : 0,
"no-shadow" : 0,
Expand All @@ -30,21 +34,21 @@
"react/prop-types" : 0,
"react/react-in-jsx-scope" : 0,
"no-param-reassign" : 0,
"import/prefer-default-export": 0,
"react/function-component-definition" : 0,
"react/jsx-filename-extension" : 0,
"import/no-unresolved": 0,
"react/no-array-index-key" : 0,
"no-use-before-define" : 0,
"import/extensions" : 0,
"no-unused-vars" : 1,
"import/no-extraneous-dependencies" : 0,
"prettier/prettier": [
"error",
{
"endOfLine": "auto"
}
]
"import/prefer-default-export": 0,
"react/function-component-definition" : 0,
"react/jsx-filename-extension" : 0,
"import/no-unresolved": 0,
"react/no-array-index-key" : 0,
"no-use-before-define" : 0,
"import/extensions" : 0,
"no-unused-vars" : 1,
"import/no-extraneous-dependencies" : 0,
"prettier/prettier": [
"error",
{
"endOfLine": "auto"
}
]
},
"settings": {
"import/resolver": {
Expand Down
27 changes: 27 additions & 0 deletions client/.storybook/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
const path = require("path");
const toPath = (_path) => path.join(process.cwd(), _path);

module.exports = {
stories: ["../src/Component/Atom/**/*.stories.tsx"],
addons: ["@storybook/addon-links", "@storybook/addon-essentials", "@storybook/addon-interactions", "@storybook/preset-create-react-app"],
framework: "@storybook/react",
core: {
builder: "@storybook/builder-webpack5",
},
webpackFinal: async (config) => {
config.resolve.alias["@Atom"] = toPath("src/Component/Atom");
config.resolve.alias["@Core"] = toPath("src/Component/Core");
config.resolve.alias["@Hook"] = toPath("src/Hook");
config.resolve.alias["@Page"] = toPath("src/Component/Page");
config.resolve.alias["@Molecules"] = toPath("src/Component/Molecules");
config.resolve.alias["@Organism"] = toPath("src/Component/Organism");
config.resolve.alias["@Template"] = toPath("src/Component/Template");
config.resolve.alias["@Hoc"] = toPath("src/Component/Hoc");
config.resolve.alias["@Common"] = toPath("src/Util");
config.resolve.alias["@Recoil"] = toPath("src/Recoil");
config.resolve.alias["@Socket"] = toPath("src/Socket");
config.resolve.alias["@emotion/styled"] = toPath("node_modules/@emotion/styled");
config.resolve.alias["@emotion/react"] = toPath("node_modules/@emotion/react");
return config;
},
};
68 changes: 68 additions & 0 deletions client/.storybook/preview.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
export const parameters = {
actions: { argTypesRegex: "^on[A-Z].*" },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
},
};

// function Test({ profileDatas, teamDatas, userDatas, children }) {
// const setProfileModal = useSetRecoilState(profileModalDatas);
// const setTeamState = useSetRecoilState(teamState);
// const setUserState = useSetRecoilState(userState);

// setProfileModal(profileDatas);
// setTeamState(teamDatas);
// setUserState(userDatas);

// return <div>{children}</div>;
// }

// export const decorators = [
// (Story, context) => (
// <RecoilRoot>
// <BrowserRouter>
// <Test {...dummyData}>
// <Story {...context} />
// </Test>
// </BrowserRouter>
// </RecoilRoot>
// ),
// ];

// const dummyData = {
// profileDatas: [
// {
// id: "1",
// image: null,
// location: "서울",
// sex: "남자",
// age: 25,
// info: "hihi",
// gid: null,
// idx: 1,
// },
// ],
// teamDatas: {
// id: "",
// image: null,
// location: "",
// sex: "",
// age: 0,
// info: "",
// leader: "",
// member: [],
// },
// userDatas: {
// id: "",
// image: null,
// location: "",
// sex: "",
// age: 0,
// info: "",
// gid: null,
// idx: 0,
// },
// };
40 changes: 24 additions & 16 deletions client/config-overrides.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,29 @@
const { useBabelRc, addWebpackAlias, override } = require("customize-cra");
const SpeedMeasurePlugin = require("speed-measure-webpack-plugin");
const path = require("path");

const resolve = (src) => path.resolve(__dirname, src);

module.exports = override(
useBabelRc(),
addWebpackAlias({
"@Atom": resolve("./src/Component/Atom/"),
"@Core": resolve("./src/Component/Core/"),
"@Hook": resolve("./src/Hook/"),
"@Page": resolve("./src/Component/Page/"),
"@Molecules": resolve("./src/Component/Molecules/"),
"@Organism": resolve("./src/Component/Organism/"),
"@Template": resolve("./src/Component/Template/"),
"@Hoc": resolve("./src/Component/Hoc/"),
"@Util": resolve("./src/Util/"),
"@Asset": resolve("./src/Asset/"),
"@Recoil": resolve("./src/Recoil"),
})
);
const smp = new SpeedMeasurePlugin();

module.exports = {
webpack: smp.wrap(
override(
useBabelRc(),
addWebpackAlias({
"@Atom": resolve("./src/Component/Atom/"),
"@Core": resolve("./src/Component/Core/"),
"@Hook": resolve("./src/Hook/"),
"@Page": resolve("./src/Component/Page/"),
"@Molecules": resolve("./src/Component/Molecules/"),
"@Organism": resolve("./src/Component/Organism/"),
"@Template": resolve("./src/Component/Template/"),
"@Hoc": resolve("./src/Component/Hoc/"),
"@Common": resolve("./src/Common/"),
"@Asset": resolve("./src/Asset/"),
"@Recoil": resolve("./src/Recoil/"),
"@Socket": resolve("./src/Socket/"),
})
)
),
};
23 changes: 23 additions & 0 deletions client/msw/handler/chatHandler/chatInfoHandler.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { MockProps } from "..";

export const chatInfoHandler: MockProps = (req, res, ctx) => {
return res(
ctx.json([
{
chatRoomId: 1,
member: [
{ id: "test", image: null, location: "수원", sex: "male", age: 25, info: "hihi", gid: 1, idx: 1 },
{ id: "test1", image: null, location: "수원", sex: "male", age: 25, info: "hihi", gid: 1, idx: 2 },
],

chatMessage: [
{
from: "test",
message: "hihi",
source: "",
},
],
},
])
);
};
18 changes: 18 additions & 0 deletions client/msw/handler/chatHandler/chatMessagesHandler.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { MockProps } from "..";

export const chatMessagesHandler: MockProps = (req, res, ctx) => {
const params = req.url.searchParams;
const chatRoomId = params.get("chatRoomId");
const index = params.get("index");
if (index === "0") return res(ctx.status(403), ctx.json({ errorMessage: "index에러" }));
if (chatRoomId === "0") return res(ctx.status(403), ctx.json({ errorMessage: "chatRoomId에러" }));
return res(
ctx.json([
{
from: "to",
message: "hi",
source: "",
},
])
);
};
9 changes: 9 additions & 0 deletions client/msw/handler/chatHandler/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { rest } from "msw";
import { POST_CHAT_READ_API_URL, CHAT_INFO_URL, CHAT_MESSAGES_API_URL, JOIN_CHAT_URL } from "../../../src/Common/URL";

import { chatInfoHandler } from "./chatInfoHandler";
import { chatMessagesHandler } from "./chatMessagesHandler";
import { joinChatHandler } from "./joinChatHandler";
import { postChatReadHandler } from "./postChatReadHandler";

export const chatHandler = [rest.post(POST_CHAT_READ_API_URL, postChatReadHandler), rest.get(JOIN_CHAT_URL, joinChatHandler), rest.get(CHAT_INFO_URL, chatInfoHandler), rest.get(CHAT_MESSAGES_API_URL, chatMessagesHandler)];
10 changes: 10 additions & 0 deletions client/msw/handler/chatHandler/joinChatHandler.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { MockProps } from "..";

export const joinChatHandler: MockProps = (req, res, ctx) => {
return res(
ctx.json([
{ chatRoomId: 1, notReadNum: 0 },
{ chatRoomId: 12, notReadNum: 5 },
])
);
};
Loading

0 comments on commit 3600c82

Please sign in to comment.