Olivier is an AI-powered meal planning and grocery shopping application designed for women who are juggling professional lives, family responsibilities, and a commitment to a healthy lifestyle. Simplifying meal planning, recipe management, and grocery shopping with intuitive features and AI technology, Olivier empowers users to craft a balanced and enjoyable diet.
We built this application during the Practicum course at Code The Dream school, you can watch our final project video presentation by following this link.
- Getting Started
- Folder Structure
- Development
- Branching Strategy
- Additional Resources
- Product Functionality
- Authors
- Contributing & Improvements
- License
This is the front-end for the team's practicum project. We recommend following these instructions after setting up the back-end server first. You can find the back-end repository here.
- Clone both the front-end and back-end repositories into a parent folder (e.g., "Practicum Project").
- The front-end app (React) runs on port 3005, and the back-end server runs on port 3000. Ensure both are running simultaneously for testing.
- Clone this repository into the parent folder.
- Run
npm install
to install dependencies. - Create a
.env.local
file in the top level of your folder and addPORT=3005
. - Pull the latest version of the
main
branch when needed. - Run
npm start
to start the development server. - Open http://localhost:3000 in your browser to access the data from the back-end server.
- You now have your front-end and back-end running locally!
Note: You may choose to run the front-end server either in Visual Studio Code or directly in the browser.
The frontend project is structured as follows:
public/
:documents/
: Documents used in the app.images/
: Images used in the app.
src/
: Contains the source code for the frontend application.components/
: React components used throughout the application.utils/
: Utility functions and helper files.Card.tsx
andCustomTheme.tsx
: Custom styling and Chakra UI theme configuration.index.tsx
: Entry point of the application.
When working on the frontend, follow these development guidelines:
-
Write clean and readable code.
- We use Prettier for code formatting. It's configured to maintain consistent code style automatically. Read further here.
-
Use semicolons consistently throughout the codebase.
-
Use Typescript to provide types where needed. Types should be provided in the
src/utils/types.tsx
folder. -
Use Node version 18 and higher to enable AI functionality.
-
Use the Chakra UI component library for consistent and accessible UI design.
- Custom styles and theme configuration can be found in the
Card.tsx
andCustomTheme.tsx
files. Chakra UI documentation.
- Custom styles and theme configuration can be found in the
-
Beautiful DND is used for drag-and-drop functionality in our application. Documentation and examples.
-
Use Axios for API Integration.
- Axios is used for making HTTP requests to the backend API. The configuration for Axios and API integration can be found in the
utils/
directory. API integration guide.
- Axios is used for making HTTP requests to the backend API. The configuration for Axios and API integration can be found in the
-
Maintain clear folder structure:
public/
: Documents and images.src/
: Source code.
-
Use functional components and React hooks for state management.
-
Use React Router for client-side routing.
-
Institute a structured import order:
- Group similar utilities.
import { Routes, Route } from "react-router-dom";
- First place third-party imports, then local imports.
import { Routes } from "react-router-dom"; import Home from "./Home";
- Adhere to the following naming conventions:
- Functional components should be named in PascalCase.
- Variables, hooks, functions, and arrays should be named in camelCase.
- All names should be descriptive and concise.
-
One component should serve one purpose. Use prop types to transfer data between components efficiently.
-
Use reusable components to avoid repetition and improve maintainability.
-
Use arrow functions to declare variables and components.
const Login = () => { ... } export default Login;
-
If you need to set state inside render, use the following patterns:
- In case of one state to set (in one line):
<Input onChange={event => setEmail(event.target.value)} />
- In case of more than one states to set:
<Input onChange={event => { setPassword(event.target.value); setErrorPassword(""); }} />
-
Keep the logic inside render to an absolute minimum.
const handleShowPassword = () => { ... }; ... <Button onClick={handleShowPassword}>Button</Button>
-
Use ternary operator for conditional rendering:
{ showPassword ? <ViewIcon /> : <ViewOffIcon />; }
-
In case of a long list of tag's attributes or component imports, each one should start on a new line to improve readability.
-
For Select buttons, Chakra Select and Chakra React Select are used.
The primary branches in our repository are:
-
main
: The main branch represents our production-ready code. Changes are only merged intomain
after thorough testing and validation. -
devops/initial-setup
: Thedevops/initial-setup
branch serves as an intermediary branch for aggregating changes from variousdev
branches before merging intomain
. This branch helps ensure that all changes are integrated and tested together as a cohesive unit.
-
Feature Development:
- Create a feature branch from
devops/initial-setup
when working on new features or bug fixes. - Name your feature branches descriptively to indicate the purpose of the work starting with
dev/
and include the Linear issue ID in the branch name (e.g.,dev/pr-template-PRA-29
).
- Create a feature branch from
-
Review:
- Seek code reviews and await approvals from two team members.
- Use Linear to track project progress and assign issue numbers to pull requests (e.g., PRA-175).
- Read on for code review guidelines here
-
Merging to
devops/initial-setup
:- Once your changes are complete and approved, merge your feature branch into
devops/initial-setup
.
- Once your changes are complete and approved, merge your feature branch into
-
Merging to
main
:- Only after successful testing on
devops/initial-setup
, create a pull request to merge changes fromdevops/initial-setup
intomain
.
- Only after successful testing on
Olivier offers a wide range of features (September 2023):
-
Register and Log In: Create a user account to access all the app's features.
-
Password Reset Feature: Easily reset your password if needed, ensuring account security.
-
AI-Powered Recipe Searches: Quickly discover meal ideas powered by AI technology.
-
Manual Recipe Creation: Create and customize recipes directly within the app.
-
Efficient Recipe Management: Organize and manage your recipes with ease, using categories and tags.
-
Comprehensive Recipe Details: Access detailed cooking instructions and ingredient lists.
-
Dynamic Weekly Meal Planner: Craft and edit weekly menus with intuitive drag-and-drop functionality.
-
Smart Shopping Lists: Generate smart shopping lists based on selected recipes.
-
Share Shopping Lists: Share your shopping lists via email or print them out for convenient offline access.
- React documentation
- TypeScript documentation
- Chakra UI documentation
- Axios documentation
- Prettier documentation
- Beautiful DND documentation
- Olivier video presentation
- Practicum project pptx presentation
- Code The Dream organization
Frontend
Backend
We're always looking to improve and enhance our project. If you have suggestions, improvements, or find any bugs, please feel free to open a pull request or an issue on our GitHub repository.
Before submitting a pull request, please ensure the following:
- Your code is well-documented and follows the project's coding style.
- Your changes are well-tested and do not introduce new bugs.
- Include a detailed description of the changes you are proposing.
We appreciate all contributions and look forward to collaborating with you!
This project is available for use under the MIT License.