Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Y_FE_Toy1_Team13 Pokemon Wiki #9

Open
wants to merge 186 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
186 commits
Select commit Hold shift + click to select a range
0dac7e4
init: Do initail setting
Sep 8, 2023
db20264
docs: Edit RADME.md
Sep 8, 2023
3f6e34c
docs: Edit README.md
Sep 8, 2023
22aee7e
chore: Edit eslintrc
Sep 8, 2023
2f5e34c
design: Add default theme
Sep 9, 2023
9bf6613
feat: Add Header
Sep 9, 2023
362048a
feat: Test routing
Sep 9, 2023
d30c0e4
feat: Add default pages
Sep 9, 2023
3c1b7a8
Merge branch 'dev' into feat/header
Sep 9, 2023
bba51fe
feat: Add nav links
Sep 9, 2023
8f5df07
style: Change font family
Sep 9, 2023
3546f83
feat: Add common flex container
Sep 9, 2023
5392a18
style: Change main layout
Sep 9, 2023
f9871be
style: Change layout
Sep 9, 2023
46fdb4f
Merge pull request #1 from JSH99/feat/header
JSH99 Sep 11, 2023
0a10fd7
feat: Add search bar
Sep 11, 2023
19d2b07
feat: Add user icon
Sep 11, 2023
4c4f7c4
feat: Add categories type
Sep 11, 2023
dd50e2e
refactor: Get categories efficiently
Sep 11, 2023
309456c
refactor: Separate category related components
Sep 11, 2023
413b184
feat: Add commute icon and remove write button
Sep 11, 2023
63168a6
feat: Add category toggle
Sep 11, 2023
43c240f
feat: Change position of sidebar
Sep 12, 2023
e888cff
feat: Add router elements
Sep 12, 2023
3829132
Merge pull request #2 from JSH99/feat/header
Sep 12, 2023
989226b
feat : Add markdown
minseokiim Sep 12, 2023
ad5dfef
feat : Edit markdown editor
minseokiim Sep 12, 2023
0c365ba
Merge pull request #3 from JSH99/feat/wiki
minseokiim Sep 13, 2023
80ae5f1
feat : Connection firebase
Sinary00 Sep 13, 2023
f270829
feat : Add universal variable for firebase
Sinary00 Sep 13, 2023
f333bca
fix : Resolve merge conflict
Sinary00 Sep 13, 2023
fe4847a
Merge pull request #4 from JSH99/feat/config
Sinary00 Sep 13, 2023
40b6fd7
fix : Resolve read .env
Sinary00 Sep 13, 2023
8e730a5
Feat : use marked
minseokiim Sep 13, 2023
6db67dd
Merge branch 'dev' of https://github.com/JSH99/Toy1_Team13 into feat/โ€ฆ
minseokiim Sep 13, 2023
df01a5e
Merge pull request #5 from JSH99/feat/config
minseokiim Sep 13, 2023
7a7355a
Feat : use marked
minseokiim Sep 13, 2023
b85ebc5
feat: Add categories and routes in gallery tab
dbstjrals Sep 13, 2023
d4b7a96
feat: Add project and member tab
dbstjrals Sep 13, 2023
78de5e5
Feat : Add usercontext
Sinary00 Sep 14, 2023
3f8fcdd
Feat : Add userProfile, Login
Sinary00 Sep 14, 2023
06fc278
Merge pull request #6 from JSH99/feat/userinfo
minseokiim Sep 14, 2023
099a25a
Merge pull request #7 from JSH99/feat/login
Sinary00 Sep 14, 2023
1df014d
Feat : connect wiki to firestore
minseokiim Sep 14, 2023
40071ed
feat: Install added packages
Sep 13, 2023
743662c
feat: Add modal timer
Sep 12, 2023
4f8c80f
feat: Add time formatter function
Sep 13, 2023
c79fd66
feat: Create commute info upload logic
Sep 14, 2023
d39f06e
feat: Check if user logged in
Sep 14, 2023
e063e9c
fix: Change commute data structure
Sep 14, 2023
1c99d00
delete: Remove useUserDetail hook due to redundancy
Sep 14, 2023
3f0450b
Merge pull request #8 from JSH99/feat/modal
Sep 14, 2023
cc61872
Feat : use toast ui
minseokiim Sep 14, 2023
d14a8a5
Merge branch 'dev' of https://github.com/JSH99/Toy1_Team13 into feat/โ€ฆ
minseokiim Sep 14, 2023
b49c997
Feat : add styled component to wiki
minseokiim Sep 14, 2023
17eee0c
feat: Edit categories and routes in gallery tab
dbstjrals Sep 14, 2023
1df7a28
feat: Add edit function and modal for project
dbstjrals Sep 14, 2023
b3f919b
feat: Add project state
dbstjrals Sep 14, 2023
84179c9
feat: Add project registering page
dbstjrals Sep 14, 2023
cd8ab46
feat: Add member introduction page view
dbstjrals Sep 14, 2023
cb762f3
feat: Add modal title
dbstjrals Sep 14, 2023
526560a
Merge branch 'dev' into feat/gallery
dbstjrals Sep 14, 2023
bf6dccc
Merge pull request #9 from JSH99/feat/wiki
minseokiim Sep 14, 2023
1c4aaaf
style: Modify React.useState to useState
dbstjrals Sep 14, 2023
36829d9
Merge branch 'feat/gallery' of https://github.com/JSH99/Toy1_Team13 iโ€ฆ
dbstjrals Sep 14, 2023
9f604d1
style: Modify React.useState to useState
dbstjrals Sep 14, 2023
a879dd7
Feat : Add recaptcha for join.tsx
Sinary00 Sep 14, 2023
5f4807b
fix : Resolve merge conflict
Sinary00 Sep 14, 2023
795deb1
fix : Resolve merge conflict
Sinary00 Sep 14, 2023
3963798
Merge pull request #10 from JSH99/feat/gallery
dbstjrals Sep 14, 2023
5258373
refactor: Changed some functions into reusable ones
dbstjrals Sep 14, 2023
8446d7e
feat: Add Carousel component
JSH99 Sep 15, 2023
f26d3e3
feat: Add auto slide
JSH99 Sep 15, 2023
a739ac1
feat: Add commute table component
JSH99 Sep 15, 2023
ebbc04e
feat: Change time format
JSH99 Sep 15, 2023
f09a2a2
feat: Connect firebase auth
JSH99 Sep 15, 2023
36415ba
fix: Upload new user's commute info
Sep 15, 2023
56eab3a
fix: Resolve async issue
JSH99 Sep 15, 2023
c17e80a
feat: Add assets
JSH99 Sep 15, 2023
05b7341
feat: Add home page
JSH99 Sep 15, 2023
756654d
delete: Remove Loading component
Sep 15, 2023
58fed67
Merge pull request #11 from JSH99/feat/login
Sinary00 Sep 15, 2023
2eb0a01
feat: Add more functions to commute modal
Sep 16, 2023
6689d0e
comment: Remove unnecessary comments
Sep 16, 2023
3852804
refactor: Destructure commuteInfo
Sep 16, 2023
a36bd7c
Merge branch 'dev' into feat/modal
Sep 16, 2023
a27617d
Merge pull request #13 from JSH99/feat/home
Sep 16, 2023
04986a5
refactor: Make the code more efficient
Sep 17, 2023
52df7f2
Merge pull request #12 from JSH99/feat/modal
Sep 17, 2023
0d4dd32
refactor: Move business logics into the custom hook #16
Sep 17, 2023
5487df8
fix: Upload first working record
Sep 17, 2023
5f13d78
refactor: Memoize modal message component using React memo
Sep 17, 2023
dec8be9
fix: Change timezone to asia seoul
Sep 17, 2023
2eb0eaf
Merge branch 'dev' into feat/#16
Sep 18, 2023
e054567
feat: Create post box component
JSH99 Sep 18, 2023
8d69c5c
Feat : add rule page
minseokiim Sep 18, 2023
1e6021f
Feat : add rule page
minseokiim Sep 18, 2023
3528311
Feat : add editor name to wiki
minseokiim Sep 18, 2023
5fb4bd4
Merge pull request #17 from JSH99/feat/#16
Sep 18, 2023
7180bb1
Merge pull request #18 from JSH99/feat/wiki
minseokiim Sep 19, 2023
de8fea9
Feat: upload photo for join
Sinary00 Sep 19, 2023
4c3774d
fix: Display work button when logged out
Sep 19, 2023
5b5d152
Merge pull request #19 from JSH99/feat/login
Sinary00 Sep 19, 2023
f592fb9
Merge pull request #21 from JSH99/feat/#20
Sep 19, 2023
26dca49
feat: Connect firestore
JSH99 Sep 19, 2023
5475be8
feat: Add project register page and integrated with firebase
dbstjrals Sep 19, 2023
97c35c3
Feat : add contact page
minseokiim Sep 19, 2023
5ba47f2
Merge branch 'dev' into feat/gallery
dbstjrals Sep 19, 2023
2fbce9e
feat: Remember working data when reload the page
Sep 19, 2023
0ce4fb3
feat: Connect firebase storage
JSH99 Sep 19, 2023
c20aae0
feat: Create loading spinner component
JSH99 Sep 19, 2023
0f8bb09
Merge pull request #22 from JSH99/feat/gallery
dbstjrals Sep 19, 2023
99ed0ef
feat: Add sidebar toggle on mobile
Sep 19, 2023
a0c7a88
design: Add style to button
Sep 19, 2023
bef01d8
Merge pull request #23 from JSH99/feat/contact
minseokiim Sep 20, 2023
2c8f571
Merge pull request #24 from JSH99/feat/modal
minseokiim Sep 20, 2023
1096413
Merge pull request #25 from JSH99/feat/sidebar
minseokiim Sep 20, 2023
fc75cd2
feat: Add timer class
Sep 20, 2023
663c692
fix: Change date to time in modal
Sep 20, 2023
7b202b8
feat : Detach join component
Sinary00 Sep 20, 2023
998ca15
Merge pull request #26 from JSH99/feat/timer
minseokiim Sep 20, 2023
f59e882
fix: Update time format
JSH99 Sep 20, 2023
c2e794f
Merge branch 'dev' into feat/main
JSH99 Sep 20, 2023
aedbf6c
feat: Add loading spinner main page
JSH99 Sep 20, 2023
08cc630
Merge pull request #27 from JSH99/feat/login
Sinary00 Sep 20, 2023
50b4709
Merge pull request #28 from JSH99/feat/main
Sinary00 Sep 20, 2023
34b6e31
Merge branch 'dev' into feat/notice
JSH99 Sep 20, 2023
d151477
feat: Route notice detail page
JSH99 Sep 20, 2023
e01540e
feat: Add loading spinner notice page
JSH99 Sep 20, 2023
554b080
Feat : add about page, logo
minseokiim Sep 20, 2023
56911d2
feat: Fetch user data from firestore
dbstjrals Sep 21, 2023
b61a17e
feat: Add name, participant and description properties to project data
dbstjrals Sep 21, 2023
1e3c3fc
Feat : Add user modify func
Sinary00 Sep 21, 2023
d208c9e
fix : Update user to login
Sinary00 Sep 21, 2023
f8d536d
Merge pull request #29 from JSH99/feat/notice
Sinary00 Sep 21, 2023
badef4f
Merge branch 'dev' into feat/contact
minseokiim Sep 21, 2023
aeb5462
Merge pull request #30 from JSH99/feat/contact
minseokiim Sep 21, 2023
3d3436e
fix : Resolve merge conflict
Sinary00 Sep 21, 2023
f6c0b4b
Merge branch 'dev' into feat/login
minseokiim Sep 21, 2023
c99f572
Merge pull request #31 from JSH99/feat/login
minseokiim Sep 21, 2023
a3095df
fix : Resolve merge conflict
Sinary00 Sep 21, 2023
e898c71
fix : Resolve merge conflict
Sinary00 Sep 21, 2023
ddb7d4a
Feat : Resolve errors
minseokiim Sep 21, 2023
d14c3b8
Merge pull request #34 from JSH99/feat/login
minseokiim Sep 21, 2023
e9a84e0
Merge branch 'dev' of https://github.com/JSH99/Toy1_Team13 into feat/โ€ฆ
minseokiim Sep 21, 2023
1939a0d
Merge pull request #32 from JSH99/feat/gallery
dbstjrals Sep 21, 2023
057d792
Merge branch 'dev' of https://github.com/JSH99/Toy1_Team13 into feat/โ€ฆ
minseokiim Sep 21, 2023
df32837
feat: Add reload after confirming working time
Sep 21, 2023
1901016
design : Add css for auth
Sinary00 Sep 21, 2023
32dd311
delete: Delete dummy image files
dbstjrals Sep 22, 2023
df936c6
fix: Change icon design
dbstjrals Sep 22, 2023
58d5c6d
feat: Add project participating function
dbstjrals Sep 22, 2023
6d9c51c
fix: Resolve pariticipants reset issue while project edit
dbstjrals Sep 22, 2023
1823a64
Merge pull request #35 from JSH99/feat/#-reload
JSH99 Sep 22, 2023
5d7a702
Merge pull request #36 from JSH99/feat/gallery
Sinary00 Sep 22, 2023
6fe992d
Merge branch 'dev' of https://github.com/JSH99/Toy1_Team13 into feat/โ€ฆ
minseokiim Sep 22, 2023
25b02e0
Fix : Firebase hosting path
minseokiim Sep 22, 2023
24dd4ed
Merge branch 'dev' of https://github.com/JSH99/Toy1_Team13 into feat/โ€ฆ
Sinary00 Sep 22, 2023
d52dbad
design : Add modify css
Sinary00 Sep 22, 2023
86a9bc0
Fix : Add local root to static file
minseokiim Sep 22, 2023
f27d141
Merge pull request #37 from JSH99/feat/contact
JSH99 Sep 22, 2023
7ee4b3e
Merge branch 'dev' of https://github.com/JSH99/Toy1_Team13 into feat/โ€ฆ
Sinary00 Sep 22, 2023
07c427a
Feat : Create Common utils
Sinary00 Sep 22, 2023
57929c1
feat: Add pagination
dbstjrals Sep 22, 2023
3ea472a
fix: Change setDoc to updateDoc while editing projects
dbstjrals Sep 22, 2023
791373d
Merge pull request #38 from JSH99/feat/gallery
Gaoridang Sep 22, 2023
757309d
design : Unify design css
Sinary00 Sep 22, 2023
ac22fdd
fix : Resolve merge conflict
Sinary00 Sep 22, 2023
1f16843
design : Design common css
Sinary00 Sep 22, 2023
9831fca
Merge pull request #39 from JSH99/feat/login
Sinary00 Sep 22, 2023
d7641f2
design : Design notice
Sinary00 Sep 22, 2023
968c423
Feat: Add user flow page
minseokiim Sep 22, 2023
fe5fdae
Merge pull request #40 from JSH99/feat/login
minseokiim Sep 22, 2023
8ca14a9
Merge branch 'dev' of https://github.com/JSH99/Toy1_Team13 into feat/โ€ฆ
minseokiim Sep 22, 2023
e68aa69
design: Change modal design
Sep 22, 2023
ecb5054
Merge pull request #41 from JSH99/feat/modal#2
Sinary00 Sep 22, 2023
0b1026c
Merge branch 'dev' of https://github.com/JSH99/Toy1_Team13 into feat/โ€ฆ
minseokiim Sep 22, 2023
72335f1
docs: Update README.md
JSH99 Sep 22, 2023
5d2c35a
Merge pull request #42 from JSH99/feat/readme
Sinary00 Sep 22, 2023
7697a0c
Merge branch 'dev' of https://github.com/JSH99/Toy1_Team13 into feat/โ€ฆ
minseokiim Sep 22, 2023
e949cc2
Fix : change image
minseokiim Sep 22, 2023
894b45a
Style: add color
minseokiim Sep 22, 2023
15f3139
Style: add color
minseokiim Sep 22, 2023
464fca5
Merge pull request #43 from JSH99/feat/contact
JSH99 Sep 22, 2023
78d85a9
fix : Resolve merge conflict
Sinary00 Sep 22, 2023
6aab030
Update README.md
minseokiim Sep 22, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
'standard',
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
'prettier',
],
ignorePatterns: ['dist', '.eslintrc.cjs'],
parser: '@typescript-eslint/parser',
plugins: ['react-refresh'],
rules: {
'react-refresh/only-export-components': ['warn', { allowConstantExport: true }],
},
};
10 changes: 10 additions & 0 deletions .firebase/hosting.ZGlzdA.cache
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
404.html,1694584186700,3240c6b45513fdd97861a63c8ae3ef0e7d2bf1357ec632ad7e6839473710326c
vite.svg,1694149012667,59ec4b6085a0cb1bf712a5e48dd5f35b08e34830d49c2026c18241be04e05d5a
index.html,1695384284340,0db067a57c13fe5950ecdaeeb6d491ba62aad54d506f67bddb82cf8c4a325cb9
assets/status-icon-f3179852.svg,1695384284340,85eb9b117034fa523e75f5d028ada645cca748342d2f4b0c58114c8361e380d6
assets/Pokemon-1232f28d.png,1695384284340,aec1412b36c19f25531df7f940a3bb5d6e0b5298810b7de0c9ecd538d2c4759e
assets/notion-1562bff6.png,1695384284340,1fccf905b1e0b2948dfe5c092909f198c3322975c211a0052b2089aa0b147cba
assets/index-5a703dad.css,1695384284340,ff2751231e19b099fbe353887180528e547bf8a9d3be76d7c34f5e215c379291
assets/figma-1134540b.png,1695384284340,be8e4963f94cb0a65e565f9abad88e7e3d0d4e90ec63cfcd8659bed8394867f4
assets/github-7e4f8586.png,1695384284340,d837af2ac66ceb2dab16eec3b27e4d02dbb6ba8f5df7125267522c45f7e5f113
assets/index-5467c633.js,1695384284342,09a591992a35e29ea5ea05d6e0a9c1b0952b5894db5aeb4bdda3220b21b858dd
3 changes: 3 additions & 0 deletions .firebase/hosting.cHVibGlj.cache
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
404.html,1694584186700,3240c6b45513fdd97861a63c8ae3ef0e7d2bf1357ec632ad7e6839473710326c
vite.svg,1694149012667,59ec4b6085a0cb1bf712a5e48dd5f35b08e34830d49c2026c18241be04e05d5a
index.html,1695347723349,b7186347f480784160bb01776efc839c1e6771dc36a2c2e077bf03f9f70d412d
5 changes: 5 additions & 0 deletions .firebaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"projects": {
"default": "toy13-b5244"
}
}
5 changes: 5 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## ์ œ๋ชฉ(๋ชฉ์ )

