02-arquitetura-backend

Define Node.js, Express, and Prisma backend standards with JWT authentication and permission checks.

Updated Feb 10, 2026
One-click install
npx skills add https://github.com/clark-neitzel/cahardt --skill 02-arquitetura-backend
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: 02-arquitetura-backend
Source: https://github.com/clark-neitzel/cahardt/tree/main/.agent/skills/02-arquitetura-backend
Command: npx skills add https://github.com/clark-neitzel/cahardt --skill 02-arquitetura-backend

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides essential guidelines and rules for developing the backend of the Hardt Salgados App, ensuring consistency, security, and maintainability in Node.js, Express, and Prisma development.

Core Features & Use Cases

  • Architectural Standards: Defines directory structure, controller/service patterns, and Prisma usage.
  • Authentication & Authorization: Outlines secure login flows and mandatory permission checking via database lookups.
  • API Integration: Specifies how to handle external API calls, particularly for Conta Azul, with built-in token refresh mechanisms.
  • Use Case: When creating a new API endpoint for product management, consult this Skill to understand the expected controller, service, and route structure, and how to properly authenticate and authorize the request using the getPerms helper.

Quick Start

Consult this skill before creating any new routes, controllers, services, or modifying authentication logic in the backend.

Frequently Asked Questions about 02-arquitetura-backend

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure a Node.js backend using Express and Prisma?

Structure a Node.js backend by separating directory structure into controller and service patterns, using Prisma for database access. This approach ensures consistency and maintainability across your Express application routes.

What is the best way to implement JWT authentication with database permission checks in Express?

Implement JWT authentication in Express by validating tokens and enforcing mandatory permission checks via database lookups. Using a helper like getPerms ensures secure login flows and proper authorization before route access.

How do I integrate external APIs like Conta Azul in a Node.js backend?

Integrate external APIs like Conta Azul in Node.js by using internal wrappers for token refresh and secure data handling. This ensures reliable authentication and consistent communication with external services.

Can I use Prisma for database access in an Express controller service architecture?

Yes, you can use Prisma for database access within an Express controller service architecture. The service layer handles Prisma queries, while controllers manage HTTP requests, maintaining a clean separation of concerns.

When do I need to refresh external API tokens in a Node.js application?

You need to refresh external API tokens in Node.js when handling integrations like Conta Azul. Implement internal wrappers to automatically manage token refresh logic and ensure secure data handling during API communication.