Skip to content

Newbie-Alert/MERN_codingApple

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

76 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Implementing a Full Online Course Platform πŸŽ“

MERN Stack β€” CodingApple Clone Project

A hands-on MERN project built by recreating the real course site I’m currently taking. This was my first full MERN portfolio project, designed to fully understand authentication, session management, CRUD, cart systems, and dynamic routing.


✨ Preview


🧩 Tech Stack

  • MongoDB
  • Express
  • React
  • Node.js
  • axios
  • Session-based authentication, dynamic routing, and server communication

πŸ“± Core Features

πŸ” Session Login

  • Local strategy authentication using passport.js
  • Session-based user login
  • Navbar UI updates depending on login state
  • Cart icon displays item count in real time

πŸ›’ Shopping Cart

  • Add-to-cart system with item quantity updates
  • Delete / reduce quantity
  • Cart persists through session
  • Responsive UI

πŸ“š Course Detail Page

  • Loads full course data through URL parameters
  • Curriculum table, introduction, reviews
  • react-html-parser converts stored HTML strings into rendered HTML
  • β€œEnroll” button adds the course to the cart
  • Sending course names via params to the board

πŸ“ Board (Forum)

  • Fetches all posts related to each course
  • Clicking a post sends title + metadata to backend and shows detail page
  • Create post form toggle
  • Full CRUD operations

πŸ’¬ Comments & Replies

  • Nested replies
  • Parent comment identified using dataset attribute & objectId
  • Replies stored inside parent comment document
  • Full threaded comment structure

🧾 Signup

  • Regex-based validation for username/password
  • Warning modal for invalid characters (Korean / symbols not allowed)
  • Password strength indicator
  • Kakao Address API for address search

πŸ”¨ Known Issues / Fixes

  • ❌ Refresh showed raw JSON β†’ βœ”οΈ Fixed by separating client routes from server routes
  • ❌ Cart icon wouldn't update without refresh β†’ Planned fix with React Query + Socket.io
  • ❌ State resetting on refresh β†’ Fixed using conditional rendering until data is loaded

πŸ—“ Daily Development Log (Short Version)

Day 1–4

  • Nav, Main page, responsive UI

Day 5

  • Backend integration
  • Session login with passport.js
  • Nav updates dynamically after login

Day 6–7

  • Course Page UI + fetching list from DB

Day 8

  • Course detail API via URL params
  • Fixed state initialization issues

Day 9

  • Finished detail page
  • Learned about useEffect timing

Day 10

  • DB restructuring for reviews / curriculum

Day 11–12

  • Built review & reviewCount collections
  • Responsive detail page
  • Implemented star rating (mix-blend-mode trick)

Day 13

  • Board (forum) post CRUD
  • Complex API routing via multiple URL params

Day 14

  • Cart system
  • Fixed refresh errors with conditional rendering

Day 15

  • Deployment done
  • Login UI bug still remaining

Day 16–17

  • Studied Socket.io / SSE
  • Working on real-time updates

Day 18–20

  • Comment + nested reply system
  • Built ObjectId-based parent-child structure

Day 21

  • Solved JSON refresh issue
  • Learned about browser behavior (URL β†’ actual GET request to server)

🎯 Summary (Upwork-Friendly)

This project demonstrates:

  • Full MERN stack development
  • Session authentication with Passport
  • Dynamic routing using parameters
  • Shopping cart logic with quantity management
  • Nested comment architecture
  • HTML parsing for course content
  • Course detail + curriculum system
  • Forum/board CRUD
  • Real-world problems & fixes: refresh issues, DB modeling, API structuring
  • Deployment experience (Google Cloud / App Engine)

κ°•μ˜μ‚¬μ΄νŠΈ κ΅¬ν˜„ ν”„λ‘œμ νŠΈ πŸŽ“

MERN μŠ€νƒ β€” μ½”λ”©μ• ν”Œ μ‚¬μ΄νŠΈ 클둠

ν˜„μž¬ μ‹€μ œλ‘œ μˆ˜κ°• 쀑인 β€œμ½”λ”©μ• ν”Œβ€ μ‚¬μ΄νŠΈλ₯Ό κ·ΈλŒ€λ‘œ ν’€μŠ€νƒμœΌλ‘œ κ΅¬ν˜„ν•΄λ³Έ ν”„λ‘œμ νŠΈμž…λ‹ˆλ‹€. 둜그인, μž₯λ°”κ΅¬λ‹ˆ, κ²Œμ‹œνŒ, λŒ“κΈ€/λŒ€λŒ“κΈ€, κ°•μ˜ 상세 λ“± μ‹€μ „ κΈ°λŠ₯ μ€‘μ‹¬μœΌλ‘œ κ°œλ°œν–ˆμŠ΅λ‹ˆλ‹€.


