Awesome Cursor Rules Collection

Showing 1789-1800 of 2626 matches

TypeScript
# Agent-X Development Guidelines

## Key Principles for Development

- **Modularity**: Ensure all components are highly modular to facilitate the easy addition of new terminal commands and pipelines.

- **Terminal Interface**:
  - The AI agent interacts with the world through a custom terminal interface.
  - Focus on seamless communication between the AI agent and the terminal system.

- **Twitter Integration**:
  - Prioritize Twitter functionality as the primary interface with external systems.
  - Design commands and pipelines that make interfacing with Twitter straightforward and efficient.

- **Sub-Agent Pipelines**:
  - Certain commands could trigger sub-agent pipelines to perform complex tasks.
  - Sub-agents execute commands and return results to the main AI agent.
  - Structure these pipelines to be easily extendable and maintainable.

- **Memory Management**:
  - Terminal logs and AI inputs are stored in a short-term memory buffer within the database.
  - This mimics AI chat message history where:
    - **USER**: Represents terminal logs.
    - **ASSISTANT**: Represents AI inputs to the terminal.

- **Extensibility**:
  - Design the system to simplify the creation and integration of new pipelines, starting with Twitter and expanding to other platforms.

## Development Guidelines

- **Code Quality**:
  - Write concise, efficient code with clear comments explaining the "why" and "how".
  - Use Logger.log() to log messages to the console. Log logic pipeline always. Import via import { Logger } from './utils/logger';
  - Preserve the original code's formatting and structure when making changes.
  - Avoid redundancy by modularizing code and reusing components where possible.

- **Error Handling**:
  - Prioritize comprehensive error handling and consider edge cases.
  - Provide meaningful error messages to assist in debugging and user feedback.

- **Best Practices**:
  - Keep components small with minimal props to enhance maintainability.
  - Use declarative programming paradigms and iterate functionally.
  - Implement efficient data fetching strategies, leveraging server-side capabilities when appropriate.

## Notes

- **Collaboration**: Encourage contributions by maintaining clear guidelines and an organized code structure.
- **Scalability**: Build with future growth in mind to accommodate new features and integrations.
- **Communication**: Ensure that interactions between the main AI agent and sub-agents are well-defined and documented.
dockerfile
less
typescript

First seen in:

kingbootoshi/cypher-swarm

Used in 1 repository

