aquario
CLAUDE.md85 starsChanged 10 months agoMITView on GitHub
Aquário is a university portal for UFPB (Universidade Federal da Paraíba) students. It provides guides, job listings, entity directories, and user profiles. The codebase uses Portuguese for domain terms: - Guia = Guide - Secao = Section - SubSecao = Subsection - Centro = Academic Center - Curso = Course/Major -
In this repository6 other files it gives its agents.
The file
We split this CLAUDE.md into the rules it gives an agent
9 rules. About 0 are common, 5 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 45
All frontend API calls use apiClient from @/lib/client/api/api-client.
- Very specific: line 60
Frontend: Use throwApiError(response) to convert API errors to exceptions
- Distinctive: line 124
Use TypeScript strict mode
- Very specific: line 125
Prefer type over interface for object types
- Distinctive: line 126
Use Zod for runtime validation
- Distinctive: line 127
Keep components focused and small
- Distinctive: line 128
Use React Query for data fetching, not useEffect
- Very specific: line 149
Always update
CHANGELOG.mdwhen completing work: Add entries under [Unreleased] in the appropriate category: - Distinctive: line 156
Keep entries concise but descriptive.
≈ “Common” is an estimate: at least 1 in 5 of the 29,248 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Aquário - AI Assistant Guidelines
Project Overview
Aquário is a university portal for UFPB (Universidade Federal da Paraíba) students. It provides guides, job listings, entity directories, and user profiles.
Tech Stack
- Framework: Next.js 15 (App Router) with React 18
- Language: TypeScript (strict mode)
- Database: PostgreSQL with Prisma ORM
- Styling: Tailwind CSS + shadcn/ui components
- State: TanStack Query (React Query) for server state
- Auth: JWT tokens with automatic refresh
Project Structure
src/
├── app/ # Next.js App Router pages and API routes
│ ├── api/ # API route handlers
│ └── (pages)/ # Page components
├── components/ # React components
│ ├── ui/ # shadcn/ui base components
│ └── [feature]/ # Feature-specific components
├── lib/
│ ├── client/ # Client-side code (runs in browser)
│ │ ├── api/ # API service functions (use apiClient)
│ │ ├── hooks/ # React hooks
│ │ └── errors.ts # Client error handling (throwApiError)
│ ├── server/ # Server-side code (runs on server only)
│ │ ├── api/ # API route utilities
│ │ ├── container/ # Dependency injection container
│ │ ├── db/ # Database repositories (Prisma)
│ │ └── services/ # Business logic services
│ └── shared/ # Code shared between client and server
│ ├── types/ # TypeScript types and interfaces
│ ├── errors/ # Error codes and types
│ └── config/ # Constants and configurationKey Patterns
API Client
All frontend API calls use apiClient from @/lib/client/api/api-client. It automatically:
- Prepends the API_URL
- Handles JWT token injection
- Refreshes tokens on 401 errors
// Correct - just pass the endpoint
const response = await apiClient("/guias", { method: "GET" });
// Wrong - don't include API_URL
const response = await apiClient(`${API_URL}/guias`, ...);Error Handling
- Backend: Return an
ApiError.*response (notFound,badRequest,forbidden, ...) from@/lib/server/errors; error codes are machine-readableErrorCodes in@/lib/shared/errors - Frontend: Use
throwApiError(response)to convert API errors to exceptions
// Backend route
if (!user) {
return ApiError.notFound("Usuário");
}
// Frontend service
if (!response.ok) {
await throwApiError(response);
}Repository Pattern
Database access uses repositories via dependency injection:
import { getContainer } from "@/lib/server/container";
const container = getContainer();
const user = await container.usuarioRepository.findById(id);API Routes
Route handlers are plain GET/POST functions. Wrap authenticated ones in withAuth and validate bodies with the Zod schemas in @/lib/server/api-schemas:
import { NextResponse } from "next/server";
import { withAuth } from "@/lib/server/services/auth/middleware";
import { ApiError, handleError } from "@/lib/server/errors";
export async function POST(request: Request) {
// The try/catch wraps withAuth: its user lookup runs before the callback and can also throw.
try {
return await withAuth(request, async (req, usuario) => {
const data = schema.parse(await req.json());
return NextResponse.json(await doSomething(usuario, data));
});
} catch (error) {
// req.json() throws a SyntaxError on a malformed body: that is the client's fault.
if (error instanceof SyntaxError) {
return ApiError.badRequest("Corpo da requisição inválido");
}
return handleError(error, "Erro ao salvar"); // ZodError -> 400, anything else -> 500
}
}Domain Terminology (Portuguese)
The codebase uses Portuguese for domain terms:
Guia= GuideSecao= SectionSubSecao= SubsectionCentro= Academic CenterCurso= Course/MajorEntidade= Entity (student organizations, labs, etc.)Usuario= UserVaga= Job listingMembro= Member
Code Style
- Use TypeScript strict mode
- Prefer
typeoverinterfacefor object types - Use Zod for runtime validation
- Keep components focused and small
- Use React Query for data fetching, not useEffect
Commands
npm run dev # Start development server
npm run build # Build for production
npm run check-all # Run lint + format check + type check
npm run db:migrate # Create/run database migrations
npm run db:studio # Open Prisma Studio
npm run setup # First-time project setupTesting
- Unit tests: Jest (
npm run test) - Integration tests: Vitest (
npm run test:integration) - All tests:
npm run test:all
Changelog
Always update CHANGELOG.md when completing work. Add entries under [Unreleased] in the appropriate category:
- Added — New features
- Changed — Changes in existing functionality
- Removed — Removed features
- Fixed — Bug fixes
Keep entries concise but descriptive. Reference the feature/component affected.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

