{"id":20834780,"url":"https://github.com/promptable/chat-bot-starter","last_synced_at":"2025-04-07T07:12:19.120Z","repository":{"id":64731678,"uuid":"577468612","full_name":"promptable/chat-bot-starter","owner":"promptable","description":"Chatbot starter with GPT3, Twilio, and React","archived":false,"fork":false,"pushed_at":"2023-10-04T21:37:10.000Z","size":336,"stargazers_count":237,"open_issues_count":32,"forks_count":97,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-03-31T05:08:22.424Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://chat-bot-starter.fly.dev/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/promptable.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2022-12-12T20:06:15.000Z","updated_at":"2024-07-14T23:55:40.000Z","dependencies_parsed_at":"2023-09-22T03:18:58.779Z","dependency_job_id":"ba651d7c-15b7-4bcf-8245-77115ef2045f","html_url":"https://github.com/promptable/chat-bot-starter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/promptable%2Fchat-bot-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/promptable%2Fchat-bot-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/promptable%2Fchat-bot-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/promptable%2Fchat-bot-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/promptable","download_url":"https://codeload.github.com/promptable/chat-bot-starter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247608153,"owners_count":20965952,"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":[],"created_at":"2024-11-18T00:20:47.613Z","updated_at":"2025-04-07T07:12:19.087Z","avatar_url":"https://github.com/promptable.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"🙂 🌈\n\n\n\u003cimg width=\"1342\" alt=\"Screen Shot 2022-12-13 at 11 25 51 AM\" src=\"https://user-images.githubusercontent.com/5430709/207388600-c59370c8-36e0-4c13-80e5-d355ebfbc07c.png\"\u003e\n\n\n## Join our discord!\nIf you have any questions post them here! This is still a WIP.\nhttps://discord.gg/SYmACWTf6V\n\n\n## Getting Started\nFor detailed instructions on setting up the project, check the 'Setup Guide' section. Make sure to fill out the .env file with necessary credentials. For details of each environment variable, refer to the 'Environment Variables' section.\n```\nOPENAI_API_KEY=\u003cYOUR KEY HERE\u003e\n```\n\n3. Generate and add NEXTAUTH_SECRET to `.env` file\n\n```\n# Next Auth\n# You can generate the secret via 'openssl rand -base64 32' on Linux\nNEXTAUTH_SECRET=\n```\n\n4. Install and run\n\n```\nyarn\nyarn dev\n```\n\n## System Overview\nThis application consists of a frontend and a backend system. The frontend is built with Next.js and Tailwind CSS. It handles rendering of the interface that users interact with. The backend handles requests from the frontend and interacts with the database. It is built with Express.js.\n\n## Architecture\nThe frontend and backend are separate entities. They communicate through APIs, with the backend offering RESTful APIs. The major API endpoints include '/api/projects' for projects-related functionalities, '/api/users' for handling user data, and '/api/auth' for authentication related tasks.\n\n```\nBelow is a conversation between a knowledgable, helpful, and witty AI assistant and a user, who has some questions about a topic.\nThe AI assistant is able to answer the user's questions and provide additional information about the topic. The AI assistant is able to\nkeep the conversation focused on the topic and provide relevant information to the user. The closer the AI agent can get to\nanswering the user's questions, the more helpful the AI agent will be to the user.\n\nCHAT HISTORY:\n{{input}}\nAssistant:\n```\n\n## Functionalities\nThe core features of this application include:\n- User registration and login\n- Project creation, update, and deletion\n- Browsing existing projects\n- Applying for projects\n- Reviewing applications for project owners\n\n\n\n\n## User Guides\nWe have several guides to help you make the most out of this project. They include how to setup your local development environment, how to deploy the application, and how to use the application as an intern, as a startup, or as a site administrator.\n\n\u003c!-- Removed content\n## How do I deploy this?\n\n## SMS Support with Twilio (Optional)\n\n## GPT3 Example Integration\n\n## TODOs/ Feature Requests\n\n--\u003e\n```\ntwilio phone-numbers:update PHONE_NUMBER --sms-url https://RANDOM_STRING.ngrok.io/messages\n```\n\nYou'll need the Twilio CLI installed. You'll need to \"upgrade\" to paid if you want to remove the Twilio branding from the SMS replies.\n\n### Dependencies\n\nInstall the dependencies:\n\n```bash\nnpm install\n```\n\n### Environment Variables\n\nCopy the `.env.example` file to `.env`:\n\n```bash\ncp .env.example .env\n```\n\nFill in your TWILIO and OPENAI Keys, and your personal PHONE_NUMBER.\n\n### Compile the TypeScript to JavaScript\n\nCompile the project:\n\n```bash\nnpm run build\n```\n\nNote that this runs the TypeScript compiler, `tsc`, you could also run `npx tsc` to get the same output.\n\nThe TypeScript project will be compiled into the `dist` directory. You can also continuously compile the project as it changes with:\n\n```bash\nnpm run watch\n```\n\n### Run the project\n\nStart the web server with:\n\n```bash\nnpm start\n```\n\n### Expose the local server with ngrok\n\nTo respond to an incoming webhook you will need a publicly available URL. [ngrok](https://ngrok.com) is a tool that can tunnel through from a public URL to your machine. Once you've [downloaded and installed ngrok](https://ngrok.com/download) you can run it like so:\n\n```bash\nngrok http 3000\n```\n\nThe ngrok terminal will show you a URL, like `https://RANDOM_STRING.ngrok.io`.\n\n### Connect your phone number to your app\n\nUsing the ngrok URL from the last part, you can set up your Twilio phone number with your application. [Edit your phone number](https://www.twilio.com/console/phone-numbers/incoming) and in the Messaging section, next to when \"A message comes in\" enter your ngrok URL with the path `/messages`.\n\n```\nhttps://RANDOM_STRING.ngrok.io/messages\n```\n\nSave the phone number and you are ready. Send your number a message and receive a reply. Type \"reset\" to reset the chat thread history and bdeing again.\n\n## GPT3 Example Integration\n\n```ts\nconst { Configuration, OpenAIApi } = require(\"openai\");\n\nconst configuration = new Configuration({\n  apiKey: process.env.OPENAI_API_KEY,\n});\nconst openai = new OpenAIApi(configuration);\n\nconst response = await openai.createCompletion({\n  model: \"text-davinci-003\",\n  prompt: \"Please reply to the chat below:\\n\",\n  temperature: 0.7,\n  max_tokens: 256,\n  top_p: 1,\n  frequency_penalty: 0,\n  presence_penalty: 0,\n});\n```\n\n## TODOs/ Feature Requests\n\nTODO: Add Voice Chats:\n- https://www.twilio.com/docs/voice/twiml/say/text-speech\n- https://www.twilio.com/blog/programmable-voice-javascript-quickstart-demo-node\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpromptable%2Fchat-bot-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpromptable%2Fchat-bot-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpromptable%2Fchat-bot-starter/lists"}