Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
5b762ba
chore: Next.js 초기 세팅 및 PRD, cursorrules 파일 추가
JIPGERIA Nov 23, 2024
100dafa
style: global로 적용할 레이아웃 파일 추가
JIPGERIA Nov 23, 2024
e5f6332
feat: not-found page 추가
JIPGERIA Nov 24, 2024
349210e
feat: Header Component 구현
JIPGERIA Nov 24, 2024
1afe573
chore: primary 및 device size 정의
JIPGERIA Nov 24, 2024
3d7ed1d
chore: not-found page 한 문단 삭제
JIPGERIA Nov 24, 2024
7af8937
chore: 상대 경로 설정
JIPGERIA Nov 24, 2024
d513d08
feat: 임시 디자인으로 root page 추가
JIPGERIA Nov 24, 2024
1a8e265
feat: api/apiGetArticles and types/article 추가
JIPGERIA Nov 26, 2024
188fd38
feat: Add useDeviceType.ts hook for 반응형 API요청
JIPGERIA Nov 29, 2024
081bcee
feat: Add NotFound.tsx page for users who enter any url
JIPGERIA Nov 29, 2024
5789c41
chore: color var 설정 & 절대 경로 설정
JIPGERIA Nov 29, 2024
166bd89
feat: 임시 boards page components 추가
JIPGERIA Nov 29, 2024
5cad34c
feat: Add QueryProvider.tsx for caching some data
JIPGERIA Nov 29, 2024
8ac7911
feat: Add useDeviceType.ts for checking device type
JIPGERIA Nov 30, 2024
98af115
refactor: apiGetArticles.ts
JIPGERIA Nov 30, 2024
ae18220
feat&refactor: SortedArticles.tsx에서 global state를 사용하여 get article수행
JIPGERIA Nov 30, 2024
9a37ddc
chore: layout에 Header, QueryProvider추가
JIPGERIA Nov 30, 2024
78665e6
chore: boards module에 components 추가
JIPGERIA Nov 30, 2024
13b5cd3
chore: 라이브러리 추가 및 스타일 변경으로 인한 변경 사항
JIPGERIA Nov 30, 2024
16c3994
sprint9 구현 완료
JIPGERIA Nov 30, 2024
faebe71
chore: page folder 삭제
JIPGERIA Dec 1, 2024
51f8278
chore: 필요한 상대 경로 설정만 유지, 그 외 제거
JIPGERIA Dec 1, 2024
4818dc9
refactor: improve Article component structure
JIPGERIA Dec 1, 2024
4883cd0
rename: BestArticles.tsx to BestSection.tsx, SortedArticles.tsx to No…
JIPGERIA Dec 1, 2024
3ecd20a
chore: move board files to each folder
JIPGERIA Dec 1, 2024
85e91e2
ignore: some files
JIPGERIA Dec 2, 2024
46b993e
feat: Add skeleton loaders for enhancing UX
JIPGERIA Dec 2, 2024
7f2ee0c
chore: 상수 컨벤션 통일
JIPGERIA Dec 2, 2024
1f418a7
refactor: Update logic to execute setKeyword 500ms after input stops …
JIPGERIA Dec 2, 2024
eeb0849
refactor: base url을 env local로 관리
JIPGERIA Dec 4, 2024
ab04ca4
chore: type optional을 보다 강도 높게 수정
JIPGERIA Dec 4, 2024
0ff2b73
refactor: error logic을 보다 단순화 => 가독성 증가
JIPGERIA Dec 5, 2024
900417b
chore: error messages 수정 및 comment 추가
JIPGERIA Dec 5, 2024
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
41 changes: 41 additions & 0 deletions .cursorrules
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Common Project Guidelines

## Device Size

- pc: 1280px or above
- tablet: 745px or above
- mobile: 744px or below

## Next.js App Router Best Practices

- Default to server components
- Implement client components only when needed
- Use file-based routing system
- Use layout.js for shared layouts
- Implement loading.js for loading states
- Use error.js for error handling
- Use route handlers for API routes

## TypeScript and Code Quality

- Use TypeScript for type safety
- Provide proper type definitions and interfaces
- Let TypeScript infer types when possible
- Use functional programming over classes
- Prefer iteration and modularization over duplication
- Use descriptive variable names (e.g., isLoading)

## Component Development

- Use functional components and hooks for state
- Default to React Server Components (RSC)
- Minimize 'use client', 'useEffect', 'setState'
- Wrap client components in Suspense
- Use dynamic loading for non-critical components

## Styling and UI

- Use Tailwind CSS classes only
- Use Shadcn UI, Radix UI, Tailwind Aria
- Mobile-first responsive design

2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"extends": "next/core-web-vitals"
"extends": ["next/core-web-vitals", "next/typescript"]
}
16 changes: 13 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
# documentation
.cursorrules
devFlow.md
PRD.md
.env.local
/node_modules
/.pnp
.pnp.js
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/versions

# testing
/coverage
Expand All @@ -24,8 +34,8 @@ npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env*.local
# env files (can opt-in for committing if needed)
.env*

# vercel
.vercel
Expand Down
3 changes: 3 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"singleAttributePerLine": true
}
8 changes: 8 additions & 0 deletions PRD.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# sprint9

## 요구 사항

- 자유 게시판 페이지 주소는 “/boards” 입니다.
- 전체 게시글에서 드롭 다운으로 “최신 순” 또는 “좋아요 순”을 선택해서 정렬을 할 수 있습니다.
- 게시글 목록 조회 api를 사용하여 베스트 게시글, 게시글을 구현합니다.
- 게시글 title에 검색어가 일부 포함되면 검색이 됩니다.
14 changes: 5 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).

## Getting Started

Expand All @@ -16,13 +16,9 @@ bun dev

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file.
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.

[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`.

The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.

This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.
This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.

## Learn More

Expand All @@ -31,10 +27,10 @@ To learn more about Next.js, take a look at the following resources:
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!

## Deploy on Vercel

The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.

Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
21 changes: 21 additions & 0 deletions components.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "new-york",
"rsc": true,
"tsx": true,
"tailwind": {
"config": "tailwind.config.ts",
"css": "src/app/globals.css",
"baseColor": "neutral",
"cssVariables": true,
"prefix": ""
},
"aliases": {
"components": "@/components",
"utils": "@/lib/utils",
"ui": "@/components/ui",
"lib": "@/lib",
"hooks": "@/hooks"
},
"iconLibrary": "lucide"
}
Empty file added devFlow.md
Empty file.
29 changes: 27 additions & 2 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,31 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
images: {
remotePatterns: [
{
protocol: "https",
hostname: "sprint-fe-project.s3.ap-northeast-2.amazonaws.com",
},
{
protocol: "https",
hostname: "ibb.co",
},
{
protocol: "https",
hostname: "i.ibb.co",
},
{
protocol: "https",
hostname: "example.com",
},
{
protocol: "http",
hostname: "via.placeholder.com",
},
],
},
reactStrictMode: true,
}
swcMinify: true,
};

module.exports = nextConfig
module.exports = nextConfig;
Loading
Loading