## ์ž‘์—… ๋‚ด์šฉ

## ํ™•์ธ ์‚ฌํ•ญ
26 changes: 26 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

.env
6 changes: 6 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules
.DS_Store
dist
dist-ssr
*.local
node_modules/*
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"singleQuote": true,
"semi": true,
"useTabs": false,
"tabWidth": 2,
"trailingComma": "all",
"printWidth": 100
}
249 changes: 75 additions & 174 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,203 +1,104 @@
# **๐Ÿ“… ์ง์›๋“ค์„ ์œ„ํ•œ ์œ„ํ‚ค ์‚ฌ์ดํŠธ**
# ๐Ÿ’ป Toy Project1

์ง์› ๋“ค์„ ์œ„ํ•œ ์œ„ํ‚ค ์‚ฌ์ดํŠธ๋ฅผ ๋งŒ๋“ค์–ด๋ณด์„ธ์š”!
์œ„ํ‚ค ์‚ฌ์ดํŠธ์—๋Š” ์œ„ํ‚ค ๋ฟ ์•„๋‹ˆ๋ผ ์—ฌ๋Ÿฌ ๊ธฐ๋Šฅ์ด ์ถ”๊ฐ€๋˜์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค!
## ๐Ÿ“Œ ๊ฐœ์š”

### **[๊ณผ์ œ ์ˆ˜ํ–‰ ๋ฐ ์ œ์ถœ ๋ฐฉ๋ฒ•]**
- ์ง์›๋“ค์„ ์œ„ํ•œ ์œ„ํ‚ค ์‚ฌ์ดํŠธ๋ฅผ ๋งŒ๋“ ๋‹ค.
- Firebase Storage, DataBase, Auth๋ฅผ ํ™œ์šฉํ•˜์—ฌ ๋ฆฌ์†Œ์Šค๋ฅผ ๊ด€๋ฆฌํ•œ๋‹ค.
- TypeScript ์‚ฌ์šฉ์„ ์ตํžŒ๋‹ค.
<br><br>

1. ํ˜„์žฌ ์ €์žฅ์†Œ๋ฅผ ๋กœ์ปฌ์— ํด๋ก (Clone)ํ•ฉ๋‹ˆ๋‹ค.
2. ์ž์‹ ์˜ ํŒ€๋ช…์œผ๋กœ ๋ธŒ๋žœ์น˜๋ฅผ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค.(๊ตฌ๋ถ„ ๊ฐ€๋Šฅํ•˜๋„๋ก ํŒ€๋ช…์„ ๊ผญ ํŒŒ์Šค์นผ์ผ€์ด์Šค๋กœ ํ‘œ์‹œํ•˜์„ธ์š”, git branch Y_FE_Toy1_Team13)
3. ์ž์‹ ์˜ ํŒ€๋ช… ๋ธŒ๋žœ์น˜์—์„œ ๊ณผ์ œ๋ฅผ ์ˆ˜ํ–‰ํ•ฉ๋‹ˆ๋‹ค.
4. ๊ณผ์ œ ์ˆ˜ํ–‰์ด ์™„๋ฃŒ๋˜๋ฉด, ์ž์‹ ์˜ ํŒ€๋ช… ๋ธŒ๋žœ์น˜๋ฅผ ์›๊ฒฉ ์ €์žฅ์†Œ์— ํ‘ธ์‹œ(Push)ํ•ฉ๋‹ˆ๋‹ค.(main ๋ธŒ๋žœ์น˜์— ํ‘ธ์‹œํ•˜์ง€ ์•Š๋„๋ก ๊ผญ ์ฃผ์˜ํ•˜์„ธ์š”, git push origin Y_FE_Toy1_Team13)
5. ์ €์žฅ์†Œ์—์„œ main ๋ธŒ๋žœ์น˜๋ฅผ ๋Œ€์ƒ์œผ๋กœ Pull Request ์ƒ์„ฑํ•˜๋ฉด, ๊ณผ์ œ ์ œ์ถœ์ด ์™„๋ฃŒ๋ฉ๋‹ˆ๋‹ค!(E.g, main <== Y_FE_Toy1_Team13)
6. Pull Request ๋งํฌ๋ฅผ LMS๋กœ๋„ ์ œ์ถœํ•ด ์ฃผ์…”์•ผ ํ•ฉ๋‹ˆ๋‹ค.
7. main ํ˜น์€ ๋‹ค๋ฅธ ์‚ฌ๋žŒ์˜ ๋ธŒ๋žœ์น˜๋กœ ์ ˆ๋Œ€ ๋ณ‘ํ•ฉํ•˜์ง€ ์•Š๋„๋ก ์ฃผ์˜ํ•˜์„ธ์š”!
8. Pull Request์—์„œ ๋ณด์ด๋Š” ์„ค๋ช…์„ ๋‹ค๋ฅธ ์‚ฌ๋žŒ๋“ค์ด ์ดํ•ดํ•˜๊ธฐ ์‰ฝ๋„๋ก ๊ผผ๊ผผํ•˜๊ฒŒ ์ž‘์„ฑํ•˜์„ธ์š”!
9. Pull Request์—์„œ ๊ณผ์ œ ์ œ์ถœ ํ›„ ์ ˆ๋Œ€ ๋ณ‘ํ•ฉ(Merge)ํ•˜์ง€ ์•Š๋„๋ก ์ฃผ์˜ํ•˜์„ธ์š”!
10. ๊ณผ์ œ ์ˆ˜ํ–‰ ๋ฐ ์ œ์ถœ ๊ณผ์ •์—์„œ ๋ฌธ์ œ๊ฐ€ ๋ฐœ์ƒํ•œ ๊ฒฝ์šฐ, ๋ฐ”๋กœ ๋‹ด๋‹น ๋ฉ˜ํ† ๋‚˜ ๊ฐ•์‚ฌ๋‹˜๊ป˜ ์–˜๊ธฐํ•˜์„ธ์š”!
## ๐Ÿฑ ์‚ฌ์ดํŠธ

### **[ํ•„์ˆ˜ ๊ตฌํ˜„์‚ฌํ•ญ]**
<a href="https://toy13-b5244.firebaseapp.com/">
<img alt="Static Badge" src="https://img.shields.io/badge/ํฌ์ผ“๋ชฌ์Šคํ„ฐ ์œ„ํ‚ค ์‚ฌ์ดํŠธ-ffcb09?style=for-the-badge">
</a>
<a href="https://github.com/JSH99/Toy1_Team13">
<img alt="Static Badge" src="https://img.shields.io/badge/%EC%9B%90%EB%B3%B8%20Repository-3267B1?style=for-the-badge">
</a>

- ๋ฌธ์„œํŽธ์ง‘, revision ๊ธฐ๋Šฅ์„ ์ œ๊ณตํ•˜์—ฌ ์—…๋ฌด์ผ์ง€๋ฅผ ์ž‘์„ฑํ•  ์ˆ˜ ์žˆ๋Š” ์ง์›๋“ค์„ ์œ„ํ•œ ์œ„ํ‚ค์‚ฌ์ดํŠธ ๊ตฌํ˜„(๋งˆํฌ๋‹ค์šด ํ˜•์‹)
- firebase database (Firestore) ์ด์šฉ
- ๋ชจ๋‹ฌ์„ ํ™œ์šฉํ•œ ๊ทผ๋ฌด ์‹œ๊ฐ„์„ ํ‘œ์‹œํ•˜๋Š” ์‹œ๊ณ„ ๋ฐ ํƒ€์ด๋จธ ์ฐฝ ๊ตฌํ˜„
- ์บ๋Ÿฌ์…€์„ ํ™œ์šฉํ•œ ํšŒ์‚ฌ ๊ณต์ง€ ํŽ˜์ด์ง€
- **๊ฐค๋Ÿฌ๋ฆฌ ํŽ˜์ด์ง€ / ์—…๋ฌด์ผ์ง€ ํŽ˜์ด์ง€ ๋“ฑ ๋ฉ”๋‰ด๋ฅผ ํ•„ํ„ฐ๋ง ๋˜๋Š” ์นดํ…Œ๊ณ ๋ฆฌํ™” ํ•˜๋Š” ์„ ํƒ๋ฐ” ๊ตฌํ˜„**
- netlify ๋“ฑ์„ ์ด์šฉํ•œ ์ •์  ํŽ˜์ด์ง€ ๋ฐฐํฌ
- TypeScript ์‚ฌ์šฉ ํ•„์ˆ˜
- ๊ณผ์ œ์— ๋Œ€ํ•œ ์„ค๋ช…์„ ํฌํ•จํ•œย `README.md`ย ํŒŒ์ผ ์ž‘์„ฑ
- ํŒ€์›๋ณ„๋กœ ๊ตฌํ˜„ํ•œ ๋ถ€๋ถ„ ์†Œ๊ฐœ
ํฌ์ผ“๋ชฌ์Šคํ„ฐ๋ฅผ ์ฃผ์ œ๋กœ ํฌ์ผ“๋ชฌ๋“ค์„ ์œ„ํ•œ ์œ„ํ‚ค ์‚ฌ์ดํŠธ๋ฅผ ์ œ์ž‘.
<br><br>

### **[์„ ํƒ ๊ตฌํ˜„์‚ฌํ•ญ]**
## ๐Ÿงšโ€โ™‚๏ธ ์—ญํ•  ๋ถ„๋‹ด

- React ์‚ฌ์šฉ์€ ์„ ํƒ
- ๊ธฐํƒ€ ๋™์ž‘์ด ์™„๋ฃŒ๋˜๊ธฐ ์ „์— ๋กœ๋”ฉ ์• ๋‹ˆ๋ฉ”์ด์…˜ ๊ตฌํ˜„
- ํŽ˜์ด์ง€๋„ค์ด์…˜
- ๊ด€๋ จ๋œ ๊ธฐํƒ€ ๊ธฐ๋Šฅ๋„ ๊ณ ๋ ค
- eslint ์„ค์ •, ์ปค๋ฐ‹์ปจ๋ฒค์…˜, ๋ฌธ์„œํ™” ๋“ฑ ํŒ€ํ”„๋กœ์ ํŠธ์‹œ ํ•„์š”ํ•œ ์ถ”๊ฐ€ ์ž‘์—…๋“ค
| [๊น€๋ฏผ์„œ](https://github.com/minseokiim) | [์‹ ํ•˜์—ฐ](https://github.com/gkdus2217) | [์œค์„๋ฏผ](https://github.com/dbstjrals) | [์ด์žฌ์ค€](https://github.com/Gaoridang) | [์ •์„œํ˜„](https://github.com/JSH99) |
| -------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
| wiki page ใƒป about page ๊ตฌํ˜„, ํ”ผ๊ทธ๋งˆ ๋””์ž์ธ, firebase ํ˜ธ์ŠคํŒ… ๋ฐ ๋ฐฐํฌ | footer ใƒป login page ใƒป my page ๊ตฌํ˜„, firebase ๊ธฐ๋ณธ ์„ค์ • ๋ฐ ์—ฐ๊ฒฐ, ๋””์ž์ธ ํ†ตํ•ฉ ๋ฐ ๋ชจ๋ฐ”์ผ ๋ฐ˜์‘ํ˜• ๊ตฌํ˜„ | gallery page (members ์†Œ๊ฐœ ใƒป projects ๊ด€๋ฆฌ) ๊ตฌํ˜„, ํ”ผ๊ทธ๋งˆ ๋””์ž์ธ ๋ฐ ์ •๋ฆฌ | header ใƒป nav bar ใƒป commute modal ๊ตฌํ˜„, ํ”ผ๊ทธ๋งˆ ๋””์ž์ธ, ํ”„๋กœ์ ํŠธ ์ƒ์„ฑ ๋ฐ ๊ธฐ๋ณธ ์„ค์ •, ๊ณตํ†ต util ๊ด€๋ฆฌ, ์œ ์ €ํ”Œ๋กœ์šฐ ์ž‘์„ฑ | main page ใƒป notice page ๊ตฌํ˜„, ์บ๋Ÿฌ์…€ ๋ฐฐ๋„ˆ ์ด๋ฏธ์ง€ ์ œ์ž‘, ํšŒ์˜๋ก ๊ด€๋ฆฌ, ๋ฆฌ๋“œ๋ฏธ ์ž‘์„ฑ |

---
<br><br>

## ๊ฐ€์ด๋“œ
## โœจ ๊ตฌํ˜„ ๋‚ด์šฉ

์•„๋ž˜ ์˜ˆ์‹œ๋Š” ๋ชจ๋‘ ํ•˜๋‚˜์˜ ์˜๊ฒฌ์ž…๋‹ˆ๋‹ค!
### ํšŒ์› ์ •๋ณด ๊ด€๋ฆฌ

๋”ฐ๋ผํ•˜๋Š”๊ฒŒ ์•„๋‹ˆ๋ผ ์ž์‹ ๋งŒ์˜ ๊ฒฐ๊ณผ๋ฌผ์„ ๋งŒ๋“ค์–ด๋ณด์„ธ์š”.
![แ„’แ…ฌแ„‹แ…ฏแ†ซ ์ •๋ณด ๊ด€๋ฆฌ](https://github.com/JSH99/Toy1_Team13/assets/63582234/faa9d3b3-f597-41bb-a3dc-4663be46887f)
[ ๋‹ด๋‹น ๊ฐœ๋ฐœ์ž: **์‹ ํ•˜์—ฐ** ]

### ๊ณต์ง€์‚ฌํ•ญ
[์˜์ƒ 1]
- ํ—ค๋”์˜ ๋กœ๊ทธ์ธ ํด๋ฆญ ์‹œ ํšŒ์› ์ธ์ฆ ํŽ˜์ด์ง€๋กœ ์ด๋™ (๋กœ๊ทธ์ธ, ํšŒ์›๊ฐ€์ž…)
- ํšŒ์›๊ฐ€์ž… ์‹œ ํœด๋Œ€ํฐ ์ธ์ฆ ๊ฐ€๋Šฅ
- ๋กœ๊ทธ์ธํ•œ ๊ฒฝ์šฐ ํ—ค๋”์—์„œ ์•„์ด์ฝ˜ ํด๋ฆญ ์‹œ ํšŒ์› ์ •๋ณด ํ™•์ธ ๋ฐ ๋งˆ์ดํŽ˜์ด์ง€ ์ด๋™
- ๋งˆ์ดํŽ˜์ด์ง€์—์„œ ํšŒ์› ์ •๋ณด ํ™•์ธ ๋ฐ ์ˆ˜์ •
- ๋งˆ์ดํŽ˜์ด์ง€์—์„œ ์ด๋ฉ”์ผ ์ธ์ฆ, ํœด๋Œ€ํฐ ์ธ์ฆ, ํšŒ์› ํƒˆํ‡ด
- ๋งˆ์ดํŽ˜์ด์ง€์—์„œ ์ด๋ฉ”์ผ ์ธ์ฆ ์‹œ ๋น„๋ฐ€๋ฒˆํ˜ธ ๋ณ€๊ฒฝ ๊ฐ€๋Šฅ
<br>

### ๊ณต์ง€ ์บ๋Ÿฌ์…€

### **๋ชจ๋‹ฌ ํƒ€์ด๋จธ**
[์˜์ƒ 2]
![๊ณต์ง€ แ„แ…ขแ„…แ…ฅแ„‰แ…ฆแ†ฏ](https://github.com/JSH99/Toy1_Team13/assets/63582234/317f1a74-9d6b-4ad5-b7da-bf2a1fc31554)
[ ๋‹ด๋‹น ๊ฐœ๋ฐœ์ž: **์ •์„œํ˜„** ]

- ์บ๋Ÿฌ์…€ ์ด๋ฏธ์ง€ 5์ดˆ๋งˆ๋‹ค ์ž๋™์œผ๋กœ ๋ฌดํ•œ ์Šฌ๋ผ์ด๋“œ
- ํ™”์‚ดํ‘œ ๋ฒ„ํŠผ, ๋™๊ทธ๋ผ๋ฏธ ๋ฒ„ํŠผ์œผ๋กœ ์ด๋ฏธ์ง€ ์ด๋™
- ์บ๋Ÿฌ์…€ ์ด๋ฏธ์ง€ ํด๋ฆญ ์‹œ ํ•ด๋‹น ๊ณต์ง€ ์ƒ์„ธ ํŽ˜์ด์ง€๋กœ ์ด๋™
- ํŒŒ์ด์–ด๋ฒ ์ด์Šค ๋ฐ์ดํ„ฐ ๊ฐ€์ ธ์˜ค๋Š” ๋™์•ˆ ๋กœ๋”ฉ ์Šคํ”ผ๋„ˆ ๋™์ž‘
<br>

https://github.com/KDT1-FE/Y_FE_Toy1/assets/38754963/20c18d28-5a01-4163-876c-be74a24f62db
### ์œ„ํ‚ค ํŽ˜์ด์ง€

![แ„‹แ…ฑแ„แ…ต ํŽ˜์ด์ง€](https://github.com/JSH99/Toy1_Team13/assets/63582234/0d224048-efa9-480b-ba51-024c2288c3f6)
[ ๋‹ด๋‹น ๊ฐœ๋ฐœ์ž: **๊น€๋ฏผ์„œ** ]

- ๋งˆํฌ๋‹ค์šด ํ˜•์‹์˜ ์œ„ํ‚ค ๊ธ€ ํŽธ์ง‘
- GUI๋ฅผ ํ†ตํ•ด ์‰ฌ์šด ํŽธ์ง‘ ๊ธฐ๋Šฅ ์ œ๊ณต
- ํŽธ์ง‘ ์‹œ ๋งˆํฌ๋‹ค์šด ๋ฏธ๋ฆฌ๋ณด๊ธฐ ๊ธฐ๋Šฅ ์ œ๊ณต
- ์ˆ˜์ •ํ•œ ๊ธ€ ์ €์žฅ ์‹œ ์ž‘์„ฑ์ž ๋ฐ ์ž‘์„ฑ ์‹œ๊ฐ„ ์—…๋ฐ์ดํŠธ
<br>

### **๋งˆํฌ๋‹ค์šด ์œ„ํ‚ค์‚ฌ์ดํŠธ**
[์˜์ƒ 3]
### ๊ฐค๋Ÿฌ๋ฆฌ ํŽ˜์ด์ง€

![แ„€แ…ขแ†ฏแ„…แ…ฅแ„…แ…ต ํŽ˜์ด์ง€](https://github.com/JSH99/Toy1_Team13/assets/63582234/efa46669-33ce-4f2a-a2fc-274419fb0e88)
[ ๋‹ด๋‹น ๊ฐœ๋ฐœ์ž: **์œค์„๋ฏผ** ]

https://github.com/KDT1-FE/Y_FE_Toy1/assets/38754963/08e3efca-8137-44d8-a0af-c62a668b810b
- ๋ฉค๋ฒ„ ์†Œ๊ฐœ ํŽ˜์ด์ง€์—์„œ ํšŒ์›๊ฐ€์ž…ํ•œ ๋ฉค๋ฒ„๋“ค์˜ ํ”„๋กœํ•„ ์กฐํšŒ
- ํ”„๋กœ์ ํŠธ ์ง„ํ–‰ ์ƒํ™ฉ ๋ณ„๋กœ ์˜ˆ์ •, ์ง„ํ–‰์ค‘, ์™„๋ฃŒ๋œ ํ”„๋กœ์ ํŠธ ์กฐํšŒ
- ํ”„๋กœ์ ํŠธ ์ถ”๊ฐ€๋ฅผ ํ†ตํ•œ ์ƒˆ๋กœ์šด ํ”„๋กœ์ ํŠธ ์ƒ์„ฑ
- ๋“ฑ๋ก๋˜์–ด ์žˆ๋Š” ํ”„๋กœ์ ํŠธ ์ƒํƒœ ๋ฐ ๋‚ด์šฉ ์ˆ˜์ •
- ํ”„๋กœ์ ํŠธ ์ƒ์„ฑ์ž ํ‘œ์‹œ ๋ฐ ํ”„๋กœ์ ํŠธ ์ฐธ์—ฌ ๊ฐ€๋Šฅ
<br><br>

### ์ถœํ‡ด๊ทผ ๊ธฐ๋ก

![แ„แ…ฉแ„‹แ…ต1_แ„Žแ…ฎแ†ฏแ„แ…ฌแ„€แ…ณแ†ซ](https://github.com/JSH99/Toy1_Team13/assets/63582234/78f0dcd8-5bec-40aa-adab-7652df21135b)
[ modal ๊ฐœ๋ฐœ์ž: **์ด์žฌ์ค€**, table ๊ฐœ๋ฐœ์ž: **์ •์„œํ˜„** ]

### **๊ฐค๋Ÿฌ๋ฆฌ**
[์˜์ƒ 4]
- ์ถœํ‡ด๊ทผ ๋ชจ๋‹ฌ ํด๋ฆญ ์‹œ ํƒ€์ด๋จธ๋ฅผ ํ†ตํ•ด ์ถœ๊ทผ ์‹œ๊ฐ„, ํ‡ด๊ทผ ์‹œ๊ฐ„ ๊ธฐ๋ก
- ํ‡ด๊ทผ ํด๋ฆญ ์‹œ ์ด ๊ทผ๋ฌด์‹œ๊ฐ„ ํ™•์ธ
- ๋‹น์ผ ์ถœ๊ทผ ๊ธฐ๋ก์ด ์ด๋ฏธ ์žˆ์„ ๊ฒฝ์šฐ ์žฌ์ถœ๊ทผํ•  ๊ฑด์ง€ ํ™•์ธ
- ๊ฐ™์€ ๋‚  ์ถœํ‡ด๊ทผ ์—ฌ๋Ÿฌ ๋ฒˆ ๊ธฐ๋ก ๊ฐ€๋Šฅ
- ํ‡ด๊ทผ ์™„๋ฃŒํ–ˆ์„ ๊ฒฝ์šฐ ํ•ด๋‹น ๋‚ ์งœ์˜ ๊ฐ€์žฅ ์ตœ๊ทผ ์ถœํ‡ด๊ทผ ๊ธฐ๋ก ์ถœํ‡ด๊ทผ ํ…Œ์ด๋ธ”์— ์ถ”๊ฐ€ (๋ฉ”์ธ ํŽ˜์ด์ง€)
<br><br>

---
## ๐Ÿ™‹๐Ÿปโ€โ™€๏ธ ์œ ์ € ํ”Œ๋กœ์šฐ

# **[Firestore]**
<img width="2856" alt="user flow" src="https://github.com/JSH99/Toy1_Team13/assets/63582234/44b158fa-ad25-452c-85c1-9089283cce89">

Firestore์— ๋Œ€ํ•œ ๊ฐ€์ด๋“œ์ž…๋‹ˆ๋‹ค.
<br><br>

์ž์„ธํ•œ ๋‚ด์šฉ์€ [๊ณต์‹ ํ™ˆํŽ˜์ด์ง€](https://firebase.google.com/?hl=ko) ๋ฅผ ์ฐพ์•„๋ณด๊ธธ ์ ๊ทน ๊ถŒ์žฅํ•ฉ๋‹ˆ๋‹ค!
## ๐Ÿ› ๏ธ Stack

### **App init**

```jsx
import { getFirestore } from "firebase/firestore";

export const db = getFirestore(fireBaseApp);
```

### Firestore ๋ฐ์ดํ„ฐ ์ถ”๊ฐ€ํ•˜๊ธฐ

Firestore์˜ ๋ฐ์ดํ„ฐ๋ฅผ ์ถ”๊ฐ€ํ•˜๋Š” ๋ฐฉ๋ฒ•์€ ํฌ๊ฒŒ ๋‘๊ฐ€์ง€์ด๋‹ค.

1. Firebase console์—์„œ ์†์ˆ˜ ๋ฐ์ดํ„ฐ ์ถ”๊ฐ€ํ•ด์ฃผ๊ธฐ
2. ์ฝ”๋“œ๋กœ ๋ฐ์ดํ„ฐ ์ถ”๊ฐ€ํ•˜๊ธฐ

### 1. Firebase console์—์„œ ์†์ˆ˜ ๋ฐ์ดํ„ฐ ์ถ”๊ฐ€ํ•ด์ฃผ๊ธฐ

1. [Firebase console](https://console.firebase.google.com/u/0/?hl=ko)์— ์ ‘์†ํ•œ๋‹ค.
2. ์ž์‹ ์˜ ํ”„๋กœ์ ํŠธ๋ฅผ ์„ ํƒํ•œ๋‹ค.
3. ์™ผ์ชฝ ๋ฉ”๋‰ด์—์„œย `Firestore Database`๋ฅผ ์„ ํƒํ•œ๋‹ค.
4. `+ ๋ฒ„ํŠผ`์„ ๋ˆŒ๋Ÿฌ ์ปฌ๋ ‰์…˜ > ๋ฌธ์„œ๋ฅผ ๋งˆ์Œ๋Œ€๋กœ ์ถ”๊ฐ€ํ•ด์ค€๋‹ค.
5. ํ•„๋“œ๋ฅผ ์ถ”๊ฐ€ํ•˜์—ฌ ๋ฌธ์„œ์— ๋ฐ์ดํ„ฐ๋ฅผ ๋„ฃ์–ด์ค€๋‹ค.

### 2. ์ฝ”๋“œ๋กœ ๋ฐ์ดํ„ฐ ์ถ”๊ฐ€ํ•˜๊ธฐ

Firestore๋Š”ย `setDoc`,ย `addDoc`ย ๋‘ ๊ฐ€์ง€ ํ•จ์ˆ˜๋กœ ๋ฐ์ดํ„ฐ๋ฅผ ์ถ”๊ฐ€ํ•  ์ˆ˜ ์žˆ๋‹ค.

์ด์ œ ์›ํ•˜๋Š” ๋ฐ์ดํ„ฐ๋ฅผ ์ถ”๊ฐ€ํ•ด๋ณด์ž.

**1.ย `addDoc`**

`addDoc`์€ ์•„๋ž˜์™€ ๊ฐ™์ด ์‚ฌ์šฉํ•˜์—ฌ ์›ํ•˜๋Š” ๋ฐ์ดํ„ฐ๋ฅผ ์ถ”๊ฐ€ํ•  ์ˆ˜ ์žˆ๋‹ค.

```
import { addDoc, collection } from "firebase/firestore";

const writtenDoc = await addDoc(collection(db, "wiki"), {
title: "LGH",
description: "ํ—ˆ๋จผ๋ฐ€๋Ÿฌ...์‚ฌ๊ณ ์‹ถ๋‹ค...",
});

console.log("Document written with ID: ", writtenDoc.id);
// ์ƒˆ๋กœ ์ƒ์„ฑ๋œ Document์˜ ID๋ฅผ ๋ฐ˜ํ™˜ํ•œ๋‹ค.
```

์›ํ•˜๋Š” ๋ฐ์ดํ„ฐ๋ฅผ ์ถ”๊ฐ€ํ•˜๊ธฐ ์œ„ํ•ด์„  ๋จผ์ € ์›ํ•˜๋Š” collection์„ ์„ ํƒํ•ด์•ผ ํ•œ๋‹ค. ์œ„ ์˜ˆ์ œ์˜ย `addDoc`ย ์•ˆ์—์„œ ์‚ฌ์šฉํ•œย `collection`ย ํ•จ์ˆ˜๋Š” db์ƒ์— ์žˆ๋Š” collection์„ ์„ ํƒํ•˜๊ฑฐ๋‚˜ ์—†์„ ๊ฒฝ์šฐ ์ƒˆ๋กœ์šด collection์„ ์ƒ์„ฑํ•˜์—ฌ ๋ฐ˜ํ™˜ํ•œ๋‹ค.

Firebase์˜ Doc๋Š” ๊ธฐ๋ณธ์ ์œผ๋กœ ID๋ฅผ ๊ฐ€์ ธ์•ผ ํ•˜๋Š”๋ฐ, addDoc์„ ์‚ฌ์šฉํ•˜๋ฉด ID๋ฅผ ์ž๋™์œผ๋กœ ๋งŒ๋“ ๋‹ค. ๋˜ํ•œ, ์ด๋ฏธ ์กด์žฌํ•˜๋Š” Doc์—ย `addDoc`์„ ์‚ฌ์šฉํ•˜๋ฉด ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•œ๋‹ค.

**2.ย `setDoc`**

`setDoc`์€ ์•„๋ž˜์™€ ๊ฐ™์ด ์‚ฌ์šฉํ•˜์—ฌ ์›ํ•˜๋Š” ๋ฐ์ดํ„ฐ๋ฅผ ์ถ”๊ฐ€ํ•  ์ˆ˜ ์žˆ๋‹ค.

```
import { setDoc, doc } from "firebase/firestore";

await setDoc(doc(db, "wiki", "new-id"), {
title: "LGH",
description: "ํ—ˆ๋จผ๋ฐ€๋Ÿฌ...์‚ฌ๊ณ ์‹ถ๋‹ค...",
});
```

`addDoc`๊ณผ์˜ ์ฐจ์ด์ ์€

1. **id**ย ๋ฅผ ์ง€์ •ํ•ด์ค˜์•ผํ•จ
2. `collection`ย ๋Œ€์‹ ย `doc`์„ ์‚ฌ์šฉํ•จ
3. ์ด๋ฏธ ์กด์žฌํ•˜๋Š” Doc์— ์‚ฌ์šฉ๊ฐ€๋Šฅ

3๊ฐ€์ง€ ์ด๋‹ค.

`setDoc`์€ย `addDoc`๊ณผ ๋‹ฌ๋ฆฌ collection์ด ์•„๋‹ˆ๋ผ doc๋ฅผ ์„ ํƒํ•ด์•ผ ํ•œ๋‹ค. ์ด๋Š”ย `setDoc`์ด ๋ฐ์ดํ„ฐ์˜ ์ถ”๊ฐ€ ๋ฟ ์•„๋‹ˆ๋ผ ๋ฐ์ดํ„ฐ ๋ฎ์–ด์“ฐ๊ธฐ ๊ธฐ๋Šฅ๋„ ๊ฐ€์ง€๊ณ  ์žˆ๊ธฐ ๋•Œ๋ฌธ์ด๋‹ค. ๋Ÿฌํ”„ํ•˜๊ฒŒ ์ƒ๊ฐํ•ด๋ณด๋ฉดย `setDoc`์€ ๋ฐ์ดํ„ฐ๋ฅผ ์ถ”๊ฐ€ํ•  ๋•Œ

1. doc์„ ์„ ํƒํ•˜๊ฑฐ๋‚˜ ์ƒˆ๋กœ์šด doc์„ ์ƒ์„ฑ
2. doc์˜ ๋‚ด์šฉ์„ ๋ฎ์–ด์”€

์˜ ๋ฐฉ์‹์œผ๋กœ ๋™์ž‘ํ•˜๋Š” ๊ฒƒ์ด๋‹ค.

Doc์„ ์„ ํƒํ•˜๋Š” ๋ฐฉ๋ฒ•์€ย `doc`ย ํ•จ์ˆ˜๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ์ด๋‹ค.ย `[doc()](https://firebase.google.com/docs/reference/js/firestore_.md?hl=ko#doc)`ย ํ•จ์ˆ˜๋Š”ย `DocumentReference`ย instance๋ฅผ ๋ฐ˜ํ™˜ํ•œ๋‹ค. ์ ˆ๋Œ€ ๊ฒฝ๋กœ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์›ํ•˜๋Š” Document๋ฅผ ์„ ํƒํ•  ์ˆ˜ ์žˆ๋‹ค. ์œ„์—์„œ ๋งŒ๋“ค์–ด๋‘”ย `wiki > completed`ย ๋ฌธ์„œ๋Š” ์•„๋ž˜์ฒ˜๋Ÿผ ๋ถˆ๋Ÿฌ์˜ฌ ์ˆ˜ ์žˆ๋‹ค.

```
import { doc } from "firebase/firestore";

const docRef = doc(db, "wiki", "completed");
```

`doc`ย ํ•จ์ˆ˜์˜ 3๋ฒˆ์งธ ์ธ์ž๊ฐ€ ๋ฐ”๋กœย **id**ย ์ด๋‹ค. id๋Š” ์ด๋ฏธ ์กด์žฌํ•˜๋Š” Doc์˜ id๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜๋„ ์žˆ๊ณ , ์ƒˆ๋กœ์šด id๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜๋„ ์žˆ๋‹ค. ์กด์žฌํ•˜๋Š” id๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๊ฒฝ์šฐ์—๋Š” ํ•ด๋‹น Doc์˜ ๋ฐ์ดํ„ฐ๋ฅผ ๋ฎ์–ด์“ฐ๊ฒŒ ๋œ๋‹ค. ๊ทธ๋ ‡์ง€ ์•Š์€ ๊ฒฝ์šฐ์—” ์ƒˆ๋กœ์šด Doc๋ฅผ ์ƒ์„ฑํ•œ๋‹ค.

์–ด์จŒ๊ฑฐ๋‚˜ ๋ฐ์ดํ„ฐ๋ฅผ ์ƒˆ๋กœ ์ถ”๊ฐ€ํ•  ์ˆ˜ ์žˆ๋Š” ๊ฒƒ์ด๋‹ค.

### Firestore ๋ฐ์ดํ„ฐ ์ˆ˜์ •ํ•˜๊ธฐ

Firestore์˜ ๋ฐ์ดํ„ฐ๋ฅผ ์ˆ˜์ •ํ•˜๋Š” ๋ฐฉ๋ฒ•์€ ํฌ๊ฒŒ ๋‘๊ฐ€์ง€์ด๋‹ค.

1. Firebase console์—์„œ ์†์ˆ˜ ๋ฐ์ดํ„ฐ ์ˆ˜์ •ํ•ด์ฃผ๊ธฐ
1. ์ฝ”๋“œ๋กœ ๋ฐ์ดํ„ฐ ์ˆ˜์ •ํ•˜๊ธฐ

1๋ฒˆ์€ ๋ฐ์ดํ„ฐ ์ƒ์„ฑ๊ณผ ๋น„์Šทํ•˜๊ฒŒ ์ง„ํ–‰ํ•˜๋ฉด ๋œ๋‹ค.

**2. ์ฝ”๋“œ๋กœ ๋ฐ์ดํ„ฐ ์ˆ˜์ •ํ•˜๊ธฐ**

Firestore๋Š”ย `setDoc`,ย `update`ย ๋‘ ๊ฐ€์ง€ ํ•จ์ˆ˜๋กœ ๋ฐ์ดํ„ฐ๋ฅผ ์ถ”๊ฐ€ํ•  ์ˆ˜ ์žˆ๋‹ค.

`setDoc`์„ ์‚ฌ์šฉํ•˜๋Š” ๋ฐฉ๋ฒ•์€ ์œ„์— ์ ํ˜€์žˆ๋‹ค.

### `update`

`setDoc`์€ ๋ฐ์ดํ„ฐ๋ฅผ ๋ฎ์–ด์“ด๋‹ค. ๋”ฐ๋ผ์„œ ๊ธฐ์กด์˜ ๋ฌธ์„œ๋ฅผ ์œ ์ง€ํ•œ ์ฑ„ ์ผ๋ถ€๋ถ„์˜ ๋ฐ์ดํ„ฐ๋งŒ ๋ณ€๊ฒฝํ•˜๊ณ  ์‹ถ์–ด๋„ ์ด์ „์˜ ๋ฐ์ดํ„ฐ๋ฅผ ๋ชจ๋‘ ์ƒˆ๋กœ ์ž…๋ ฅํ•ด์•ผ ํ•œ๋‹ค.

๊ทธ๋Ÿฌ๋‚˜ย `update`๋Š” ๊ธฐ์กด์˜ ๋ฐ์ดํ„ฐ๋ฅผ ์œ ์ง€ํ•œ ์ฑ„ ์ผ๋ถ€๋ถ„์˜ ๋ฐ์ดํ„ฐ๋งŒ ๋ณ€๊ฒฝํ•  ์ˆ˜ ์žˆ๋‹ค.

```jsx
import { updateDoc, doc } from "firebase/firestore";

await updateDoc(doc(db, "wiki", "new-id"), {
description: "ํ—ˆ๋จผ๋ฐ€๋Ÿฌ...200๋งŒ์›...",
});
```

์œ„์™€ ๊ฐ™์ด ์ฝ”๋“œ๋ฅผ ์ž‘์„ฑํ•˜๋ฉดย `new-id`๋ผ๋Š” id๋ฅผ ๊ฐ€์ง„ ๋ฌธ์„œ์˜ description๋งŒ ๋ณ€๊ฒฝ๋œ๋‹ค.

---

### *์ฐธ๊ณ  ๋งํฌ

- **[Firebase](https://firebase.google.com/docs?hl=ko)**
- [**ํ”„๋กœํ† ํƒ€์ž… ํ”„๋กœ์ ํŠธ**](https://stfe.vercel.app/)
![TypeScript](https://img.shields.io/badge/typescript-%23007ACC.svg?style=for-the-badge&logo=typescript&logoColor=white)
![React](https://img.shields.io/badge/react-%2320232a.svg?style=for-the-badge&logo=react&logoColor=%2361DAFB)
![Firebase](https://img.shields.io/badge/firebase-%2335495e.svg?style=for-the-badge&logo=firebase)
![Vite](https://img.shields.io/badge/vite-%23646CFF.svg?style=for-the-badge&logo=vite&logoColor=white)
![ESLint](https://img.shields.io/badge/ESLint-4B3263?style=for-the-badge&logo=eslint&logoColor=white)
![NPM](https://img.shields.io/badge/NPM-%23CB3837.svg?style=for-the-badge&logo=npm&logoColor=white)
13 changes: 13 additions & 0 deletions firebase.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"firestore": {
"rules": "firestore.rules",
"indexes": "firestore.indexes.json"
},
"hosting": {
"public": "dist",
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"]
},
"storage": {
"rules": "storage.rules"
}
}
4 changes: 4 additions & 0 deletions firestore.indexes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"indexes": [],
"fieldOverrides": []
}
Loading