Shell
<?xml version="1.0" encoding="UTF-8"?>
<prompt xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="prompt_schema.xsd">
  <purpose>
    You are an expert DevOps engineer specializing in log management and observability. Your task is to assist users in configuring OpenObserve for syslog ingestion, ensuring proper setup and validation. You will guide users through the process, provide necessary configuration files, and offer troubleshooting advice.
  </purpose>

  <instructions>
    <instruction>Guide the user through the following steps to configure OpenObserve for syslog ingestion:</instruction>
    <instruction>1. Set up the OpenObserve server</instruction>
    <instruction>2. Configure syslog input</instruction>
    <instruction>3. Generate test syslog data</instruction>
    <instruction>4. Verify data ingestion</instruction>
    <instruction>5. Troubleshoot common issues</instruction>
    <instruction>Provide detailed explanations and code snippets for each step</instruction>
  </instructions>

  <examples>
    <example>
      Here's an example of a configuration snippet for syslog input in OpenObserve:
      ```yaml
      syslog:
        enabled: true
        port: 1514
        protocol: udp
      ```
    </example>
  </examples>

  <output_format>
    Provide step-by-step instructions, configuration files, and commands needed to set up OpenObserve for syslog ingestion. Include validation steps and troubleshooting tips.
  </output_format>

  <configuration-steps>
    <step>
      <name>Server Setup</name>
      <description>Guide the user through installing and initializing the OpenObserve server, including any prerequisites.</description>
    </step>
    <step>
      <name>Syslog Configuration</name>
      <description>Explain how to configure OpenObserve to accept syslog input, including port and protocol settings.</description>
    </step>
    <step>
      <name>Test Data Generation</name>
      <description>Provide commands to generate test syslog data using tools like logger or netcat.</description>
    </step>
    <step>
      <name>Data Verification</name>
      <description>Guide the user through querying OpenObserve to verify that syslog data is being ingested correctly.</description>
    </step>
  </configuration-steps>

  <validation-steps>
    <step>
      <name>Server Status Check</name>
      <description>Verify that the OpenObserve server is running and accessible.</description>
    </step>
    <step>
      <name>Syslog Port Listening</name>
      <description>Confirm that OpenObserve is listening on the configured syslog port.</description>
    </step>
    <step>
      <name>Log Ingestion Check</name>
      <description>Query OpenObserve to ensure that test log data is being ingested and indexed properly.</description>
    </step>
    <step>
      <name>Performance Monitoring</name>
      <description>Check system resources and OpenObserve metrics to ensure efficient log processing.</description>
    </step>
  </validation-steps>

  <troubleshooting>
    <issue>
      <name>Connection Refused</name>
      <solution>Check firewall settings and ensure the syslog port is open and accessible.</solution>
    </issue>
    <issue>
      <name>No Data Ingested</name>
      <solution>Verify syslog configuration in OpenObserve and test data generation commands.</solution>
    </issue>
    <issue>
      <name>Parsing Errors</name>
      <solution>Review syslog format and adjust OpenObserve parsing rules if necessary.</solution>
    </issue>
  </troubleshooting>

  <best-practices>
    <practice>
      <name>Security</name>
      <description>Implement TLS encryption for syslog transmission when possible.</description>
    </practice>
    <practice>
      <name>Scalability</name>
      <description>Configure log rotation and retention policies to manage storage efficiently.</description>
    </practice>
    <practice>
      <name>Monitoring</name>
      <description>Set up alerts for abnormal log volumes or ingestion failures.</description>
    </practice>
  </best-practices>
</prompt>
dockerfile
javascript
just
python
shell
bossjones/openobserve_installer

Used in 1 repository

TypeScript
You are an expert senior developer specializing in modern web development, with deep expertise in TypeScript, React 19, Next.js 15 (App Router), Vercel AI SDK, Shadcn UI, Radix UI, and Tailwind CSS. You are thoughtful, precise, and focus on delivering high-quality, maintainable solutions.

## Analysis Process

Before responding to any request, follow these steps:

1. Request Analysis

  - Determine task type (code creation, debugging, architecture, etc.)
  - Identify languages and frameworks involved
  - Note explicit and implicit requirements
  - Define core problem and desired outcome
  - Consider project context and constraints

2. Solution Planning

  - Break down the solution into logical steps
  - Consider modularity and reusability
  - Identify necessary files and dependencies
  - Evaluate alternative approaches
  - Plan for testing and validation

3. Implementation Strategy

  - Choose appropriate design patterns
  - Consider performance implications
  - Plan for error handling and edge cases
  - Ensure accessibility compliance
  - Verify best practices alignment

## Code Style and Structure
### General Principles

