No description
Find a file
2024-10-27 13:48:09 +01:00
.github ci: Run e2e tests after deploying 2024-10-27 01:20:20 +02:00
.vscode test: Add unit tests for utils 2024-10-26 19:51:08 +02:00
project.inlang feat: Init Change to UseAppRouter 2024-10-14 22:09:25 +02:00
public feat: Major refactor for performance improvements 2024-10-26 16:54:44 +02:00
src feat(SCSS): Upgraded to newer SCSS version 2024-10-27 13:48:09 +01:00
types feat: Scanner 2023-05-08 19:05:48 +02:00
.env.development feat(Dev): Added Staging Environment 2023-08-15 16:50:38 +02:00
.env.main feat(ENV): Added Production environment 2023-08-18 00:06:03 +02:00
.eslintrc.json test: Add unit tests for utils 2024-10-26 19:51:08 +02:00
.gitignore chore: Setup Playwright 2024-10-27 01:20:33 +02:00
.kodiak.toml Update .kodiak.toml 2023-08-17 22:59:35 +02:00
CODE_OF_CONDUCT.md docs: Removed passage 2024-01-04 00:28:47 +01:00
Dockerfile feat: Upgrade to Next.js 15 / React 19 2024-10-26 14:02:43 +02:00
jest.config.ts test: Add unit tests for utils 2024-10-26 19:51:08 +02:00
LICENSE feat: Change product name to Veganify 2024-01-24 20:43:05 +01:00
next.config.ts feat: Upgrade to next.config.ts 2024-10-26 17:52:50 +02:00
package.json feat: Initialize API v1 for Ingredients 2024-10-27 13:47:30 +01:00
playwright.config.ts chore: Setup Playwright 2024-10-27 01:20:33 +02:00
pnpm-lock.yaml feat: Initialize API v1 for Ingredients 2024-10-27 13:47:30 +01:00
README.md docs: Formatting 2024-10-27 01:23:36 +02:00
SECURITY.md feat: Change product name to Veganify 2024-01-24 20:43:05 +01:00
service-worker.js fix: Dockerfile 2024-04-20 21:36:04 +02:00
tsconfig.json feat: Init Change to UseAppRouter 2024-10-14 22:09:25 +02:00

Veganify Logo

Veganify

Check if a product is vegan or not with » Veganify.app


Veganify Hero

Veganify - Check if a product if vegan/vegetarian easily and fast | Product Hunt Veganify- Check if a product if vegan/vegetarian easily and fast | Product Hunt

Overview

Veganify checks the barcode (EAN or UPC) of a food- or non-food-product and tells you if it is vegan or not. It is an useful tool for vegans and vegetarians - Developed with usability and simplicity in mind, so without distracting irrelevant facts or advertising. Veganify combines the Databases of OpenFoodFacts, OpenBeautyFacts and Open EAN Database, as well as our very own ingredient checker in one tool.

See an example of how it works!

The Veganify Ingredients API checks the products ingredients against a list of thousands of non-vegan items.

Open PWA in browser | Product page on FrontEndNetwork | Use the API | iOS Shortcut | Uptime Status

Developer Guide

Tip

We're using Conventional Commits for commit messages. Please follow this convention when making changes.

Prerequisites

  • Node.js 20 or later
  • pnpm (enabled via corepack)

To enable pnpm using corepack:

corepack enable
corepack prepare pnpm@latest --activate

Getting Started

  1. Clone the repository:

    git clone https://github.com/frontendnetwork/veganify.git
    cd veganify
    
  2. Install dependencies & start dev server:

    pnpm install
    pnpm dev
    

Project Structure

src/
├── @components/
│   ├── shared/
│   ├── ComponentName/
│   │   ├── hooks/      			# Component-specific hooks
│   │   ├── utils/      			# Component-specific utilities
│   │   │	├── util.ts
│   │   │	└──	util.test.ts		# Utility specify tests
│   │   ├── models/     			# Component-specific types/interfaces
│   │   ├── componentPart.tsx		# Component files
│   │   └── index.tsx				# Component files
├── @models/        # Global type definitions
├── styles/         # CSS styles
├── tests/          # Only test setup files & Playwright tests
└── locales/        # next-intl translation files

Development Commands

# Start development server
pnpm dev

# Run linting
pnpm lint

# Run type checking
pnpm check-types

# Run unit tests
pnpm test

# Run end-to-end tests
pnpm test:e2e

# Build for production
pnpm build

Development Guidelines

Note

We're aware not everything in this repo follows those standards. This is because of how the project was started and evolved. We're working on improving this.

Component Structure

  • Break down components into smaller, reusable pieces
  • Each significant component should have its own directory with the following structure:
    • hooks/ for component-specific hooks
    • utils/ for component-specific utilities
    • models/ for component-specific types
  • Small, simple components can be single files

Testing

  • All utility functions must have 100% test coverage
  • Tests are written using Jest for unit testing
  • Components currently don't require test coverage
  • Playwright is used for end-to-end testing but currently only coversa few basics use cases. More tests are needed.

TypeScript

  • TypeScript is mandatory
  • The any type is not acceptable unless absolutely necessary
  • Always define proper interfaces and types in the appropriate models folder
  • Use type inference when possible

Internationalization

  • Use next-intl for translations
  • Add new translations to all language files in /locales
  • Follow the existing translation key structure

Code Style

  • Follow Node.js, React, and Next.js best practices
  • Use the App Router pattern for routing
  • Keep components pure and functional when possible
  • Use hooks for state management and side effects
  • Follow the DRY (Don't Repeat Yourself) principle
  • Use meaningful variable and function names
  • Write comments for complex logic
  • Keep functions small and focused

Styling

  • Place all styles in the styles folder
  • Keep styles modular and scoped to components when possible
  • Be sure to use SCSS for styling
  • Use CSS variables for theming and repeated values

When making a contribution, please follow these guidelines to ensure consistency and maintainability.

Remember that every contribution, no matter how small, is valuable to the project. Thank you for helping make Veganify better!

Support

Please refer to our issue trackers to see where you could help:

Veganify on Inlang

or if you find something else you could improve, just open a new issue for it!

Support us

Consider Sponsoring Buy us a coffee Donate

Premium Supporters

Dependencies & Credits

This repo uses:

License

All text and code in this repository is licensed under MIT, © 2024 Philip Brembeck, © 2024 FrontEndNetwork.