Skip to content

8oo30un/capstone_SecondChap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

62 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

next/dynamic

** ๋™์  ์ปดํฌ๋„ŒํŠธ ๋กœ๋”ฉ์„ ํ•  ์ˆ˜ ์žˆ๊ฒŒ ํ•ด์ฃผ๋Š” ์—ญํ•  -> ์ปดํฌ๋„ŒํŠธ๋ฅผ ๋‚˜์ค‘์— ๋น„๋™๊ธฐ์ ์œผ๋กœ ๋ถˆ๋Ÿฌ์™€์„œ ์„ฑ๋Šฅ ์ตœ์ ํ™” -> ์ดˆ๊ธฐ ๋ฒˆ๋“ค ์‚ฌ์ด์ฆˆ๋ฅผ ์ค„์ด๊ธฐ ์œ„ํ•ด -> ์ธ์ฆ ์ƒํƒœ์— ๋”ฐ๋ผ ์กฐ๊ฑด์ ์œผ๋กœ ๋ณด์—ฌ์ค˜์•ผ ํ•˜๋Š” ui์— ์ž์ฃผ ์‚ฌ์šฉ

nextauth

** ๋„ฅ์ŠคํŠธ ์•ฑ์„ ์œ„ํ•œ ์™„์ „ํ•œ ์ธ์ฆ ์†”๋ฅ˜์…˜ -> OAuth, ์ด๋ฉ”์ผ, ์ž์ฒด, JWT์„ธ์„ , ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค ์„ธ์…˜, ์„œ๋ฒ„๋ฆฌ์Šค ์นœํ™”์ (API ๋ผ์šฐํŠธ ๊ธฐ๋ฐ˜์œผ๋กœ ๋™์ž‘) /auth/[...nextauth]/route.ts -> ์ธ์ฆ ๋ผ์šฐํŠธ ์—”๋“œํฌ์ธํŠธ๋กœ ๋™์ž‘

** ์„ธ์…˜ ์ €์žฅ๋ฐฉ์‹ -> ์„œ๋ฒ„์ €์žฅ์—†์ด ์ฟ ํ‚ค์— ์ •๋ณด ํฌํ•จ JWT ๊ธฐ๋ฐ˜ ์„ธ์…˜ , DB ์—ฐ๊ฒฐ์‹œ ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค ์„ธ์…˜ ๋ฐฉ์‹๋„ ๊ฐ€๋Šฅ

useSession

** ํด๋ผ์ด์–ธํŠธ ์ปดํฌ๋„ŒํŠธ์—์„œ ๋กœ๊ทธ์ธ ์ƒํƒœ๋ฅผ ํ™•์ธํ•˜๋Š” ํ›…

useCallback

difference between .ts and .tsx

** JSX ๋ฌธ๋ฒ•์˜ ์‚ฌ์šฉ ์—ฌ๋ถ€์— ์žˆ์Œ

Skeleton UI

debounced

** ์‚ฌ์šฉ์ž๊ฐ€ ๊ฒ€์ƒ‰์ฐฝ์— ์ž…๋ ฅํ• ๋•Œ๋งˆ๋‹ค ๋ฐ”๋กœ APIํ˜ธ์ถœํ•˜๋ฉด, ๋„ˆ๋ฌด ๋งŽ์€ ์š”์ฒญ ์ƒ๊ฒจ ์„œ๋ฒ„ ๋ถ€๋‹ด/ ์ง€์—ฐํ•ด์„œ ์‹ค์ œ ๊ฒ€์ƒ‰์–ด API ์š”์ฒญ ๋ฐ˜์˜

React-Query

๐ŸŽต SecondChap - AI-Powered Music Discovery Platform

Live Demo

๐Ÿš€ ๊ธฐ์ˆ  ์Šคํƒ (Tech Stack)

Frontend

  • Next.js 14 - React ๊ธฐ๋ฐ˜ ํ’€์Šคํƒ ํ”„๋ ˆ์ž„์›Œํฌ
  • TypeScript - ํƒ€์ž… ์•ˆ์ „์„ฑ์„ ์œ„ํ•œ ์ •์  ํƒ€์ž… ์–ธ์–ด
  • Tailwind CSS - ์œ ํ‹ธ๋ฆฌํ‹ฐ ํผ์ŠคํŠธ CSS ํ”„๋ ˆ์ž„์›Œํฌ
  • React Hooks - ์ƒํƒœ ๊ด€๋ฆฌ ๋ฐ ์‚ฌ์ด๋“œ ์ดํŽ™ํŠธ ์ฒ˜๋ฆฌ

