/Book-review-website

REST-based Book Review Website (Web50 - project 1)

Primary LanguagePython

Book Review Website ๐Ÿ“š

Practicing Back-end development using Python, Flask (server framework), PostgreSQL database (+SQLAlchemy), and APIs to create a book review website.

Python, Flask, PostgreSQL ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค(+SQLAlchemy), API๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๊ฐ„๋‹จํ•œ ๋ถ๋ฆฌ๋ทฐ ์‚ฌ์ดํŠธ๋ฅผ ๊ฐœ๋ฐœํ•ด ๋ณด๋Š” ๋ฐฑ์—”๋“œ ์›น ๊ฐœ๋ฐœ ์—ฐ์Šต.

๐Ÿ“– Book Review Website

  • For CS50 Web Programming with Python and JavaScript - project 1.
  • Created a book review website using Python and Flask as the server framerwork.
  • Used PostgreSQL database (deployed in Heroku) and sessions to store login credentials.
  • Also ssed the database for storing and searching book information including the isbn, title, author, ratings, and reviews.
  • A third-party API by Goodreads (a book review website) to use ratings on books.
  • Created a custom API for the Website so that a GET request ("api/") returns a JSON for book details.
/login /search
user can login search for book by isbn, title, author
/search (by isbn) /search (by title)
search result by isbn search result by title
/book/isbn /search (no match)
review of searched book no match for search result
/api/isbn
API for web application

๐Ÿ“– ๋ถ๋ฆฌ๋ทฐ ์›น์‚ฌ์ดํŠธ ๊ฐœ๋ฐœ

  • ํ•˜๋ฒ„๋“œ์˜ CS50 MOOC(edX)์˜ Web Programming with Python and JavaScript ์ˆ˜์—…์˜ ํ”„๋กœ์ ํŠธ 1.
  • Python๊ณผ Flask๋ฅผ ์„œ๋ฒ„ ํ”„๋ ˆ์ž„์›Œํฌ๋กœ ์‚ฌ์šฉํ•˜์—ฌ ๋ถ ๋ฆฌ๋ทฐ ์›น์‚ฌ์ดํŠธ๋ฅผ ๊ฐœ๋ฐœ.
  • PostgreSQL ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์ฑ…์˜ ์ •๋ณด(isbn, ์ œ๋ชฉ, ์ž‘๊ฐ€, ํ‰์ )์„ ์ €์žฅ ๋ฐ ๊ฒ€์ƒ‰ํ•˜๋Š” ๊ธฐ๋Šฅ์„ ๋งŒ๋“ฆ.
  • ๋งˆ์ฐฌ๊ฐ€์ง€๋กœ PostgreSQL์„ ์‚ฌ์šฉํ•˜์—ฌ ์›น์‚ฌ์ดํŠธ์—์„œ ๋งŒ๋“ค์–ด์ง„ ๋ถ ๋ฆฌ๋ทฐ๋ฅผ ์ €์žฅ ๋ฐ ๊ฒ€์ƒ‰ํ•˜๋Š” ๊ธฐ๋Šฅ์„ ๋งŒ๋“ฆ.
  • Session๊ณผ ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๋กœ๊ทธ์ธ ๊ธฐ๋Šฅ์„ ๋งŒ๋“ฆ.
  • Goodreads (ํƒ€์‚ฌ ๋ถ ๋ฆฌ๋ทฐ ์›น์‚ฌ์ดํŠธ)์˜ API๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ํ‰์  ์ •๋ณด๋ฅผ ๋ถˆ๋Ÿฌ์˜ค๋Š” ๊ธฐ๋Šฅ์„ ๋งŒ๋“ฆ.
  • ์›น์‚ฌ์ดํŠธ์˜ API๋ฅผ ๋งŒ๋“ค์–ด GET request ("api/")๋ฅผ ํ†ตํ•ด JSON ํŒŒ์ผ์„ ๋ฐ˜ํ™˜ํ•˜๋Š” ๊ธฐ๋Šฅ์„ ๋งŒ๋“ฆ.

๐ŸŒฑ what I learned | ๋ฌด์—‡์„ ๋ฐฐ์› ๋Š”๊ฐ€

Still a bit confused on whether I prefer back-end or front-end. Still, I learned that one side alone is not sufficient since you must know both sides in order for the logic to work.

Specifically, I learned how to create a logic using the routes in how the user is suppose to use and have access to pages (how the website as a whole should flow).

  • learned how to use Flask as a server framework in order to direct the application's routes
  • learned how to use relational databases via PostgreSQL and how to implement it using SQLAlchemy
  • learned how to use sessions to store login credentials.
  • learned how to use third-party APIs and also create custom APIs to return JSONs.