TypeScript axios .cursorrules prompt file
About .cursorrules prompt file
What you can build
Multi-LLM Orchestration Platform: Create a platform that allows developers to easily integrate and switch between multiple large language models, such as OpenAI, GPT-3, and others. It would utilize TypeScript for creating a composable library with APIs that ensure seamless transition and orchestration between different LLM providers.
TypeScript Functional Programming Library: Develop a library that promotes functional programming paradigms in TypeScript. It would include utilities and helper functions that emphasize immutability, pure functions, and composability, thereby helping developers write more maintainable and easy-to-test code.
Dynamic Documentation Generator: Build a tool that automatically generates comprehensive TypeScript documentation using JSDoc comments. It would include code examples and integrate with version control systems to ensure documentation is always up-to-date.
Error Handling and Logging Utility: Create a library specializing in TypeScript error handling with custom error types and integrated logging capabilities. This could be particularly useful for large-scale applications or systems requiring robust error tracking and analysis.
TypeScript-based Dependency Injection Framework: Develop a lightweight, easy-to-use dependency injection framework tailored for TypeScript. This tool would enhance testability and flexibility in applications, focusing on the Single Responsibility Principle and simple APIs for developers.
Asynchronous Task Manager: Design a TypeScript asynchronous task management library that uses async/await patterns, providing utilities for queuing, retrying, and handling asynchronous operations gracefully.
Type-safe YAML Configuration Manager: Create a configuration management tool using js-yaml that allows developers to define and validate configurations with type-safe schemas in TypeScript. This would target applications requiring robust configuration management solutions.
MIME Type Detection Service: Develop a service utilizing the mime-types library that provides developers an API for accurate MIME type detection and file extension mapping. It could serve as an essential tool in applications handling diverse file types and uploads.
Unique Identifier Service: Offer a service built around uuid for securely generating and managing unique identifiers. It would be ideal for systems needing random UUIDs for tracking, data indexing, or security purposes.
Pure Function Analyzer and Optimizer: Construct a tool that analyzes TypeScript codebases to identify opportunities for implementing pure functions and optimize existing code for better performance and testability. This could function as a Web or CLI tool to aid developers in maintaining clean and efficient codebases.
Benefits
- Strong preference for functional programming with TypeScript; emphasizes composability and immutability.
- Detailed coding standards with focus on effective naming conventions, file organization, and code style using TypeScript features.
- Emphasizes best practices like single responsibility, dependency injection, comprehensive testing, and using async/await.
Synopsis
Developers building a TypeScript-based multi-provider architecture for LLMs will streamline code organization, enhance testability, and ensure robust error handling and documentation using this comprehensive prompt.
Overview of .cursorrules prompt
The .cursorrules file outlines coding standards and best practices for an elite software engineer and product manager specialized in multi-provider architectures for Large Language Models (LLMs) using TypeScript. It provides guidelines on naming conventions, file organization, and code style, emphasizing the use of const, arrow functions, and TypeScript’s type system. The file advocates for principles like immutability, composability, and the Single Responsibility Principle, as well as best practices such as dependency injection, error handling, unit testing, and using async/await. Additionally, it specifies the effective use of libraries like axios, js-yaml, mime-types, node-gyp, uuid, and zod, and underscores the importance of documentation with JSDoc comments, examples, and updated README files.