https://github.com/gurudarshan57/prompt-hub
Prompt-Hub is an open-source AI prompting tool for modern world to discover, create and share creative prompts.
https://github.com/gurudarshan57/prompt-hub
fullstack javascript nextjs14 reactjs serverless tailwindcss
Last synced: 3 months ago
JSON representation
Prompt-Hub is an open-source AI prompting tool for modern world to discover, create and share creative prompts.
- Host: GitHub
- URL: https://github.com/gurudarshan57/prompt-hub
- Owner: GuruDarshan57
- Created: 2024-08-25T17:46:11.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-02-10T11:52:09.000Z (over 1 year ago)
- Last Synced: 2025-03-11T06:58:36.881Z (over 1 year ago)
- Topics: fullstack, javascript, nextjs14, reactjs, serverless, tailwindcss
- Language: JavaScript
- Homepage: https://prompt-hub-zeta.vercel.app/
- Size: 238 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PromptHub
PromptHub is an open-source AI prompting full-stack tool for the modern world. It allows users to discover, create, discuss, and share creative prompts to inspire their writing, brainstorming sessions, and creative projects. This README file will guide you through the features, setup, and deployment process for the PromptHub app.
## ScreenShots






## Features
- **Authentication with Google:** Users can sign in to PromptHub using their Google accounts, ensuring a secure and hassle-free login process.
- **Create, Edit, and Delete Posts:** Once logged in, users can create new prompts, edit existing ones, or delete prompts they no longer wish to keep. This gives them complete control over their prompt collection.
- **User Profiles:** Each user has their own profile page where they can showcase their created prompts. Other users can visit these profile pages to view and gain inspiration from the prompts shared by that user.
- **Search Functionality:** The main page of PromptHub allows users to search for prompts using keywords, tags, or usernames. This feature makes it easier for users to discover prompts related to specific themes or topics.
- **Like, Save, and Comment:** Users can like and save prompts they like, as well as comment on them.
- **Copy Prompt Text:** A handy button allows users to copy the text of a prompt with a single click. This makes it convenient to paste the prompt into an AI tool or any other writing platform.
## Prerequisites
Before running the application, you need to have the following installed on your system:
- Next.js (version 14)
- React
- Node.js (version 14 or later)
- MongoDB (version 4.0 or later)
PromptHub is deployed on Vercel, a cloud platform for static sites and serverless functions.
## Installation
1. Clone the repository to your local machine using the following command:
```bash
git clone https://github.com/GuruDarshan57/Prompt-Hub/
```
2. Install the necessary dependencies by navigating to the project directory and running:
```bash
npm install
```
3. Create a `.env` file in the root directory of the project and add the following environment variables:
```
GOOGLE_ID=
GOOGLE_CLIENT_SECRET=
MONGODB_URI=
NEXTAUTH_URL=
NEXTAUTH_URL_INTERNAL=
NEXTAUTH_SECRET=
```
4. Run the app:
```bash
npm run dev
```
## API Endpoints
The following API endpoints are available:
- **POST /api/prompt/create:** Create a new prompt.
- **GET /api/prompt:** Get all prompts.
- **GET /api/prompt/{promptId}:** Get prompt.
- **PATCH /api/prompt/{promptId}:** Update prompt.
- **DELETE /api/prompt/{promptId}:** Delete prompt.
- **GET /api/user/{userId}/posts:** Get prompts by a user.
- **POST /api/comment/{promptId}:** Add comment on prompt.
- **POST /api/like/{promptId}:** Add like to prompt.
- **POST /api/save/{promptId}:** Save prompt.
## Error Handling
The API endpoints return error responses with code and message.
## Tribute
A special thanks to [JavaScript Mastery](https://www.youtube.com/@JavaScriptMastery) for their exceptional Next.js tutorial. Their guidance and resources were invaluable in bringing this project to life.