🧩 기술 μŠ€νƒ

  • MongoDB
  • Express
  • React
  • Node.js
  • axios

μ„Έμ…˜ 둜그인, μ„œλ²„-ν΄λΌμ΄μ–ΈνŠΈ 톡신, URL νŒŒλΌλ―Έν„° 기반 데이터 λ‘œλ”© λ“± ν’€μŠ€νƒ 핡심 κΈ°λŠ₯을 λͺ¨λ‘ λ‹€λ€˜μŠ΅λ‹ˆλ‹€.


πŸ“± κ΅¬ν˜„ κΈ°λŠ₯ μš”μ•½

πŸ” μ„Έμ…˜ 둜그인

  • passport.js Local μ „λž΅ μ‚¬μš©
  • μ„Έμ…˜ 기반 인증
  • 둜그인 μƒνƒœμ— 따라 Nav UI λ³€κ²½
  • μž₯λ°”κ΅¬λ‹ˆ μ•„μ΄μ½˜μ— μ‹€μ‹œκ°„ 개수 ν‘œμ‹œ

πŸ›’ μž₯λ°”κ΅¬λ‹ˆ

  • κ°•μ˜ μΆ”κ°€ / 쀑볡 μ‹œ μˆ˜λŸ‰ 증가
  • X λ²„νŠΌ 클릭 μ‹œ μ‚­μ œ λ˜λŠ” μˆ˜λŸ‰ κ°μ†Œ
  • ν…Œμ΄λΈ” UI λ Œλ”λ§

πŸ“š μƒμ„ΈνŽ˜μ΄μ§€

  • URL parameter둜 κ°•μ˜ 데이터 λ‘œλ“œ
  • 컀리큘럼, 리뷰, μ†Œκ°œ
  • react-html-parser 둜 HTML λ Œλ”
  • μ‹ μ²­ν•˜κΈ° β†’ μž₯λ°”κ΅¬λ‹ˆ μΆ”κ°€
  • κ²Œμ‹œνŒμœΌλ‘œ κ°•μ’Œλͺ… 전달

πŸ“ κ²Œμ‹œνŒ

  • κ°•μ’Œλ³„ κ²Œμ‹œλ¬Ό 리슀트
  • κ²Œμ‹œκΈ€ 상세보기
  • κ²Œμ‹œκΈ€ CRUD
  • UI 기반 κΈ€μ“°κΈ° 폼 μ œμ–΄

πŸ’¬ λŒ“κΈ€/λŒ€λŒ“κΈ€

  • ObjectId 기반 λŒ€λŒ“κΈ€ ꡬ쑰
  • dataset을 μ΄μš©ν•œ parent comment 식별
  • μ€‘μ²©λœ λŒ“κΈ€ ꡬ쑰 ꡬ좕 μ™„λ£Œ

🧾 νšŒμ›κ°€μž…

  • μ •κ·œν‘œν˜„μ‹ 기반 검증
  • λͺ¨λ‹¬μ„ μ΄μš©ν•œ κ²½κ³  처리
  • λΉ„λ°€λ²ˆν˜Έ 강도 ν‘œμ‹œ
  • 카카였 μ£Όμ†Œ API

πŸ›  ν•΄κ²°ν•œ λ¬Έμ œλ“€

  • μƒˆλ‘œκ³ μΉ¨ μ‹œ JSON만 보이던 문제 ν•΄κ²°
  • useEffect 타이밍 문제 β†’ 쑰건뢀 λ Œλ”λ§
  • μž₯λ°”κ΅¬λ‹ˆ μ‹€μ‹œκ°„ 반영 문제 (Socket.io μ˜ˆμ •)

πŸ—“ μΌμžλ³„ 개발 기둝 (μš”μ•½)

  • 1~4일: Nav, Main Page
  • 5일: λ°±μ—”λ“œ 톡신, passport μ„Έμ…˜ 둜그인
  • 6~8일: Course Page, Detail API
  • 9~10일: DB ꡬ쑰 μž¬μ •λΉ„
  • 11~13일: 리뷰/별점/κ²Œμ‹œνŒ/CRUD
  • 14~15일: μž₯λ°”κ΅¬λ‹ˆ, 배포
  • 16~21일: μ‹€μ‹œκ°„ 톡신 ν•™μŠ΅, λŒ“κΈ€/λŒ€λŒ“κΈ€, μƒˆλ‘œκ³ μΉ¨ 문제 ν•΄κ²°

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published