Skip to content

Booktopia is an online bookstore application that follows frontend architecture

License

Notifications You must be signed in to change notification settings

akapez/book-store-fe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bookstore Application (Booktopia)

alt text

This project is built using Next.js, NextAuth for authentication, React Hook Form with Zod for form validation, Jest for unit testing, Playwright for end-to-end testing, Redux Toolkit for state management, and shadcn/ui for UI components.

Table of Contents

Features

  • Next.js: A React framework for building server-side rendered and static web applications.
  • NextAuth: Authentication for Next.js applications.
  • React Hook Form / Zod: Form handling and validation.
  • Unit Testing: Jest is used for writing and running unit tests.
  • End-to-End Testing: Playwright is used for writing and running end-to-end tests.
  • State Management: Redux Toolkit is used for managing the application state.
  • shadcn/ui: A UI component library.

Installation

  1. Clone the repository:

    git clone https://github.com/akapez/book-store-fe.git
    cd book-store-fe
  2. Install dependencies:

    yarn install
  3. Set up environment variables: Create a .env.local file in the root directory and add the following variables:

    API_BASE_URL=your-api-base-url
    NEXTAUTH_SECRET=your-nextauth-secret
    NEXTAUTH_URL=your-nextauth-url
    NEXT_PUBLIC_BASE_URL=your-next-public-base-url
  4. Set up environment variables for testing: Create a .env.test file in the root directory with the same variables as .env.local.

Usage

  1. Start the development server:

    yarn dev
  2. The application will start on http://localhost:3000.

  3. This project uses commitlint. Please follow the convention below when committing your changes:

    git commit -m "subject: message"

Testing

  1. Run unit tests:

    yarn test
  2. Run end-to-end tests:

    yarn test:e2e

Backend Repository

The backend application for Booktopia, built with Nest.js, can be found at https://github.com/akapez/book-store-be.

License

This project is licensed under the MIT License - see the LICENSE file for details.