AviPro Mobile API is the dedicated backend for the AviPro mobile application, implemented with Express and Docker. This API is part of an integrated solution that facilitates the synchronization and management of data between the desktop and mobile versions of AviPro.
AviPro Mobile is an extension of Avi Pro+, a desktop system used for accounting and management of poultry companies. The mobile application is designed to digitize the management of outstanding invoice collections from clients, providing an efficient tool that is connected with its desktop version.
This project is divided into three repositories:
- AviPro-Mobile-APP: Mobile application.
- AviPro-Mobile-API: Dedicated backend, implemented with Express and Docker.
- AviPro-Dashboard: Web dashboard project for managing licenses and synchronization between the desktop and mobile systems.
Note: The Dashboard does not refer to the desktop version of AviPro. It is a web application intended for managing the backend.
The project structure is designed to facilitate the daily synchronization between the desktop version and the mobile version of AviPro. Each day, at a defined time, the information from the companies using the AviPro+ desktop version is synchronized with the database used by the mobile application. Throughout the day, the mobile application uses the data from the designated mobile database. At the end of the day, the manager handling the desktop program decides to import the information from the mobile application's database, performs management tasks, and reloads data into the desktop-designated database.
- Docker (https://www.docker.com/get-started)
- Node.js (https://nodejs.org/) (optional, for local development)
-
Clone the repository:
git clone https://github.com/WilliamCallao/AviPro-Mobile-API.git cd AviPro-Mobile-API
-
Configure environment variables:
Create a
.env
file in the root of the project with the following variables:DB_NAME=your_database_name DB_USER=your_username DB_PASSWORD=your_password DB_HOST=your_host DB_PORT=your_port
-
Start the application with Docker:
docker-compose up --build
-
Access the API:
The API will be available at http://localhost:3000.
-
Clients:
GET /api/mobile/clientes/empresa/:empresa_id
GET /api/mobile/clientes/:empresa_id/:cuenta
-
Pending Notes:
GET /api/mobile/notas-pendientes/empresa/:empresa_id
POST /api/mobile/notas-pendientes
-
Collectors:
GET /api/mobile/cobradores/empresa/:empresa_id
POST /api/mobile/cobradores
-
Deposit Accounts:
GET /api/mobile/cuentas-deposito/empresa/:empresa_id
POST /api/mobile/cuentas-deposito
-
Payment History:
GET /api/mobile/historial-cobros/empresa/:empresa_id/cobrador/:cobrador_id
POST /api/mobile/historial-cobros
-
Payment Rollback:
POST /api/mobile/notas-cobradas/rollback
POST /api/mobile/notas-pendientes/rollback