Backend & API

  • Next.js API Routes - ์„œ๋ฒ„๋ฆฌ์Šค API ์—”๋“œํฌ์ธํŠธ
  • Spotify Web API - ์Œ์•… ๋ฐ์ดํ„ฐ ๋ฐ ์•„ํ‹ฐ์ŠคํŠธ ์ •๋ณด
  • Prisma - ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค ORM
  • SQLite - ๊ฐœ๋ฐœ์šฉ ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค

Authentication & Database

  • NextAuth.js - OAuth ์ธ์ฆ ์‹œ์Šคํ…œ (Google ๋กœ๊ทธ์ธ)
  • JWT - JSON Web Token ๊ธฐ๋ฐ˜ ์„ธ์…˜ ๊ด€๋ฆฌ
  • Prisma Schema - ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค ์Šคํ‚ค๋งˆ ๊ด€๋ฆฌ

Deployment & Infrastructure

  • Vercel - ์„œ๋ฒ„๋ฆฌ์Šค ๋ฐฐํฌ ํ”Œ๋žซํผ
  • GitHub - ๋ฒ„์ „ ๊ด€๋ฆฌ ๋ฐ ํ˜‘์—…
  • Environment Variables - ๋ณด์•ˆ์„ ์œ„ํ•œ ํ™˜๊ฒฝ ๋ณ€์ˆ˜ ๊ด€๋ฆฌ

๐ŸŽฏ ํ•ต์‹ฌ ๊ธฐ๋Šฅ (Core Features)

1. ๐ŸŽค ์•„ํ‹ฐ์ŠคํŠธ ๊ฒ€์ƒ‰ ๋ฐ ๊ด€๋ฆฌ

  • ์‹ค์‹œ๊ฐ„ ๊ฒ€์ƒ‰: Debounced ๊ฒ€์ƒ‰์œผ๋กœ API ํ˜ธ์ถœ ์ตœ์ ํ™”
  • ์•„ํ‹ฐ์ŠคํŠธ ์ •๋ณด: Spotify API๋ฅผ ํ†ตํ•œ ์ƒ์„ธ ์•„ํ‹ฐ์ŠคํŠธ ์ •๋ณด
  • ์ฆ๊ฒจ์ฐพ๊ธฐ: ๋“œ๋ž˜๊ทธ ์•ค ๋“œ๋กญ์œผ๋กœ ์•„ํ‹ฐ์ŠคํŠธ ์ฆ๊ฒจ์ฐพ๊ธฐ ๊ด€๋ฆฌ

2. ๐ŸŽต ์•จ๋ฒ” ๋ฐ ํŠธ๋ž™ ์ •๋ณด

  • ์•จ๋ฒ” ์ƒ์„ธ: ์•„ํ‹ฐ์ŠคํŠธ๋ณ„ ์ตœ์‹  ์•จ๋ฒ” ์ •๋ณด ํ‘œ์‹œ
  • ํŠธ๋ž™ ๋ชฉ๋ก: ์•จ๋ฒ”์˜ ๋ชจ๋“  ํŠธ๋ž™ ์ •๋ณด ๋ฐ ์žฌ์ƒ ์‹œ๊ฐ„
  • Spotify ์—ฐ๋™: ์ง์ ‘ Spotify์—์„œ ์žฌ์ƒ ๊ฐ€๋Šฅํ•œ ๋งํฌ

3. ๐Ÿ” ์‚ฌ์šฉ์ž ์ธ์ฆ ์‹œ์Šคํ…œ

  • Google OAuth: ์•ˆ์ „ํ•œ ์†Œ์…œ ๋กœ๊ทธ์ธ
  • ์„ธ์…˜ ๊ด€๋ฆฌ: JWT ๊ธฐ๋ฐ˜ ์‚ฌ์šฉ์ž ์„ธ์…˜ ์œ ์ง€
  • ๊ฐœ์ธํ™”: ์‚ฌ์šฉ์ž๋ณ„ ์ฆ๊ฒจ์ฐพ๊ธฐ ์•„ํ‹ฐ์ŠคํŠธ ๊ด€๋ฆฌ

