Skip to content

Commit

Permalink
Merge branch 'main' into dhananjaysingh10
Browse files Browse the repository at this point in the history
  • Loading branch information
dhananjaysingh10 committed May 30, 2024
2 parents 70207ac + 0a01569 commit 78f5eb7
Show file tree
Hide file tree
Showing 24 changed files with 1,562 additions and 434 deletions.
26 changes: 26 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
## Related Issue
[Cite any related issue(s) this pull request addresses. If none, simply state “None”]

## Description
[Please include a brief description of the changes or features added]

## Type of PR

- [ ] Bug fix
- [ ] Feature enhancement
- [ ] Documentation update
- [ ] Other (specify): _______________

## Screenshots / videos (if applicable)
[Attach any relevant screenshots or videos demonstrating the changes]

## Checklist:
- [ ] I have performed a self-review of my code
- [ ] I have read and followed the Contribution Guidelines.
- [ ] I have tested the changes thoroughly before submitting this pull request.
- [ ] I have provided relevant issue numbers, screenshots, and videos after making the changes.
- [ ] I have commented my code, particularly in hard-to-understand areas.
<!-- [X] - put a cross/X inside [] to check the box -->

## Additional context:
[Include any additional information or context that might be helpful for reviewers.]
21 changes: 21 additions & 0 deletions .github/workflows/auto-comment-pr-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Auto Comment on PR Merge

on:
pull_request:
types: [closed]

jobs:
comment:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest

steps:
- name: Add Comment to Merged PR
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
curl -X POST \
-H "Authorization: token $GITHUB_TOKEN" \
-H "Accept: application/vnd.github.v3+json" \
-d '{"body":"🎉 Your pull request has been successfully merged! 🎉 Thank you for your contribution to our project. Your efforts are greatly appreciated. Keep up the fantastic work! 🚀"}' \
"https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments"
34 changes: 34 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,40 @@ in case you are stuck:

<br>

### Alternatively, contribute using GitHub Desktop

1. **Open GitHub Desktop:**
Launch GitHub Desktop and log in to your GitHub account if you haven't already.

2. **Clone the Repository:**
- If you haven't cloned the Petari repository yet, you can do so by clicking on the "File" menu and selecting "Clone Repository."
- Choose the Petari repository from the list of repositories on GitHub and clone it to your local machine.

3. **Switch to the Correct Branch:**
- Ensure you are on the branch that you want to submit a pull request for.
- If you need to switch branches, you can do so by clicking on the "Current Branch" dropdown menu and selecting the desired branch.

4. **Make Changes:**
Make your changes to the code or files in the repository using your preferred code editor.

5. **Commit Changes:**
- In GitHub Desktop, you'll see a list of the files you've changed. Check the box next to each file you want to include in the commit.
- Enter a summary and description for your changes in the "Summary" and "Description" fields, respectively. Click the "Commit to <branch-name>" button to commit your changes to the local branch.

6. **Push Changes to GitHub:**
After committing your changes, click the "Push origin" button in the top right corner of GitHub Desktop to push your changes to your forked repository on GitHub.

7. **Create a Pull Request:**
- Go to the GitHub website and navigate to your fork of the Petari repository.
- You should see a button to "Compare & pull request" between your fork and the original repository. Click on it.

8. **Review and Submit:**
- On the pull request page, review your changes and add any additional information, such as a title and description, that you want to include with your pull request.
- Once you're satisfied, click the "Create pull request" button to submit your pull request.

9. **Wait for Review:**
Your pull request will now be available for review by the project maintainers. They may provide feedback or ask for changes before merging your pull request into the main branch of the Petari repository.

## **Issue Report Process 📌**

1. Go to the project's issues.
Expand Down
83 changes: 65 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,68 @@
# PETARI Documentation
# <p align="center"> Petari - The Food Donation Management System</p>
<div id="top"></div>
<h2>Table of Contents</h2>

