Post System - kookmin-sw/capstone-2025-44 GitHub Wiki
ํ์ํ์ด์ ํต์ฌ ๊ธฐ๋ฅ์ผ๋ก, ํ๋ ๊ฒ์๊ธ์ ์์ฑ, ์กฐํ, ๊ด๋ฆฌํ ์ ์๋ ์์คํ ์ ๋๋ค.
- src/api/post-api.tsx
- src/api/types/post-type.ts
- src/components/common/activity-box.tsx
- src/components/common/bottom-fixed.tsx
- src/components/common/button.tsx
- src/components/post/post-category.tsx
- src/components/post/type.ts
- src/hooks/queries/useDeletePost.ts
- src/hooks/queries/useGetPostList.tsx
- src/lib/firebase.ts
- src/lib/messaging.ts
- src/pages/post/post-detail.tsx
- src/pages/post/post-list.tsx
- src/react-app-env.d.ts
- src/utils/type-id-interaction-string.ts
Post ์์คํ ์ ๋ค์ ๋ค ๊ฐ์ง ์ฃผ์ ์ปดํฌ๋ํธ๋ก ๊ตฌ์ฑ๋ฉ๋๋ค:
- Post Listing
- Post Details
- Post Creation Flow
- Applicant Management
Post์ ์ฃผ์ ๋ฐ์ดํฐ ๊ตฌ์กฐ๋ ๋ค์์์ ํ์ธํ ์ ์์ต๋๋ค.
์ฌ์ฉ์๊ฐ ๊ฒ์๊ธ์ ๊ฒ์ํ๊ณ , ํํฐ๋งํ๋ฉฐ, ๋ฌดํ ์คํฌ๋กค๋ก ๋ ๋ง์ ๊ฒ์๊ธ์ ๋ถ๋ฌ์ฌ ์ ์๋๋ก ์ง์ํฉ๋๋ค.
- ๊ฒ์
- ์นดํ ๊ณ ๋ฆฌ ํํฐ
- ๋ฌดํ ์คํฌ๋กค
- FCM ํธ์ ์๋ฆผ ์ฐ๋
- ๊ฒ์๊ธ ์์ฑ ๋ฒํผ ๊ณ ์
ํน์ ๊ฒ์๊ธ์ ๋ํ ์์ธ ์ ๋ณด๋ฅผ ๋ณด์ฌ์ฃผ๊ณ , ์ฌ์ฉ์ ์ญํ (์์ฑ์/์ง์์)์ ๋ฐ๋ผ ๋ค๋ฅธ ๊ธฐ๋ฅ์ ์ ๊ณตํฉ๋๋ค.
- Post ์ ๋ณด ํ์(ActivityBox)
- ์ฐธ์ฌ ์ ์ฒญ/์ทจ์
- ์์ฑ์์ฉ ๊ด๋ฆฌ ๊ธฐ๋ฅ (์์ , ์ญ์ , ๋์ด์ฌ๋ฆฌ๊ธฐ, ์ ์ฒญ์ ๊ด๋ฆฌ)
- ์ ๊ณ
- src/pages/post/post-detail.tsx
- src/components/common/activity-box.tsx
- src/components/common/bottom-fixed.tsx
Post ๊ด๋ จ ๋ฐฑ์๋ API์ ํต์ ํ์ฌ ๊ฒ์๊ธ ์กฐํ, ์์ฑ, ์์ , ์ญ์ ๋ฑ์ ๊ธฐ๋ฅ์ ์ ๊ณตํฉ๋๋ค.
๋ฉ์๋๋ช | ์ค๋ช |
---|---|
getPostList |
๊ฒ์๊ธ ๋ชฉ๋ก ์กฐํ |
getPostDetail |
๊ฒ์๊ธ ์์ธ ์กฐํ |
postPosting |
๊ฒ์๊ธ ์์ฑ |
editPost |
๊ฒ์๊ธ ์์ |
deletePost |
๊ฒ์๊ธ ์ญ์ |
reportPosting |
๊ฒ์๊ธ ์ ๊ณ |
pullUp |
๊ฒ์๊ธ ๋์ด์ฌ๋ฆฌ๊ธฐ |
getUserActivity |
์ฌ์ฉ์์ ํ๋ ๋ด์ญ ์กฐํ |
- ์ํ, ์ธ์ ์, ๊ธ์ฌ, ์ ๋ชฉ, ๋ด์ฉ, ์๊ฐ, ์์น, ์์ ์์ ์๊ฐ, ์กฐํ์ ๋ฑ ํ์
export const ActivityBox = ({ data, editMode = false }: ActivityBoxType) => {
// Component code
return (
<>
<Progress>
<Status $status={data.status}>
{data.status === "RECRUITING" ? "๋ชจ์ง์ค" : "๋ชจ์ง์๋ฃ"}
</Status>
<HeadCount>
{data.currentApplicant}/{data.maxNumOfPeople}๋ช
</HeadCount>
<KnotPay>{data.pay} ํ์</KnotPay>
</Progress>
<PostInfo>
{!editMode ? (
<>
<Title>{data.title}</Title>
<Content>{data.content}</Content>
</>
) : (
// Edit mode UI
)}
</PostInfo>
<MoreInfoContainer>
<PromiseInfoList>
<PromiseInfoItem $icon={DateSVG}>
<span>{BackdateToItemtype(data.startDate)}</span>
</PromiseInfoItem>
<PromiseInfoItem $icon={LocationSVG}>
<span>{data.location}</span>
</PromiseInfoItem>
<PromiseInfoItem $icon={TimeSVG}>
<span>์์ ์์ ์๊ฐ {data.volunteerTime}๋ถ</span>
</PromiseInfoItem>
</PromiseInfoList>
<span>์กฐํ์ {data.viewsCount}ํ</span>
</MoreInfoContainer>
</>
);
};
๊ฒ์๊ธ ์์คํ ์ ๋ค์ ๊ธฐ๋ฅ๋ค์ ์ค์ฌ์ผ๋ก ๊ตฌ์ฑ๋ฉ๋๋ค:
- ๐ ๊ฒ์๊ธ ๋ชฉ๋ก: ๊ฒ์, ํํฐ๋ง, ๋ฌดํ ์คํฌ๋กค
- ๐ ๊ฒ์๊ธ ์์ธ: ์ญํ ๊ธฐ๋ฐ ์ก์
- ๐ Post API ์ฐ๋
- ๐ FCM ์๋ฆผ ๊ธฐ๋ฅ
- ๐ก ๊ณตํต UI ์ปดํฌ๋ํธ: ActivityBox, BottomFixed ๋ฑ