KyrosDigital kyros-business-ontology .cursorrules file for TypeScript

### General

- Use yarn instead of npm
- Use shadcn components

### Next.js
- We use /app directory instead of /src

### Middleware
- Use import { clerkMiddleware, createRouteMatcher } from '@clerk/nextjs/server' instead of '@clerk/nextjs'

### Code Architecture Patterns
- Frontend uses contexts, contexts interact with routes, routes utilize services, services interact with prisma. 
- Services are in the /services directory, contexts are in the /contexts directory, routes are in the /app/api/v1/ directory. 

### clerk
- access to the auth object with clerk uses '@clerk/nextjs/server'
- const { userId }: { userId: string | null } = await auth()

### Services
- Services are in the /services directory, services interact with prisma. 
- All prisma interactions should be handled by a service. 
- Services should be named like the prisma model they interact with, but with a Service suffix. 
clerk
css
javascript
next.js
npm
prisma
shadcn/ui
typescript
+1 more

First Time Repository

TypeScript

Languages:

CSS: 1.7KB
JavaScript: 1.6KB
TypeScript: 368.6KB
Created: 11/8/2024
Updated: 1/21/2025

All Repositories (1)