Skip to content

API RESTful to serve the brain agriculture app from brain ag.

Notifications You must be signed in to change notification settings

diegobaena89/brain-ag-api-backend

Repository files navigation

📝 Project Description

This project serves as the backend for the Brain Agriculture web app developed by Brain AG Company. It provides a RESTful API for managing and retrieving data related to agricultural farms.


🚜 API Endpoints

Endpoint Método Descrição
/farms GET Get all farms
/farms/:id GET Get farm by ID
/farms-total GET Get total number of farms
/farms POST Add a new farm
/farms/:id PUT Edit an existing farm
/farms/:id DELETE Delete a farm
/dashboard-state GET List farms by state
/dashboard-culture GET List farms by culture
/dashboard-solo GET List farms by soil

Example JSON for Adding a Farm:

{
  "document": "xx.xxx.xxx/xxxx-xx",
  "productor_name": "Diego Baena",
  "farm_name": "Fazenda Glifada",
  "state": "São Paulo",
  "city": "São Paulo",
  "total_area": 200,
  "agriculture_area": 120,
  "area_vegetation": 20,
  "cultures": ["Soja", "Cana"]
}

Swagger Documentation

Explore the API using Swagger documentation. The API documentation provides details about available endpoints, request parameters, and response formats.

Access Swagger UI

Visit the Swagger UI to interactively explore and test the Brain-AG API:

Brain-AG Swagger UI

How to Use

  1. Open the Swagger UI link in your browser.
  2. Browse through available endpoints, request/response examples, and parameter details.
  3. Test API endpoints directly within the Swagger UI.

Feel free to use the Swagger documentation to understand and interact with the Brain-AG API effortlessly.


📂 How to start this project

   # Clone this repo
❯ git clone https://github.com/diegobaena89/brain-ag-api-backend

# Enter on its directory
❯ cd brain-ag-api-backend

# Launch the Application
❯ yarn dev/npm run dev

About

API RESTful to serve the brain agriculture app from brain ag.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages