V.E.R.A is an acronym for Value Effective Revenue Analyzed, a service that processes income and work time of a professional to support credit analysis. The application was developed with a componentized and data-oriented approach, designed to be performant and easy to maintain.
- React - JavaScript library for creating user interfaces
- TypeScript - Static typing to improve development experience
- Vite - Fast build tool for development
- Tailwind CSS - CSS library for styling
- Shadcn/ui - Component library based on Radix UI
- pnpm - Fast and efficient package manager
- SWR - Data fetching with cache and revalidation
- React Router - Route management
- Tanstack Table - Table with sorting and pagination
- React Hook Form + Zod - Forms with validation
- Cypress - End-to-end testing
The project follows a clean architecture, following separation of concerns principles, ensuring that business logic hooks, data layer api, and presentation components are decoupled.
src/
├── api/ # API layer
├── components/ # UI components
├── hooks/ # Custom hooks
├── lib/ # Utility functions and configurations
├── pages/ # Route components
└── types/ # TypeScript type definitions
- Filters: Search with debounce and multiple criteria
- Column Sorting: All columns with asc/desc sort
- Responsive Design: Mobile-first approach with breakpoints
- Data Validation: Client-side validation with Zod schemas
- Updates and Cache: SWR cache management for real-time updates
- View-Only Mode: Support for mock data to view UI without backend
- End-to-End Tests: Test coverage with Cypress
- Node.js >= 18
- pnpm >= 8
# Install dependencies
pnpm install
# Configure environment variables
cp .env_example .env
# Initialize the application
pnpm devThe application supports view-only mode for data visualization without backend, controlled by the VITE_VIEW_ONLY environment variable.
-
VITE_VIEW_ONLY=true: Displays mock data. -
VITE_VIEW_ONLY=false: Displays real data.
- Data Display: The table shows 10 records (mock)
- Interactive Elements: Buttons and forms remain functional
- No API Calls: Requests return mock with realistic delays
- Form Interactions: You can type and submit, with success messages
- Static Detail: Detail pages always show the same record (mock)
- Filters: You can type in filters, but there is no real filtering
| Script | Description |
|---|---|
pnpm dev |
Starts the application in development mode |
pnpm build |
Generates the production build |
pnpm preview |
Serves the production build locally |
pnpm lint |
Runs code linting |
pnpm cypress:open |
Runs the Cypress Test Runner |
pnpm cypress:run |
Runs Cypress in headless mode |
For development and debug:
pnpm cypress:openFor CI/CD and automation:
pnpm cypress:run- Create a feature branch
- Make your changes
- Add tests for new functionality
- Make sure all tests pass
- Send a pull request
This project is licensed under the MIT License.