A modern and responsive food delivery application built with React, Redux, and Styled Components. This project provides a complete food ordering experience with category browsing, product search, cart management, and user authentication.
- Product Catalog: Browse food items organized by categories
- Search Functionality: Find specific products with real-time search
- Shopping Cart: Add, remove, and manage items in your cart
- Pagination: Navigate through product pages efficiently
- Responsive Design: Optimized for desktop and mobile devices
- State Management: Persistent cart state using Redux and Redux Persist
- User Authentication: Protected routes for orders and profile pages
- Interactive UI: Tooltips and modals for enhanced user experience
- React (17.0.2) - UI library
- React Router DOM (5.2.0) - Client-side routing
- Redux (4.1.0) - State management
- Redux Persist (6.0.0) - Persistent state storage
- Styled Components (5.2.3) - CSS-in-JS styling
- React Tooltip (4.2.21) - Interactive tooltips
- React Scripts (5.0.1) - Build and development tools
- ESLint with Airbnb configuration - Code linting
- Testing Library - Unit testing utilities
- Query String (qs) - URL parameter handling
- RESTful API integration with B7Web DevsFood API
src/
├── components/ # Reusable UI components
│ ├── Cart/ # Shopping cart component
│ ├── CategoryItem/ # Category display component
│ ├── Header/ # Application header
│ ├── MenuItem/ # Navigation menu items
│ ├── Modal/ # Modal dialog component
│ ├── ModalProduct/ # Product details modal
│ ├── ProductItem/ # Product display component
│ └── PrivateRoute.js # Protected route wrapper
├── pages/
│ └── HomeScreen/ # Main application screen
├── reducers/ # Redux reducers
│ ├── CartReducer.js # Cart state management
│ ├── UserReducer.js # User state management
│ └── index.js # Combined reducers
├── App.js # Main application component
├── AppStyled.js # Global styled components
├── api.js # API service functions
├── index.js # Application entry point
└── store.js # Redux store configuration
- Node.js (version 14 or higher)
- npm or yarn package manager
-
Clone the repository
git clone https://github.com/christopherldo/react-devsfood.git cd react-devsfood -
Install dependencies
npm install # or yarn install -
Start the development server
npm start # or yarn start -
Open your browser
Navigate to http://localhost:3000 to view the application.
npm start- Runs the app in development modenpm build- Builds the app for productionnpm test- Launches the test runnernpm eject- Ejects from Create React App (one-way operation)
The application uses environment variables for configuration:
ESLINT_NO_DEV_ERRORS=true- Disables ESLint errors in development
The application integrates with the B7Web DevsFood API:
- Base URL:
https://api.b7web.com.br/devsfood/api - Endpoints:
GET /categories- Fetch product categoriesGET /products- Fetch products with filtering and pagination
- Responsive Design: Adapts to different screen sizes
- Interactive Elements: Hover effects and smooth transitions
- Modal Dialogs: Product details and cart management
- Tooltips: Contextual help and information
- Loading States: User feedback during API calls
The application includes protected routes for:
- Order history (
/orders) - User profile (
/profile)
These routes require user authentication and redirect to login if not authenticated.
The shopping cart features:
- Add products with quantity selection
- Increase/decrease item quantities
- Remove items from cart
- Persistent storage across browser sessions
- Real-time total calculation
- Browsers with >0.2% market share
- Not dead browsers
- Excludes Opera Mini
- Latest Chrome version
- Latest Firefox version
- Latest Safari version
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Christopher Leonardo
- GitHub: @christopherldo
- B7Web for providing the API
- React community for excellent documentation
- Contributors and testers
Built with ❤️ using React and modern web technologies