<<<<<<< HEAD
Welcome to the Direct AI repository! This application allows users to create, edit, search, and share prompts. Built with Next.js and MongoDB, the application leverages modern web technologies to provide a seamless user experience. Below, you'll find comprehensive information on the features, technologies used, and instructions for setting up the project locally.
- User Authentication: Secure login and registration functionality using NextAuth.
- Prompt Creation: Users can create new prompts with associated tags.
- Prompt Editing: Users can edit their existing prompts.
- Prompt Deletion: Users can delete their prompts.
- Search Functionality: Search prompts by tags, username, or keywords within the prompts.
- Profile Pages: Each user has a personalized profile page displaying their prompts.
- Responsive Design: Optimized for both desktop and mobile views.
- Next.js: React framework for server-side rendering and static site generation.
- MongoDB: NoSQL database for storing user and prompt data.
- Mongoose: ODM library for MongoDB and Node.js.
- NextAuth: Authentication library for Next.js applications.
- Tailwind CSS: Utility-first CSS framework for designing responsive user interfaces.
Follow these steps to install and run the project on your local machine:
- Node.js: Ensure you have Node.js installed. You can download it from Node.js official website.
- MongoDB: Ensure you have MongoDB installed and running. You can download it from MongoDB official website.
-
Clone the Repository
git clone https://github.com/your-username/prompt-sharing-app.git cd prompt-sharing-app
-
Install Dependencies
npm install
-
Set Up Environment Variables
Create a
.env.local
file in the root directory and add the following environment variables:NEXTAUTH_URL=http://localhost:3000 MONGODB_URI=your_mongodb_connection_string NEXTAUTH_SECRET=your_nextauth_secret
-
Run the Development Server
npm run dev
Open http://localhost:3000 in your browser to see the application.
- Code Quality: Use ESLint and Prettier for maintaining code quality and consistency.
- Commit Messages: Follow conventional commit message guidelines for better project management.
- Environment Variables: Keep sensitive information secure and avoid hardcoding credentials.
- Error Handling: Implement comprehensive error handling in your APIs and client-side code.
- Responsive Design: Ensure that your changes maintain the application's responsiveness across different devices.
Here's an overview of the project directory structure:
prompt-sharing-app/
├── components/
│ ├── Form.jsx
│ ├── Profile.jsx
│ ├── PromptCard.jsx
│ ├── PromptCardList.jsx
│ ├── Feed.jsx
│ ├── useFetchPosts.jsx
│ ├── useSearch.jsx
│ └── debounce.jsx
├── models/
│ └── prompt.js
├── pages/
│ ├── api/
│ │ ├── auth/
│ │ ├── prompt/
│ │ └── users/
│ ├── profile/
│ │ └── [id].jsx
│ ├── _app.js
│ ├── index.js
│ └── update-prompt.jsx
├── styles/
│ └── globals.css
├── utils/
│ └── database.js
├── .env.local
├── .eslintrc.js
├── .gitignore
├── next.config.js
├── package.json
└── README.md
We welcome contributions! Please read our Contributing Guidelines for details on the process for submitting pull requests to us.
This project is licensed under the MIT License. See the LICENSE file for details.
Thank you for using and contributing to the Prompt Sharing Application! If you have any questions or need further assistance, please feel free to open an issue or contact the repository maintainers.
AI Prompt Project
df2d1a759fdddd2cbddb466ce3f7e0c1c4e4a00c