Skip to content

Next.js web application for searching books and creating lists using the Google Books API

Notifications You must be signed in to change notification settings

r1zzrvk/lib-client-interface

Repository files navigation

изображение

Getting started 👋

Web application that implements lib-booksearch.vercel.app

Develop branch deployed here lib-test-app.vercel.app

Development 💻

npm run dev - to start application in development mode. App will be available at http://localhost:3000.

  • Atomic file system is mandatory. Each component is in its own folder along with its styles, tests and other files intended for it.

npm run lint - to start linting and simple fixing.

npm run type-check - to start looking for type errors

npm run install:hooks - if you have problem with husky (Mac/Linux only)

Recommended Node.js version: 20.4.0

Using older versions may cause issues with package installation or compilation. I also recommend using nvm

Nvm Installation Instructions

Nvm Installation Instructions for Windows

Nvm commands for installation node.js:

nvm install 20.4.0
nvm use 20.4.0

Git

When creating a commit, pay attention to its structure. For linting use commitlint. But for convenience I have placed rules here.

In general the pattern mostly looks like this:

commitType(scope?): subject  #scope is optional; multiple scopes are supported (current delimiter options: "/", "\" and ",")

Real world examples can look like this:

chore: run tests on travis ci
fix(server): send cors headers
feat(blog): add comment section

Common types can be:

  • build
  • chore
  • ci
  • docs
  • feat
  • fix
  • perf
  • refactor
  • revert
  • style
  • test

Before committing, I recommend running a linter because if there are errors when pushing, it will be rejected! npm run lint and npm run type-check will start automatically with git push.

Branches rules ❗

A branch name should consist of two sections:

  1. Task type suffix:

    • feature: for new features or enhancements
    • bugfix: for fixing bugs or resolving issues
    • hotfix: for fixing urgent bugs in the main or release branch
    • release: for updating changes in the main branch
  2. Name and issue/task number:

    • The second section should include the name and number of the corresponding issue or task.
    • Use the format ISSUE-{issue number} for issues and LIB-{task number} for tasks.

Example:

feature/LIB-322
bugfix/ISSUE-456

Release branch naming:

  • For the release branch, it is not required to specify the issue number.
  • Instead of ISSUE or LIB, use "v" and add the desired version number.

Example:

release/v3.2.2

Developer Branch Access Table:

MR Push Branching
main ❌ can not merge by request ❌ can not push ✔️ can branch from
develop ✔️ can merge by request ❌ can not push ✔️ can branch from
feature/bugfix ✔️ can merge by request and without ✔️ can push ✔️ can branch from

Google documentation

Data

Auth

Google Books


book.volumeInfo.imageLinks - object contains images in poor quality that shouldn't be used. So I found the solution using another link in the directory src/constants/api/BOOKS_IMAGE_SIZE with book.id


https://www.googleapis.com/your_request

Figma 🎨

Disign and ui-kit based on these layouts. But for some pages and components I had to create it myself :)