Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Celaya55/app-cr/llms.txt
Use this file to discover all available pages before exploring further.
Overview
App CR uses Prisma ORM with PostgreSQL 15 as the database. The schema defines two core models: User and Task, with a one-to-many relationship.Schema Configuration
Generates the Prisma Client for JavaScript/TypeScript applications
Database provider (PostgreSQL 15)
Database connection URL from
DATABASE_URL environment variableUser Model
The User model represents application users who can create and manage tasks.Fields
Primary key with auto-incrementAttributes:
@id- Primary key constraint@default(autoincrement())- Auto-generated sequential ID
User’s email address (unique across all users)Attributes:
@unique- Unique constraint enforced at database level
Hashed password for user authenticationSecurity: Store only bcrypt/argon2 hashed passwords, never plaintext
One-to-many relationship with Task modelRelation: A user can have multiple tasks
Database Table
Task Model
The Task model represents todo items created by users.Fields
Primary key with auto-incrementAttributes:
@id- Primary key constraint@default(autoincrement())- Auto-generated sequential ID
Task title or summaryValidation: Required field, cannot be null or empty
Optional detailed description of the taskNullable: Can be null/undefined
Task completion statusAttributes:
@default(false)- New tasks are incomplete by default
true (completed) or false (pending)Foreign key referencing the User who created this taskRelation: Links to
User.idMany-to-one relationship with User modelAttributes:
@relation(fields: [userId], references: [id])- Foreign key relationship
ON DELETE RESTRICT- Cannot delete user if they have tasksON UPDATE CASCADE- Updates propagate to tasks
Database Table
Relationships
User ↔ Task (One-to-Many)
Task belongs to User
Each task belongs to exactly one user through the
author relation and userId foreign keySchema File Location
Working with the Schema
After modifying the schema, always run
prisma generate to update the Prisma Client types.Next Steps
Run Migrations
Learn how to apply schema changes to your database
Database Setup
Configure database connection and environment