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.
- MongoDB
- Express
- React
- Node.js
- axios
- Session-based authentication, dynamic routing, and server communication
- 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
- Add-to-cart system with item quantity updates
- Delete / reduce quantity
- Cart persists through session
- Responsive UI
- Loads full course data through URL parameters
- Curriculum table, introduction, reviews
react-html-parserconverts stored HTML strings into rendered HTML- βEnrollβ button adds the course to the cart
- Sending course names via params to the board
- 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
- Nested replies
- Parent comment identified using dataset attribute & objectId
- Replies stored inside parent comment document
- Full threaded comment structure
- Regex-based validation for username/password
- Warning modal for invalid characters (Korean / symbols not allowed)
- Password strength indicator
- Kakao Address API for address search
- β 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
- Nav, Main page, responsive UI
- Backend integration
- Session login with passport.js
- Nav updates dynamically after login
- Course Page UI + fetching list from DB
- Course detail API via URL params
- Fixed state initialization issues
- Finished detail page
- Learned about useEffect timing
- DB restructuring for reviews / curriculum
- Built review & reviewCount collections
- Responsive detail page
- Implemented star rating (mix-blend-mode trick)
- Board (forum) post CRUD
- Complex API routing via multiple URL params
- Cart system
- Fixed refresh errors with conditional rendering
- Deployment done
- Login UI bug still remaining
- Studied Socket.io / SSE
- Working on real-time updates
- Comment + nested reply system
- Built ObjectId-based parent-child structure
- Solved JSON refresh issue
- Learned about browser behavior (URL β actual GET request to server)
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μΌ: μ€μκ° ν΅μ νμ΅, λκΈ/λλκΈ, μλ‘κ³ μΉ¨ λ¬Έμ ν΄κ²°



