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.
Soon...
cd server
npm install
npm startcd client
npm install
npm startserver/
├── 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.jsonclient/
├── 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-
GET /products- Get products with filtering and pagination- Query параметры:
category(string) - filter by categorysearch(string) - search by titlesortBy(string) - one of title, price, ratingpage(number) - page number (default: 1)
- Query параметры:
-
GET /products/:id- Get a product by ID -
GET /categories- Get all categories -
GET /sort- Get all available sort options