4. ๐ŸŽจ ํ˜„๋Œ€์ ์ธ UI/UX

  • ์‚ฌ์ด๋ฒ„ํŽ‘ํฌ ํ…Œ๋งˆ: ๋ฏธ๋ž˜์ง€ํ–ฅ์ ์ธ ๋””์ž์ธ
  • ๋ฐ˜์‘ํ˜• ๋””์ž์ธ: ๋ชจ๋“  ๋””๋ฐ”์ด์Šค์—์„œ ์ตœ์ ํ™”๋œ ๊ฒฝํ—˜
  • ์Šค์ผˆ๋ ˆํ†ค UI: ๋กœ๋”ฉ ์ค‘ ์‚ฌ์šฉ์ž ๊ฒฝํ—˜ ํ–ฅ์ƒ
  • ์ปค์Šคํ…€ ์Šคํฌ๋กค๋ฐ”: ๋””์ž์ธ๊ณผ ์กฐํ™”๋กœ์šด ์Šคํฌ๋กค ์ธํ„ฐํŽ˜์ด์Šค

5. โšก ์„ฑ๋Šฅ ์ตœ์ ํ™”

  • ๋™์  ์ž„ํฌํŠธ: Next.js dynamic import๋กœ ๋ฒˆ๋“ค ํฌ๊ธฐ ์ตœ์ ํ™”
  • ์ด๋ฏธ์ง€ ์ตœ์ ํ™”: Next.js Image ์ปดํฌ๋„ŒํŠธ๋กœ ์ด๋ฏธ์ง€ ์„ฑ๋Šฅ ํ–ฅ์ƒ
  • API ์ตœ์ ํ™”: Rate limiting ๋ฐ ๋ฐฐ์น˜ ์ฒ˜๋ฆฌ๋กœ Spotify API ํšจ์œจ์  ์‚ฌ์šฉ

๐Ÿ“ฑ ์›น ๊ธฐ๋Šฅ ๊ตฌํ˜„ ํ˜„ํ™ฉ

โœ… ๊ตฌํ˜„ ์™„๋ฃŒ๋œ ๊ธฐ๋Šฅ

  • ๋ฐ˜์‘ํ˜• ์›น ๋””์ž์ธ - Tailwind CSS๋กœ ๋ชจ๋“  ํ™”๋ฉด ํฌ๊ธฐ ์ง€์›
  • ์‹ค์‹œ๊ฐ„ ๊ฒ€์ƒ‰ - Debounced ๊ฒ€์ƒ‰์œผ๋กœ ์‚ฌ์šฉ์ž ์ž…๋ ฅ ์ตœ์ ํ™”
  • OAuth ์ธ์ฆ - Google ๋กœ๊ทธ์ธ ๋ฐ ์„ธ์…˜ ๊ด€๋ฆฌ
  • API ํ†ตํ•ฉ - Spotify Web API ์—ฐ๋™
  • ์ƒํƒœ ๊ด€๋ฆฌ - React Hooks๋ฅผ ํ†ตํ•œ ํšจ์œจ์ ์ธ ์ƒํƒœ ๊ด€๋ฆฌ
  • ๋กœ๋”ฉ ์ƒํƒœ - Skeleton UI ๋ฐ ์ง„ํ–‰๋ฅ  ํ‘œ์‹œ
  • ์—๋Ÿฌ ํ•ธ๋“ค๋ง - ์‚ฌ์šฉ์ž ์นœํ™”์ ์ธ ์—๋Ÿฌ ๋ฉ”์‹œ์ง€
  • ๋“œ๋ž˜๊ทธ ์•ค ๋“œ๋กญ - ์ฆ๊ฒจ์ฐพ๊ธฐ ๊ด€๋ฆฌ
  • ์ปค์Šคํ…€ ์Šคํฌ๋กค๋ฐ” - ๋””์ž์ธ๊ณผ ์กฐํ™”๋กœ์šด ์Šคํฌ๋กค ์ธํ„ฐํŽ˜์ด์Šค
  • PWA ์ง€์› - ์›น ์•ฑ์œผ๋กœ ์„ค์น˜ ๊ฐ€๋Šฅ
  • SEO ์ตœ์ ํ™” - ๋ฉ”ํƒ€ ํƒœ๊ทธ ๋ฐ ๊ตฌ์กฐํ™”๋œ ๋ฐ์ดํ„ฐ

