From 3462ebef68abfef7973208732e0fcbdf2fd0656e Mon Sep 17 00:00:00 2001 From: Achanandhi M <110651321+Achanandhi-M@users.noreply.github.com> Date: Tue, 17 Jun 2025 16:14:16 +0530 Subject: [PATCH 1/4] Add New Engineering prompts (#1) * add: new engg-prompts Signed-off-by: Achanandhi-M * add: few engg-prompts Signed-off-by: Achanandhi-M * add: few engg-prompts Signed-off-by: Achanandhi-M * add: few engg-prompts Signed-off-by: Achanandhi-M * add: few engg-prompts Signed-off-by: Achanandhi-M * add: few engg-prompts Signed-off-by: Achanandhi-M --------- Signed-off-by: Achanandhi-M Signed-off-by: Swapnashree Sahoo --- LICENSE | 201 +++++++++++++++++++ README.md | 498 +++++++++++++++++++++++++++++++++++++++++++++++- contributing.md | 56 ++++++ 3 files changed, 754 insertions(+), 1 deletion(-) create mode 100644 LICENSE create mode 100644 contributing.md diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/README.md b/README.md index 4fc9d34..477bc01 100644 --- a/README.md +++ b/README.md @@ -1 +1,497 @@ -#adding prompts for engineering +# Engineering Prompts + +Welcome to the **Engineering Prompts** repository! This repository contains a collection of **AI prompt chains** organized by different domains, primarily for assisting developers in various tasks such as code refactoring, CI/CD setup, database management, cloud, Kubernetes deployment, web development, API Development, security, and more. + +Each prompt chain is designed to build context for ChatGPT before executing a task. They can be used in **ChatGPT Queue** for bulk prompting, job, or task-focused automation. + +## Domains Covered + +This repository contains prompt chains for the following domains: + +1. **Code Refactoring & Development** +2. **CI/CD & DevOps** +3. **Database Management** +4. **Cloud & Kubernetes** +5. **Full-Stack Development** +6. **UX/UI & Design** +7. **Security & Authentication** +8. **Event-Driven Architecture & Integration** +9. **Content Creation & Marketing** +10. **Infrastructure & System Administration** +11. **System Monitoring & Debugging** +12. **Web Development** +13. **API Development** + +--- + +## Use Cases and Prompts + +### **1. Code Refactoring & Development** + +* **Refactor Code for Better Readability** + + ```text + "Please review the provided code and identify areas where readability can be improved. Focus on simplifying complex functions, improving variable names, and removing redundant code. Return the refactored code and explain the changes made to improve readability." + ``` + +* **Translate Code from One Language to Another** + + ```text + "Translate the provided code from {source_language} to {target_language}. Ensure that the functionality remains equivalent. Highlight major differences in syntax or constructs between the two languages and explain the changes." + ``` + +* **Create Documentation from Code** + + ```text + "Extract the necessary information from the provided code to create detailed documentation. This should include explanations for functions, methods, classes, and the purpose of the code. Return the documentation in markdown format." + ``` + +* **Provide Code Explanations** + + ```text + "Please analyze the provided code and explain its functionality step-by-step. Include explanations for each major part of the code and why it’s necessary. Keep the explanation clear and concise." + ``` + +* **Generate Git Commit Messages** + + ```text + "Based on the code changes, generate concise and meaningful Git commit messages. Ensure the messages describe what was changed and why, and follow conventional commit standards." + ``` + +* **Debug Code** + + ```text + "Please review the provided code and the accompanying error message. Identify the cause of the error, suggest possible fixes, and return the corrected code with explanations of the changes made." + ``` + +* **Write Regular Expressions** + + ```text + "Create a regular expression for {use_case}. For example, to validate email addresses, generate a regex that matches valid email formats. Return the regular expression and explain how it works." + ``` + +* **Generate Boilerplate Code** + + ```text + "Generate boilerplate code for a {project_type} using {programming_language}. The code should include basic setup, functions, and structure for a starting point. Return the full code with instructions for customization." + ``` + +* **Automate Code Formatting** + + ```text + "Set up an automatic code formatting system using {tool}. Configure it to run on each commit or via pre-commit hooks. Return the necessary configuration and explain how it integrates into the workflow." + ``` + +* **Explain Data Structures and Algorithms** + + ```text + "Explain the following data structure/algorithm: {data_structure/algorithm}. Include its time complexity, use cases, and any common implementations. Provide code examples where applicable." + ``` + +* **Generate Mock Data** + + ```text + "Generate mock data for the following schema: {data_schema}. Include a variety of realistic values for testing purposes. Return the data in JSON, CSV, or another format as requested." + ``` + +* **Create Code for a New Feature** + + ```text + "Please create code to implement the following feature: {feature_description}. The feature should be fully functional and integrate smoothly with the existing codebase. Return the implementation along with an explanation." + ``` + +* **Suggest Performance Optimizations** + + ```text + "Analyze the provided code for performance bottlenecks. Suggest optimizations such as reducing time complexity, memory usage, or optimizing algorithms. Return the updated code with explanations of the optimizations." + ``` + +* **Generate Build Scripts** + + ```text + "Create a build script for automating the build process of a {project_type} using {build_tool}. The script should include steps for compiling, packaging, and versioning. Return the build script along with setup instructions." + ``` + +* **Offer Security Best Practices** + + ```text + "Provide a list of security best practices for {application_type}. Focus on areas like authentication, authorization, data protection, and secure coding practices. Return actionable advice with examples where necessary." + ``` + +* **Assist in Code Reviews** + + ```text + "Review the provided code and provide feedback. Focus on aspects like readability, performance, security, and maintainability. Suggest improvements and explain the rationale behind each recommendation." + ``` + +* **Test for Compatibility After Upgrading Node.js Version** + + ```text + "After upgrading Node.js from version 14 to 18, use Keploy to run automated tests to ensure that the application is working as expected. Set up Keploy to perform integration tests and verify that the backend, APIs, and frontend components are compatible with the new Node.js version. The tests should focus on key areas such as API responses, performance, and compatibility with external dependencies that may have been affected by the Node.js upgrade. Ensure that Keploy compares the results with the previous behavior recorded under Node.js 14 to detect any regressions or issues introduced by the upgrade. Return the Keploy test configuration, test cases, and results." + ``` + +* **Integrate Third-Party Services** + + ```text + "Integrate {third_party_service} into the existing project. Provide step-by-step instructions for setup, authentication, and API interaction. Return the integration code with explanations of how it works." + ``` + +* **Write a Dockerfile for the Application** + + ```text + "Create a Dockerfile to containerize the provided application. Ensure that the Dockerfile sets up the environment correctly, installs dependencies, and exposes the necessary ports. Return the Dockerfile with explanations." + ``` + +* **Provide UX/UI Design Advice** + + ```text + "Provide UX/UI design recommendations for the provided {website/app}. Focus on improving usability, accessibility, and aesthetics. Return a list of specific design improvements with examples where necessary." + ``` + +* **Suggest Testing Strategies** + + ```text + "Suggest a comprehensive testing strategy for {project_type}. The strategy should include unit tests, integration tests, and end-to-end tests. Provide recommendations for testing frameworks and tools, along with examples." + ``` + +* **Test for Regressions After Refactoring Code with Keploy** + + ```text + "After refactoring the code, use Keploy to run automated tests to check if any regressions have been introduced. Set up Keploy to verify that the refactored code behaves as expected, ensuring that all existing functionalities remain intact. The tests should include integration tests to verify that API endpoints, data handling, and user interactions still function properly. Ensure that Keploy is set to compare the current behavior with previously recorded test cases to detect any discrepancies or regressions. Return the Keploy test configuration, test cases, and results showing the behavior of the refactored code." + ``` + +--- + +### **2. CI/CD & DevOps** + +* **Set up CI/CD Pipelines** + + ```text + "Help set up a CI/CD pipeline for the project using {CI_tool}. The pipeline should include stages for building, testing, and deploying the application. Provide configuration files and explanations of each stage." + ``` + +* **Automate Code Formatting** + + ```text + "Set up an automated code formatting system using {tool}. Configure it to run on each commit or via pre-commit hooks. Return the necessary configuration and explain how it integrates into the workflow." + ``` + +* **Set up Cloud Cost Optimization Strategies** + + ```text + "Provide strategies for optimizing cloud costs in {cloud_provider}. Focus on areas like reserved instances, auto-scaling, and rightsizing. Return recommendations and examples of how to implement them." + ``` + +* **Create Docker Compose Configurations** + + ```text + "Create a Docker Compose configuration file to set up {services}. The configuration should include service dependencies, environment variables, and port mappings. Return the Docker Compose YAML with an explanation." + ``` + +* **Generate Cron Jobs for Task Scheduling** + + ```text + "Write cron jobs to schedule tasks on a Linux system. The tasks should run at {interval} and execute {command}. Return the cron job configurations with explanations of each field." + ``` + +* **Implement Automated Security Testing in CI/CD** + + ```text + "Integrate automated security testing tools like {security_tool} into the CI/CD pipeline. Configure the pipeline to run security checks on each commit or pull request. Return the updated pipeline configuration." + ``` + +* **Set up Serverless Architecture with Google Cloud Functions** + + ```text + "Create a serverless architecture using Google Cloud Functions for {task}. The functions should trigger based on specific events and return the necessary code with setup instructions." + ``` + +* **Write Infrastructure as Code (IaC) for AWS with CloudFormation** + + ```text + "Write infrastructure-as-code (IaC) for AWS using CloudFormation. Automate the provisioning of resources such as EC2, RDS, and S3 for {application}. Return the CloudFormation templates with explanations." + ``` + +* **Create a Custom Shell Script for System Administration** + + ```text + "Create a custom shell script that automates {system_task} such as backups, log rotations, or user management. The script should be efficient and handle errors gracefully. Return the shell script with usage instructions." + ``` + +* **Create an Event-Driven Architecture with Kafka** + + ```text + "Set up an event-driven architecture with Kafka. Define the Kafka topics, producers, and consumers to handle real-time data processing. Return the code with configuration details." + ``` + +* **Implement Data Preprocessing for Machine Learning** + + ```text + "Implement data preprocessing steps for machine learning. This includes handling missing data, scaling features, and encoding categorical variables. Return the preprocessing code and explain each step." + ``` + +* **Implement Serverless Functions on AWS Lambda** + + ```text + "Set up serverless functions using AWS Lambda to perform {task}. Include setup instructions for the trigger and return the Lambda function code." + ``` + +* **Set up Google Analytics for Portfolio Tracking** + + ```text + "Set up Google Analytics tracking for my portfolio website. Provide the steps for adding tracking code and configuring goals. Return the setup instructions." + ``` + +* **Optimize a Docker-Based Development Environment** + + ```text + "Optimize the provided Docker development environment. Focus on reducing build time, improving caching, and streamlining container configurations. Return the optimized Dockerfile and Docker Compose file." + ``` + +--- + +### **3. Database Management** + +* **Generate SQL Queries** + + ```text + "Given the database schema and the following requirements (e.g., 'Find all users who joined after 2020'), generate an appropriate SQL query. Return the SQL query and explain its logic." + ``` + +* **Explain Database Design** + + ```text + "Please review the database schema provided and explain its design choices. Discuss normalization, relationships between tables, and indexing strategies. Suggest improvements for scalability and performance." + ``` + +* **Design a Normalized Relational Database Schema** + + ```text + "Design a relational database schema for {application}. Ensure that it is normalized up to 3NF, with proper primary/foreign keys and indexes. Return the schema in SQL format." + ``` + +* **Set Up a PostgreSQL Database with Docker** + + ```text + "Set up a PostgreSQL database in a Docker container. Include steps for configuring the database, creating the schema, and connecting to the container. Return the Dockerfile and Docker Compose configuration." + ``` + +* **Implement Database Sharding** + + ```text + "Implement database sharding for {database_name}. Define the sharding strategy and partition the data across multiple shards. Return the setup and configuration details." + ``` + +* **Create and Optimize a NoSQL Database (MongoDB)** + + ```text + "Set up and optimize a MongoDB database for {application}. Include recommendations for indexing, query optimization, and data modeling. Return the schema and optimization steps." + ``` + +* **Optimize Database Queries for Performance** + + ```text + "Analyze the provided database queries and suggest performance optimizations. This may include indexing, query refactoring, and reducing the complexity of joins. Return the optimized query with explanations." + ``` + +* **Implement Multi-Threading and Concurrency Concepts** + + ```text + "Explain the concepts of multi-threading and concurrency in {programming_language}. Focus on thread management, race conditions, and synchronization techniques. Provide code examples where applicable." + ``` + +--- + +### **4. Cloud & Kubernetes** + +* **Set Up Kubernetes Cluster on AWS EKS** + + ```text + "Please guide the setup of a Kubernetes cluster using Amazon EKS. Include steps for configuring the cluster, setting up node groups, and connecting kubectl. Return the steps and configuration files." + ``` + +* **Implement Persistent Storage in Kubernetes Using StatefulSets** + + ```text + "Set up persistent storage in Kubernetes using StatefulSets. Configure PersistentVolumeClaims (PVC) and explain how it ensures data persistence. Return the YAML configuration files." + ``` + +* **Set Up Cloud Storage with Amazon S3** + + ```text + "Please provide the steps for setting up cloud storage using Amazon S3. Include how to create a bucket, set permissions, and manage files programmatically via AWS SDKs. Return the necessary code examples for integration." + ``` + +--- + +### **5. Full-Stack Development** + +* **Develop a Full-Stack Web Application Using Django and React** + + ```text + "Create a full-stack web application with Django as the backend and React for the frontend. Implement user authentication, RESTful API communication, and a simple CRUD interface. Return the project structure and code snippets." + ``` + +* **Integrate a Payment Gateway (Stripe) in a Full-Stack App** + + ```text + "Integrate Stripe for handling payments in a full-stack application with Django and React. Set up the backend to handle payments and the frontend to interact with Stripe's API. Return the code for integration." + ``` + +* **Create a RESTful API with Express.js** + + ```text + "Help me set up a RESTful API using Express.js. Define the necessary routes and controllers to support CRUD operations for a {resource}. Return the implementation of the API with explanations for each endpoint." + ``` + +* **Implement Real-Time Updates with WebSockets** + + ```text + "Set up real-time updates in the application using WebSockets. Provide the necessary code for both the server (using socket.io or similar) and the frontend to enable live updates." + ``` + +* **Test Backend and Frontend for Regression Using Keploy** + + ```text + "Set up Keploy in your full-stack application to test both the backend and frontend after an update. Configure Keploy for automatic integration testing, focusing on testing API endpoints, data handling, and the interaction between the frontend and backend. Ensure that Keploy is set to capture all changes in the API response, including edge cases, and validate that the frontend works correctly with the updated backend. Return the setup configuration and steps to trigger Keploy for testing." + ``` + +--- + +### **6. UX/UI & Design** + +* **Provide UX/UI Design Advice** + + ```text + "Provide UX/UI design recommendations for the provided {website/app}. Focus on improving usability, accessibility, and aesthetics. Return a list of specific design improvements with examples where necessary." + ``` + +--- + +### **7. Security & Authentication** + +* **Offer Security Best Practices** + + ```text + "Provide a list of security best practices for {application_type}. Focus on areas like authentication, authorization, data protection, and secure coding practices. Return actionable advice with examples where necessary." + ``` + +* **Implement JWT-Based Authentication** + + ```text + "Implement JSON Web Token (JWT) authentication in the provided application. The system should handle token generation, validation, and secure access to protected routes. Return the code with explanations." + ``` + +--- + +### **8. Event-Driven Architecture & Integration** + +* **Set Up an Event-Driven Architecture with Kafka** + + ```text + "Set up an event-driven architecture with Kafka. Define the Kafka topics, producers, and consumers to handle real-time data processing. Return the code with configuration details." + ``` + +* **Help Integrate Third-Party Services** + + ```text + "Integrate {third_party_service} into the existing project. Provide step-by-step instructions for setup, authentication, and API interaction. Return the integration code with explanations of how it works." + ``` + +--- + +### **9. Content Creation & Marketing** + +* **Create a Personal Portfolio Website** + + ```text + "Help me build a personal portfolio website. The site should include sections for my bio, projects, skills, and contact information. Make sure it’s responsive and easy to navigate. Return the basic HTML/CSS/JS code for the website." + ``` + +* **Write SEO-Optimized Blog Content** + + ```text + "Generate a blog post on {topic} optimized for SEO. Use keyword research to include high-traffic keywords naturally, structure the post with headings and subheadings, and ensure it is engaging and informative. Return the content with SEO suggestions." + ``` + +* **Generate LinkedIn Summary and Job Descriptions** + + ```text + "Generate a compelling LinkedIn summary and job description based on the following details: {job_title}, {skills}, {experience}. Ensure the summary is concise, professional, and highlights key achievements." + ``` + +--- + +### **10. Infrastructure & System Administration** + +* **Create an Infrastructure as Code (IaC) for AWS with CloudFormation** + + ```text + "Write infrastructure-as-code (IaC) for AWS using CloudFormation. Automate the provisioning of resources such as EC2, RDS, and S3 for {application}. Return the CloudFormation templates with explanations." + ``` + +* **Set Up Serverless Architecture with Google Cloud Functions** + + ```text + "Create a serverless architecture using Google Cloud Functions for {task}. The functions should trigger based on specific events and return the necessary code with setup instructions." + ``` + +--- + +### **11. System Monitoring & Debugging** + +* **Debug Performance Issues in Production Systems** + + ```text + "Analyze the performance of the production system and identify bottlenecks. Suggest and implement optimizations to improve speed, reduce memory usage, and increase scalability. Return the optimized code and explanations." + ``` + +--- + +### **12. Web Development** + +* **Write Tests for Front-End Components** + + ```text + "Write unit and integration tests for the provided front-end components using {testing_framework}. Ensure the tests cover all major use cases and edge cases. Return the test code with explanations." + ``` + +--- + +### **13. API Development** + +* **Generate OpenAPI Schema from Source Code** + + ```text + "Given the following source code for a RESTful API implemented in {programming_language} with endpoints {list_of_endpoints}, generate an OpenAPI 3.0 schema that describes the API. The schema should include paths, request/response parameters, status codes, authentication methods, and other relevant details. Return the complete OpenAPI schema in YAML format." + ``` + +* **Generate Curl Commands for Testing OpenAPI Endpoints** + + ```text + "For the OpenAPI schema provided, generate `curl` commands to test the endpoints. Include examples for GET, POST, PUT, and DELETE requests. The `curl` commands should include the correct headers, body content (for POST/PUT), and any required authentication tokens (if applicable)." + ``` + +* **Generate OpenAPI Schema for a Custom API with Source Code** + + ```text + "Given the following source code for an API implemented in {programming_language}, generate the OpenAPI schema for this API. The schema should cover all routes, parameters, request/response types, and status codes. Include both request body and query parameters where applicable, and provide the schema in YAML format." + ``` + +* **Create OpenAPI Schema and Curl Commands for a CRUD API** + + ```text + "Create an OpenAPI schema for a simple CRUD API with the following endpoints: `GET /items`, `POST /items`, `PUT /items/{id}`, and `DELETE /items/{id}`. Based on the schema, generate `curl` commands to test these endpoints with sample data, including headers and request bodies as necessary." + ``` + +* **Generate OpenAPI Schema for a Node.js API and Curl Examples** + + ```text + "Given the following source code for a Node.js API using Express, generate the corresponding OpenAPI 3.0 schema. Then, create `curl` commands to test each endpoint in the API, covering all HTTP methods (GET, POST, PUT, DELETE) and including sample request bodies for each method." + ``` + +* **Keploy CI/CD Integration Setup** + + ```text + "Set up a CI/CD pipeline to automatically run Keploy tests as part of the deployment process. Include configuration for GitHub Actions or Jenkins to run tests whenever new code is pushed to the repository." + ``` \ No newline at end of file diff --git a/contributing.md b/contributing.md new file mode 100644 index 0000000..19a76ad --- /dev/null +++ b/contributing.md @@ -0,0 +1,56 @@ +# Contributing to Engineering Prompts + +Thank you for considering contributing to **Engineering Prompts**! We welcome contributions from everyone, and there are a few guidelines to make the process smooth and easy. + +## How to Contribute + +1. **Fork the Repository:** + Start by forking the repository to your GitHub account and cloning it to your local machine. + +2. **Create a New Branch:** + Create a new branch for your contribution, such as `feature/your-feature-name`. + +3. **Add Your Prompt Chain:** + Navigate to the appropriate section in **README.md** based on the domain your prompt belongs to. If your prompt doesn't fit into any of the existing sections, feel free to create a new one under the corresponding category. + +4. **Update the README:** + Provide a clear description for your prompt chain. Use the format: + + ``` + ### **{Domain Name}** + + - **{Use Case Name}** + "{Prompt Chain}" + ``` + +5. **Test Your Changes:** + Ensure your prompt is correctly formatted and works as expected. + +6. **Submit a Pull Request:** + After making your changes, push them to your fork and create a pull request. Be sure to include a description of your changes and why you think it adds value to the repository. + +## Guidelines + +* **Be Clear:** Ensure the prompt chain is easy to follow and provides clear context. +* **Be Concise:** Keep the prompts concise and to the point, avoiding unnecessary fluff. +* **Be Descriptive:** Provide enough information so someone unfamiliar with the task can understand and use the prompt effectively. + +--- + +## Adding a New Use Case + +If you're adding a completely new use case that doesn't fit into the existing categories, follow these steps: + +1. **Find the right domain** + If it fits into an existing category, place it under the right domain section in **README.md**. + +2. **Create a new section** + If it's a completely new use case and domain, add a new section at the bottom of the **README.md**. + +--- + +## Thank You! + +We truly appreciate your contributions! By helping us expand and improve this collection of prompts, you’re making it easier for developers to work more efficiently and with less effort. + +Happy Prompting! 🚀 \ No newline at end of file From 73ff550c891e0141c44b5da216de56c6c0bbaf00 Mon Sep 17 00:00:00 2001 From: Swapnashree Sahoo Date: Wed, 18 Jun 2025 22:26:39 +0530 Subject: [PATCH 2/4] add: prompts to Code Refactoring domain and separate readme for each domain and direct access from main readme Signed-off-by: Swapnashree Sahoo --- README.md | 508 +------------------- domains/api-development/README.md | 37 ++ domains/ci-cd-devops/README.md | 86 ++++ domains/cloud-kubernetes/README.md | 20 + domains/code-refactoring/README.md | 133 +++++ domains/content-marketing/README.md | 21 + domains/database-management/README.md | 50 ++ domains/event-driven-architecture/README.md | 13 + domains/full-stack-development/README.md | 31 ++ domains/infrastructure-admin/README.md | 13 + domains/security-authentication/README.md | 14 + domains/system-monitoring/README.md | 7 + domains/ux-ui-design/README.md | 7 + domains/web-development/README.md | 7 + 14 files changed, 456 insertions(+), 491 deletions(-) create mode 100644 domains/api-development/README.md create mode 100644 domains/ci-cd-devops/README.md create mode 100644 domains/cloud-kubernetes/README.md create mode 100644 domains/code-refactoring/README.md create mode 100644 domains/content-marketing/README.md create mode 100644 domains/database-management/README.md create mode 100644 domains/event-driven-architecture/README.md create mode 100644 domains/full-stack-development/README.md create mode 100644 domains/infrastructure-admin/README.md create mode 100644 domains/security-authentication/README.md create mode 100644 domains/system-monitoring/README.md create mode 100644 domains/ux-ui-design/README.md create mode 100644 domains/web-development/README.md diff --git a/README.md b/README.md index 477bc01..f052166 100644 --- a/README.md +++ b/README.md @@ -1,497 +1,23 @@ -# Engineering Prompts +# 🚀 Engineering Prompts -Welcome to the **Engineering Prompts** repository! This repository contains a collection of **AI prompt chains** organized by different domains, primarily for assisting developers in various tasks such as code refactoring, CI/CD setup, database management, cloud, Kubernetes deployment, web development, API Development, security, and more. +Welcome to the **Engineering Prompts** repository! This repo contains AI prompt chains across various engineering domains to assist developers with automation, refactoring, documentation, DevOps, and more. -Each prompt chain is designed to build context for ChatGPT before executing a task. They can be used in **ChatGPT Queue** for bulk prompting, job, or task-focused automation. - -## Domains Covered - -This repository contains prompt chains for the following domains: - -1. **Code Refactoring & Development** -2. **CI/CD & DevOps** -3. **Database Management** -4. **Cloud & Kubernetes** -5. **Full-Stack Development** -6. **UX/UI & Design** -7. **Security & Authentication** -8. **Event-Driven Architecture & Integration** -9. **Content Creation & Marketing** -10. **Infrastructure & System Administration** -11. **System Monitoring & Debugging** -12. **Web Development** -13. **API Development** - ---- - -## Use Cases and Prompts - -### **1. Code Refactoring & Development** - -* **Refactor Code for Better Readability** - - ```text - "Please review the provided code and identify areas where readability can be improved. Focus on simplifying complex functions, improving variable names, and removing redundant code. Return the refactored code and explain the changes made to improve readability." - ``` - -* **Translate Code from One Language to Another** - - ```text - "Translate the provided code from {source_language} to {target_language}. Ensure that the functionality remains equivalent. Highlight major differences in syntax or constructs between the two languages and explain the changes." - ``` - -* **Create Documentation from Code** - - ```text - "Extract the necessary information from the provided code to create detailed documentation. This should include explanations for functions, methods, classes, and the purpose of the code. Return the documentation in markdown format." - ``` - -* **Provide Code Explanations** - - ```text - "Please analyze the provided code and explain its functionality step-by-step. Include explanations for each major part of the code and why it’s necessary. Keep the explanation clear and concise." - ``` - -* **Generate Git Commit Messages** - - ```text - "Based on the code changes, generate concise and meaningful Git commit messages. Ensure the messages describe what was changed and why, and follow conventional commit standards." - ``` - -* **Debug Code** - - ```text - "Please review the provided code and the accompanying error message. Identify the cause of the error, suggest possible fixes, and return the corrected code with explanations of the changes made." - ``` - -* **Write Regular Expressions** - - ```text - "Create a regular expression for {use_case}. For example, to validate email addresses, generate a regex that matches valid email formats. Return the regular expression and explain how it works." - ``` - -* **Generate Boilerplate Code** - - ```text - "Generate boilerplate code for a {project_type} using {programming_language}. The code should include basic setup, functions, and structure for a starting point. Return the full code with instructions for customization." - ``` - -* **Automate Code Formatting** - - ```text - "Set up an automatic code formatting system using {tool}. Configure it to run on each commit or via pre-commit hooks. Return the necessary configuration and explain how it integrates into the workflow." - ``` - -* **Explain Data Structures and Algorithms** - - ```text - "Explain the following data structure/algorithm: {data_structure/algorithm}. Include its time complexity, use cases, and any common implementations. Provide code examples where applicable." - ``` - -* **Generate Mock Data** - - ```text - "Generate mock data for the following schema: {data_schema}. Include a variety of realistic values for testing purposes. Return the data in JSON, CSV, or another format as requested." - ``` - -* **Create Code for a New Feature** - - ```text - "Please create code to implement the following feature: {feature_description}. The feature should be fully functional and integrate smoothly with the existing codebase. Return the implementation along with an explanation." - ``` - -* **Suggest Performance Optimizations** - - ```text - "Analyze the provided code for performance bottlenecks. Suggest optimizations such as reducing time complexity, memory usage, or optimizing algorithms. Return the updated code with explanations of the optimizations." - ``` - -* **Generate Build Scripts** - - ```text - "Create a build script for automating the build process of a {project_type} using {build_tool}. The script should include steps for compiling, packaging, and versioning. Return the build script along with setup instructions." - ``` - -* **Offer Security Best Practices** - - ```text - "Provide a list of security best practices for {application_type}. Focus on areas like authentication, authorization, data protection, and secure coding practices. Return actionable advice with examples where necessary." - ``` - -* **Assist in Code Reviews** - - ```text - "Review the provided code and provide feedback. Focus on aspects like readability, performance, security, and maintainability. Suggest improvements and explain the rationale behind each recommendation." - ``` - -* **Test for Compatibility After Upgrading Node.js Version** - - ```text - "After upgrading Node.js from version 14 to 18, use Keploy to run automated tests to ensure that the application is working as expected. Set up Keploy to perform integration tests and verify that the backend, APIs, and frontend components are compatible with the new Node.js version. The tests should focus on key areas such as API responses, performance, and compatibility with external dependencies that may have been affected by the Node.js upgrade. Ensure that Keploy compares the results with the previous behavior recorded under Node.js 14 to detect any regressions or issues introduced by the upgrade. Return the Keploy test configuration, test cases, and results." - ``` - -* **Integrate Third-Party Services** - - ```text - "Integrate {third_party_service} into the existing project. Provide step-by-step instructions for setup, authentication, and API interaction. Return the integration code with explanations of how it works." - ``` - -* **Write a Dockerfile for the Application** - - ```text - "Create a Dockerfile to containerize the provided application. Ensure that the Dockerfile sets up the environment correctly, installs dependencies, and exposes the necessary ports. Return the Dockerfile with explanations." - ``` - -* **Provide UX/UI Design Advice** - - ```text - "Provide UX/UI design recommendations for the provided {website/app}. Focus on improving usability, accessibility, and aesthetics. Return a list of specific design improvements with examples where necessary." - ``` - -* **Suggest Testing Strategies** - - ```text - "Suggest a comprehensive testing strategy for {project_type}. The strategy should include unit tests, integration tests, and end-to-end tests. Provide recommendations for testing frameworks and tools, along with examples." - ``` - -* **Test for Regressions After Refactoring Code with Keploy** - - ```text - "After refactoring the code, use Keploy to run automated tests to check if any regressions have been introduced. Set up Keploy to verify that the refactored code behaves as expected, ensuring that all existing functionalities remain intact. The tests should include integration tests to verify that API endpoints, data handling, and user interactions still function properly. Ensure that Keploy is set to compare the current behavior with previously recorded test cases to detect any discrepancies or regressions. Return the Keploy test configuration, test cases, and results showing the behavior of the refactored code." - ``` +Each domain has its own set of prompts in separate folders. Click any domain below to explore. --- -### **2. CI/CD & DevOps** - -* **Set up CI/CD Pipelines** - - ```text - "Help set up a CI/CD pipeline for the project using {CI_tool}. The pipeline should include stages for building, testing, and deploying the application. Provide configuration files and explanations of each stage." - ``` - -* **Automate Code Formatting** - - ```text - "Set up an automated code formatting system using {tool}. Configure it to run on each commit or via pre-commit hooks. Return the necessary configuration and explain how it integrates into the workflow." - ``` - -* **Set up Cloud Cost Optimization Strategies** - - ```text - "Provide strategies for optimizing cloud costs in {cloud_provider}. Focus on areas like reserved instances, auto-scaling, and rightsizing. Return recommendations and examples of how to implement them." - ``` - -* **Create Docker Compose Configurations** - - ```text - "Create a Docker Compose configuration file to set up {services}. The configuration should include service dependencies, environment variables, and port mappings. Return the Docker Compose YAML with an explanation." - ``` - -* **Generate Cron Jobs for Task Scheduling** - - ```text - "Write cron jobs to schedule tasks on a Linux system. The tasks should run at {interval} and execute {command}. Return the cron job configurations with explanations of each field." - ``` - -* **Implement Automated Security Testing in CI/CD** - - ```text - "Integrate automated security testing tools like {security_tool} into the CI/CD pipeline. Configure the pipeline to run security checks on each commit or pull request. Return the updated pipeline configuration." - ``` - -* **Set up Serverless Architecture with Google Cloud Functions** - - ```text - "Create a serverless architecture using Google Cloud Functions for {task}. The functions should trigger based on specific events and return the necessary code with setup instructions." - ``` - -* **Write Infrastructure as Code (IaC) for AWS with CloudFormation** - - ```text - "Write infrastructure-as-code (IaC) for AWS using CloudFormation. Automate the provisioning of resources such as EC2, RDS, and S3 for {application}. Return the CloudFormation templates with explanations." - ``` - -* **Create a Custom Shell Script for System Administration** - - ```text - "Create a custom shell script that automates {system_task} such as backups, log rotations, or user management. The script should be efficient and handle errors gracefully. Return the shell script with usage instructions." - ``` - -* **Create an Event-Driven Architecture with Kafka** - - ```text - "Set up an event-driven architecture with Kafka. Define the Kafka topics, producers, and consumers to handle real-time data processing. Return the code with configuration details." - ``` - -* **Implement Data Preprocessing for Machine Learning** - - ```text - "Implement data preprocessing steps for machine learning. This includes handling missing data, scaling features, and encoding categorical variables. Return the preprocessing code and explain each step." - ``` - -* **Implement Serverless Functions on AWS Lambda** - - ```text - "Set up serverless functions using AWS Lambda to perform {task}. Include setup instructions for the trigger and return the Lambda function code." - ``` - -* **Set up Google Analytics for Portfolio Tracking** - - ```text - "Set up Google Analytics tracking for my portfolio website. Provide the steps for adding tracking code and configuring goals. Return the setup instructions." - ``` - -* **Optimize a Docker-Based Development Environment** - - ```text - "Optimize the provided Docker development environment. Focus on reducing build time, improving caching, and streamlining container configurations. Return the optimized Dockerfile and Docker Compose file." - ``` - ---- - -### **3. Database Management** - -* **Generate SQL Queries** - - ```text - "Given the database schema and the following requirements (e.g., 'Find all users who joined after 2020'), generate an appropriate SQL query. Return the SQL query and explain its logic." - ``` - -* **Explain Database Design** - - ```text - "Please review the database schema provided and explain its design choices. Discuss normalization, relationships between tables, and indexing strategies. Suggest improvements for scalability and performance." - ``` - -* **Design a Normalized Relational Database Schema** - - ```text - "Design a relational database schema for {application}. Ensure that it is normalized up to 3NF, with proper primary/foreign keys and indexes. Return the schema in SQL format." - ``` - -* **Set Up a PostgreSQL Database with Docker** - - ```text - "Set up a PostgreSQL database in a Docker container. Include steps for configuring the database, creating the schema, and connecting to the container. Return the Dockerfile and Docker Compose configuration." - ``` - -* **Implement Database Sharding** - - ```text - "Implement database sharding for {database_name}. Define the sharding strategy and partition the data across multiple shards. Return the setup and configuration details." - ``` - -* **Create and Optimize a NoSQL Database (MongoDB)** - - ```text - "Set up and optimize a MongoDB database for {application}. Include recommendations for indexing, query optimization, and data modeling. Return the schema and optimization steps." - ``` - -* **Optimize Database Queries for Performance** - - ```text - "Analyze the provided database queries and suggest performance optimizations. This may include indexing, query refactoring, and reducing the complexity of joins. Return the optimized query with explanations." - ``` - -* **Implement Multi-Threading and Concurrency Concepts** - - ```text - "Explain the concepts of multi-threading and concurrency in {programming_language}. Focus on thread management, race conditions, and synchronization techniques. Provide code examples where applicable." - ``` - ---- - -### **4. Cloud & Kubernetes** - -* **Set Up Kubernetes Cluster on AWS EKS** - - ```text - "Please guide the setup of a Kubernetes cluster using Amazon EKS. Include steps for configuring the cluster, setting up node groups, and connecting kubectl. Return the steps and configuration files." - ``` - -* **Implement Persistent Storage in Kubernetes Using StatefulSets** - - ```text - "Set up persistent storage in Kubernetes using StatefulSets. Configure PersistentVolumeClaims (PVC) and explain how it ensures data persistence. Return the YAML configuration files." - ``` - -* **Set Up Cloud Storage with Amazon S3** - - ```text - "Please provide the steps for setting up cloud storage using Amazon S3. Include how to create a bucket, set permissions, and manage files programmatically via AWS SDKs. Return the necessary code examples for integration." - ``` - ---- - -### **5. Full-Stack Development** - -* **Develop a Full-Stack Web Application Using Django and React** - - ```text - "Create a full-stack web application with Django as the backend and React for the frontend. Implement user authentication, RESTful API communication, and a simple CRUD interface. Return the project structure and code snippets." - ``` - -* **Integrate a Payment Gateway (Stripe) in a Full-Stack App** - - ```text - "Integrate Stripe for handling payments in a full-stack application with Django and React. Set up the backend to handle payments and the frontend to interact with Stripe's API. Return the code for integration." - ``` - -* **Create a RESTful API with Express.js** - - ```text - "Help me set up a RESTful API using Express.js. Define the necessary routes and controllers to support CRUD operations for a {resource}. Return the implementation of the API with explanations for each endpoint." - ``` - -* **Implement Real-Time Updates with WebSockets** - - ```text - "Set up real-time updates in the application using WebSockets. Provide the necessary code for both the server (using socket.io or similar) and the frontend to enable live updates." - ``` - -* **Test Backend and Frontend for Regression Using Keploy** - - ```text - "Set up Keploy in your full-stack application to test both the backend and frontend after an update. Configure Keploy for automatic integration testing, focusing on testing API endpoints, data handling, and the interaction between the frontend and backend. Ensure that Keploy is set to capture all changes in the API response, including edge cases, and validate that the frontend works correctly with the updated backend. Return the setup configuration and steps to trigger Keploy for testing." - ``` - ---- - -### **6. UX/UI & Design** - -* **Provide UX/UI Design Advice** - - ```text - "Provide UX/UI design recommendations for the provided {website/app}. Focus on improving usability, accessibility, and aesthetics. Return a list of specific design improvements with examples where necessary." - ``` - ---- - -### **7. Security & Authentication** - -* **Offer Security Best Practices** - - ```text - "Provide a list of security best practices for {application_type}. Focus on areas like authentication, authorization, data protection, and secure coding practices. Return actionable advice with examples where necessary." - ``` - -* **Implement JWT-Based Authentication** - - ```text - "Implement JSON Web Token (JWT) authentication in the provided application. The system should handle token generation, validation, and secure access to protected routes. Return the code with explanations." - ``` - ---- - -### **8. Event-Driven Architecture & Integration** - -* **Set Up an Event-Driven Architecture with Kafka** - - ```text - "Set up an event-driven architecture with Kafka. Define the Kafka topics, producers, and consumers to handle real-time data processing. Return the code with configuration details." - ``` - -* **Help Integrate Third-Party Services** - - ```text - "Integrate {third_party_service} into the existing project. Provide step-by-step instructions for setup, authentication, and API interaction. Return the integration code with explanations of how it works." - ``` - ---- - -### **9. Content Creation & Marketing** - -* **Create a Personal Portfolio Website** - - ```text - "Help me build a personal portfolio website. The site should include sections for my bio, projects, skills, and contact information. Make sure it’s responsive and easy to navigate. Return the basic HTML/CSS/JS code for the website." - ``` - -* **Write SEO-Optimized Blog Content** - - ```text - "Generate a blog post on {topic} optimized for SEO. Use keyword research to include high-traffic keywords naturally, structure the post with headings and subheadings, and ensure it is engaging and informative. Return the content with SEO suggestions." - ``` - -* **Generate LinkedIn Summary and Job Descriptions** - - ```text - "Generate a compelling LinkedIn summary and job description based on the following details: {job_title}, {skills}, {experience}. Ensure the summary is concise, professional, and highlights key achievements." - ``` - ---- - -### **10. Infrastructure & System Administration** - -* **Create an Infrastructure as Code (IaC) for AWS with CloudFormation** - - ```text - "Write infrastructure-as-code (IaC) for AWS using CloudFormation. Automate the provisioning of resources such as EC2, RDS, and S3 for {application}. Return the CloudFormation templates with explanations." - ``` - -* **Set Up Serverless Architecture with Google Cloud Functions** - - ```text - "Create a serverless architecture using Google Cloud Functions for {task}. The functions should trigger based on specific events and return the necessary code with setup instructions." - ``` - ---- - -### **11. System Monitoring & Debugging** - -* **Debug Performance Issues in Production Systems** - - ```text - "Analyze the performance of the production system and identify bottlenecks. Suggest and implement optimizations to improve speed, reduce memory usage, and increase scalability. Return the optimized code and explanations." - ``` - ---- - -### **12. Web Development** - -* **Write Tests for Front-End Components** - - ```text - "Write unit and integration tests for the provided front-end components using {testing_framework}. Ensure the tests cover all major use cases and edge cases. Return the test code with explanations." - ``` - ---- - -### **13. API Development** - -* **Generate OpenAPI Schema from Source Code** - - ```text - "Given the following source code for a RESTful API implemented in {programming_language} with endpoints {list_of_endpoints}, generate an OpenAPI 3.0 schema that describes the API. The schema should include paths, request/response parameters, status codes, authentication methods, and other relevant details. Return the complete OpenAPI schema in YAML format." - ``` - -* **Generate Curl Commands for Testing OpenAPI Endpoints** - - ```text - "For the OpenAPI schema provided, generate `curl` commands to test the endpoints. Include examples for GET, POST, PUT, and DELETE requests. The `curl` commands should include the correct headers, body content (for POST/PUT), and any required authentication tokens (if applicable)." - ``` - -* **Generate OpenAPI Schema for a Custom API with Source Code** - - ```text - "Given the following source code for an API implemented in {programming_language}, generate the OpenAPI schema for this API. The schema should cover all routes, parameters, request/response types, and status codes. Include both request body and query parameters where applicable, and provide the schema in YAML format." - ``` - -* **Create OpenAPI Schema and Curl Commands for a CRUD API** - - ```text - "Create an OpenAPI schema for a simple CRUD API with the following endpoints: `GET /items`, `POST /items`, `PUT /items/{id}`, and `DELETE /items/{id}`. Based on the schema, generate `curl` commands to test these endpoints with sample data, including headers and request bodies as necessary." - ``` - -* **Generate OpenAPI Schema for a Node.js API and Curl Examples** - - ```text - "Given the following source code for a Node.js API using Express, generate the corresponding OpenAPI 3.0 schema. Then, create `curl` commands to test each endpoint in the API, covering all HTTP methods (GET, POST, PUT, DELETE) and including sample request bodies for each method." - ``` - -* **Keploy CI/CD Integration Setup** +## 📚 Table of Contents - ```text - "Set up a CI/CD pipeline to automatically run Keploy tests as part of the deployment process. Include configuration for GitHub Actions or Jenkins to run tests whenever new code is pushed to the repository." - ``` \ No newline at end of file +- [Code Refactoring & Development](./domains/code-refactoring/README.md) +- [CI/CD & DevOps](./domains/ci-cd-devops/README.md) +- [Database Management](./domains/database-management/README.md) +- [Cloud & Kubernetes](./domains/cloud-kubernetes/README.md) +- [Full-Stack Development](./domains/full-stack-development/README.md) +- [UX/UI & Design](./domains/ux-ui-design/README.md) +- [Security & Authentication](./domains/security-authentication/README.md) +- [Event-Driven Architecture & Integration](./domains/event-driven-architecture/README.md) +- [Content Creation & Marketing](./domains/content-marketing/README.md) +- [Infrastructure & System Administration](./domains/infrastructure-admin/README.md) +- [System Monitoring & Debugging](./domains/system-monitoring/README.md) +- [Web Development](./domains/web-development/README.md) +- [API Development](./domains/api-development/README.md) diff --git a/domains/api-development/README.md b/domains/api-development/README.md new file mode 100644 index 0000000..51acc15 --- /dev/null +++ b/domains/api-development/README.md @@ -0,0 +1,37 @@ +# **13. API Development** + +* **Generate OpenAPI Schema from Source Code** + + ```text + "Given the following source code for a RESTful API implemented in {programming_language} with endpoints {list_of_endpoints}, generate an OpenAPI 3.0 schema that describes the API. The schema should include paths, request/response parameters, status codes, authentication methods, and other relevant details. Return the complete OpenAPI schema in YAML format." + ``` + +* **Generate Curl Commands for Testing OpenAPI Endpoints** + + ```text + "For the OpenAPI schema provided, generate `curl` commands to test the endpoints. Include examples for GET, POST, PUT, and DELETE requests. The `curl` commands should include the correct headers, body content (for POST/PUT), and any required authentication tokens (if applicable)." + ``` + +* **Generate OpenAPI Schema for a Custom API with Source Code** + + ```text + "Given the following source code for an API implemented in {programming_language}, generate the OpenAPI schema for this API. The schema should cover all routes, parameters, request/response types, and status codes. Include both request body and query parameters where applicable, and provide the schema in YAML format." + ``` + +* **Create OpenAPI Schema and Curl Commands for a CRUD API** + + ```text + "Create an OpenAPI schema for a simple CRUD API with the following endpoints: `GET /items`, `POST /items`, `PUT /items/{id}`, and `DELETE /items/{id}`. Based on the schema, generate `curl` commands to test these endpoints with sample data, including headers and request bodies as necessary." + ``` + +* **Generate OpenAPI Schema for a Node.js API and Curl Examples** + + ```text + "Given the following source code for a Node.js API using Express, generate the corresponding OpenAPI 3.0 schema. Then, create `curl` commands to test each endpoint in the API, covering all HTTP methods (GET, POST, PUT, DELETE) and including sample request bodies for each method." + ``` + +* **Keploy CI/CD Integration Setup** + + ```text + "Set up a CI/CD pipeline to automatically run Keploy tests as part of the deployment process. Include configuration for GitHub Actions or Jenkins to run tests whenever new code is pushed to the repository." + ``` diff --git a/domains/ci-cd-devops/README.md b/domains/ci-cd-devops/README.md new file mode 100644 index 0000000..d15d5db --- /dev/null +++ b/domains/ci-cd-devops/README.md @@ -0,0 +1,86 @@ +# **2. CI/CD & DevOps** + +* **Set up CI/CD Pipelines** + + ```text + "Help set up a CI/CD pipeline for the project using {CI_tool}. The pipeline should include stages for building, testing, and deploying the application. Provide configuration files and explanations of each stage." + ``` + +* **Automate Code Formatting** + + ```text + "Set up an automated code formatting system using {tool}. Configure it to run on each commit or via pre-commit hooks. Return the necessary configuration and explain how it integrates into the workflow." + ``` + +* **Set up Cloud Cost Optimization Strategies** + + ```text + "Provide strategies for optimizing cloud costs in {cloud_provider}. Focus on areas like reserved instances, auto-scaling, and rightsizing. Return recommendations and examples of how to implement them." + ``` + +* **Create Docker Compose Configurations** + + ```text + "Create a Docker Compose configuration file to set up {services}. The configuration should include service dependencies, environment variables, and port mappings. Return the Docker Compose YAML with an explanation." + ``` + +* **Generate Cron Jobs for Task Scheduling** + + ```text + "Write cron jobs to schedule tasks on a Linux system. The tasks should run at {interval} and execute {command}. Return the cron job configurations with explanations of each field." + ``` + +* **Implement Automated Security Testing in CI/CD** + + ```text + "Integrate automated security testing tools like {security_tool} into the CI/CD pipeline. Configure the pipeline to run security checks on each commit or pull request. Return the updated pipeline configuration." + ``` + +* **Set up Serverless Architecture with Google Cloud Functions** + + ```text + "Create a serverless architecture using Google Cloud Functions for {task}. The functions should trigger based on specific events and return the necessary code with setup instructions." + ``` + +* **Write Infrastructure as Code (IaC) for AWS with CloudFormation** + + ```text + "Write infrastructure-as-code (IaC) for AWS using CloudFormation. Automate the provisioning of resources such as EC2, RDS, and S3 for {application}. Return the CloudFormation templates with explanations." + ``` + +* **Create a Custom Shell Script for System Administration** + + ```text + "Create a custom shell script that automates {system_task} such as backups, log rotations, or user management. The script should be efficient and handle errors gracefully. Return the shell script with usage instructions." + ``` + +* **Create an Event-Driven Architecture with Kafka** + + ```text + "Set up an event-driven architecture with Kafka. Define the Kafka topics, producers, and consumers to handle real-time data processing. Return the code with configuration details." + ``` + +* **Implement Data Preprocessing for Machine Learning** + + ```text + "Implement data preprocessing steps for machine learning. This includes handling missing data, scaling features, and encoding categorical variables. Return the preprocessing code and explain each step." + ``` + +* **Implement Serverless Functions on AWS Lambda** + + ```text + "Set up serverless functions using AWS Lambda to perform {task}. Include setup instructions for the trigger and return the Lambda function code." + ``` + +* **Set up Google Analytics for Portfolio Tracking** + + ```text + "Set up Google Analytics tracking for my portfolio website. Provide the steps for adding tracking code and configuring goals. Return the setup instructions." + ``` + +* **Optimize a Docker-Based Development Environment** + + ```text + "Optimize the provided Docker development environment. Focus on reducing build time, improving caching, and streamlining container configurations. Return the optimized Dockerfile and Docker Compose file." + ``` + diff --git a/domains/cloud-kubernetes/README.md b/domains/cloud-kubernetes/README.md new file mode 100644 index 0000000..fc5b680 --- /dev/null +++ b/domains/cloud-kubernetes/README.md @@ -0,0 +1,20 @@ +# **4. Cloud & Kubernetes** + +* **Set Up Kubernetes Cluster on AWS EKS** + + ```text + "Please guide the setup of a Kubernetes cluster using Amazon EKS. Include steps for configuring the cluster, setting up node groups, and connecting kubectl. Return the steps and configuration files." + ``` + +* **Implement Persistent Storage in Kubernetes Using StatefulSets** + + ```text + "Set up persistent storage in Kubernetes using StatefulSets. Configure PersistentVolumeClaims (PVC) and explain how it ensures data persistence. Return the YAML configuration files." + ``` + +* **Set Up Cloud Storage with Amazon S3** + + ```text + "Please provide the steps for setting up cloud storage using Amazon S3. Include how to create a bucket, set permissions, and manage files programmatically via AWS SDKs. Return the necessary code examples for integration." + ``` + diff --git a/domains/code-refactoring/README.md b/domains/code-refactoring/README.md new file mode 100644 index 0000000..4dcc155 --- /dev/null +++ b/domains/code-refactoring/README.md @@ -0,0 +1,133 @@ +# **1. Code Refactoring & Development** + +* **Refactor Code for Better Readability** + + ```text + "Please review the provided code and identify areas where readability can be improved. Focus on simplifying complex functions, improving variable names, and removing redundant code. Return the refactored code and explain the changes made to improve readability." + ``` + +* **Translate Code from One Language to Another** + + ```text + "Translate the provided code from {source_language} to {target_language}. Ensure that the functionality remains equivalent. Highlight major differences in syntax or constructs between the two languages and explain the changes." + ``` + +* **Create Documentation from Code** + + ```text + "Extract the necessary information from the provided code to create detailed documentation. This should include explanations for functions, methods, classes, and the purpose of the code. Return the documentation in markdown format." + ``` + +* **Provide Code Explanations** + + ```text + "Please analyze the provided code and explain its functionality step-by-step. Include explanations for each major part of the code and why it’s necessary. Keep the explanation clear and concise." + ``` + +* **Generate Git Commit Messages** + + ```text + "Based on the code changes, generate concise and meaningful Git commit messages. Ensure the messages describe what was changed and why, and follow conventional commit standards." + ``` + +* **Debug Code** + + ```text + "Please review the provided code and the accompanying error message. Identify the cause of the error, suggest possible fixes, and return the corrected code with explanations of the changes made." + ``` + +* **Write Regular Expressions** + + ```text + "Create a regular expression for {use_case}. For example, to validate email addresses, generate a regex that matches valid email formats. Return the regular expression and explain how it works." + ``` + +* **Generate Boilerplate Code** + + ```text + "Generate boilerplate code for a {project_type} using {programming_language}. The code should include basic setup, functions, and structure for a starting point. Return the full code with instructions for customization." + ``` + +* **Automate Code Formatting** + + ```text + "Set up an automatic code formatting system using {tool}. Configure it to run on each commit or via pre-commit hooks. Return the necessary configuration and explain how it integrates into the workflow." + ``` + +* **Explain Data Structures and Algorithms** + + ```text + "Explain the following data structure/algorithm: {data_structure/algorithm}. Include its time complexity, use cases, and any common implementations. Provide code examples where applicable." + ``` + +* **Generate Mock Data** + + ```text + "Generate mock data for the following schema: {data_schema}. Include a variety of realistic values for testing purposes. Return the data in JSON, CSV, or another format as requested." + ``` + +* **Create Code for a New Feature** + + ```text + "Please create code to implement the following feature: {feature_description}. The feature should be fully functional and integrate smoothly with the existing codebase. Return the implementation along with an explanation." + ``` + +* **Suggest Performance Optimizations** + + ```text + "Analyze the provided code for performance bottlenecks. Suggest optimizations such as reducing time complexity, memory usage, or optimizing algorithms. Return the updated code with explanations of the optimizations." + ``` + +* **Generate Build Scripts** + + ```text + "Create a build script for automating the build process of a {project_type} using {build_tool}. The script should include steps for compiling, packaging, and versioning. Return the build script along with setup instructions." + ``` + +* **Offer Security Best Practices** + + ```text + "Provide a list of security best practices for {application_type}. Focus on areas like authentication, authorization, data protection, and secure coding practices. Return actionable advice with examples where necessary." + ``` + +* **Assist in Code Reviews** + + ```text + "Review the provided code and provide feedback. Focus on aspects like readability, performance, security, and maintainability. Suggest improvements and explain the rationale behind each recommendation." + ``` + +* **Test for Compatibility After Upgrading Node.js Version** + + ```text + "After upgrading Node.js from version 14 to 18, use Keploy to run automated tests to ensure that the application is working as expected. Set up Keploy to perform integration tests and verify that the backend, APIs, and frontend components are compatible with the new Node.js version. The tests should focus on key areas such as API responses, performance, and compatibility with external dependencies that may have been affected by the Node.js upgrade. Ensure that Keploy compares the results with the previous behavior recorded under Node.js 14 to detect any regressions or issues introduced by the upgrade. Return the Keploy test configuration, test cases, and results." + ``` + +* **Integrate Third-Party Services** + + ```text + "Integrate {third_party_service} into the existing project. Provide step-by-step instructions for setup, authentication, and API interaction. Return the integration code with explanations of how it works." + ``` + +* **Write a Dockerfile for the Application** + + ```text + "Create a Dockerfile to containerize the provided application. Ensure that the Dockerfile sets up the environment correctly, installs dependencies, and exposes the necessary ports. Return the Dockerfile with explanations." + ``` + +* **Provide UX/UI Design Advice** + + ```text + "Provide UX/UI design recommendations for the provided {website/app}. Focus on improving usability, accessibility, and aesthetics. Return a list of specific design improvements with examples where necessary." + ``` + +* **Suggest Testing Strategies** + + ```text + "Suggest a comprehensive testing strategy for {project_type}. The strategy should include unit tests, integration tests, and end-to-end tests. Provide recommendations for testing frameworks and tools, along with examples." + ``` + +* **Test for Regressions After Refactoring Code with Keploy** + + ```text + "After refactoring the code, use Keploy to run automated tests to check if any regressions have been introduced. Set up Keploy to verify that the refactored code behaves as expected, ensuring that all existing functionalities remain intact. The tests should include integration tests to verify that API endpoints, data handling, and user interactions still function properly. Ensure that Keploy is set to compare the current behavior with previously recorded test cases to detect any discrepancies or regressions. Return the Keploy test configuration, test cases, and results showing the behavior of the refactored code." + ``` \ No newline at end of file diff --git a/domains/content-marketing/README.md b/domains/content-marketing/README.md new file mode 100644 index 0000000..73bc63d --- /dev/null +++ b/domains/content-marketing/README.md @@ -0,0 +1,21 @@ +# **9. Content Creation & Marketing** + +* **Create a Personal Portfolio Website** + + ```text + "Help me build a personal portfolio website. The site should include sections for my bio, projects, skills, and contact information. Make sure it’s responsive and easy to navigate. Return the basic HTML/CSS/JS code for the website." + ``` + +* **Write SEO-Optimized Blog Content** + + ```text + "Generate a blog post on {topic} optimized for SEO. Use keyword research to include high-traffic keywords naturally, structure the post with headings and subheadings, and ensure it is engaging and informative. Return the content with SEO suggestions." + ``` + +* **Generate LinkedIn Summary and Job Descriptions** + + ```text + "Generate a compelling LinkedIn summary and job description based on the following details: {job_title}, {skills}, {experience}. Ensure the summary is concise, professional, and highlights key achievements." + ``` + + diff --git a/domains/database-management/README.md b/domains/database-management/README.md new file mode 100644 index 0000000..13ea27d --- /dev/null +++ b/domains/database-management/README.md @@ -0,0 +1,50 @@ +# **3. Database Management** + +* **Generate SQL Queries** + + ```text + "Given the database schema and the following requirements (e.g., 'Find all users who joined after 2020'), generate an appropriate SQL query. Return the SQL query and explain its logic." + ``` + +* **Explain Database Design** + + ```text + "Please review the database schema provided and explain its design choices. Discuss normalization, relationships between tables, and indexing strategies. Suggest improvements for scalability and performance." + ``` + +* **Design a Normalized Relational Database Schema** + + ```text + "Design a relational database schema for {application}. Ensure that it is normalized up to 3NF, with proper primary/foreign keys and indexes. Return the schema in SQL format." + ``` + +* **Set Up a PostgreSQL Database with Docker** + + ```text + "Set up a PostgreSQL database in a Docker container. Include steps for configuring the database, creating the schema, and connecting to the container. Return the Dockerfile and Docker Compose configuration." + ``` + +* **Implement Database Sharding** + + ```text + "Implement database sharding for {database_name}. Define the sharding strategy and partition the data across multiple shards. Return the setup and configuration details." + ``` + +* **Create and Optimize a NoSQL Database (MongoDB)** + + ```text + "Set up and optimize a MongoDB database for {application}. Include recommendations for indexing, query optimization, and data modeling. Return the schema and optimization steps." + ``` + +* **Optimize Database Queries for Performance** + + ```text + "Analyze the provided database queries and suggest performance optimizations. This may include indexing, query refactoring, and reducing the complexity of joins. Return the optimized query with explanations." + ``` + +* **Implement Multi-Threading and Concurrency Concepts** + + ```text + "Explain the concepts of multi-threading and concurrency in {programming_language}. Focus on thread management, race conditions, and synchronization techniques. Provide code examples where applicable." + ``` + diff --git a/domains/event-driven-architecture/README.md b/domains/event-driven-architecture/README.md new file mode 100644 index 0000000..0777030 --- /dev/null +++ b/domains/event-driven-architecture/README.md @@ -0,0 +1,13 @@ +# **8. Event-Driven Architecture & Integration** + +* **Set Up an Event-Driven Architecture with Kafka** + + ```text + "Set up an event-driven architecture with Kafka. Define the Kafka topics, producers, and consumers to handle real-time data processing. Return the code with configuration details." + ``` + +* **Help Integrate Third-Party Services** + + ```text + "Integrate {third_party_service} into the existing project. Provide step-by-step instructions for setup, authentication, and API interaction. Return the integration code with explanations of how it works." + ``` diff --git a/domains/full-stack-development/README.md b/domains/full-stack-development/README.md new file mode 100644 index 0000000..7aad19e --- /dev/null +++ b/domains/full-stack-development/README.md @@ -0,0 +1,31 @@ +# **5. Full-Stack Development** + +* **Develop a Full-Stack Web Application Using Django and React** + + ```text + "Create a full-stack web application with Django as the backend and React for the frontend. Implement user authentication, RESTful API communication, and a simple CRUD interface. Return the project structure and code snippets." + ``` + +* **Integrate a Payment Gateway (Stripe) in a Full-Stack App** + + ```text + "Integrate Stripe for handling payments in a full-stack application with Django and React. Set up the backend to handle payments and the frontend to interact with Stripe's API. Return the code for integration." + ``` + +* **Create a RESTful API with Express.js** + + ```text + "Help me set up a RESTful API using Express.js. Define the necessary routes and controllers to support CRUD operations for a {resource}. Return the implementation of the API with explanations for each endpoint." + ``` + +* **Implement Real-Time Updates with WebSockets** + + ```text + "Set up real-time updates in the application using WebSockets. Provide the necessary code for both the server (using socket.io or similar) and the frontend to enable live updates." + ``` + +* **Test Backend and Frontend for Regression Using Keploy** + + ```text + "Set up Keploy in your full-stack application to test both the backend and frontend after an update. Configure Keploy for automatic integration testing, focusing on testing API endpoints, data handling, and the interaction between the frontend and backend. Ensure that Keploy is set to capture all changes in the API response, including edge cases, and validate that the frontend works correctly with the updated backend. Return the setup configuration and steps to trigger Keploy for testing." + ``` diff --git a/domains/infrastructure-admin/README.md b/domains/infrastructure-admin/README.md new file mode 100644 index 0000000..f4987ab --- /dev/null +++ b/domains/infrastructure-admin/README.md @@ -0,0 +1,13 @@ +# **10. Infrastructure & System Administration** + +* **Create an Infrastructure as Code (IaC) for AWS with CloudFormation** + + ```text + "Write infrastructure-as-code (IaC) for AWS using CloudFormation. Automate the provisioning of resources such as EC2, RDS, and S3 for {application}. Return the CloudFormation templates with explanations." + ``` + +* **Set Up Serverless Architecture with Google Cloud Functions** + + ```text + "Create a serverless architecture using Google Cloud Functions for {task}. The functions should trigger based on specific events and return the necessary code with setup instructions." + ``` diff --git a/domains/security-authentication/README.md b/domains/security-authentication/README.md new file mode 100644 index 0000000..1ad78a6 --- /dev/null +++ b/domains/security-authentication/README.md @@ -0,0 +1,14 @@ +# **7. Security & Authentication** + +* **Offer Security Best Practices** + + ```text + "Provide a list of security best practices for {application_type}. Focus on areas like authentication, authorization, data protection, and secure coding practices. Return actionable advice with examples where necessary." + ``` + +* **Implement JWT-Based Authentication** + + ```text + "Implement JSON Web Token (JWT) authentication in the provided application. The system should handle token generation, validation, and secure access to protected routes. Return the code with explanations." + ``` + diff --git a/domains/system-monitoring/README.md b/domains/system-monitoring/README.md new file mode 100644 index 0000000..7975945 --- /dev/null +++ b/domains/system-monitoring/README.md @@ -0,0 +1,7 @@ +# **11. System Monitoring & Debugging** + +* **Debug Performance Issues in Production Systems** + + ```text + "Analyze the performance of the production system and identify bottlenecks. Suggest and implement optimizations to improve speed, reduce memory usage, and increase scalability. Return the optimized code and explanations." + ``` diff --git a/domains/ux-ui-design/README.md b/domains/ux-ui-design/README.md new file mode 100644 index 0000000..6c38d2a --- /dev/null +++ b/domains/ux-ui-design/README.md @@ -0,0 +1,7 @@ +# **6. UX/UI & Design** + +* **Provide UX/UI Design Advice** + + ```text + "Provide UX/UI design recommendations for the provided {website/app}. Focus on improving usability, accessibility, and aesthetics. Return a list of specific design improvements with examples where necessary." + ``` diff --git a/domains/web-development/README.md b/domains/web-development/README.md new file mode 100644 index 0000000..7cb9fa4 --- /dev/null +++ b/domains/web-development/README.md @@ -0,0 +1,7 @@ +# **12. Web Development** + +* **Write Tests for Front-End Components** + + ```text + "Write unit and integration tests for the provided front-end components using {testing_framework}. Ensure the tests cover all major use cases and edge cases. Return the test code with explanations." + ``` From 3ea21038b061946a51b96a077322ba305de9fed6 Mon Sep 17 00:00:00 2001 From: Swapnashree Sahoo Date: Wed, 18 Jun 2025 22:53:16 +0530 Subject: [PATCH 3/4] modified the add new use case section in contributing.md Signed-off-by: Swapnashree Sahoo --- README.md | 8 +++++--- contributing.md | 25 ++++++++++++++++--------- 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index f052166..2d9601b 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,14 @@ -# 🚀 Engineering Prompts +# Engineering Prompts -Welcome to the **Engineering Prompts** repository! This repo contains AI prompt chains across various engineering domains to assist developers with automation, refactoring, documentation, DevOps, and more. +Welcome to the **Engineering Prompts** repository! This repository contains a collection of AI prompt chains organized by different domains, primarily for assisting developers in various tasks such as code refactoring, CI/CD setup, database management, cloud, Kubernetes deployment, web development, API Development, security, and more. + +Each prompt chain is designed to build context for ChatGPT before executing a task. They can be used in ChatGPT Queue for bulk prompting, job, or task-focused automation. Each domain has its own set of prompts in separate folders. Click any domain below to explore. --- -## 📚 Table of Contents +## Table of Contents - [Code Refactoring & Development](./domains/code-refactoring/README.md) - [CI/CD & DevOps](./domains/ci-cd-devops/README.md) diff --git a/contributing.md b/contributing.md index 19a76ad..a737479 100644 --- a/contributing.md +++ b/contributing.md @@ -37,15 +37,22 @@ Thank you for considering contributing to **Engineering Prompts**! We welcome co --- -## Adding a New Use Case - -If you're adding a completely new use case that doesn't fit into the existing categories, follow these steps: - -1. **Find the right domain** - If it fits into an existing category, place it under the right domain section in **README.md**. - -2. **Create a new section** - If it's a completely new use case and domain, add a new section at the bottom of the **README.md**. +## Adding a New Use Case or Domain + +#### If it fits into an existing domain: +1. Navigate to the appropriate domain folder inside the `domains/` directory. +2. Open its `README.md`. +3. Add your new use case as a bullet point or sub-section in that file. +4. Follow the existing formatting for consistency. + +#### If it's a completely new domain: +1. Inside the `domains/` directory, create a new folder with a meaningful name (e.g., `mobile-development`). +2. Inside that folder, create a `README.md` file. +3. Add your use cases and prompts inside this new `README.md`. +4. At the bottom of the main `README.md` (root level), add a new entry to the Table of Contents linking to your new domain: + +```md +- [Mobile Development](domains/mobile-development/README.md) --- From 5ee0812332c0d6c4393949c7a41d2d90dc6c51b3 Mon Sep 17 00:00:00 2001 From: Swapnashree Sahoo Date: Thu, 19 Jun 2025 00:11:04 +0530 Subject: [PATCH 4/4] add: new domain backend-development & added new prompts to fullstack development Signed-off-by: Swapnashree Sahoo --- README.md | 1 + contributing.md | 5 +- domains/backend-development/README.md | 151 +++++++++++++++++++++++ domains/full-stack-development/README.md | 63 ++++++++++ 4 files changed, 218 insertions(+), 2 deletions(-) create mode 100644 domains/backend-development/README.md diff --git a/README.md b/README.md index 2d9601b..202e815 100644 --- a/README.md +++ b/README.md @@ -23,3 +23,4 @@ Each domain has its own set of prompts in separate folders. Click any domain bel - [System Monitoring & Debugging](./domains/system-monitoring/README.md) - [Web Development](./domains/web-development/README.md) - [API Development](./domains/api-development/README.md) +- [Backend Development](.domains/backend-development/README.md) diff --git a/contributing.md b/contributing.md index a737479..dffa15a 100644 --- a/contributing.md +++ b/contributing.md @@ -52,10 +52,11 @@ Thank you for considering contributing to **Engineering Prompts**! We welcome co 4. At the bottom of the main `README.md` (root level), add a new entry to the Table of Contents linking to your new domain: ```md -- [Mobile Development](domains/mobile-development/README.md) - + [Mobile Development](domains/mobile-development/README.md) +``` --- + ## Thank You! We truly appreciate your contributions! By helping us expand and improve this collection of prompts, you’re making it easier for developers to work more efficiently and with less effort. diff --git a/domains/backend-development/README.md b/domains/backend-development/README.md new file mode 100644 index 0000000..dcdc5de --- /dev/null +++ b/domains/backend-development/README.md @@ -0,0 +1,151 @@ +# Backend Development Prompts + + +### 1. Authentication & Authorization +* **Secure Auth System** + ```text + Implement a secure user authentication system using {auth_strategy}. Include login, registration, token/session-based authentication, and role-based access control. + ``` + +* **Social Login** + + ```text + Implement a social login system supporting {oauth_provider}. Include account linking, user profile handling, and secure token storage. + ``` + +### 2. Database & ORM + +* **Relational Database Schema** + + ```text + Create models and schema for a relational database using {orm_tool}. Include relationships, constraints, and migrations. + ``` + +* **Document-Oriented Models** + + ```text + Define document-based models for use with a NoSQL database like {nosql_database}. Include embedded documents, references, and validation rules. + ``` + +### 3. Middleware & Request Handling + +* **Middleware Stack Setup** + + ```text + Configure a middleware stack using {server_framework}. Include request parsing, logging, security (CORS, rate limiting), and error handling. + ``` + +* **Custom Middleware Logic** + + ```text + Implement custom middleware to validate headers or authentication tokens. Make it reusable across multiple routes in {server_framework}. + ``` + +### 4. RESTful APIs + +* **Versioned REST API** + + ```text + Implement a versioned REST API using {server_framework}. Include CRUD routes, query filtering, pagination, and consistent response formatting. + ``` + +* **REST API Documentation** + + ```text + Auto-generate API documentation using {doc_tool}. Cover endpoints, request/response schemas, authentication flow, and examples. + ``` + +### 5. Real-Time Features + +* **Socket/Streaming System** + + ```text + Build a real-time messaging system using {realtime_library}. Include room handling, connection tracking, and broadcasting logic. + ``` + +### 6. GraphQL APIs + +* **Modular GraphQL Server** + + ```text + Create a modular GraphQL API server with schema, queries, mutations, and error handling using {graphql_server}. + ``` + +### 7. Security + +* **CORS & Headers** + + ```text + Configure CORS and security headers for your backend using {server_framework}. Support custom origin rules and header restrictions. + ``` + +* **Secure Environment Setup** + + ```text + Configure secure environment variable handling for different stages (dev, test, prod) using {env_tool}. Include .env templates and code usage. + ``` + +### 8. File Upload & Storage + +* **File Upload Handler** + + ```text + Implement a backend file upload system using {upload_library}. Support file validation, error handling, and storage to {storage_provider}. + ``` + +### 9. Notifications + +* **Email Sending System** + + ```text + Build a transactional email sender using {email_service}. Include dynamic templates, scheduling, and error recovery. + ``` + +### 10. Testing & Debugging + +* **Backend Test Suite** + + ```text + Write unit and integration tests for backend routes using {test_library}. Include mock database setups and error condition testing. + ``` + +### 11. Deployment + +* **Deployable Backend Setup** + + ```text + Provide configuration for deploying a backend app using {platform}. Include environment setup, CI pipeline overview, and rollback strategy. + ``` + +### 12. Logging & Monitoring + +* **Structured Logging** + + ```text + Implement structured logging using {logging_tool}. Include request tracing, error logs, and contextual metadata. + ``` + +* **Error Tracking Setup** + + ```text + Integrate error tracking using {monitoring_tool}. Include user context, stack traces, and alerting rules. + ``` + +### 13. Job Queues + +* **Async Job Queue** + + ```text + Implement a job queue using {queue_system}. Handle retries, concurrency, and job status tracking. + ``` + +### 14. Performance & Optimization + +* **Optimize Backend Performance** + + ```text + Optimize backend performance using techniques like {optimization_technique}. Include caching, database tuning, and asynchronous processing. + ``` + +--- + diff --git a/domains/full-stack-development/README.md b/domains/full-stack-development/README.md index 7aad19e..3422e90 100644 --- a/domains/full-stack-development/README.md +++ b/domains/full-stack-development/README.md @@ -29,3 +29,66 @@ ```text "Set up Keploy in your full-stack application to test both the backend and frontend after an update. Configure Keploy for automatic integration testing, focusing on testing API endpoints, data handling, and the interaction between the frontend and backend. Ensure that Keploy is set to capture all changes in the API response, including edge cases, and validate that the frontend works correctly with the updated backend. Return the setup configuration and steps to trigger Keploy for testing." ``` + +* **Modular Full-Stack Application** + + ```text + "Build a full-stack application with a frontend using {frontend_framework} and a backend using {backend_framework}. Implement routing, state management, authentication, and persistent data storage with {database_technology}. Ensure modularity and scalability." + ``` + +* **Role-Based Access Control (RBAC)** + + ```text + "Implement role-based access control across frontend and backend using {auth_method}. Protect frontend routes and backend endpoints based on roles like {roles_list}." + ``` + +* **Reusable Component & Service Structure** + + ```text + "Design reusable UI components using {ui_library} and reusable backend service logic using {architecture_pattern}. Ensure separation of concerns and maintain clean code structure." + ``` + +* **Form Submission Flow** + + ```text + "Create a form using {form_library} on the frontend and connect it to backend endpoints built with {server_framework}. Include validation, success/error feedback, and secure data handling." + ``` + +* **End-to-End Error Handling** + + ```text + "Implement global error handling across the full stack. Catch, log, and display errors from both the frontend and backend using {error_tracking_tool}, and show user-friendly messages on the UI." + ``` + +* **Real-Time Data Sync** + + ```text + "Integrate real-time features using {realtime_tech} for full-duplex communication between clients and server. Use this to implement live updates for {use_case}, including proper state syncing." + ``` + +* **File Upload and Storage Pipeline** + + ```text + "Implement file upload from the frontend using {upload_library} and process/store the files on the backend using {storage_service}. Include file validation, error handling, and upload progress tracking." + ``` + +* **Authentication and Protected Routes** + + ```text + "Create full-stack authentication using {auth_library}. Implement protected routes on frontend and backend, and use token/session-based authentication. Secure sensitive endpoints and user sessions." + ``` + +* **Analytics Dashboard with Visualization** + + ```text + "Build a dashboard that fetches data via APIs built in {backend_framework} and visualizes them using {chart_library}. Include filters, real-time updates, and drill-down analytics." + ``` + +* **Paginated & Infinite Scrolling Lists** + + ```text + "Implement frontend pagination or infinite scroll using {pagination_strategy}, supported by backend pagination logic using {query_method}. Optimize API performance and user experience." + ``` + +``` +