- [Introduction](#introduction)
- [Tech Stack](#tech-stack)
<br>
- [Frontend](#frontend)<br>
- [Backend](#backend)
- [Features](#features)
- [Contribution Guidelines](#contribution-guidelines)
- [How Can You Contribute?](#how-can-you-contribute)
- [Getting Started](#getting-started)
- [Code Style Guidelines](#code-style-guidelines)
- [Code Review Process](#code-review-process)
- [Community Guidelines](#community-guidelines)
- [Output Screenshot](#output-screenshot)
<br>

## Introduction

<a name="introduction"></a>
PETARI, The Food Donate WebApp, is an initiative by an organization aiming to redistribute excess food from various events to those in need. The project aligns with India's Sustainable Development Goals to achieve a hunger-free world and zero food waste. By leveraging technology, PETARI seeks to bridge the gap between surplus food and hunger, thereby benefiting society and the environment.

## Tech Stack

<a v="tech-stack"></a>
### Frontend
- HTML
- CSS
- Bootstrap
- JavaScript

<a F="frontend"></a>
<p>
<a href="https://www.w3schools.com/html/"> <img src="https://img.icons8.com/color/70/000000/html-5--v1.png" alt="HTML" /></a>
<a href="https://www.w3schools.com/css/"> <img src="https://img.icons8.com/color/70/000000/css3.png" alt="CSS" /></a>
<a href="https://www.w3schools.com/js/"><img src="https://img.icons8.com/color/70/000000/javascript--v1.png" alt="JS" /></a>
<a href="https://getbootstrap.com/docs/5.0/getting-started/introduction/"> <img src="https://img.icons8.com/color/70/000000/bootstrap.png" alt="Bootstrap" /></a>

</p>

### Backend
- Node.js
- EJS
- Express.js
- MongoDB
- Authentication (Auth 2.0)
<a m="backend"></a>
<a href="https://www.w3schools.com/nodejs/"><img src="https://e7.pngegg.com/pngimages/247/558/png-clipart-node-js-javascript-express-js-npm-react-github-angle-text.png" alt="Node.js" width="50" height="50" /></a>
<a href="https://www.javatpoint.com/expressjs-tutorial"><img src="https://cdn.icon-icons.com/icons2/2699/PNG/512/expressjs_logo_icon_169185.png" alt="expressjs" width="50" height="50" /></a>
<a href="https://www.mongodb.com/docs/"><img src="https://w7.pngwing.com/pngs/956/695/png-transparent-mongodb-original-wordmark-logo-icon-thumbnail.png" alt="MongoDB" width="50" height="50" /></a>
<a href="https://www.npmjs.com/package/ejs"><img src="https://icons.veryicon.com/png/o/business/vscode-program-item-icon/ejs.png" alt="EJS" width="50" height="50" /></a>
<a href="https://oauth.net/2/"><img src="https://miro.medium.com/v2/resize:fit:828/format:webp/1*e2x6biTeTNWeMc-C4aPogw.jpeg" alt="Auth2.0" width="70" height="60" /></a>

# Contribution Guidelines
<p align="right">(<a href="#top">back to top</a>)</p>

# Features
<a c="features"></a>
- <h4>Redistribution of Excess Food:</h4>
Petari focuses on collecting excess food from weddings, parties, and events to redistribute it to individuals who are hungry, thereby reducing food waste and ensuring that surplus food benefits those in need.
- <h4>Societal Impact:</h4> The organization aims to bring benefits across society by providing access to food for individuals who may not have adequate means to access it, addressing food insecurity and hunger issues.
- <h4>Alignment with Sustainable Development Goals: </h4>Petari's mission aligns with India's Sustainable Development Goals, particularly focusing on making the world hunger-free and reducing food waste to contribute to a sustainable and equitable society.
- <h4>Environmental Consciousness: </h4> By redistributing excess food and reducing food waste, Petari helps alleviate the pressure on finite natural resources and minimizes the environmental impact associated with food wastage.
- <h4>Economic Impact:</h4> Through its activities, Petari not only addresses social issues related to hunger but also contributes to economic sustainability by efficiently utilizing excess resources and reducing wastage.
- <h4>Collaboration with Events:</h4> Petari likely collaborates with various events, such as weddings and parties, to collect surplus food, emphasizing the importance of partnerships and community involvement in achieving its goals.

<p align="right">(<a href="#top">back to top</a>)</p>


# Contribution Guidelines
<a g="contribution-guidelines"></a>
Thank you for considering contributing to PETARI! We appreciate your efforts to make a positive impact on society through food redistribution and combating hunger. By contributing to PETARI, you are helping us move closer to our goal of creating a hunger-free world and reducing food waste.

## How Can You Contribute?

<a h="how-can-you-contribute"></a>
There are several ways you can contribute to PETARI:

1. **Code Contributions**: Help improve the PETARI codebase by fixing bugs, adding new features, or enhancing existing functionalities.
Expand All @@ -37,8 +75,10 @@ There are several ways you can contribute to PETARI:

5. **Feedback**: Provide feedback on the existing features, suggest new ideas, or share your thoughts on how PETARI can be further improved.

## Getting Started
<p align="right">(<a href="#top">back to top</a>)</p>

## Getting Started
<a h="getting-started"></a>
If you're new to contributing to open-source projects, don't worry! Here's how you can get started:

1. **Fork the Repository**: Fork the PETARI repository to your GitHub account.
Expand Down Expand Up @@ -164,26 +204,31 @@ If you're new to contributing to open-source projects, don't worry! Here's how y
15. **Create a Pull Request**: Open a pull request from your forked repository to the main PETARI repository. Provide a clear description of your changes in the pull request. Follow these steps
- Add the issue number, that you have been assigned[Formate:- Isuue number #(your issue number)]
- Brief description of the changes

<p align="right">(<a href="#top">back to top</a>)</p>

## Code Style Guidelines

<a h="code-style-guidelines"></a>
To maintain consistency and readability, please follow these code style guidelines:

- Use meaningful variable and function names.
- Follow indentation and formatting conventions used in the existing codebase.
- Write clear and concise comments to explain complex logic or algorithms.

## Code Review Process

<a k="code-review-process"></a>
All contributions to PETARI will go through a code review process to ensure code quality, consistency, and adherence to project standards. Your contributions are valuable, and we appreciate your patience during the review process.

## Community Guidelines

<a j="community-guidelines"></a>
PETARI is committed to fostering an inclusive and welcoming community. We encourage respectful and constructive communication among contributors. Please refer to our [Code of Conduct]-(https://github.com/Sahil1786/Petari/blob/dffa12d5f33b3227ec287af602762ef1f7bc3f89/Code_of_conduct.md) for more information.

<p align="right">(<a href="#top">back to top</a>)</p>

## Output Screenshot

## Output Screenshot
<a i="output-screenshot"></a>
### 1. Index Page
The index page serves as the main landing page for PETARI. It showcases the mission and purpose of the organization, along with relevant information about its activities.

Expand All @@ -205,3 +250,5 @@ Admins have special privileges and access to manage the platform. The admin logi
![Admin Login Page](https://github.com/Sahil1786/Petari/assets/111786720/fb1cc46a-e3ad-40fd-93c6-268849e05e91)

**Please follow me and give a star to my repository
<p align="right">(<a href="#top">back to top</a>)</p>

5 changes: 4 additions & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,7 @@ app.listen( process.env.port|| 3000,function(){
console.log("server is running on port 3000 ");
});


// Route for policies.ejs
app.get('/policies', (req, res) => {
res.render('policies'); // Ensure policies.ejs is in the views directory
});
6 changes: 6 additions & 0 deletions model/query.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ const querySchema = new mongoose.Schema(
subject: String,
message: String,
approved: { type: Boolean, default: false },
// adding models for storing ANSWERE ans USER_ID
answere: String,
user_id: {
type: mongoose.Schema.Types.ObjectId,
ref: "User",
},
},
{ timestamps: true }
);
Expand Down
2 changes: 2 additions & 0 deletions model/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ const userSchema = new mongoose.Schema({
approved: { type: Boolean, default: false },
// googleId: String,
// profile: String,
resetTokenExpiration: Date,
resetToken:String
});

const User = new mongoose.model("User", userSchema);
Expand Down
40 changes: 40 additions & 0 deletions public/css/admin_css.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,46 @@ body{
background: #ececec;
}

/* Dark Mode */

.dark-mode {
background-color: #121212;
color: #e0e0e0;
}

.dark-mode #darkModeToggle {
background-color: #333; /* Dark background color */
}

.dark-mode #darkModeIcon {
color: #e0e0e0; /* Dark mode icon color */
}

/* Dark Mode Toggle Button - Hover */
#darkModeToggle:hover {
background-color: #555; /* Dark background color on hover */
}

/* Dark Mode Toggle Button */
#darkModeToggle {
width: 50px;
height: 50px;
border: none; /* Remove border */
position: fixed;
top: 20px;
right: 20px;
z-index: 1000; /* Ensure it's above other content */
}

#darkModeIcon {
font-size: 24px;
}

.dark-mode .custom-box {
background-color: #333 !important; /* Dark mode background color for the login container */
color: #e0e0e0; /* Dark mode text color for the login container */
}

/*------------ Login container ------------*/

.box-area{
Expand Down
24 changes: 24 additions & 0 deletions public/css/policies.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
.container{
margin: 40px;
font-family: 'Poppins', sans-serif;
font-size: 18px;
}

.section{
padding: 15px;
}

.heading{
font-size: 25px;
text-decoration: underline;
color: rgb(4, 101, 10);

}

.content{
padding: 15px;
}

hr#line{
border: 1px solid rgb(4, 101, 10);
}
Loading

0 comments on commit 78f5eb7

Please sign in to comment.