{"id":26542270,"url":"https://github.com/elyse502/deepseek-clone","last_synced_at":"2026-04-09T20:01:58.486Z","repository":{"id":283640162,"uuid":"950404029","full_name":"elyse502/deepseek-clone","owner":"elyse502","description":"Full Stack DeepSeek Clone Using Next JS With DeepSeek API | AI Project In Next Js","archived":false,"fork":false,"pushed_at":"2025-03-21T09:20:04.000Z","size":222,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-21T10:37:49.739Z","etag":null,"topics":["backend-development","clerk","clerk-authentication","front-end-development","mongodb-atlas","nextjs"],"latest_commit_sha":null,"homepage":"https://deepseek-clone-gold.vercel.app","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elyse502.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-18T05:30:32.000Z","updated_at":"2025-03-21T09:20:07.000Z","dependencies_parsed_at":"2025-03-21T10:37:58.946Z","dependency_job_id":"79b0bfef-08a7-40fe-a874-ce1953191a83","html_url":"https://github.com/elyse502/deepseek-clone","commit_stats":null,"previous_names":["elyse502/deepseek-clone"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elyse502%2Fdeepseek-clone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elyse502%2Fdeepseek-clone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elyse502%2Fdeepseek-clone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elyse502%2Fdeepseek-clone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elyse502","download_url":"https://codeload.github.com/elyse502/deepseek-clone/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244894308,"owners_count":20527678,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backend-development","clerk","clerk-authentication","front-end-development","mongodb-atlas","nextjs"],"created_at":"2025-03-22T02:15:39.162Z","updated_at":"2026-04-09T20:01:58.481Z","avatar_url":"https://github.com/elyse502.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DeepSeek Clone\n\nDeepSeek Clone is a web application designed to provide an interactive chat interface powered by **AI**. It allows users to engage in conversations, manage chats, and perform actions like renaming or deleting chats. The application is built using modern web technologies such as React, Next.js, and Node.js.\n\n## LIVE - DEMO 🌐\nVisit the 👉 [LINK 🔗](https://deepseek-clone-gold.vercel.app)\n\n## Features\n\n- **AI-Powered Chat**: Users can send prompts and receive responses from an AI model.\n- **Chat Management**: Users can rename or delete chats.\n- **Real-Time Updates**: Chat messages are updated dynamically in the UI.\n- **User Authentication**: Secure user authentication and session management.\n- **Responsive Design**: Optimized for both desktop and mobile devices.\n\n## Tech Stack\n\n- **Frontend**: React, Next.js\n- **Backend**: Node.js, Clerk\n- **Database**: MongoDB\n- **Styling**: Tailwind CSS\n- **State Management**: Context API\n- **Notifications**: React Hot Toast\n- **API Integration**: Axios\n\n## Folder Structure\n\n```groovy\ndeepseek-clone/\n├── app/\n│   ├── api/\n│   │   ├── chat/\n│   │   │   ├── ai/         # AI chat endpoint\n│   │   │   ├── rename/     # Rename chat endpoint\n│   │   │   └── delete/     # Delete chat endpoint\n│   └── clerk/              # Clerk webhook integration\n├── components/\n│   ├── ChatLabel.jsx       # Chat label component\n│   ├── PromptBox.jsx       # Chat input box component\n│   └── Sidebar.jsx         # Sidebar for chat navigation\n├── context/\n│   └── AppContext.jsx      # Global state management\n├── config/\n│   └── db.js               # MongoDB connection configuration\n├── models/\n│   └── User.js             # User model schema\n├── public/\n│   └── assets/             # Static assets (icons, images)\n├── styles/\n│   └── globals.css         # Global styles\n└── README.md               # Project documentation\n```\n\n## Installation\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/elyse502/deepseek-clone.git\n   cd deepseek-clone\n   ```\n\n2. Install dependencies:\n   ```bash\n   npm install\n   ```\n\n3. Set up environment variables:\n   Create a `.env` file in the root directory and add the following:\n   ```env\n   # 👇 Frontend (Public) Clerk Key – starts with pk_...\n   NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your-clerk-publishable-key\n\n   # 👇 Backend (Secret) Clerk Key – starts with sk_...\n   CLERK_SECRET_KEY=your-clerk-secret-key\n\n   # 👇 Your MongoDB connection string\n   MONGODB_URI=your-mongodb-connection-string\n\n   # 👇 Secret key used for signing webhooks (like SVIX)\n   SIGNING_SECRET=your-svix-signing-secret\n\n   # 👇 API key for DeepSeek or any AI/chat API service\n   DEEPSEEK_API_KEY=your-deepseek-api-key\n\n   ```\n\n4. Run the development server:\n   ```bash\n   npm run dev\n   ```\n\n5. Open the application in your browser:\n   ```\n   http://localhost:3000\n   ```\n\n## API Endpoints\n\n### `/api/chat/ai`\n- **Method**: POST\n- **Description**: Sends a user prompt to the AI model and retrieves a response.\n- **Request Body**:\n  ```json\n  {\n    \"chatId\": \"string\",\n    \"prompt\": \"string\"\n  }\n  ```\n- **Response**:\n  ```json\n  {\n    \"success\": true,\n    \"data\": {\n      \"content\": \"AI response\"\n    }\n  }\n  ```\n\n### `/api/chat/rename`\n- **Method**: POST\n- **Description**: Renames a chat.\n- **Request Body**:\n  ```json\n  {\n    \"chatId\": \"string\",\n    \"name\": \"string\"\n  }\n  ```\n- **Response**:\n  ```json\n  {\n    \"success\": true,\n    \"message\": \"Chat renamed successfully\"\n  }\n  ```\n\n### `/api/chat/delete`\n- **Method**: POST\n- **Description**: Deletes a chat.\n- **Request Body**:\n  ```json\n  {\n    \"chatId\": \"string\"\n  }\n  ```\n- **Response**:\n  ```json\n  {\n    \"success\": true,\n    \"message\": \"Chat deleted successfully\"\n  }\n  ```\n\n## Components\n\n### `ChatLabel.jsx`\n- Displays individual chat labels in the sidebar.\n- Allows renaming and deleting chats via a dropdown menu.\n\n### `PromptBox.jsx`\n- Provides a text area for users to input prompts.\n- Handles sending prompts to the AI and displaying responses.\n\n### `Sidebar.jsx`\n- Displays a list of chats.\n- Allows users to select a chat to view or interact with.\n\n## Context API\n\nThe `AppContext` provides global state management for the application, including:\n- `user`: Current logged-in user.\n- `chats`: List of user chats.\n- `selectedChat`: Currently selected chat.\n- `setChats`: Function to update the list of chats.\n- `setSelectedChat`: Function to update the selected chat.\n\n## Known Issues\n\n- Ensure the `selectedChat` state is properly initialized to avoid errors when accessing its properties.\n- Verify that the `/api/chat/rename` and `/api/chat/delete` endpoints are functioning correctly.\n\n## Contributing\n\n1. Fork the repository.\n2. Create a new branch:\n   ```bash\n   git checkout -b feature-name\n   ```\n3. Make your changes and commit them:\n   ```bash\n   git commit -m \"Add feature-name\"\n   ```\n4. Push to your branch:\n   ```bash\n   git push origin feature-name\n   ```\n5. Open a pull request.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](https://github.com/elyse502/deepseek-clone/blob/main/LICENSE) file for details.\n\n## Acknowledgments\n\n- [Next.js Documentation](https://nextjs.org/docs)\n- [React Documentation](https://reactjs.org/docs/getting-started.html)\n- [MongoDB Documentation](https://www.mongodb.com/docs/)\n- [Svix Webhooks](https://www.svix.com/)\n\n\n## 📞 Contact\nFor any questions or support, please contact:\n- [**NIYIBIZI Elysée**](https://linktr.ee/niyibizi_elysee)👨🏿‍💻 | [Github](https://github.com/elyse502) | [Linkedin](https://www.linkedin.com/in/niyibizi-elys%C3%A9e/) | [Twitter](https://twitter.com/Niyibizi_Elyse).\n- **Email**: \u003celyseniyibizi502@gmail.com\u003e\n\n[![LinkedIn](https://img.shields.io/badge/LinkedIn-0077B5?style=for-the-badge\u0026logo=linkedin\u0026logoColor=white)](https://www.linkedin.com/in/niyibizi-elys%C3%A9e/) [![@phenrysay](https://img.shields.io/badge/Twitter-1DA1F2?style=for-the-badge\u0026logo=twitter\u0026logoColor=white)](https://twitter.com/Niyibizi_Elyse) [![pH-7](https://img.shields.io/badge/GitHub-100000?style=for-the-badge\u0026logo=github\u0026logoColor=white)](https://github.com/elyse502)\n\n---\n\n\u003cdiv align=\"center\"\u003e\nMade with ❤️ by \u003cb\u003eElysée NIYIBIZI\u003c/b\u003e\n\u003c/div\u003e\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felyse502%2Fdeepseek-clone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felyse502%2Fdeepseek-clone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felyse502%2Fdeepseek-clone/lists"}