Fast Pizza Co. is a web application that allows users to order pizzas π from a menu π without creating an account or logging in. Users can add multiple pizzas to a cart π, provide their name π, phone number π±, and address π , and place their order with a simple POST request. Users can also mark their order as "priority" π for an additional 20% of the π cart price, either before or after placing the order. Each order will get a unique ID π that can be used to look up the order status . Payments π΅ are made on delivery, so no payment processing is necessary in the app.
βοΈ React π£οΈ React Router π§ Redux Toolkit π¨ Tailwind CSS π Typescript π§Ή ESlint π Prettier π Vite
π User Authentication: No user accounts or login are required. Users simply input their names before using the app.
π Dynamic Pizza Menu: The pizza menu is loaded from an external API, allowing for changes in the menu over time.
π Shopping Cart: Users can add multiple pizzas to a cart before placing an order.
ποΈ Order Placement: Orders require the user's name, phone number, and address.
π Priority Orders: Users can mark their orders as "priority" for an additional 20% of the cart price.
π€ Order Submission: Orders are submitted by sending a POST request with the order data (user data + selected pizzas) to the API.
π°οΈ GPS location: Feature that uses the browser's geolocation API to get the user's coordinates and send back the address.
π° Payment on Delivery: Payments are made on delivery, so no payment processing is necessary in the app.
β Confirmation page: Displays the order ID, the estimated delivery time and other info
π Order Tracking: Allows the user to look up their order by the order ID and see the order details and status
π Post-Order Modification: Users can mark their order as "priority" even after it has been placed.
The project is organized into different folders and files, each serving a specific purpose. Here's an overview:
src/App.tsx: The main application component that sets up the router and defines the main structure of the app.
src/features/: This folder contains various features of the application, including cart, menu, order, and user-related functionality.
src/ui/: UI reusable components and layouts used throughout the application, such as the AppLayout and Home components.
src/services/: Functions for interacting with the external API, including fetching the menu, handling orders and obtaining user geolocation.
src/store/: Redux store setup and configuration.
src/utils/: Contains helpers functions.
src/interfaces/: Includes TypeScript interfaces for: cart, geocoding data, order, pizza, newOrder etc.
dev: Run the development server using Vite.
npm run dev
build: Build the project using TypeScript (tsc) and Vite.
npm run build
lint: Lint the project using ESLint, checking TypeScript and TypeScript React files.
npm run lint
preview: Preview the production build using Vite.
npm run preview
lint:fix: Fix linting issues automatically using ESLint.
npm run lint:fix
format: Format the code using Prettier.
npm run format
Clone the repository:
git clone https://github.com/RoierS/fast-pizza.git
cd fast-pizza
Install dependencies:
npm install
Run the development server:
npm run dev
Build for production:
npm run build
Or simply visit Fast Pizza Co. π
Feel free to contribute to the project by submitting issues, feature requests, or pull requests. Please follow the established coding conventions and guidelines.
π¨βπΌ RoierS - iermoliuk.roman@gmail.com
This project is licensed under the MIT License.