๐Ÿ”„ ๊ตฌํ˜„ ์ค‘์ธ ๊ธฐ๋Šฅ

  • ๊ณ ๊ธ‰ ํ•„ํ„ฐ๋ง - ์žฅ๋ฅด, ๊ตญ๊ฐ€๋ณ„ ์Œ์•… ๋ถ„๋ฅ˜
  • ์ถ”์ฒœ ์‹œ์Šคํ…œ - AI ๊ธฐ๋ฐ˜ ์Œ์•… ์ถ”์ฒœ
  • ํ”Œ๋ ˆ์ด๋ฆฌ์ŠคํŠธ ๊ด€๋ฆฌ - ์‚ฌ์šฉ์ž๋ณ„ ํ”Œ๋ ˆ์ด๋ฆฌ์ŠคํŠธ ์ƒ์„ฑ

๐Ÿ“‹ ํ–ฅํ›„ ๊ตฌํ˜„ ์˜ˆ์ • ๊ธฐ๋Šฅ

  • ์‹ค์‹œ๊ฐ„ ์•Œ๋ฆผ - ์ข‹์•„ํ•˜๋Š” ์•„ํ‹ฐ์ŠคํŠธ ์‹ ๊ณก ์•Œ๋ฆผ
  • ์†Œ์…œ ๊ธฐ๋Šฅ - ์นœ๊ตฌ์™€ ์Œ์•… ์ทจํ–ฅ ๊ณต์œ 
  • ์˜คํ”„๋ผ์ธ ์ง€์› - Service Worker๋ฅผ ํ†ตํ•œ ์˜คํ”„๋ผ์ธ ๊ธฐ๋Šฅ

๐ŸŒŸ ํ”„๋กœ์ ํŠธ ํŠน์ง•

1. ํ˜„๋Œ€์ ์ธ ์›น ๊ฐœ๋ฐœ ํŒจํ„ด

  • Next.js 14 App Router ์‚ฌ์šฉ
  • TypeScript๋กœ ํƒ€์ž… ์•ˆ์ „์„ฑ ํ™•๋ณด
  • ์ปดํฌ๋„ŒํŠธ ๊ธฐ๋ฐ˜ ์•„ํ‚คํ…์ฒ˜

2. ์‚ฌ์šฉ์ž ๊ฒฝํ—˜ ์ค‘์‹ฌ

  • ์ง๊ด€์ ์ธ ์ธํ„ฐํŽ˜์ด์Šค
  • ๋น ๋ฅธ ๋กœ๋”ฉ ์†๋„
  • ์ ‘๊ทผ์„ฑ ๊ณ ๋ ค

3. ํ™•์žฅ ๊ฐ€๋Šฅํ•œ ๊ตฌ์กฐ

  • ๋ชจ๋“ˆํ™”๋œ ์ปดํฌ๋„ŒํŠธ
  • ์žฌ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ API ์—”๋“œํฌ์ธํŠธ
  • ํ™˜๊ฒฝ ๋ณ€์ˆ˜๋ฅผ ํ†ตํ•œ ์„ค์ • ๊ด€๋ฆฌ

introduction

if you want to find new song, you can see your favorite artist's album easily and comfortabily. So I consider some functions about such needs.

  1. artist keyword - It shows artist who release new songs .clicking this button, we provide the information about artist's new album.
  2. categorized new-released music Information can be categorized by genre, searching and country if user want resources - debounced search
  3. fetching data by spotify API you can use most of data by spotify API. it provides releated image and information of Album what you pick. resources - spotify api
  4. Login If you want to this site, you must sign in by your google email. Not only you can enroll your favorite artists, but also see their new-released album. resources - nextAuth, useSession
  5. Skeleton UI Because of fetching lots of data, you can see empty blocks somtimes. So I consider Conditional Rendering such as Skeleton UI, dynamic import and responsive design.

