Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/soozynn/ant_todo


https://github.com/soozynn/ant_todo

Last synced: 5 days ago
JSON representation

Awesome Lists containing this project

README

        

# ๐Ÿ“š ์‚ฌ์ „ ๊ณผ์ œ: "Toodos"

ํ”„๋ก ํŠธ์—”๋“œ ์ฑ„์šฉ ๋ฉด์ ‘์— ์•ž์„œ `์‚ฌ์ „ ๊ณผ์ œ`๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค.
์ธํ„ฐ๋ทฐ์—์„œ ์ˆ˜์ • ๋ฐ ๊ตฌํ˜„ ์ž‘์—…ํ•ด์ฃผ์‹  ๋‚ด์šฉ์— ๋Œ€ํ•ด ์งˆ๋ฌธ์„ ๋“œ๋ฆด ์˜ˆ์ •์ž…๋‹ˆ๋‹ค. ๋ฉด์ ‘์—์„œ ํŽธํ•˜๊ฒŒ ๋‹ต๋ณ€์„ ํ•ด์ฃผ์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค.

> **Note**
> _์„ค๋ช…ํ•˜์‹œ๋Š” ์ฝ”๋“œ๋ฅผ ํ•จ๊ป˜ ๋ณผ ์ˆ˜ ์žˆ๋„๋ก google meet์—์„œ **ํ™”๋ฉด ๊ณต์œ  ์ค€๋น„**๋ฅผ ๋ถ€ํƒ๋“œ๋ฆฝ๋‹ˆ๋‹ค._

## ๐ŸŽฏ ๋ชฉํ‘œ

๋ณธ ๊ณผ์ œ๋Š” ๊ฐœ๋ฐœ์ž์˜ ํ•˜๋ฃจ ์ผ๊ณผ ์ค‘ ๊ฐ€์žฅ ๊ธฐ๋ณธ์ ์ธ ์—…๋ฌด์ธ **์ฝ”๋“œ ๋ฆฌ๋ทฐ** ๋ฐ **๊ธฐ๋Šฅ ๊ตฌํ˜„**์ž…๋‹ˆ๋‹ค. ํ•ด๋‹น ๋ฆฌํฌ์ง€ํ† ๋ฆฌ๋Š” *Toodos*๋ผ๋Š” ์ด๋ฆ„์„ ๊ฐ€์ง„ `React.js`๋กœ ์ œ์ž‘๋œ `To-do ๋ฆฌ์ŠคํŠธ` ์•ฑ์ž…๋‹ˆ๋‹ค. ์ฝ”๋“œ ๋ฆฌ๋ทฐ๋ฅผ ํ†ตํ•ด ๋‹ค๋ฅธ ๊ฐœ๋ฐœ์ž๋“ค๊ณผ ํ˜‘์—…ํ•˜๋Š” ์Šคํƒ€์ผ๊ณผ ๊ธฐ์กด ์ฝ”๋“œ๋ฅผ ๋ฆฌํŒฉํ† ๋งํ•˜๋Š” ๋ฐฉ์‹์„ ํŒŒ์•…ํ•˜๊ณ ์ž ํ•ฉ๋‹ˆ๋‹ค. ๋˜ํ•œ ๊ธฐ๋Šฅ ๋ช…์„ธ์„œ์™€ ๋””์ž์ธ ๊ฐ€์ด๋“œ๋ฅผ ํ†ตํ•ด ์ƒˆ๋กœ์šด ๊ธฐ๋Šฅ์„ ์–ด๋–ป๊ฒŒ ๊ตฌํ˜„ํ•˜์‹œ๋Š”์ง€ ํŒŒ์•…ํ•˜๊ธฐ ์œ„ํ•ด ์ค€๋น„ํ–ˆ์Šต๋‹ˆ๋‹ค.

## ๐Ÿ  Toodos ๊ตฌ์กฐ

`Toodos` ์•ฑ์˜ ํด๋” ๊ตฌ์กฐ์ž…๋‹ˆ๋‹ค.

> **Warning**
> _**๋ณ„๋„๋กœ ์ „๋‹ฌ ๋ฐ›์œผ์‹  api token์„ `.env` ํŒŒ์ผ์— ์ถ”๊ฐ€ ๋ถ€ํƒ๋“œ๋ฆฝ๋‹ˆ๋‹ค.**_

```javascript
src
โ”ฃ api
โ”ƒ โ”— index.js
โ”ƒ โ”— todo.js
โ”ฃ components
โ”ƒ โ”ฃ Header.js
โ”ƒ โ”ฃ InputTodo.js
โ”ƒ โ”ฃ TodoItem.js
โ”ƒ โ”— TodoList.js
โ”ฃ hooks
โ”ƒ โ”— useFocus.js
โ”ฃ pages
โ”ƒ โ”— Main.js
โ”ฃ App.css
โ”ฃ App.js
โ”— index.js
.env // <--- YOU NEED THIS!

```


---


