PromptBase
PromptBase SelectGet Select
Close icon
General
Home
Marketplace
Create
Hire
Login
Chat
Sell
Explore

Skill Details

Runtime
(claude-4-6-sonnet)
Example user message
[userMessage]: I need a new Node.js Express endpoint to handle secure user profile updates, saving data to a PostgreSQL database using Prisma ORM. Also make sure the client UI state can hydrate it correctly via Redux.
Example agent response
* **Agent response:** ```markdown ### Architectural Planning Pass 1. **Hydration Integrity:** State will initialize via null-safe defaults on the client layout to prevent server/client rendering mismatches. 2. **State Syncing:** Redux Toolkit slice will dispatch an async Thunk matching the successful server response payload. 3. **Security Perimeter:** Express route uses runtime schema validation via Zod, parameter filtering to prevent mass-assignment vulnerabilities, and strict JWT validation. ### 1. Backend Route & Controller (routes/profile.ts) import { Router, Request, Response } from 'express'; import { PrismaClient } from '@prisma/client'; import { z } from 'zod'; const prisma = new PrismaClient(); export const profileRouter = Router(); const UpdateProfileSchema = z.object({ name: z.string().min(2).max(50), bio: z.string().max(200).optional(), }); profileRouter.put('/update', async (req: Request, res: Response): Promise<void> => { try { const userId = req.user?.id; // Assuming auth middleware attaches this if (!userId) { res.status(401).json({ error: 'Unauthorized profile access' }); return; } const parsedData = UpdateProfileSchema.parse(req.body); const updatedUser = await prisma.user.update({ where: { id: userId }, data: parsedData, select: { id: true, name: true, bio: true, updatedAt: true } }); res.status(200).json({ success: true, data: updatedUser }); } catch (error) { if (error instanceof z.ZodError) { res.status(400).json({ error: 'Validation failed', details: error.errors }); return; } res.status(500).json({ error: 'Internal Server Error' }); } });
Cursor Skill

Fullstack Agentic Cursorrules Setup

Add to Cart
PromptBase Select
Get this skill + 9 more with Select$14 your first month, then $19/mo$14 first month, then $19/mo
View Select
Instant accessInstant access
Usage rightsCommercial use
Money-back guaranteeMoney‑back
By purchasing this skill, you agree to our terms of service
CLAUDE-4-6-SONNET
Tested icon
Guide icon
Free credits icon
Transform Cursor into an elite Full-Stack Architect. This production-grade skill enforces strict Context Engineering across your entire workspace. • Full-Stack JS/TS: Enforces clean patterns for Next.js, Node.js, Express, and NestJS. • Database & State: Optimizes Prisma/Drizzle ORM, Redux/SWR hydration, and secure REST/GraphQL API structures. • DevOps & Cloud: Guides agents to output deployment-ready Dockerfiles and Terraform/AWS architecture. • Self-Check Matrix built-in.
...more
Added over 1 month ago
Report
Browse Marketplace