How victorborges97/efix works
Project type and purpose
• This is a full-stack web application (“eFix – Sistema de Gerenciamento de Soluções de Erros”) composed of:
• Backend: NestJS monolith exposing REST endpoints (and a WebSocket gateway)
• Frontend: React (Vite) SPA
• Database: PostgreSQL via Prisma ORM
• Containerization: Docker Compose for local DB
File structure
• Top-level folders:
• backend/
• frontend/
• Backend structure (NestJS):
• src/app.module.ts – root module
• Modules: dashboard, evaluations, suggestions, events, prisma, shared
• Prisma folder: schema.prisma, migrations, seed.ts
• Configuration: docker-compose.yml, env.example, eslint, tsconfig
• Frontend structure (Vite + React):
• src/pages – page components (dashboard-page, suggestions-page)
• src/components – layout + UI building blocks (ShadCN UI wrappers)
• src/lib – API client (Axios), socket.io wrapper, utils
• src/shared – DTOs, hooks (use-socket), interfaces, utilities
• Config: vite.config.ts, tailwind.config.js, env.example
README for additional insights
• Purpose: CRUD for suggestions + evaluations, reporting dashboard
• Phases: suggestion management, evaluation management, dashboard filters, real-time updates planned
• Tech stack: NestJS, Prisma, PostgreSQL, React, Tailwind, ShadCN UI, Axios, React Hook Form, Zod
Elements
• Clear labels:
• “React SPA” with sub-areas: Pages, Components, Hooks
• “NestJS API” with modules listed
• “PostgreSQL” (Prisma)
• Blue rectangles for UI layer
• Green for Backend services
Detailed capture of essential elements
• Frontend: Data fetching (Axios), real-time hooks, form validation
• Backend: Business logic (Services), API contracts (DTOs/Zod), DB access (Prisma), real-time gateway
• DB: Schema entities: ErrorSuggestion, Evaluation
• Sequence for a typical flow:
1. User fills suggestion form → Axios POST → SuggestionsController → SuggestionsService → Prisma → DB
2. User views dashboard → HTTP GET → DashboardService aggregates data via Prisma
3. (Real-time) Backend emits events → Frontend use-socket hook updates UI
Summary
• Detail on modules’ roles without overcrowding—group where logical