โœจ ์•„๋ž˜ 3๊ฐ€์ง€ `์ฝ”๋“œ ๋ฆฌ๋ทฐ`์™€ `๊ธฐ๋Šฅ ๊ตฌํ˜„`, `๋ฌธ์„œํ™”` ํƒœ์Šคํฌ๋ฅผ ์ˆ˜ํ–‰ ๋ถ€ํƒ๋“œ๋ฆฝ๋‹ˆ๋‹ค.

## ๐Ÿ‘€ ์ฝ”๋“œ ๋ฆฌ๋ทฐ

1. ์ž‘์„ฑ๋œ ์ฝ”๋“œ์˜ ์ž‘๋™ ๋ฐฉ๋ฒ•์„ ์ตํžˆ์‹  ํ›„, ๊ฐœ์„ ์ด ํ•„์š”ํ•˜๋‹ค๊ณ  ํŒ๋‹จ๋˜๋Š” ๋ถ€๋ถ„์ด ์žˆ๋‹ค๋ฉด ์ˆ˜์ •ํ•ด์ฃผ์„ธ์š”.
2. ๋” ๋‚˜์€ ํ”„๋กœ์ ํŠธ ๊ตฌ์กฐ๋‚˜, ํŒจํ„ด, ์—๋Ÿฌ ์ฒ˜๋ฆฌ, ์Šคํƒ€์ผ๋ง, ํ…Œ์ŠคํŒ… ๋ฐฉ๋ฒ• ๋“ฑ ์ž์œ ๋กญ๊ฒŒ ์ž‘์—…ํ•ด์ฃผ์„ธ์š”.

## ๐Ÿ›  ๊ธฐ๋Šฅ ๊ตฌํ˜„

์‚ฌ์šฉ์ž๊ฐ€ input์— ํƒ€์ดํ•‘์„ ํ•˜๋ฉด ์ผ์น˜ํ•˜๋Š” ์•„์ดํ…œ๋“ค์ด dropdown์— ๋ณด์—ฌ์งˆ ์ˆ˜ ์žˆ๋„๋ก `InputTodo`์— ์ถ”์ฒœ ๊ธฐ๋Šฅ์„ ๊ตฌํ˜„ํ•ด์ฃผ์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค.

