docs/code-samples/eventing/bookstore-sample-app/frontend
Phuong Cao 791daf51bb
Sample app frontend (#5931)
* Add darkmode

* Edit README

* Add comments and readme

* Fix UI

* Update README

* Update code-samples/eventing/bookstore-sample-app/frontend/client/pages/Main.js

Co-authored-by: Leo Li <leoli@redhat.com>

* Update code-samples/eventing/bookstore-sample-app/frontend/client/components/BookDetail.js

Co-authored-by: Leo Li <leoli@redhat.com>

* Change emoji

* Update code-samples/eventing/bookstore-sample-app/frontend/client/components/Toggle.js

Co-authored-by: Leo Li <leoli@redhat.com>

* Fix UI

* Align time

---------

Co-authored-by: Leo Li <leoli@redhat.com>
2024-04-05 15:09:02 +00:00
..
app Sample app frontend (#5931) 2024-04-05 15:09:02 +00:00
client Sample app frontend (#5931) 2024-04-05 15:09:02 +00:00
public/images Sample app frontend (#5931) 2024-04-05 15:09:02 +00:00
.eslintrc.json Sample app frontend (#5931) 2024-04-05 15:09:02 +00:00
.gitignore Sample app frontend (#5931) 2024-04-05 15:09:02 +00:00
Dockerfile Sample app frontend (#5931) 2024-04-05 15:09:02 +00:00
README.md Sample app frontend (#5931) 2024-04-05 15:09:02 +00:00
next.config.mjs Sample app frontend (#5931) 2024-04-05 15:09:02 +00:00
package-lock.json Sample app frontend (#5931) 2024-04-05 15:09:02 +00:00
package.json Sample app frontend (#5931) 2024-04-05 15:09:02 +00:00
postcss.config.js Sample app frontend (#5931) 2024-04-05 15:09:02 +00:00
tailwind.config.ts Sample app frontend (#5931) 2024-04-05 15:09:02 +00:00
tsconfig.json Sample app frontend (#5931) 2024-04-05 15:09:02 +00:00

README.md

Getting Started

This app use Next.js and TailwindCSS as main packages. Use this command to install all dependencies:

npm install

To run application, use:

npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev

Open http://localhost:3000 with your browser to see the result.

Project Structures

  • app/: Contains the main layout, page, and global styling.
  • client/: Contains components and pages used in the application.
  • public/images/: Contains image files.
  • next-env.d.ts, next.config.mjs, package-lock.json, package.json, postcss.config.js, tailwind.config.js, tsconfig.json: Configuration files for Next.js, Tailwind CSS, and TypeScript.

Containerize Application

This repository contains a Next.js application that utilizes next-themes and Tailwind CSS. This README file provides instructions on how to containerize the application using Docker.

Prerequisites

  • Docker installed on your machine. You can download and install Docker from here.

Dockerization Steps

  1. Clone this repository to your local machine.
  2. Navigate to the root directory of the cloned repository.

Building the Docker Image

Run the following command to build the Docker image:

docker build -t frontend .

Running the Docker Container

Once the image is built, you can run a container using the following command:

docker run -d -p 3000:3000 frontend