Getting Startedย ย ย |ย ย ย Aboutย ย ย |ย ย ย Technologies used
# Install dependencies
npm install
# Create a new Docker environment
docker compose up -d
# Run Prisma migrations [OPTIONAL]
npx prisma migrate dev
# Run seeds
npm run seed
# Run tests [OPTIONAL]
npm test
This test aims to assess the candidate's skills in some problem-solving related the programming logic, business rules and object-oriented.
In summary, it involves registering rural producers with the following data:
- CPF or CNPJ
- Producer name
- Farm Name
- City
- State
- Total area of the farm in hectares
- Arable area in hectares
- Vegetation area in hectares
- Planted crops (Soybeans, Corn, Cotton, Coffee, Sugarcane)
- The user must be able to register, edit, and exclude rural producers.
- The system must validate incorrectly entered CPF and CNPJ .
- The sum of arable area and vegetation must not exceed the total farm area
- Each producer can cultivate more than one crop on their Farm.
- The platform must include a Dashboard that shows:
- Total number of farms
- Total farms in hectares (total area)
- Pie chart by state.
- Pie chart by crop type.
- Pie chart by land use (Agricultural area and vegetation)
- Save the data in a Postgres database using Node.js as a backend layer, and deliver the endpoints to register, edit, and delete rural producers, in addition to the endpoint that returns the totals to the dashboard.
- The creation of "mocked" data structures is part of the evaluation.
- Implements automated tests (unit tests)
- Accept CPF or CNJP masked
- Express - Minimalist and unopinionated framework for Node.js
- Node.js - JavaScript runtime environment / plataform
- PostgreSQL - Open source relational database
- Prisma - ORM (Object Mapping Relation) for Node.js and TypeScript
- TypeScript - Programming language and superset for JavaScript
- Vitest - Testing framework that use esbuild
- Zod - TypeScript-first schema validations
Made with โค๏ธ by ๐งโ๐ Guilherme Bezerra ๐ Get in touch!