Skip to content
This repository was archived by the owner on Mar 16, 2026. It is now read-only.

Clement-Muth/Deazl

Repository files navigation

Deazl - Smart Price Comparison & Shopping Lists

Deazl Logo

A free, open-source platform for price comparison and collaborative shopping lists

TypeScript Next.js Prisma PostgreSQL Release CI/CD CodeRabbit Pull Request Reviews

🌐 Live Demo β€’ πŸ“– Documentation β€’ πŸ› Report Bug β€’ πŸ’‘ Request Feature

πŸš€ About Deazl

Deazl is a community-driven price comparison platform that helps you save money on your groceries and daily purchases. Compare prices across different stores, create collaborative shopping lists, and track price trends - all completely free and open source.

πŸ”„ Release Management

This project uses an automated release system with semantic versioning:

🎯 Quick Commands

# Check release status make status # Promote staging to production make promote # Deploy to staging make deploy # View unreleased changes make changelog

πŸ“‹ Workflow Overview

  1. Development β†’ Feature branches merged to dev
  2. Staging β†’ Auto pre-releases on dev (e.g., 1.2.0-beta.1)
  3. Production β†’ Promote stable releases to master

See Release Documentation for detailed workflow information.

✨ Key Features

  • πŸ” Real-time Price Comparison: Compare prices between different stores instantly
  • πŸ“± Barcode Scanner: Quickly add products by scanning barcodes
  • πŸ“‹ Smart Shopping Lists: Create, share, and collaborate on shopping lists in real-time
  • πŸ‘₯ Collaboration: Share lists with family and friends with role-based permissions
  • πŸ“Š Price History: Track price changes over time with detailed charts
  • πŸ”” Price Alerts: Get notified when prices drop
  • 🌍 Community-Driven: Prices verified and updated by an active community
  • πŸ“± PWA Support: Install as a mobile app for the best experience
  • 🌐 Multi-language: Available in English and French
  • 🎨 Modern UI: Beautiful, responsive interface with dark/light mode

πŸ› οΈ Tech Stack

Frontend

Backend

Architecture

  • Pattern: Clean Architecture with Domain-Driven Design (DDD)
  • Repository Pattern: Separated domain logic from infrastructure
  • CQRS: Command Query Responsibility Segregation
  • API: RESTful with OpenAPI documentation

Development Tools

  • Code Quality: Biome for linting and formatting
  • Testing: Jest with Testing Library
  • Type Safety: Strict TypeScript with Zod validation
  • Database: Prisma migrations and type-safe queries
  • CI/CD: GitHub Actions with automated testing and deployment

πŸ—οΈ Architecture Overview

The application follows Clean Architecture principles with Domain-Driven Design:

src/ β”œβ”€β”€ applications/ # Application layer (use cases) β”‚ β”œβ”€β”€ ShoppingLists/ # Shopping list domain β”‚ β”‚ β”œβ”€β”€ Api/ # Server actions (controllers) β”‚ β”‚ β”œβ”€β”€ Application/ # Application services β”‚ β”‚ β”œβ”€β”€ Domain/ # Domain entities, value objects, services β”‚ β”‚ β”œβ”€β”€ Infrastructure/# Repositories, mappers β”‚ β”‚ └── Ui/ # React components β”‚ β”œβ”€β”€ Prices/ # Price comparison domain β”‚ β”œβ”€β”€ Authentication/ # User authentication β”‚ └── ... β”œβ”€β”€ components/ # Shared UI components β”œβ”€β”€ libraries/ # External service integrations └── views/ # Page-level components 

Key Architectural Decisions

  • Repository Pattern: Clean separation between domain logic and data access
  • Domain Services: Business logic encapsulated in domain services
  • Application Services: Orchestrate use cases and handle cross-cutting concerns
  • Value Objects: Ensure data integrity with typed value objects
  • Entity Aggregates: Maintain consistency within domain boundaries

πŸš€ Quick Start

Prerequisites

  • Node.js 22+ and yarn
  • PostgreSQL database
  • Git for version control

Installation

  1. Clone the repository

    git clone https://github.com/Deazl-Comparator/deazl.git cd pcomparator
  2. Install dependencies

    yarn install
  3. Environment setup

    cp .env.example .env.local

    Configure your environment variables:

    # Database DATABASE_URL="postgresql://username:password@localhost:5432/deazl" # NextAuth NEXTAUTH_SECRET="your-secret-key" NEXTAUTH_URL="http://localhost:3001" # OAuth providers (optional) GOOGLE_CLIENT_ID="your-google-client-id" GOOGLE_CLIENT_SECRET="your-google-client-secret" # External APIs ALGOLIA_APP_ID="your-algolia-app-id" ALGOLIA_API_KEY="your-algolia-api-key" OPEN_FOOD_FACT_API_ENDPOINT="https://world.openfoodfacts.org"
  4. Database setup

    npx prisma migrate dev npx prisma generate
  5. Start development server

    yarn dev

    Open http://localhost:3001 in your browser.

πŸ“š Available Scripts

Command Description
yarn dev Start development server with Turbo
yarn build Build for production
yarn start Start production server
yarn test Run test suite
yarn lint Lint code with Biome
yarn format:check Check code formatting
yarn typescript:check Type check without emitting
yarn translation:extract Extract translation strings
yarn storybook Start Storybook development

🏒 Core Features

πŸ“‹ Shopping Lists

  • Create & Manage: Organize your shopping with smart lists
  • Real-time Collaboration: Share with family/friends with role-based access
  • Quick Add: Use natural language input (e.g., "2kg apples €3.50")
  • Progress Tracking: Monitor completion status and spending
  • Barcode Integration: Scan products directly into lists

πŸ’° Price Comparison

  • Multi-store Comparison: Compare prices across different retailers
  • Historical Data: 30-day price history with trend analysis
  • Community Verified: Prices validated by the user community
  • Price Alerts: Get notified when products go on sale
  • Proof System: Photo verification for price accuracy

🀝 Community Features

  • Crowdsourced Data: Community-maintained price database
  • Product Database: 10,000+ products with detailed information
  • Store Network: Major French retailers and local stores
  • User Contributions: Easy price submission with verification

πŸ“± Mobile Experience

  • Progressive Web App: Install on mobile devices
  • Offline Support: Basic functionality works offline
  • Camera Integration: Barcode scanning and price proof photos
  • Touch Optimized: Designed for mobile-first experience

πŸ—‚οΈ Database Schema

Core Entities

-- Users and Authentication User (id, email, name, phone, image) Account (provider, providerAccountId, userId) Session (sessionToken, userId, expires) -- Product Catalog Product (id, barcode, name, description, categoryId, brandId) Category (id, name, description, parentCategoryId) Brand (id, name, description, websiteUrl) Store (id, name, location, websiteUrl) -- Price Tracking Price (id, productId, storeId, amount, currency, dateRecorded, proofImage) -- Shopping Lists ShoppingList (id, name, description, userId, isPublic, shareToken) ShoppingListItem (id, shoppingListId, productId, quantity, unit, customName, price, isCompleted) ShoppingListCollaborator (id, listId, userId, role)

πŸ”’ Authentication & Authorization

Supported Providers

  • Google OAuth: Quick social login

Permission System

  • OWNER: Full control over shopping lists
  • EDITOR: Can modify list items and settings
  • VIEWER: Read-only access to shared lists

Security Features

  • Session Management: Secure JWT-based sessions
  • CSRF Protection: Built-in security measures
  • Rate Limiting: API abuse prevention
  • Data Validation: Comprehensive input sanitization

🌍 Internationalization

Deazl supports multiple languages using Lingui:

  • English (en): Primary language
  • French (fr): Fully localized

Adding New Languages

  1. Extract strings:

    yarn translation:extract
  2. Add new locale in lingui.config.ts

  3. Translate strings in src/translations/messages/{locale}.po

  4. Compile translations:

    yarn compile

πŸ§ͺ Testing

Test Structure

# Unit Tests yarn test # Component Tests yarn test -- --testPathPattern=components # Integration Tests yarn test -- --testPathPattern=integration

Testing Strategy

  • Unit Tests: Domain logic and utilities
  • Integration Tests: API endpoints and database operations
  • Component Tests: React component behavior
  • E2E Tests: Critical user journeys

πŸš€ Deployment

Vercel (Recommended)

  1. Connect repository to Vercel
  2. Configure environment variables
  3. Deploy: Automatic deployment on push to main

Environment Variables for Production

# Database DATABASE_URL="postgresql://..." # NextAuth NEXTAUTH_SECRET="production-secret" NEXTAUTH_URL="https://your-domain.com" # Storage BLOB_READ_WRITE_TOKEN="vercel-blob-token" # Search ALGOLIA_APP_ID="production-app-id" ALGOLIA_API_KEY="production-key"

Self-Hosting

# Build application yarn build # Start production server yarn start

πŸ“Š Performance & Monitoring

Optimization Features

  • Server-Side Rendering: Fast initial page loads
  • Image Optimization: Automatic image compression and lazy loading
  • Code Splitting: Bundle optimization with Next.js
  • Caching: Aggressive caching strategies
  • PWA: Offline functionality and app-like experience

Monitoring

  • Error Tracking: Built-in error boundaries
  • Performance Metrics: Core Web Vitals monitoring
  • Database Monitoring: Query performance tracking
  • User Analytics: Privacy-friendly usage analytics

🀝 Contributing

We welcome contributions from the community! Here's how you can help:

Development Workflow

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes following the coding standards
  4. Add tests for new functionality
  5. Run the test suite: yarn test
  6. Lint your code: yarn lint
  7. Commit your changes: git commit -m 'Add amazing feature'
  8. Push to the branch: git push origin feature/amazing-feature
  9. Open a Pull Request

Coding Standards

  • TypeScript: Strict type checking enabled
  • Biome: Consistent code formatting and linting
  • Conventional Commits: Semantic commit messages
  • Clean Architecture: Follow established patterns
  • Test Coverage: Maintain test coverage above 80%

Areas for Contribution

  • πŸ› Bug Fixes: Help us squash bugs
  • ✨ New Features: Implement requested features
  • 🌍 Translations: Add support for new languages
  • πŸ“š Documentation: Improve docs and guides
  • 🎨 UI/UX: Enhance user experience
  • ⚑ Performance: Optimize application performance
  • πŸ§ͺ Testing: Improve test coverage

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • Open Food Facts: Product database and API
  • Community Contributors: Thanks to all who contribute prices and feedback
  • Open Source Libraries: Built on the shoulders of giants

πŸ“ž Support & Community

πŸ“ˆ Project Status

  • Version: 4.9.0
  • Status: Active Development
  • Users: 2+ active users
  • Products: 10+ tracked products
  • Stores: Major French retailers supported

Made with ❀️ by the Deazl community

Help us make price comparison accessible to everyone

⭐ Star this repository β€’ πŸ”„ Share with friends

About

Deazl is a community-driven price comparison platform that helps you save money on your groceries and daily purchases. Compare prices across different stores, create collaborative shopping lists, and track price trends - all completely free and open source.

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Sponsor this project

Packages

 
 
 

Contributors