Skip to content

serlisovyk/Pizza

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Pizza

A full-stack pizza ordering app with a Node.js backend (Express + MongoDB) and a React frontend (TypeScript + Redux Toolkit). The app supports browsing, search, filtering, sorting, and adding items to the cart.

Demo

Soon...

Tools

Mongodb Express Nodejs

React Typescript Sass Redux

npm Yarn Figma Git

Running API

cd server
npm install
npm start

Running the Development Server

cd client
npm install
npm start

📁 Структура Backend

server/
├── src/
│   ├── controllers/          # Request handlers
│   │   ├── ProductsController.ts
│   │   ├── CategoriesController.ts
│   │   └── SortController.ts
│   ├── services/             # Business logic
│   │   ├── ProductsService.ts
│   │   ├── CategoriesService.ts
│   │   └── SortService.ts
│   ├── models/               # MongoDB models
│   │   ├── ProductsModel.ts
│   │   ├── CategoriesModel.ts
│   │   └── SortModel.ts
│   ├── router/               # API routing
│   │   ├── router.ts
│   │   ├── productsRouter.ts
│   │   ├── categoriesRouter.ts
│   │   └── sortRouter.ts
│   ├── middlewares/          # Middlewares
│   │   └── ErrorHandlingMiddleware.ts
│   ├── error/                # Custom error classes
│   │   └── ApiError.ts
│   ├── types/                # TypeScript types and interfaces
│   │   └── types.ts
│   ├── db.ts                 # Database connection
│   └── server.ts             # App entry point
├── package.json
├── yarn.lock
└── tsconfig.json

📁 Структура Frontend

client/
├── public/                                  # Static assets served as-is
│   ├── index.html
│   ├── fonts/
│   └── img/
├── src/
│   ├── index.tsx                            # App bootstrap (React root, providers)
│   ├── components/                          # React components and routes
│   │   ├── App
│   │   ├── AppRoutes
│   │   ├── CartEmpty
│   │   ├── CartItem
│   │   ├── Categories
│   │   ├── Content
│   │   ├── Error
│   │   ├── Header
│   │   ├── Loader
│   │   ├── Pagination
│   │   ├── PizzaBlock
│   │   ├── Search
│   │   └── Sort
│   ├── hooks/                               # Custom React hooks
|   |   └── usePizzasFromFilters
│   ├── pages/                               # Route-level screens
│   │   ├── Cart
│   │   ├── Home
│   │   ├── NotFound
│   │   └── SingleProduct
│   ├── redux/                               # State management (RTK + RTK Query)
│   │   ├── store
│   │   ├── store.hooks
│   │   ├── api/
│   │   │   └── apiSlice
│   │   └── slices/
│   │       ├── cartSlice
│   │       └── filterSlice
│   ├── scss/                                # Global styles (Sass modules)
│   │   ├── app.scss
│   │   ├── _button.scss
│   │   ├── _fonts.scss
│   │   ├── _reset.scss
│   │   └── _variables.scss
│   ├── types/                               # Shared TypeScript types
│   │   ├── global
│   │   └── types
│   └── utils/                               # Helpers and constants
│       ├── constants
│       ├── routes
│       └── utils
├── package-lock.json
├── package.json
└── tsconfig.json

📡 API Endpoints

  • GET /products - Get products with filtering and pagination

    • Query параметры:
      • category (string) - filter by category
      • search (string) - search by title
      • sortBy (string) - one of title, price, rating
      • page (number) - page number (default: 1)
  • GET /products/:id - Get a product by ID

  • GET /categories - Get all categories

  • GET /sort - Get all available sort options

Releases

Packages

Used by

Contributors

Languages