Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
panwar8279 authored May 18, 2024
2 parents 15bc59e + 605ff6a commit 06a31a4
Show file tree
Hide file tree
Showing 26 changed files with 586 additions and 243 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/greetings.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Greetings

on: [pull_request_target, issues]

jobs:
greeting:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/first-interaction@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: "Hi there! Thanks for opening this issue. We appreciate your contribution to this open-source project. We aim to respond or assign your issue as soon as possible."
pr-message: "Welcome to Our repository.🎊 Thank you so much for taking the time to point this out."
72 changes: 43 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,45 +1,52 @@
# Devlabs
<div align="center">
<h1><img src="https://raw.githubusercontent.com/Tarikul-Islam-Anik/Animated-Fluent-Emojis/master/Emojis/Objects/Laptop.png" alt="Laptop" width="50" height="50" /> DevLaps</h1>
<p>Welcome to DevLaps, a website where you can search for free tools that are useful for your daily needs. This application is created by the incredible open-source community. On DevLaps, you can discover a collection of free tools that can assist you in various aspects of your life. Moreover, you have the opportunity to contribute to this project by adding more tools to the database.</p>
<p>Check out the live project at <a href="https://DevLabs-one.vercel.app">DevLaps</a></p>
<img src="https://github.com/HimanshuNarware/Devlabs/assets/83147410/a508cf73-6724-46d3-a66d-6b9a7811bfdd" alt="DevLaps" />
</div>

- Welcome DevLabs is a website where you can search for free tools that are useful for your daily needs. This application is created by the incredible open-source community. On DevLabs, you can discover a collection of free tools that can assist you in various aspects of your life. Moreover, you have the opportunity to contribute to this project by adding more tools to the database.
---

You can check out the live project at <https://DevLabs-one.vercel.app>
## 🌟 Our Mission
Our website provides a platform for contributors from all over the world to share their ideas in the form of helpful websites that are free to use. It helps us save a ton of time by allowing us to access a list of all the websites in one location. Whether it be a tool or an educational platform, we may discover any type of website here. This makes it a platform for sharing knowledge!

![devlabs](https://github.com/HimanshuNarware/Devlabs/assets/83147410/a508cf73-6724-46d3-a66d-6b9a7811bfdd)
---

- Our website is one of those types that provide a platform for contributors from all over the world to contribute their ideas in the form of helpful websites that are free to use. It helps us save a ton of time by allowing us to access a list of all the websites in one location. Whether it be a tool or an educational platform, we may discover any type of website here. This makes it a platform for sharing knowledge!
## 🚀 Tech Stack
- **React.js**: A JavaScript library for building user interfaces.

## Tech Stack
---

Reactjs - Reactjs is a JavaScript library for building user interfaces.
🚀 Quick start
## 🚀 Quick Start
Contributions are welcome! If you have any ideas, suggestions, or bug fixes, please open an issue or submit a pull request. Make sure to follow the project's code of conduct.

## Installation
---

## 📦 Installation

You can clone the project directly from this repo to your local system.

### 1. Clone the repo
### 1. Clone the Repo

```bash
https://github.com/username/Devlabs.git
git clone https://github.com/username/Devlabs.git
```

The `.` will clone it to the current directory so make sure you are inside your project folder first.

### 2. Install Dependencies

```bash
npm install
`
### 3. Start development Server
```

### 3. Start Development Server

```bash
npm start
#or
npm run dev
```

### 3. Create Backend Environment
### 4. Create Backend Environment

```bash
MONGODB_URI=<mongodb connection uri for the database>
Expand All @@ -49,23 +56,23 @@ MAIL=<email from which to send mail to self>
PASSWORD=<passkey corresponding to above mail>
```

### 4. Create Frontend Environment
### 5. Create Frontend Environment

All the environment variables for react must be prefixed with `REACT_APP_`.

```bash
REACT_APP_BACKEND=<url of the backend>
```

### 5 Create a new branch
### 6. Create a New Branch

```bash
git checkout -b YourBranchName
```

### 6. Make your changes to the source code
### 7. Make Your Changes to the Source Code

Add new tool :
To add a new tool:
> Go to **src > DB > `product.json`** & add your code
```bash
Expand All @@ -77,34 +84,41 @@ git checkout -b YourBranchName
description: "< Description of product >"
},
```
- Ensure that your URLs are short. It is recommended to use bitly for URL shortening.
- Descriptions should not exceed 10-12 words.

To ensure that your URLs are short, it is recommended to use bitly for URL shortening.
Description should not exceed 10-12 words

### 7. Stage your changes
### 8. Stage Your Changes

⚠️ **Make sure** not to commit `package.json` or `package-lock.json` file

⚠️ **Make sure** not to run the commands `git add .` or `git add *`

> Instead, stage your changes for each file/folder
>
> By using public path it means it will add all files and folders under that folder, it is better to be specific
---

Instead, stage your changes for each file/folder specifically.

```bash
git add "<files_you_have_changed>"
```

### 8. Commit your changes
### 9. Commit Your Changes

```bash
git commit -m "<your_commit_message>"
```

### 9. Push your local commits to the remote repository
### 10. Push Your Local Commits to the Remote Repository

```bash
git push origin YourBranchName
```

**10.** Create a [Pull Request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request)!
### 11. Create a Pull Request
Create a [Pull Request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request)!

<div align="center">
<h2>Let's Collaborate and Make DevLaps Even Better! 💻🌟</h2>
</div>


2 changes: 1 addition & 1 deletion backend/src/config/database.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const mongoose = require("mongoose");

require("dotenv").config();

const DB_URI = process.env.MONGODB_URI || "mongodb://localhost:27017"
const DB_URI = process.env.MONGODB_URI || "mongodb://0.0.0.0:27017"

const connectToDB = async () => {
try {
Expand Down
16 changes: 14 additions & 2 deletions backend/src/controllers/specialController.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
require("dotenv").config();
const mongoose = require("mongoose")
const reviewForm = require("../models/reviewForm");

const {transporter, mailOptions} = require("../config/nodemailer");

Expand Down Expand Up @@ -39,7 +40,18 @@ const sendMail = async (req, res) => {
text: generateEmailText({ name, email, review }),
html: generateEmailBody({ name, email, review })
});

const newReview = new reviewForm({
name,
email,
msg: review,
});
console.log(newReview)
try {
await newReview.save();
//console.log("SAVED DATA")
} catch (error) {
//console.log("ERROR IS SAVING DATA")
}
return res.status(200).json({ success: true });
}
catch (error) {
Expand Down
2 changes: 1 addition & 1 deletion backend/src/models/Tool.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const ToolSchema = new mongoose.Schema({
},
category: {
type: String,
enum: ['remote', 'resume', 'tweet', 'ai', 'ethical', 'movies', 'extensions', 'tools','coding'],
enum: ['remote', 'resume', 'tweet', 'ai', 'ethical', 'movies', 'extensions', 'tools','coding', 'productivity'],
required: true
},
image: {
Expand Down
18 changes: 18 additions & 0 deletions backend/src/models/reviewForm.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
const mongoose = require("mongoose");

const reviewFormSchema = new mongoose.Schema({
name: {
type: String,
required: true,
},
email: {
type: String,
required: true,
},
msg: {
type: String,
required: true
}
});

module.exports = mongoose.model("reviewForm", reviewFormSchema);
Loading

0 comments on commit 06a31a4

Please sign in to comment.