Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions .clauderc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

This file contains instructions for GitHub Copilot to follow when generating code for this project. Please adhere to these guidelines to ensure consistency and maintainability across the codebase. This project is CoRATES (Collaborative Research Appraisal Tool for Evidence Synthesis), a SolidJS-based web application deployed on Cloudflare Workers.

the /web package contains the frontend application built with SolidJS.
the /workers package contains backend services, including API endpoints and database migrations.
the /landing package contains the marketing and landing site.

The web package is copied into the landing package during the build process for deployment and all deployed as a single site on a single worker.

## Coding Standards

- Do not use emojis in code, comments, documentation, or commit messages.
Expand All @@ -11,6 +17,7 @@ This file contains instructions for GitHub Copilot to follow when generating cod
- Use aliases for imports when appropriate to improve readability.
- Use responsive design principles for UI components.
- Prefer using config files rather than hardcoding values.
- Place plans in the docs/plans/ directory.

## File Size Guidelines

Expand All @@ -21,14 +28,20 @@ This file contains instructions for GitHub Copilot to follow when generating cod
- Each file should handle one coherent responsibility
- Group related components in subdirectories with an `index.js` barrel export

## Libraries

Use Zod for schema and input validation.
Use Drizzle ORM for database interactions and migrations.
Use Better-Auth for authentication and user management.
Use Zag.js for UI components and design system.

## Documentation Tool

PLEASE USE THE CORATES MCP tools to explore local documentation sources. Use this MCP for all Better-Auth, Drizzle, Icons, and Zag documentation.

## Zag.js

When you need to implement UI components use zag.js
Zag component exist in `packages/web/src/components/zag/*` and should be reused, see the README.md in that folder for a list of existing components.
Zag component exist in `packages/web/src/components/zag/*` and should be reused, see the README.md in that folder for a list of existing components. BE SURE TO CHECK THAT LIST AND REFERENCE EXISTING COMPONENTS AS WELL AS THE DOCS MCP BEFORE ADDING NEW COMPONENTS AND WHEN DEBUGGING.

## Additional References

Expand All @@ -51,6 +64,7 @@ Zag component exist in `packages/web/src/components/zag/*` and should be reused,
### State Architecture (Very Important)

To keep the codebase maintainable and avoid prop drilling:

- Do NOT prop-drill application state.
- Shared or cross-feature state must live in external stores under packages/web/src/stores/ or relative to the component file.
- Import stores directly where needed instead of passing values through multiple components.
Expand All @@ -59,7 +73,7 @@ To keep the codebase maintainable and avoid prop drilling:
- an external store
- a primitive
- or Solid context (when scoped to a feature)
ALWAYS prefer the CLEANEST solution.
ALWAYS prefer the CLEANEST solution.

### Destructuring props

Expand Down
20 changes: 17 additions & 3 deletions .cursorrules
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

This file contains instructions for GitHub Copilot to follow when generating code for this project. Please adhere to these guidelines to ensure consistency and maintainability across the codebase. This project is CoRATES (Collaborative Research Appraisal Tool for Evidence Synthesis), a SolidJS-based web application deployed on Cloudflare Workers.

the /web package contains the frontend application built with SolidJS.
the /workers package contains backend services, including API endpoints and database migrations.
the /landing package contains the marketing and landing site.

The web package is copied into the landing package during the build process for deployment and all deployed as a single site on a single worker.

## Coding Standards

- Do not use emojis in code, comments, documentation, or commit messages.
Expand All @@ -11,6 +17,7 @@ This file contains instructions for GitHub Copilot to follow when generating cod
- Use aliases for imports when appropriate to improve readability.
- Use responsive design principles for UI components.
- Prefer using config files rather than hardcoding values.
- Place plans in the docs/plans/ directory.

## File Size Guidelines

Expand All @@ -21,14 +28,20 @@ This file contains instructions for GitHub Copilot to follow when generating cod
- Each file should handle one coherent responsibility
- Group related components in subdirectories with an `index.js` barrel export

## Libraries

Use Zod for schema and input validation.
Use Drizzle ORM for database interactions and migrations.
Use Better-Auth for authentication and user management.
Use Zag.js for UI components and design system.

## Documentation Tool

PLEASE USE THE CORATES MCP tools to explore local documentation sources. Use this MCP for all Better-Auth, Drizzle, Icons, and Zag documentation.

## Zag.js

When you need to implement UI components use zag.js
Zag component exist in `packages/web/src/components/zag/*` and should be reused, see the README.md in that folder for a list of existing components.
Zag component exist in `packages/web/src/components/zag/*` and should be reused, see the README.md in that folder for a list of existing components. BE SURE TO CHECK THAT LIST AND REFERENCE EXISTING COMPONENTS AS WELL AS THE DOCS MCP BEFORE ADDING NEW COMPONENTS AND WHEN DEBUGGING.

## Additional References

Expand All @@ -51,6 +64,7 @@ Zag component exist in `packages/web/src/components/zag/*` and should be reused,
### State Architecture (Very Important)

To keep the codebase maintainable and avoid prop drilling:

- Do NOT prop-drill application state.
- Shared or cross-feature state must live in external stores under packages/web/src/stores/ or relative to the component file.
- Import stores directly where needed instead of passing values through multiple components.
Expand All @@ -59,7 +73,7 @@ To keep the codebase maintainable and avoid prop drilling:
- an external store
- a primitive
- or Solid context (when scoped to a feature)
ALWAYS prefer the CLEANEST solution.
ALWAYS prefer the CLEANEST solution.

### Destructuring props

Expand Down
1 change: 1 addition & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ The web package is copied into the landing package during the build process for
- Use aliases for imports when appropriate to improve readability.
- Use responsive design principles for UI components.
- Prefer using config files rather than hardcoding values.
- Place plans in the docs/plans/ directory.

## File Size Guidelines

Expand Down
Loading