- Created comprehensive documentation files for backend services, detailing API endpoints, database access, authentication, and middleware. - Added documentation for Rose UI components and custom FormKit components, including descriptions and usage. - Documented database models defined in Prisma, outlining core and supporting models with their fields and relationships. - Established development guidelines for component and form development, state management, API development, and styling. - Included details on FormKit integration for form handling, plugins, and the form builder feature. - Provided an overview of the project structure, key configuration files, and routing system with main routes and middleware usage. - Enhanced state management documentation with key stores and usage guidelines for Pinia.
41 lines
888 B
Plaintext
41 lines
888 B
Plaintext
---
|
|
description:
|
|
globs: *.js
|
|
alwaysApply: false
|
|
---
|
|
# Backend Services
|
|
|
|
The project uses Nuxt's server directory for backend API endpoints and services.
|
|
|
|
## API Endpoints
|
|
|
|
Check the [server](mdc:server) directory for API routes:
|
|
- Authentication routes (login, register, password reset)
|
|
- User management
|
|
- Form builder APIs
|
|
- Data access endpoints
|
|
|
|
## Database Access
|
|
|
|
The application uses Prisma ORM to interact with the database:
|
|
- Models defined in [schema.prisma](mdc:prisma/schema.prisma)
|
|
- Database operations through Prisma Client
|
|
- Migrations managed through Prisma Migration
|
|
|
|
## Authentication
|
|
|
|
The authentication system includes:
|
|
- JWT-based authentication
|
|
- Password hashing and verification
|
|
- Role-based access control
|
|
- Session management
|
|
|
|
## Middleware
|
|
|
|
Server middleware handles:
|
|
- Request validation
|
|
- Authentication verification
|
|
- Error handling
|
|
- Response formatting
|
|
|