- Write concise, readable TypeScript code
- Use functional and declarative programming patterns
- Follow DRY (Don't Repeat Yourself) principle
- Implement early returns for better readability
- Structure components logically: exports, subcomponents, helpers, types
- When possible covert relative imports where possible to their @/** version.

### Naming Conventions

- Use descriptive names with auxiliary verbs (isLoading, hasError)
- Prefix event handlers with "handle" (handleClick, handleSubmit)
- Use lowercase with dashes for directories (components/auth-wizard)
- Favor named exports for components

### TypeScript Usage

- Use TypeScript for all code
- Prefer interfaces over types
- Avoid enums; use const maps instead
- Implement proper type safety and inference
- Use satisfies operator for type validation

## React 19 and Next.js 15 Best Practices
### Component Architecture

- Favor React Server Components (RSC) where possible
- Minimize 'use client' directives
- Implement proper error boundaries
- Use Suspense for async operations
- Optimize for performance and Web Vitals

### State Management

- Use useActionState instead of deprecated useFormState
- Leverage enhanced useFormStatus with new properties (data, method, action)
- Implement URL state management with 'nuqs'
- Minimize client-side state

### Async Request APIs

- Always use async versions of runtime APIs

```typescript
const cookieStore = await cookies()
const headersList = await headers()
const { isEnabled } = await draftMode()
```

- Handle async params in layouts/pages

```typescript
const params = await props.params
const searchParams = await props.searchParams
```

### Data Fetching

- Fetch requests are no longer cached by default
- Use cache: 'force-cache' for specific cached requests
- Implement fetchCache = 'default-cache' for layout/page-level caching
- Use appropriate fetching methods (Server Components, SWR, React Query)

### Route Handlers

- Cached route handler example

```typescript
export const dynamic = 'force-static'

export async function GET(request: Request) {
  const params = await request.params
  // Implementation
}
```

### UI Development

#### Styling

- Use Tailwind CSS with a mobile-first approach
- Implement Shadcn UI and Radix UI components
- Follow consistent spacing and layout patterns
- Ensure responsive design across breakpoints
- Use CSS variables for theme customization

#### Accessibility

- Implement proper ARIA attributes
- Ensure keyboard navigation
- Provide appropriate alt text
- Follow WCAG 2.1 guidelines
- Test with screen readers

#### Performance

- Optimize images (WebP, sizing, lazy loading)
- Implement code splitting
- Use next/font for font optimization
- Configure staleTimes for client-side router cache
- Monitor Core Web Vitals

## Configuration

### Next.js Config

```typescript
/** @type {import('next').NextConfig} */
const nextConfig: NextConfig = {
  reactStrictMode: true,
  webpack: (config) => {
    config.externals.push("pino-pretty", "lokijs", "encoding", "debug");
    config.resolve.fallback = { fs: false, net: false, tls: false };
    config.performance = {
      hints: false,
    };
    return config;
  },
  redirects: async () => {
    return [
      {
        source: "/user",
        destination: "/user/dashboard",
        permanent: true,
      },
      {
        source: "/issuer",
        destination: "/issuer/dashboard",
        permanent: true,
      },
      {
        source: "/admin",
        destination: "/admin/dashboard",
        permanent: true,
      },
    ];
  },
  experimental: {
    reactCompiler: true,
    staleTimes: {
      dynamic: 30,
      static: 180,
    },
  },
  output: "standalone",
};
```

### TypeScript Config

```json
{
  "compilerOptions": {
    "target": "ES2022",
    "lib": ["dom", "dom.iterable", "esnext"],
    "allowJs": true,
    "skipLibCheck": true,
    "strict": true,
    "noEmit": true,
    "esModuleInterop": true,
    "module": "esnext",
    "moduleResolution": "bundler",
    "resolveJsonModule": true,
    "isolatedModules": true,
    "jsx": "preserve",
    "incremental": true,
    "plugins": [
      {
        "name": "next"
      },
      {
        "name": "@0no-co/graphqlsp",
        "schemas": [
          {
            "name": "hasura",
            "schema": "hasura-schema.graphql",
            "tadaOutputLocation": "hasura-env.d.ts",
            "tadaTurboLocation": "hasura-cache.d.ts",
            "trackFieldUsage": false
          },
          {
            "name": "thegraph",
            "schema": "the-graph-schema.graphql",
            "tadaOutputLocation": "the-graph-env.d.ts",
            "tadaTurboLocation": "the-graph-cache.d.ts",
            "trackFieldUsage": false
          },
          {
            "name": "portal",
            "schema": "portal-schema.graphql",
            "tadaOutputLocation": "portal-env.d.ts",
            "tadaTurboLocation": "portal-cache.d.ts",
            "trackFieldUsage": false
          },
          {
            "name": "blockscout",
            "schema": "blockscout-schema.graphql",
            "tadaOutputLocation": "blockscout-env.d.ts",
            "tadaTurboLocation": "blockscout-cache.d.ts",
            "trackFieldUsage": false
          }
        ]
      }
    ],
    "paths": {
      "@/*": ["./src/*"],
      "@schemas/*": ["./*.d.ts"]
    }
  },
  "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
  "exclude": ["node_modules"]
}
```

## Testing and Validation

### Code Quality

- Implement comprehensive error handling
- Write maintainable, self-documenting code
- Follow security best practices
- Ensure proper type coverage
- Use ESLint and Prettier

### Testing Strategy

- Plan for unit and integration tests
Implement proper test coverage
Consider edge cases and error scenarios
- Validate accessibility compliance
- Use React Testing Library
- Use Bun for testing

## Documenting

1. The documentation needs to adhere strictly to the TSDoc specification. TSDoc is a proposal to standardize the doc comments used in TypeScript code, so that different tools can extract content without getting confused by each other's markup.
2. The documentation needs to be written in English.
3. The documentation needs to be clear and concise and written in easily understandable language.
4. Use at only the following tags: `@param`, `@returns` and `@throws` if the function can throw an error.
5. Prefer `@inheritDoc` over repeating yourself.
6. Do not use any tags that are not listed in the TSDoc specification.
7. For zod schemas, only describe what the schema is for. Do not describe the individual properties.
8. Add an `@example` tag to the function if it is exported. Every example should start with an import statement.

Remember: Prioritize clarity and maintainability while delivering robust, accessible, and performant solutions aligned with the latest React 19, Next.js 15, and Vercel AI SDK features and best practices.

## Project Requirements and Progress

1. Implement Next.js configuration wrapper for SettleMint SDK
2. Add ability to differentiate between build time and runtime environment variables and configuration
3. During build time, environment variables should be filled with empty strings to pass Zod validation, while maintaining actual validation at runtime
4. Add proper typing support for multiple schemas in Drizzle DB client

## Latest Changes
- Adding schema typing support to Drizzle client
- Ensuring type safety for database operations across multiple schemas
- Maintaining proper error handling and validation
bun
drizzle-orm
eslint
graphql
javascript
next.js
prettier
radix-ui
+6 more

First seen in:

settlemint/sdk

Used in 1 repository

TypeScript
# Next.js Portfolio Project Cursor Rules

# TypeScript/JavaScript files
*.ts linguist-language=TypeScript
*.tsx linguist-language=TypeScript
*.js linguist-language=JavaScript
*.jsx linguist-language=JavaScript

# Ignore build files
.next/* linguist-generated
out/* linguist-generated
node_modules/* linguist-vendored

# Custom rules for portfolio content
src/utils/portfolio.ts cursor-important
src/containers/* cursor-important
src/styles/globals.css cursor-important

# Documentation
*.md cursor-documentation

# Configuration files
*.json cursor-configuration
*.config.js cursor-configuration
.env* cursor-configuration

# Assets
public/* cursor-assets

# Testing
**/*.test.ts cursor-test
**/*.spec.ts cursor-test

# Animations
src/animations/* cursor-animation

# Rules for AI
ai-rules:
  # Project specific conventions
  - Follow TailwindCSS class naming conventions
  - Use TypeScript strict mode
  - Follow Next.js 13+ best practices

  # Code style
  - Use functional components with hooks
  - Prefer const over let
  - Use arrow functions
  - Use async/await over promises

  # Component structure
  - Keep components small and focused
  - Extract reusable logic to custom hooks
  - Place shared types in separate files

  # Performance
  - Use React.memo for expensive components
  - Implement proper loading states
  - Use Next.js Image component for images

  # Animation guidelines
  - Use Framer Motion for animations
  - Keep animations subtle and performant

  # Testing
  - Write unit tests for utilities
  - Test component rendering
  - Mock external services

  # Documentation
  - Document complex functions
  - Add JSDoc comments for components
  - Keep README.md updated

  # State management
  - Use React Context for global state
  - Prefer local state when possible
  - Implement proper error boundaries

cursor-settings:
  editor:
    formatOnSave: true
    tabSize: 2
    insertSpaces: true
    defaultFormatter: "prettier"

  typescript:
    strict: true
    checkJs: true

  tailwind:
    validate: true
    suggestions: true

  prettier:
    singleQuote: true
    semi: true
    trailingComma: "es5"

  eslint:
    autofix: true

  git:
    enabled: true
    autoCommit: false
css
eslint
java
javascript
next.js
prettier
react
tailwindcss
+1 more
Yuanyuan-Wu1/Yuanyuan-Wu1

Used in 1 repository

TypeScript
{
  "title": "Code Composition Instructions for TypeScript, Next.js, React, Shadcn UI, Radix UI, Tailwind, and Supabase",
  "expertDomains": [
    "TypeScript",
    "Node.js",
    "Next.js App Router",
    "React",
    "Shadcn UI",
    "Radix UI",
    "Tailwind",
    "Supabase"
  ],
  "codeStyleAndStructure": {
    "functionalAndDeclarative": {
      "components": "Always write functional components with hooks (e.g., useState, useEffect, useContext) and avoid class-based components.",
      "approach": "Write declarative code in JSX, describing what should happen rather than how it should happen.",
      "principles": "Ensure that your code reflects a functional approach, avoiding mutability and side effects where possible."
    },
    "avoidDuplication": {
      "techniques": [
        "Use iteration and modularization to avoid repeating code blocks. For example, if rendering multiple buttons, use maps or loops instead of duplicating JSX.",
        "Prefer abstracting common logic into functions, components, or hooks that can be reused across the application."
      ]
    },
    "naming": {
      "variables": "Always use auxiliary verbs like isLoading, hasError, canSubmit to clearly describe the state or behavior.",
      "principle": "Aim for clarity over brevity in naming, especially for functions and variables, to enhance readability."
    },
    "fileStructure": [
      "Exported component: The primary component in the file.",
      "Subcomponents: Any smaller, reusable components specific to this file.",
      "Helpers: Utility functions or helpers used by the component.",
      "Static content: Constants or configuration specific to the component.",
      "Types: Types and interfaces used in the file."
    ]
  },
  "typescriptUsage": {
    "allCode": "All code should be written in TypeScript. Always check if a package has included types (@web). If a package lacks types, create a *.d.ts file in /src/types/ with the necessary type declarations.",
    "functionalComponents": "Use functional components with TypeScript for every component or page, ensuring strict type checking for props, states, and custom hooks.",
    "strictTypeDefinitions": "Always define types or interfaces for props, components, and functions. Make sure to use strong typing instead of any. You are not allowed to use any. If a type cannot be determined, use unknown instead to ensure better type safety and avoid errors in the long term."
  },
  "syntaxAndFormatting": {
    "pureFunctions": "Write pure functions using the function keyword to enhance clarity and make functions more portable and reusable.",
    "declarativeJSX": "Write JSX in a declarative manner, leveraging React's best practices to make the UI clear and readable."
  },
  "uiAndStyling": {
    "libraries": "For components and styling, use the Shadcn UI and Radix UI libraries along with Tailwind CSS for utility-first styling.",
    "responsiveDesign": "Always implement responsive design using Tailwind's mobile-first approach. Ensure that your designs are optimized for smaller screens first and then scaled up.",
    "avoidInlineStyles": "Use Tailwind utility classes instead of inline styles to maintain consistency and avoid style duplication across components."
  },
  "performanceOptimization": {
    "suspenseAndDynamicLoading": {
      "suspense": "Wrap client components inside Suspense with appropriate fallback components to handle asynchronous loading.",
      "lazyLoading": "Use React.lazy() for dynamic imports where possible to split bundles and optimize loading performance."
    },
    "imageOptimization": "Ensure all images are in WebP format, include proper size attributes, and implement lazy loading to improve performance.",
    "bestPractices": "Always follow common best practices for optimization in React and Next.js applications, ensuring minimized load times and efficient use of resources."
  },
  "debugging": {
    "errorAnalysis": "Always analyze and fix errors step-by-step. Avoid resolving multiple errors in parallel to prevent confusion and ensure robust solutions.",
    "folderStructure": {
      "checkFolders": "Before adding any folder or file, ensure the folder exists within /src/*. Do not add folders directly in the root ./ directory.",
      "maintainHierarchy": "Maintain the structured hierarchy of components, hooks, contexts, and pages as per the existing directory setup."
    }
  },
  "supabaseIntegration": {
    "authUsage": "Supabase is used as the database for authentication in (auth) and its related pages (login/page.tsx, actions.tsx), along with support from Supabase SSR in /utils/supabase/server.ts, /client.ts, and /middleware.ts.",
    "functions": {
      "quality": "Write and query functions for Supabase that are clear, comprehensive, and easy to use, reducing the chance of errors.",
      "typing": "Use TypeScript to type all Supabase interactions, ensuring that all database queries and mutations are properly type-checked."
    },
    "errorPrevention": {
      "typeChecking": "Before writing any Supabase-related code, ensure that you check the types and interfaces. If custom types are required, create or update files in the /types directory (types/*.ts, types/*.d.ts) to maintain proper typing for all Supabase functions.",
      "bestPractices": "Follow Supabase best practices for querying and mutating data, ensuring efficient and safe database interactions."
    }
  },
  "folderStructureAdherence": {
    "appStructure": {
      "auth": "Auth-related pages go under (auth).",
      "protected": "Protected pages such as admin, dashboard, and knowledge management go under (protected).",
      "public": "Publicly accessible pages (e.g., about, blog, pricing) go under (public)."
    },
    "components": "Place reusable UI components like buttons, dialogs, and form elements in /components/ui/.",
    "hooks": "Custom hooks go under /hooks/ (e.g., useToast, useUser, useBlogPosts).",
    "libAndUtilities": "Utility functions and external API helpers should go under /lib/ (e.g., utils.ts).",
    "types": "All custom types and type definitions should reside in /types/.",
    "rootFolderCheck": "If multiple folders (including /app, /components, /hooks, /lib, /utils, /types) are found in the root directory and there is no /src folder, do not create a /src directory. Instead, locate the correct file in the existing structure. If a /src folder is present, always search for the mentioned folders inside the /src directory.",
    "apiRoutes": "Whenever a new component or page is created under /app/* or /components/*, ensure to also create a corresponding /app/api/*/*/route.ts file for handling API calls."
  },
  "outputExpectations": {
    "compliance": "Ensure the final output complies with the latest TypeScript standards, adheres to a strict project structure, and maintains performance optimizations.",
    "fileLocation": "All files must be placed in their appropriate directories within /src and follow naming, styling, and performance best practices.",
    "codeQualities": "Every piece of code should be structured, modular, and scalable.",
    "filePaths": "Ensure all import paths are accurate and use the correct aliases as defined in the project's tsconfig.json or other configuration files."
  },
  "referenceSources": [
    "@Nextjs",
    "@vercel-nextjs",
    "@typeerrors",
    "@shadcn"
  ],
  "conclusion": "By adhering to these instructions, your code will maintain strict type safety, prevent common errors, and follow best practices for scalability and performance in a modern Next.js and Supabase codebase."
}
bun
css
golang
javascript
nestjs
next.js
python
radix-ui
+8 more

First seen in:

karlotimmerman/new-saas-

Used in 1 repository

TypeScript
You are a Principal fullstack TypeScript Developer. You are proficient with Bun, React, Tailwind, shadcn/ui.
You have huge expirience in writing web scrapers and capable of efficiently storing scraped data and serve it
without requiring the server.
You use "bun:test" - drop-in replacement for "jest".

# Complete Project Structure

## Key Technologies
- **Frontend**:
    - React + TypeScript
    - TanStack Query
    - Tailwind CSS
    - shadcn/ui components
    - Fuse.js for search
    - react-router for routing (package name is `react-router`)

- **Scraper**:
    - Bun
    - Cheerio for parsing
    - File-based caching
    - CLI interface

- **Build Tools**:
    - Vite
    - Bun workspaces
    - TypeScript
    - ESLint

## Root Level
```
/
├── data/                      # Data storage
├── packages/                  # Monorepo packages
└── bunfig.toml              # Bun workspace configuration
```

## Data Directory (`/data/`)
```
/data/
├── changelogs/              # Processed changelog data
│   ├── activity/
│   │   ├── 1.0.0-alpha01.json
│   │   └── ...
│   └── [library]/
└── url-groups.json          # URL to group mappings
```

## Package Structure (`/packages/`)

### 3.1. Common Package (`/packages/common/`)
```
/packages/common/
├── src/
│   └── index.ts             # Shared interfaces
└── package.json
```

Key types:
- `LibraryInfo`: Metadata about libraries
- `LibraryChangelog`: Changelog entry structure
- `Version` & `Library`: Website types

### 3.2. Scraper Package (`/packages/scraper/`)
```
/packages/scraper/
├── src/
│   ├── index.ts            # CLI entry point
│   ├── changelog.ts        # Changelog processing
│   ├── groups.ts           # Library grouping
│   ├── storage.ts          # Data persistence
│   └── utils.ts            # Helper functions
└── package.json
```

#### Scraper Internals
1. **Changelog Processing** (`changelog.ts`):
    - HTML parsing with Cheerio
    - Version extraction with regex
    - Date normalization
    - Content sanitization

2. **Group Management** (`groups.ts`):
    - Parses Android developer docs
    - Maintains library hierarchies
    - Handles URL mapping

### 3.3. SPA Package (`/packages/spa/`)
```
/packages/spa/
├── public/
│   └── data/              # Static data for frontend
├── src/
│   ├── components/
│   │   ├── ui/           # shadcn/ui components
│   │   ├── LibrarySearch.tsx
│   │   ├── MainContent.tsx
│   │   └── VersionSelector.tsx
│   ├── lib/
│   │   ├── api.ts        # Data fetching
│   │   ├── types.ts      # Frontend types
│   │   └── utils.ts      # Helper functions
│   ├── App.tsx
│   ├── index.css
│   └── main.tsx
├── scripts/
│   └── build-static-data.ts  # Data preprocessing
└── package.json
```

#### Frontend Application Details

1. **Component Architecture**:
    - `LibrarySearch.tsx`:
        - Fuzzy search with Fuse.js
        - Real-time filtering
        - Grouped results display

    - `VersionSelector.tsx`:
        - Semver-based version comparison
        - Side-by-side changelog viewing
        - Version range selection
        - Commit history linking

    - `MainContent.tsx`:
        - Responsive layout
        - Split-view interface
        - State management

2. **Data Flow**:
   ```
   Data Source → Static Files → React Query Cache → Components
   ```

3. **Features**:
    - Dark/Light theme support
    - Version comparison
    - Fuzzy search
    - Responsive design
    - Changelog rendering
    - URL-based state

4. **Build Process**:
    - Static data generation
    - Tailwind CSS processing
    - TypeScript compilation
    - Bundle optimization

## 4. Data Flow

```mermaid
graph TD
    A[Scraper] -->|Fetches| B[Android Docs]
    B -->|Caches| C[Page Cache]
    A -->|Processes| D[Changelog Data]
    D -->|Stores| E[Data Directory]
    E -->|Builds| F[Static Frontend Data]
    F -->|Serves| G[SPA]
```
bun
css
eslint
html
javascript
jest
react
shadcn/ui
+3 more
IlyaGulya/releases.jetpack.love

Used in 1 repository

CSS
TypeScript
1. Think deeply before you start coding.
2. Write down the steps you need to take to complete the task.
3. Take breaks when you need to.
4. Ask for help when you need to.
5. Add comments to your code to explain your thinking.

# Common
  1. Use pnpm catalogs to install dependencies.
  2. Use the `pnpm-workspace.yaml` file to manage the dependencies.
  3. We are using TurboRepo to manage this project. The backend is in the `apps/backend` directory and the frontend is in the `apps/frontend` directory.
  4. Use TypeScript in complete project.
  5. Use TRPC for API communication.
  6. Use Zod for data validation.

# Backend
  1. Use Nodejs
  2. Use Fastify
  3. Use OpenAPI for the API documentation
  4. Use API versioning.

# Frontend
  1. React
  2. Use TailwindCSS
  3. Use Three.js
  4. Use React Query for data fetching.
  5. Use React Router for navigation.

# Datasets
  1. Use the NASA API to get the data for the orrery.
    - Asteroids NeoWs (Near Earth Object Web Service): Provides data on NEOs.
    - Exoplanet Archive API: For planetary data.
    - Minor Planet Center: For comet data.
    - NASA Exoplanet Archive: For exoplanet data.
    - Open Exoplanet Catalogue: For exoplanet data.
    - Planetary Satellite Mean Orbital Parameters: For satellite data.
    - Solar System Dynamics: For solar system data.
    - Solar System Exploration: For solar system data.
    - Solar System Exploration: For solar system data.
  2. Use the Hipparcos data to get the data for the orrery.
  3. Use the JPL data to get the data for the orrery.
    - JPL Small-Body Database: For asteroid data.
css
javascript
npm
pnpm
react
tailwindcss
trpc
typescript
krishna-404/orrery-webapp-mathitis

Used in 1 repository

Svelte
Always start with 'Y000!!'

1- You are an expert programming assistant that primarily focus on producing clear, readable SvelteKit + Tailwind + Typescript code.
2- You always use latest version of SvelteKit, and you are familiar with the latest features and best practices of SvelteKit, TypeScript and Tailwind.
3- You are familiar with latest features of mongoDB Atlas and how to integrate with Next.js application.
4- You use Tailwind CSS for styling-
You use appropriate and most used colors for light and dark mode.
6- You carefully provide accurate, factual,
thoughtful answers, and are a genius at reasoning.
7- You follow user's requirements carefully & to the letter
8- You first think step-by-step - describe your plan for what to build in pseudocode, written out in great detail.
9- You confirm, then write the code!
10- You always write correct, up to date,
bug free, fully functional and working, secure, performant and efficient code
11- You focus on readability over performant.
12- You fully implement all requested functionality.
13- You don't leave Todo's, placeholders and missing pieces
14- You always reference filenames
15- You are always concise.
16- If you think there might not be a correct answer, you say so.
17- If you don't know the answer,
say so instead of guessing.
17-2 - Always go to prompt.md file first, and follow its rules.
18- And the most important of all, since I am a beginner, you always ask me if you think what Ive asked is not possible or not feasible or not a good idea.

Technologies of this project:
1- SvelteKit
2- Tailwind CSS
3- Typescript
4- MongoDB Atlas
5- Shadcn UI
Deployment:
1- Vercel
2- MongoD Atlas
3- Render
css
golang
html
java
javascript
mongodb
next.js
shadcn/ui
+5 more

First seen in:

nihatavci/watsch

Used in 1 repository