current progress

done: Login, route API, SEO-friendly

to do: Design, favorite function, filtering

ํ™˜๊ฒฝ ๋ณ€์ˆ˜ ์„ค์ •

์ด ํ”„๋กœ์ ํŠธ๋ฅผ ์‹คํ–‰ํ•˜๋ ค๋ฉด Spotify API ํ™˜๊ฒฝ ๋ณ€์ˆ˜๋ฅผ ์„ค์ •ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

๋กœ์ปฌ ๊ฐœ๋ฐœ ํ™˜๊ฒฝ

  1. ํ”„๋กœ์ ํŠธ ๋ฃจํŠธ์— .env.local ํŒŒ์ผ ์ƒ์„ฑ
  2. ๋‹ค์Œ ํ™˜๊ฒฝ ๋ณ€์ˆ˜ ์ถ”๊ฐ€:
SPOTIFY_CLIENT_ID=your_spotify_client_id_here
SPOTIFY_CLIENT_SECRET=your_spotify_client_secret_here

Vercel ๋ฐฐํฌ ํ™˜๊ฒฝ

  1. Vercel ๋Œ€์‹œ๋ณด๋“œ์—์„œ ํ”„๋กœ์ ํŠธ ์„ ํƒ
  2. Settings > Environment Variables๋กœ ์ด๋™
  3. ๋‹ค์Œ ํ™˜๊ฒฝ ๋ณ€์ˆ˜ ์ถ”๊ฐ€:
    • SPOTIFY_CLIENT_ID: Spotify Developer Dashboard์˜ Client ID
    • SPOTIFY_CLIENT_SECRET: Spotify Developer Dashboard์˜ Client Secret

Spotify Developer Dashboard ์„ค์ •

  1. Spotify Developer Dashboard ์ ‘์†
  2. ์ƒˆ ์•ฑ ์ƒ์„ฑ ๋˜๋Š” ๊ธฐ์กด ์•ฑ ์„ ํƒ
  3. Client ID์™€ Client Secret ๋ณต์‚ฌ
  4. Redirect URIs์— http://localhost:3000/api/auth/callback/spotify ์ถ”๊ฐ€ (๋กœ์ปฌ ๊ฐœ๋ฐœ์šฉ)

question:

1. What additional features could I implement to make this project more challenging and improve my skills?
- component libarary, implementubg drag and ddrop ordering to your favirutes  , try to figuure out goood patttern for using ssr.


Things you can do to make this project more difficult.
  1. Try using component libraries if you haven't already.

  2. Try adding Drag and Drop ordering to your favorites pages.

  3. Try figure a good pattern for using server side rendered pages - maybe just the main page on first load.

    1. Are there any security aspects you would recommend me to study more deeply?
    • RBAC: Role based access control (Artist vs Listener users) Secrets Manager

https://aws.amazon.com/secrets-manager/

3. What testing strategies would you recommend for this kind of project to ensure code quality and reliability?
  • testing,
  1. unit testing - compoenents make sure contunue to work
  2. end testing - flowes throught that act

Unit testing: tests your components End to end (or integration) testing: tests your flows through the app

Playwright for end to end: https://playwright.dev/

Start with unit tests. Then try out end to end tests

4. Are there any popular libraries or tools youโ€™d recommend for enhanced security or UX?

ux - i use mantine - compoenet library https://mantine.dev/ https://dndkit.com/

5. How have you approached learning frontend development? Are there any experiences or resources you would recommend?
  • gettingn good reading documentation ai for test

์ฆ๊ฒจ์ฐพ๊ธฐ ์„น์…˜์— Drap and Drop ๊ธฐ๋Šฅ์„ ๊ตฌํ˜„.

ServerSideRendering์„ ์ด์šฉํ•œ ํŽ˜์ด์ง€ ๋ฐ ์ปดํฌ๋„ŒํŠธ ๊ตฌํ˜„.

์ปดํฌ๋„ŒํŠธ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ ์จ๋ณด๊ธฐ

RBAC(Role based access control) ๋ฅผ ์ด์šฉํ•ด ๋ณด์•ˆ์ ์ธ ์‚ฌ์ดํŠธ ๊ตฌ์ถ•

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published