This repository contains the source code for an Ecommerce website built using React and PHP. The website provides various features for users, including adding items to the cart, an admin dashboard to upload products, user account management, and seamless checkout and instant payment integration with Paystack.
- React
- PHP
- Paystack
- Clone the repository:
git clone https://github.com/piouskenny/orange_commerce.git
- Navigate to the project directory:
cd ecommerce-website
- Install the required dependencies for React:
npm install
- Set up the PHP backend and REST API. (Details provided in the next section)
- Start the development server for React:
npm start
- Access the website in your browser at
http://localhost:5173
- Start the PHP backend server with
php -S localhost:8000
To set up the PHP backend and REST API, follow these steps:
- Ensure you have PHP installed on your system.
- Copy the PHP files to your web server's document root directory or a directory accessible to your web server.
- Update the necessary configuration details in the PHP files, such as database credentials and Paystack API keys.
- Configure your web server to handle PHP files. For example, if you are using Apache, ensure that PHP is installed and enabled. Restart the server if necessary.
- Test the REST API endpoints using a tool like Postman or by making HTTP requests from your frontend React application.
- Adding to Cart: Users can add items to their cart while browsing the website, allowing them to gather multiple items for purchase.
- Admin Dashboard: An intuitive admin dashboard is provided for managing products. Admin users can upload new products, edit existing products, and delete products from the inventory.
- User Account: Users can create and manage their accounts. They can update their personal information, view order history, and track the status of their orders.
- Checkout and Instant Payment with Paystack: The website integrates with Paystack, a popular payment gateway. Users can proceed to checkout and make instant payments for their orders using various payment methods supported by Paystack.
Contributions to this project are welcome! If you would like to make any improvements, please follow these steps:
- Fork the repository.
- Create a new branch for your feature/bug fix:
git checkout -b my-feature
. - Make your changes and commit them:
git commit -m "Description of my changes"
. - Push to the branch:
git push origin my-feature
. - Submit a pull request outlining your changes.
This project is licensed under the MIT License. Feel free to use and modify the code as per the license terms.
We would like to acknowledge the following resources for their valuable contributions:
Please refer to their respective documentation for more information on these technologies.