-
Notifications
You must be signed in to change notification settings - Fork 0
Development #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
HrishikeshThakkar-github
wants to merge
31
commits into
main
Choose a base branch
from
development
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Development #1
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
927422c
Freshcery : completed with the sign and login system along with the u…
HrishikeshThakkar-github 0adba2f
Freshcery : completed with the sign and login system along with the u…
HrishikeshThakkar-github 72837e1
Freshcery : completed with product category crud and dynamic genratio…
HrishikeshThakkar-github 86360bd
Freshcery : started with the cart and implemented it in product page
HrishikeshThakkar-github 2591a3d
Freshcery : added the sql file
HrishikeshThakkar-github 4ead58d
Freshcery : completed with cart feature which displays quantity of pr…
HrishikeshThakkar-github baf4d18
Freshcery : completed with checkout page
HrishikeshThakkar-github f35a783
Freshcery : completed the integration of stripe payment system
HrishikeshThakkar-github fd8f677
Freshcery : completed the integration of stripe payment system(update…
HrishikeshThakkar-github 7d7cf46
Freshcery : completed with checkout page (removal page)
HrishikeshThakkar-github 5effc97
Freshcery : completed with checkout page (updated it with the additio…
HrishikeshThakkar-github bca826b
Freshcery : completed with checkout page (updated it with the remove …
HrishikeshThakkar-github 6adb614
Freshcery : completed with transaction page and removal of cart items…
HrishikeshThakkar-github d8dce8f
Freshcery : started with the development of the admin panel - complet…
HrishikeshThakkar-github 4e02b64
Freshcery : added the functionality of adding products and adding cat…
HrishikeshThakkar-github 5cb01e2
Freshcery : complted with the full admin panel and the project is rea…
HrishikeshThakkar-github 8c24cd6
Freshcery : complted with the full admin panel and the project is rea…
HrishikeshThakkar-github 9145dc3
Freshcery: made changes in the admin panel css
HrishikeshThakkar-github c5a2f22
Merge branch 'main' of github.com:HrishikeshThakkar-github/freshcery …
HrishikeshThakkar-github 8d9fe5b
Stop tracking .vscode/launch.json
HrishikeshThakkar-github ff0a7b5
Freshcery: added some assets and made some minor changes and also add…
HrishikeshThakkar-github 0a9329a
Freshcery : added the functionality of how a normal user cannot acces…
HrishikeshThakkar-github 76c8014
Freshcery : added the validations almost everywhere made changes in t…
HrishikeshThakkar-github 69965ef
Freshcery : made changes in the admin panel,made payment method work …
HrishikeshThakkar-github 7ba2e0f
Freshcery : made changes in the admin panel,made payment method work …
HrishikeshThakkar-github 88722e1
Freshcery : made changes in the admin panel,made payment method work …
HrishikeshThakkar-github 6253508
Freshcery : made changes in the admin panel,made payment method work …
HrishikeshThakkar-github 9232650
Merge branch 'development' of github.com:HrishikeshThakkar-github/fre…
HrishikeshThakkar-github 462f27e
Freshcery : made a small change in the shop page
HrishikeshThakkar-github 759359d
Freshcery: Remove ignored files from repository
HrishikeshThakkar-github d45ae30
added a Readme .md for better installation
HrishikeshThakkar-github File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| DB_USER = "" | ||
| DB_PASS = "" | ||
| DB_NAME = "" | ||
| STRIPE_PUBLIC_KEY = "pk_test_xxxx" | ||
| STRIPE_SECRET_KEY = "sk_test_xxxx" | ||
| FRESHCERY_EMAIL = "[email protected]" | ||
| FRESHCERY_EMAIL_PASS = "gmail app key" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| .vscode/launch.json | ||
| payment_system/vendor/ | ||
| .env |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| RewriteEngine On | ||
|
|
||
| # ✅ Skip existing files and folders | ||
| RewriteCond %{REQUEST_FILENAME} !-f | ||
| RewriteCond %{REQUEST_FILENAME} !-d | ||
|
|
||
| # ✅ Custom clean route mappings | ||
| RewriteRule ^login$ auth/login.php [L] | ||
| RewriteRule ^register$ auth/register.php [L] | ||
| RewriteRule ^logout$ auth/logout.php [L] | ||
| RewriteRule ^dashboard$ admin-panel/admin.php [L] | ||
| RewriteRule ^categories$ admin-panel/categories.php [L] | ||
| RewriteRule ^products$ admin-panel/products.php [L] | ||
| RewriteRule ^orders$ admin-panel/orders.php [L] | ||
| RewriteRule ^admin-logout$ auth/admin-logout.php | ||
| RewriteRule ^productsb$ /admin-panel/include/product.php | ||
| # ✅ Optional: Generic fallback for root-level files (like /about → about.php) | ||
| RewriteRule ^([a-zA-Z0-9_-]+)$ $1.php [L] | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
|
|
||
|
|
||
| <h1 align="center">Freshcery</h1> | ||
|
|
||
| <p align="center"><em>Fresh from Farms to Your Doorstep 🌿</em></p> | ||
|
|
||
| --- | ||
|
|
||
| ## 🚀 About the Project | ||
|
|
||
| **Freshcery** is an online platform that connects local farmers directly to customers, ensuring that you receive **freshly harvested products** right at your doorstep. The platform supports sustainable agriculture and helps promote locally-grown produce. | ||
|
|
||
| --- | ||
|
|
||
| ## 🛠️ Technologies Used | ||
|
|
||
| - 🐘 **PHP 8.3** | ||
| - 🛢️ **MySQL** | ||
| - 🌐 **Apache Web Server** | ||
|
|
||
| --- | ||
|
|
||
| ## ⚙️ Installation & Setup | ||
|
|
||
| > 📌 **Important:** Before running the project, make sure to: | ||
|
|
||
| 1. **Clone the repository**: | ||
| ```bash | ||
| git clone https://github.com/your-username/freshcery.git | ||
| cd freshcery | ||
| ``` | ||
|
|
||
| 2. **Copy the `.env.example` file and configure environment variables**: | ||
| ```bash | ||
| cp .env.example .env | ||
| ``` | ||
|
|
||
| Update the `.env` file with your database credentials and other environment-specific settings. | ||
|
|
||
| 3. **Install PHP dependencies using Composer**: | ||
| ```bash | ||
| composer install | ||
| ``` | ||
|
|
||
| 4. **Set up your local web server**: | ||
| - Use Apache with PHP enabled. | ||
| - Point the document root to the appropriate folder (e.g., `public/` or `payment_system/`). | ||
|
|
||
| 5. **Import the database**: | ||
| ```sql | ||
| You may import the database by viewing the db.txt from the `assets/` folder | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## 💡 Future Scope | ||
|
|
||
| - Implementing a locate location feature | ||
| - Add a track order feature | ||
|
|
||
| --- | ||
|
|
||
| ## 🧑🌾 Made with ❤️ to support local farmers! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,93 @@ | ||
| <?php include 'include/header.php'?> | ||
| <div id="page-content" class="page-content"> | ||
| <div class="banner"> | ||
| <div class="jumbotron jumbotron-bg text-center rounded-0" style="background-image: url('assets/img/bg-header.jpg');"> | ||
| <div class="container"> | ||
| <h1 class="pt-5"> | ||
| About Us | ||
| </h1> | ||
| <p class="lead"> | ||
| Save time and leave the groceries to us. | ||
| </p> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| <section class="bg-leaf"> | ||
| <div class="container"> | ||
| <div class="row justify-content-center"> | ||
| <div class="col-md-8 text-center mb-3"> | ||
| <h1 class="title text-uppercase mb-2">Freshcery</h1> | ||
| <h5> | ||
| Groceries Organic Store | ||
| </h5> | ||
| </div> | ||
| <div class="col-md-10"> | ||
| <p class="text-justify"> | ||
| Occaecat sunt id anim officia laborum incididunt dolore sit consequat consectetur enim fugiat aute culpa consequat cillum incididunt officia sed esse laborum anim aliqua et duis reprehenderit commodo do dolor dolor deserunt esse in aute anim adipisicing deserunt eu tempor veniam magna magna nulla in ea nulla elit est do veniam dolor pariatur in ut deserunt adipisicing est anim proident occaecat aliquip sunt enim occaecat cillum commodo in duis fugiat pariatur officia aliquip anim in dolore id id pariatur pariatur enim quis excepteur proident incididunt dolor consequat nisi et veniam occaecat sed exercitation dolore eiusmod elit sed voluptate adipisicing ut irure ad ut ex deserunt exercitation amet in eu quis ut occaecat non sunt labore reprehenderit elit commodo aute ea occaecat tempor dolor sed ut cillum aute et pariatur sit consequat commodo sunt sit amet nulla commodo aute laborum non ullamco ea laboris do adipisicing quis consequat adipisicing ea cupidatat et minim pariatur sed amet cillum commodo pariatur fugiat duis id amet ut exercitation voluptate culpa fugiat nostrud aute. | ||
| </p> | ||
| </div> | ||
| </div> | ||
|
|
||
| <div class="row justify-content-center align-items-center mt-3"> | ||
| <div class="col-md-4"> | ||
| <img src="assets/img/fruits.jpg" class="img-fluid"> | ||
| </div> | ||
| <div class="col-md-6"> | ||
| <h5> | ||
| Straight from the Farm | ||
| </h5> | ||
| <p> | ||
| Our farm-to-table concept emphasizes on getting the fresh produce directly from local farms to your tables within one day, hence you know you get the freshest produce straight from harvest. | ||
| </p> | ||
| <p> | ||
| Our farm-to-table concept emphasizes on getting the fresh produce directly from local farms to your tables within one day, hence you know you get the freshest produce straight from harvest. | ||
| </p> | ||
| <p> | ||
| Our farm-to-table concept emphasizes on getting the fresh produce directly from local farms to your tables within one day, hence you know you get the freshest produce straight from harvest. | ||
| </p> | ||
| </div> | ||
| </div> | ||
|
|
||
| <div class="row justify-content-center align-items-center text-right mt-3"> | ||
| <div class="col-md-6"> | ||
| <h5> | ||
| Know Your Farmers | ||
| </h5> | ||
| <p> | ||
| We want you to know exactly who is growing your food by having the farmers profile on each item and farmers page. You’re welcome to visit the farms and see the love they put into growing your food. | ||
| </p> | ||
| <p> | ||
| We want you to know exactly who is growing your food by having the farmers profile on each item and farmers page. You’re welcome to visit the farms and see the love they put into growing your food. | ||
| </p> | ||
| <p> | ||
| We want you to know exactly who is growing your food by having the farmers profile on each item and farmers page. You’re welcome to visit the farms and see the love they put into growing your food. | ||
| </p> | ||
| </div> | ||
| <div class="col-md-4"> | ||
| <img src="assets/img/vegetables.jpg" class="img-fluid"> | ||
| </div> | ||
| </div> | ||
|
|
||
| <div class="row justify-content-center align-items-center mt-3"> | ||
| <div class="col-md-4"> | ||
| <img src="assets/img/fish.jpg" class="img-fluid"> | ||
| </div> | ||
| <div class="col-md-6"> | ||
| <h5> | ||
| Improving Farmers’ Livelihood | ||
| </h5> | ||
| <p> | ||
| Slowly but sure, by cutting the complex supply chain and food system, we hope to improve the welfare of farmers by giving them the returns they deserve for their hard work. | ||
| </p> | ||
| <p> | ||
| Slowly but sure, by cutting the complex supply chain and food system, we hope to improve the welfare of farmers by giving them the returns they deserve for their hard work. | ||
| </p> | ||
| <p> | ||
| Slowly but sure, by cutting the complex supply chain and food system, we hope to improve the welfare of farmers by giving them the returns they deserve for their hard work. | ||
| </p> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </section> | ||
| </div> | ||
| <?php include 'include/footer.php'?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,130 @@ | ||
| <?php | ||
| session_start(); | ||
| define("freshcery", "http://freshcery"); | ||
| ?> | ||
| <?php include '../configration/db.config.php' ?> | ||
| <!DOCTYPE html> | ||
| <html lang="en"> | ||
|
|
||
| <head> | ||
| <meta charset="utf-8"> | ||
|
|
||
| <title>Admin Panel</title> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1"> | ||
| <link href="http://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet"> | ||
| <link href="styles/style.css" rel="stylesheet"> | ||
| <script src="http://code.jquery.com/jquery-1.11.1.min.js"></script> | ||
| <script src="http://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script> | ||
| <link href="http://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet"> | ||
| <link href="/admin-panel/styles/style.css" rel="stylesheet"> | ||
| <script src="http://code.jquery.com/jquery-1.11.1.min.js"></script> | ||
| <script src="http://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script> | ||
| <script src="https://cdn.jsdelivr.net/npm/chart.js"></script> | ||
| </head> | ||
|
|
||
| <body> | ||
|
|
||
|
|
||
| <div id="wrapper"> | ||
| <?php include 'nav.php'?> | ||
| <div class="container-fluid"> | ||
|
|
||
| <div class="row"> | ||
| <div class="col-md-4"> | ||
| <div class="card"> | ||
| <div class="card-body"> | ||
| <h5 class="card-title">Products</h5> | ||
| <p class="card-text">number of products: <?= $_SESSION['product_count']?></p> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| <div class="col-md-4"> | ||
| <div class="card"> | ||
| <div class="card-body"> | ||
| <h5 class="card-title">Orders</h5> | ||
| <p class="card-text">number of orders: <?= $_SESSION['orders_count']?></p> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| <div class="col-md-4"> | ||
| <div class="card"> | ||
| <div class="card-body"> | ||
| <h5 class="card-title">Categories</h5> | ||
| <p class="card-text">number of categories: <?= $_SESSION['categories_count']?></p> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| <div class="row "> | ||
| <div class="col-md-6"> | ||
| <div class="card"> | ||
| <div class="card-body"> | ||
| <h5 class="card-title">Products per Category</h5> | ||
| <canvas id="productsByCategory"></canvas> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| <div class="col-md-6"> | ||
| <div class="card"> | ||
| <div class="card-body"> | ||
| <h5 class="card-title">Top 5 Ordered Products</h5> | ||
| <canvas id="topOrderedProducts"></canvas> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| <script> | ||
| const categoryData = { | ||
| labels: ['Electronics', 'Fashion', 'Home Decor', 'Sports', 'Books'], | ||
| datasets: [{ | ||
| label: 'Products per Category', | ||
| data: [120, 95, 78, 50, 40], | ||
| backgroundColor: ['#3498db', '#e74c3c', '#2ecc71', '#f1c40f', '#9b59b6'], | ||
| borderColor: ['#2980b9', '#c0392b', '#27ae60', '#f39c12', '#8e44ad'], | ||
| borderWidth: 1 | ||
| }] | ||
| }; | ||
| new Chart(document.getElementById('productsByCategory'), { | ||
| type: 'bar', | ||
| data: categoryData, | ||
| options: { | ||
| responsive: true, | ||
| scales: { | ||
| y: { | ||
| beginAtZero: true | ||
| } | ||
| } | ||
| } | ||
| }); | ||
| const topProductsData = { | ||
| labels: ['Laptop', 'Shoes', 'Smartphone', 'Watch', 'Backpack'], | ||
| datasets: [{ | ||
| label: 'Orders', | ||
| data: [250, 180, 150, 130, 100], | ||
| borderColor: '#e67e22', | ||
| backgroundColor: 'rgba(230, 126, 34, 0.2)', | ||
| fill: true, | ||
| tension: 0.3 | ||
| }] | ||
| }; | ||
| new Chart(document.getElementById('topOrderedProducts'), { | ||
| type: 'line', | ||
| data: topProductsData, | ||
| options: { | ||
| responsive: true, | ||
| scales: { | ||
| y: { | ||
| beginAtZero: true | ||
| } | ||
| } | ||
| } | ||
| }); | ||
| </script> | ||
| <script type="text/javascript"> | ||
|
|
||
| </script> | ||
HrishikeshThakkar-github marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| </body> | ||
|
|
||
| </html> | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use proper naming conventions. Constants must be uppercase.
https://www.php.net/manual/en/language.constants.php