1. [๋””์ž์ธ ๊ฐ€์ด๋“œ](https://zpl.io/r17Wzv1)๋ฅผ ์ฐธ๊ณ ํ•ด์„œ InputTodo์˜ ๋””์ž์ธ ์ˆ˜์ • ๋ฐ dropdown์„ ์ƒˆ๋กœ ๋งŒ๋“ค์–ด์ฃผ์„ธ์š”. (ํ•ด๋‹น ๋งํฌ๋Š” ์ œํ”Œ๋ฆฐ ํ”„๋กœ์ ํŠธ๋กœ ๋ฏธ๋ฆฌ ์ด๋ฉ”์ผ๋กœ ์ดˆ๋Œ€๋ฅผ ๋“œ๋ฆฌ๊ฒ ์Šต๋‹ˆ๋‹ค.)
2. Bootstrap์ด๋‚˜ Ant Design, tailwindcss์™€ ๊ฐ™์€ UI kit๋Š” ์‚ฌ์šฉํ•˜์ง€ ์•Š๊ณ  ๊ตฌํ˜„ํ•ด ์ฃผ์„ธ์š”.
3. Input์— `500ms`๋กœ debounce๋ฅผ ์ ์šฉํ•ด์ฃผ์„ธ์š”.
4. Dropdown์— ์ถ”์ฒœ๋œ ์•„์ดํ…œ๋“ค์ด ์ฒ˜์Œ์— 10๊ฐœ๊ฐ€ ๋‚˜์˜ฌ ์ˆ˜ ์žˆ๋„๋ก ํ•˜๊ณ , ์•„์ดํ…œ์ด ๋” ์žˆ์œผ๋ฉด ๋ฌดํ•œ ์Šคํฌ๋กค๋กœ ์ตœ๋Œ€ 10๊ฐœ์”ฉ ๋ฐ›์•„์˜ฌ ์ˆ˜ ์žˆ๋„๋ก ๊ตฌํ˜„ํ•ด์ฃผ์„ธ์š”.
5. Dropdown์—์„œ ์•„์ดํ…œ ํ•˜๋‚˜๋ฅผ ์„ ํƒํ•˜๋ฉด, input์˜ value๋Š” ์ดˆ๊ธฐํ™”๊ฐ€ ๋˜๊ณ  ์•„์ดํ…œ์ด ๋ฆฌ์ŠคํŠธ์— ์ถ”๊ฐ€๋˜๋„๋ก ๊ตฌํ˜„ํ•ด์ฃผ์„ธ์š”.

## ๐Ÿ“œ ๋ฌธ์„œํ™”

1. ์ž‘์—…์˜ ์ฃผ์ œ์™€ ์„ฑ๊ฒฉ์— ๋”ฐ๋ผ [GitHub PR](https://docs.github.com/es/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request)์„ ์ƒ์„ฑ ํ›„, ๊ฐœ๋ฐœ๋œ ๋‚ด์šฉ์„ ์ •๋ฆฌ ๋ถ€ํƒ๋“œ๋ฆฝ๋‹ˆ๋‹ค. (์™„๋ฃŒ๋œ ๋‚ด์šฉ์€ merge ํ•ด์ฃผ์…”๋„ ์ข‹์Šต๋‹ˆ๋‹ค.)
2. ๊ฐœ๋ฐœ์ด ๋ชจ๋‘ ์™„๋ฃŒ๋˜๋ฉด [GitHub Issues](https://docs.github.com/en/issues/tracking-your-work-with-issues/about-issues)์— ์ „๋ฐ˜์ ์œผ๋กœ ์ˆ˜์ •๋œ ์‚ฌํ•ญ๊ณผ ๊ทธ๋ ‡๊ฒŒ ๊ฐœ๋ฐœ๋œ ์ด์œ ๋ฅผ ์ž‘์„ฑ ๋ถ€ํƒ๋“œ๋ฆฝ๋‹ˆ๋‹ค.


---


### ๐Ÿ” API

#### HTTP

- API: `https://interview-api.labnote.co/api`
- RESOURCE: `{ GET } /search`

#### Parameters

| Name | Required | Type | Default | Description |
| ----- | -------- | -------- | ------- | ----------------------- |
| q | yes | `string` | - | input์—์„œ ๊ฒ€์ƒ‰ํ•˜๋Š” ๋‹จ์–ด |
| page | no | `number` | `1` | ๋ฐ›์•„์˜ฌ ํŽ˜์ด์ง€ ๋ฒˆํ˜ธ |
| limit | no | `number` | `10` | ๋ฐ›์•„์˜ฌ ์ตœ๋Œ€ ์‚ฌ์ด์ฆˆ ๊ฐ’ |

#### Responses

| Status | Messsage | data |
| ------ | --------------------- | -------------------------------------- |
| 200 | Ok | ์‘๋‹ต ๋ฐ์ดํ„ฐ (See Payload result) |
| 400 | Bad Request | `details`: ์ƒ์„ธ validation ์—๋Ÿฌ ๋ฉ”์‹œ์ง€ |
| 401 | You are unauthorized. | `(์ธ์ฆ ์‹คํŒจ, ํ† ํฐ ํ•„์š”)` |
| 500 | Internal Server Error | `(์„œ๋ฒ„์ธก ์—๋Ÿฌ)` |


### Payload result

| Field | Type | Description |
| -------- | ---------- | -------------------------------------- |
| `q` | `string` | ์ฟผ๋ฆฌ ํ‚ค์›Œ๋“œ |
| `page` | `number` | ํ˜„์žฌ ํŽ˜์ด์ง€ ๋ฒˆํ˜ธ |
| `limit` | `number` | per page ์‚ฌ์ด์ฆˆ |
| `result` | `string[]` | `limit`์ด ์ ์šฉ๋˜์–ด `q`๋กœ ํ•„ํ„ฐ๋œ ๋ฆฌ์ŠคํŠธ |
| `qty` | `number` | `result`์˜ ๊ธธ์ด |
| `total` | `number` | `q`๋กœ ํ•„ํ„ฐ๋œ ์ด `result` ๊ธธ์ด |

#### Sample

```javascript
// Request
`{ GET } https://interview-api.labnote.co/api/search?q=lorem&page=1&limit=10`

// Response (JSON)
{
"opcode": 200,
"message": "OK",
"data": {
"q": "lorem",
"page": 1,
"limit": 10,
"result": [
"Maecenas in lorem sit amet felis volutpat dapibus vulputate at dui.",
"Nam porta lorem ut turpis pellentesque, et efficitur felis ullamcorper.",
"Duis fringilla turpis vel lorem eleifend, sit amet hendrerit velit gravida.",
"Cras in felis eget augue cursus placerat ac eget lorem.",
"Sed id orci quis mi porttitor pulvinar cursus eget lorem.",
"Fusce tincidunt lorem ac purus elementum, ut fermentum lacus mollis.",
"Nam commodo lorem ac posuere dignissim.",
"Etiam eu elit finibus enim consequat scelerisque aliquam vulputate lorem.",
"Donec in lorem id eros ornare aliquam ut a nisi.",
"Donec efficitur nulla eget lorem sollicitudin, in blandit massa dictum."
],
"qty": 10,
"total": 19
}
}
```


---


## ๐Ÿ’ป ๋กœ์ปฌ ์„ค์น˜ ๋ฐ ์‹คํ–‰๋ฐฉ๋ฒ•

1. Clone this repo:

```bash
git clone ...
```

2. Install dependencies & packages

```bash
npm i
# OR
yarn
```

3. Run application

```bash
npm run start
# OR
yarn start
```