|
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). |
| 1 | +# git-ranker-client |
2 | 2 |
|
3 | | -## Getting Started |
| 3 | +`git-ranker-client`는 Git Ranker의 Next.js 16 프런트엔드다. 랭킹 조회, 사용자 상세, 로그인 진입, SEO 메타데이터와 배지 링크를 제공한다. |
4 | 4 |
|
5 | | -First, run the development server: |
| 5 | +## Requirements |
6 | 6 |
|
7 | | -```bash |
8 | | -npm run dev |
9 | | -# or |
10 | | -yarn dev |
11 | | -# or |
12 | | -pnpm dev |
13 | | -# or |
14 | | -bun dev |
| 7 | +- Node.js 20+ |
| 8 | +- npm |
| 9 | +- `NEXT_PUBLIC_BASE_URL` |
| 10 | +- `NEXT_PUBLIC_API_URL` |
| 11 | + |
| 12 | +`NEXT_PUBLIC_BASE_URL`와 `NEXT_PUBLIC_API_URL`는 build와 runtime 모두에서 필수다. 값이 없으면 `npm run build`와 런타임 초기화가 즉시 실패한다. |
| 13 | + |
| 14 | +## Environment |
| 15 | + |
| 16 | +로컬 Next.js 실행은 `.env.local`, Docker Compose 실행은 `.env`를 사용하면 된다. 시작점으로는 [.env.example](.env.example)을 복사한다. |
| 17 | + |
| 18 | +로컬 개발 예시: |
| 19 | + |
| 20 | +```env |
| 21 | +NEXT_PUBLIC_BASE_URL=http://localhost:3000 |
| 22 | +NEXT_PUBLIC_API_URL=http://localhost:8080 |
15 | 23 | ``` |
16 | 24 |
|
17 | | -Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. |
| 25 | +프로덕션 예시: |
18 | 26 |
|
19 | | -You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. |
| 27 | +```env |
| 28 | +NEXT_PUBLIC_BASE_URL=https://www.git-ranker.com |
| 29 | +NEXT_PUBLIC_API_URL=https://www.git-ranker.com |
| 30 | +``` |
20 | 31 |
|
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. |
| 32 | +선택 env: |
22 | 33 |
|
23 | | -## Learn More |
| 34 | +- `NEXT_PUBLIC_ANALYTICS_ENDPOINT` |
| 35 | +- `NEXT_PUBLIC_SENTRY_DSN` |
| 36 | +- `SENTRY_DSN` |
24 | 37 |
|
25 | | -To learn more about Next.js, take a look at the following resources: |
| 38 | +선택 env가 없어도 핵심 기능은 동작한다. 없으면 analytics/web vitals 전송이나 Sentry 수집만 비활성화된다. |
26 | 39 |
|
27 | | -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. |
28 | | -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. |
| 40 | +## Commands |
29 | 41 |
|
30 | | -You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome! |
| 42 | +```bash |
| 43 | +npm install |
| 44 | +npm run dev |
| 45 | +npm run lint |
| 46 | +npx tsc --noEmit |
| 47 | +npm run build |
| 48 | +``` |
| 49 | + |
| 50 | +## Docker Compose |
| 51 | + |
| 52 | +```bash |
| 53 | +cp .env.example .env |
| 54 | +docker compose up --build |
| 55 | +``` |
31 | 56 |
|
32 | | -## Deploy on Vercel |
| 57 | +`docker-compose.yml`과 `Dockerfile`은 `NEXT_PUBLIC_BASE_URL`, `NEXT_PUBLIC_API_URL`가 비어 있으면 즉시 실패한다. |
33 | 58 |
|
34 | | -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. |
| 59 | +## Build And Runtime Notes |
35 | 60 |
|
36 | | -Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details. |
| 61 | +- `JetBrains Mono`는 공식 JetBrains Mono release v2.304에서 가져온 로컬 자산을 사용한다. |
| 62 | +- 폰트 라이선스는 [src/fonts/JetBrainsMono-OFL.txt](src/fonts/JetBrainsMono-OFL.txt)에 보관한다. |
| 63 | +- locale routing과 보안 헤더는 [src/proxy.ts](src/proxy.ts)에서 처리한다. |
| 64 | +- public URL 정책은 [src/shared/lib/public-env.ts](src/shared/lib/public-env.ts)에서 단일 기준으로 관리한다. |
0 commit comments