Skip to content
Open
Show file tree
Hide file tree
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 Mar 28, 2025
0adba2f
Freshcery : completed with the sign and login system along with the u…
HrishikeshThakkar-github Mar 28, 2025
72837e1
Freshcery : completed with product category crud and dynamic genratio…
HrishikeshThakkar-github Mar 31, 2025
86360bd
Freshcery : started with the cart and implemented it in product page
HrishikeshThakkar-github Mar 31, 2025
2591a3d
Freshcery : added the sql file
HrishikeshThakkar-github Mar 31, 2025
4ead58d
Freshcery : completed with cart feature which displays quantity of pr…
HrishikeshThakkar-github Apr 1, 2025
baf4d18
Freshcery : completed with checkout page
HrishikeshThakkar-github Apr 1, 2025
f35a783
Freshcery : completed the integration of stripe payment system
HrishikeshThakkar-github Apr 2, 2025
fd8f677
Freshcery : completed the integration of stripe payment system(update…
HrishikeshThakkar-github Apr 2, 2025
7d7cf46
Freshcery : completed with checkout page (removal page)
HrishikeshThakkar-github Apr 2, 2025
5effc97
Freshcery : completed with checkout page (updated it with the additio…
HrishikeshThakkar-github Apr 2, 2025
bca826b
Freshcery : completed with checkout page (updated it with the remove …
HrishikeshThakkar-github Apr 2, 2025
6adb614
Freshcery : completed with transaction page and removal of cart items…
HrishikeshThakkar-github Apr 3, 2025
d8dce8f
Freshcery : started with the development of the admin panel - complet…
HrishikeshThakkar-github Apr 3, 2025
4e02b64
Freshcery : added the functionality of adding products and adding cat…
HrishikeshThakkar-github Apr 4, 2025
5cb01e2
Freshcery : complted with the full admin panel and the project is rea…
HrishikeshThakkar-github Apr 4, 2025
8c24cd6
Freshcery : complted with the full admin panel and the project is rea…
HrishikeshThakkar-github Apr 4, 2025
9145dc3
Freshcery: made changes in the admin panel css
HrishikeshThakkar-github Apr 7, 2025
c5a2f22
Merge branch 'main' of github.com:HrishikeshThakkar-github/freshcery …
HrishikeshThakkar-github Apr 7, 2025
8d9fe5b
Stop tracking .vscode/launch.json
HrishikeshThakkar-github Apr 7, 2025
ff0a7b5
Freshcery: added some assets and made some minor changes and also add…
HrishikeshThakkar-github Apr 7, 2025
0a9329a
Freshcery : added the functionality of how a normal user cannot acces…
HrishikeshThakkar-github Apr 8, 2025
76c8014
Freshcery : added the validations almost everywhere made changes in t…
HrishikeshThakkar-github Apr 10, 2025
69965ef
Freshcery : made changes in the admin panel,made payment method work …
HrishikeshThakkar-github Apr 11, 2025
7ba2e0f
Freshcery : made changes in the admin panel,made payment method work …
HrishikeshThakkar-github Apr 11, 2025
88722e1
Freshcery : made changes in the admin panel,made payment method work …
HrishikeshThakkar-github Apr 10, 2025
6253508
Freshcery : made changes in the admin panel,made payment method work …
HrishikeshThakkar-github Apr 11, 2025
9232650
Merge branch 'development' of github.com:HrishikeshThakkar-github/fre…
HrishikeshThakkar-github Apr 14, 2025
462f27e
Freshcery : made a small change in the shop page
HrishikeshThakkar-github Apr 14, 2025
759359d
Freshcery: Remove ignored files from repository
HrishikeshThakkar-github Apr 16, 2025
d45ae30
added a Readme .md for better installation
HrishikeshThakkar-github Apr 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .env.example
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"
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.vscode/launch.json
payment_system/vendor/
.env
19 changes: 19 additions & 0 deletions .htaccess
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]

63 changes: 63 additions & 0 deletions Readme.md
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!
93 changes: 93 additions & 0 deletions about.php
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'?>
130 changes: 130 additions & 0 deletions admin-panel/admin.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
<?php
session_start();
define("freshcery", "http://freshcery");
Copy link
Collaborator

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

?>
<?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>
</body>

</html>
Loading