Skip to content

Commit 082cd23

Browse files
authored
Merge pull request #311 from k-jipgeria/Next-김승준-sprint9
[김승준] sprint9
2 parents 8d163dd + 900417b commit 082cd23

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+5453
-1122
lines changed

.cursorrules

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Common Project Guidelines
2+
3+
## Device Size
4+
5+
- pc: 1280px or above
6+
- tablet: 745px or above
7+
- mobile: 744px or below
8+
9+
## Next.js App Router Best Practices
10+
11+
- Default to server components
12+
- Implement client components only when needed
13+
- Use file-based routing system
14+
- Use layout.js for shared layouts
15+
- Implement loading.js for loading states
16+
- Use error.js for error handling
17+
- Use route handlers for API routes
18+
19+
## TypeScript and Code Quality
20+
21+
- Use TypeScript for type safety
22+
- Provide proper type definitions and interfaces
23+
- Let TypeScript infer types when possible
24+
- Use functional programming over classes
25+
- Prefer iteration and modularization over duplication
26+
- Use descriptive variable names (e.g., isLoading)
27+
28+
## Component Development
29+
30+
- Use functional components and hooks for state
31+
- Default to React Server Components (RSC)
32+
- Minimize 'use client', 'useEffect', 'setState'
33+
- Wrap client components in Suspense
34+
- Use dynamic loading for non-critical components
35+
36+
## Styling and UI
37+
38+
- Use Tailwind CSS classes only
39+
- Use Shadcn UI, Radix UI, Tailwind Aria
40+
- Mobile-first responsive design
41+

.eslintrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"extends": "next/core-web-vitals"
2+
"extends": ["next/core-web-vitals", "next/typescript"]
33
}

.gitignore

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,19 @@
11
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
22

33
# dependencies
4+
# documentation
5+
.cursorrules
6+
devFlow.md
7+
PRD.md
8+
.env.local
49
/node_modules
510
/.pnp
6-
.pnp.js
11+
.pnp.*
12+
.yarn/*
13+
!.yarn/patches
14+
!.yarn/plugins
15+
!.yarn/releases
16+
!.yarn/versions
717

818
# testing
919
/coverage
@@ -24,8 +34,8 @@ npm-debug.log*
2434
yarn-debug.log*
2535
yarn-error.log*
2636

27-
# local env files
28-
.env*.local
37+
# env files (can opt-in for committing if needed)
38+
.env*
2939

3040
# vercel
3141
.vercel

.prettierrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"singleAttributePerLine": true
3+
}

PRD.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# sprint9
2+
3+
## 요구 사항
4+
5+
- 자유 게시판 페이지 주소는 “/boards” 입니다.
6+
- 전체 게시글에서 드롭 다운으로 “최신 순” 또는 “좋아요 순”을 선택해서 정렬을 할 수 있습니다.
7+
- 게시글 목록 조회 api를 사용하여 베스트 게시글, 게시글을 구현합니다.
8+
- 게시글 title에 검색어가 일부 포함되면 검색이 됩니다.

README.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
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).
1+
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).
22

33
## Getting Started
44

@@ -16,13 +16,9 @@ bun dev
1616

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

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

21-
[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`.
22-
23-
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.
24-
25-
This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.
21+
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.
2622

2723
## Learn More
2824

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

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

3632
## Deploy on Vercel
3733

3834
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.
3935

40-
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
36+
Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.

components.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"$schema": "https://ui.shadcn.com/schema.json",
3+
"style": "new-york",
4+
"rsc": true,
5+
"tsx": true,
6+
"tailwind": {
7+
"config": "tailwind.config.ts",
8+
"css": "src/app/globals.css",
9+
"baseColor": "neutral",
10+
"cssVariables": true,
11+
"prefix": ""
12+
},
13+
"aliases": {
14+
"components": "@/components",
15+
"utils": "@/lib/utils",
16+
"ui": "@/components/ui",
17+
"lib": "@/lib",
18+
"hooks": "@/hooks"
19+
},
20+
"iconLibrary": "lucide"
21+
}

devFlow.md

Whitespace-only changes.

next.config.js

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,31 @@
11
/** @type {import('next').NextConfig} */
22
const nextConfig = {
3+
images: {
4+
remotePatterns: [
5+
{
6+
protocol: "https",
7+
hostname: "sprint-fe-project.s3.ap-northeast-2.amazonaws.com",
8+
},
9+
{
10+
protocol: "https",
11+
hostname: "ibb.co",
12+
},
13+
{
14+
protocol: "https",
15+
hostname: "i.ibb.co",
16+
},
17+
{
18+
protocol: "https",
19+
hostname: "example.com",
20+
},
21+
{
22+
protocol: "http",
23+
hostname: "via.placeholder.com",
24+
},
25+
],
26+
},
327
reactStrictMode: true,
4-
}
28+
swcMinify: true,
29+
};
530

6-
module.exports = nextConfig
31+
module.exports = nextConfig;

0 commit comments

Comments
 (0)