Empowering consumers with transparent price comparison across retail establishments.
PROFECO App is a comprehensive price comparison platform inspired by Mexico's Procuraduría Federal del Consumidor (PROFECO). The system bridges the gap between consumers and retailers by providing real-time price transparency, enabling informed purchasing decisions while promoting fair market practices.
Our platform serves three distinct user groups: consumers seeking the best deals, stores wanting to showcase competitive pricing, and PROFECO administrators ensuring market fairness and consumer protection.
- Smart Product Search - Find and compare prices across multiple stores instantly
- Personalized Experience - Save favorite products, stores, and create custom shopping lists
- Price Analytics - Track price history and receive alerts for price drops
- Report Discrepancies - Report price inconsistencies between published and actual store prices
- Store Reviews - Rate and comment on store experiences to help other consumers
- Product Wishlist - Request stores to carry specific products you're looking for
- Real-time Notifications - Get instant alerts for special offers and price changes
- Customer Insights - Access detailed reports on ratings, comments, and customer feedback
- Price Management - Easy upload and update of product prices and inventory
- Targeted Promotions - Create and publish special offers with real-time customer notifications
- Discrepancy Reports - Receive and manage customer-reported price inconsistencies
- Demand Intelligence - View customer wishlists to understand market demand
- Performance Analytics - Track store performance and customer satisfaction metrics
- Market Oversight - Monitor and verify price discrepancy reports across all establishments
- Compliance Management - Implement penalties and fines for stores with verified pricing violations
- Market Analysis - Generate comprehensive reports on market trends and pricing patterns
- Consumer Protection - Ensure fair trading practices and protect consumer rights
PROFECO App follows a microservices architecture with event-driven communication to ensure scalability, maintainability, and real-time responsiveness. The system is designed as a distributed application where different services handle specific business domains.
- Frontend Service: React-based single-page application with TypeScript
- Backend Service: Spring Boot application handling core business logic
- Database Layer: PostgreSQL for relational data storage
- Message Broker: RabbitMQ for asynchronous event processing and real-time notifications
- File Storage: Local file system for product images and documents
The services communicate through REST APIs for synchronous operations and RabbitMQ message queues for asynchronous events such as notifications.
- Synchronous: Frontend ↔ Backend API (REST)
- Asynchronous: Backend → RabbitMQ → Notification processing
- Data Flow: Backend ↔ PostgreSQL for persistent storage
- React 19.0
- TypeScript 5.7
- Tailwind CSS 4.1
- Vite 6.2
- Java 21
- Spring Boot 3.4.5
- Spring Security
- Apache Maven
- PostgreSQL 17
- RabbitMQ 4.1
- Docker
- Docker Compose
- MapStruct - Object mapping
- Lombok - Boilerplate code reduction
- SpringDoc OpenAPI - API documentation
- JWT - Authentication tokens
- Axios - HTTP client
- Lucide React - Icons
Ensure you have the following software installed on your system:
- Git (latest version)
- Docker (24.0 or higher)
- Docker Compose (2.0 or higher)
- Java 21 (for local development)
- Node.js 18+ (for local development)
-
Clone the repository:
git clone https://github.com/jssroberto/profeco-app.git cd profeco-app -
Set up environment variables:
cp .env.example .env
Edit the
.envfile with your configuration:POSTGRES_DB=profeco_db DEFAULT_USER=your_username DEFAULT_PASSWORD=your_secure_password
-
Build and run the entire system:
docker-compose up --build
-
Access the application:
- Frontend: http://localhost:5173
- Backend API: http://localhost:8080
- API Documentation: http://localhost:8080/swagger-ui.html
- RabbitMQ Management: http://localhost:15672
For local development without Docker:
-
Start PostgreSQL and RabbitMQ:
docker-compose up postgres rabbitmq
-
Run the backend:
cd profeco-back ./mvnw spring-boot:run -
Run the frontend:
cd profeco-front npm install npm run dev
POST /api/auth/login
Content-Type: application/json
{
"email": "user@example.com",
"password": "password123"
}GET /api/products?search=milk&location=Mexico&sortBy=price&order=ascPOST /api/stores/{storeId}/reports/discrepancy
Content-Type: application/json
{
"productId": "123",
"reportedPrice": 25.50,
"actualPrice": 30.00,
"description": "Price difference found during purchase",
"evidence": "base64_image_data"
}GET /api/stores/{storeId}/offersPOST /api/customers/{customerId}/notifications
Content-Type: application/json
{
"type": "PRICE_ALERT",
"productId": "123",
"message": "Price dropped by 15%!"
}profeco-app/
├── profeco-back/
│ ├── src/main/java/
│ ├── src/main/resources/
│ ├── uploads/
│ ├── Dockerfile.dev
│ └── pom.xml
├── profeco-front/
│ ├── src/
│ ├── public/
│ ├── Dockerfile.dev
│ └── package.json
├── docs/
├── compose.yaml
└── README.md
- Controllers: REST API endpoints
- Services: Business logic implementation
- Repositories: Data access layer
- Entities: JPA data models
- DTOs: Data transfer objects
- Config: Security and application configuration
- Components: Reusable React components
- Pages: Route-specific page components
- Context: State management
- API: HTTP client configuration
- Assets: Static resources
This project is licensed under the MIT License - see the LICENSE file for details.
