A modern, personal recipe management application built with Blazor WebAssembly and Supabase. Organize your favorite recipes, associate them with cookbooks and authors, and never lose track of your culinary treasures again!
- 📝 Recipe Management: Create, edit, and organize your favorite recipes
- 📚 Cookbook Integration: Associate recipes with physical or digital cookbooks
- ⭐ Rating System: Rate recipes from 1-5 stars for easy favorites tracking
- 📄 Page References: Track page numbers for cookbook recipes
- 🖨️ Print-Friendly: Generate clean, printable versions of recipes
- 📱 Responsive Design: Works beautifully on desktop, tablet, and mobile
- 🔍 Search & Filter: Find recipes by name, rating, cookbook, or author
- .NET 9.0 SDK
- Git
- A Supabase account (free tier available)
-
Clone the repository
git clone https://github.com/mongeon/RecettesIndex.git cd RecettesIndex -
Restore dependencies
dotnet restore
-
Configure Supabase
- Create a new project at supabase.com
- Update
wwwroot/appsettings.json:
{ "Supabase": { "Url": "YOUR_SUPABASE_URL", "Key": "YOUR_SUPABASE_ANON_KEY" } } -
Set up the database Run this SQL in your Supabase SQL editor:
-- Create tables CREATE TABLE authors ( id SERIAL PRIMARY KEY, name VARCHAR(255) NOT NULL, creation_date TIMESTAMP DEFAULT NOW() ); CREATE TABLE books ( id SERIAL PRIMARY KEY, title VARCHAR(255) NOT NULL, author_id INTEGER REFERENCES authors(id), creation_date TIMESTAMP DEFAULT NOW() ); CREATE TABLE recettes ( id SERIAL PRIMARY KEY, name VARCHAR(255) NOT NULL, notes TEXT, rating INTEGER CHECK (rating >= 1 AND rating <= 5), book_id INTEGER REFERENCES books(id), page_number INTEGER, creation_date TIMESTAMP DEFAULT NOW() );
-
Run the application
dotnet run
-
Open in browser Navigate to
http://localhost:5000
- Frontend: Blazor WebAssembly (.NET 9.0)
- UI Framework: MudBlazor (Material Design)
- Backend: Supabase (PostgreSQL + REST API)
- Authentication: Supabase Auth
- Testing: xUnit with NSubstitute mocking and comprehensive unit test coverage
- CI/CD: GitHub Actions with automated testing and deployment
- Hosting: Azure Static Web Apps
This project maintains comprehensive unit test coverage with 318 tests across all business logic:
# Run all tests
dotnet test
# Run tests with detailed output
dotnet test --verbosity detailed
# Run specific test file
dotnet test --filter "RecipeModelTests"- ✅ Model Validation: Recipe rating constraints (1-5), data annotations, relationship tests
- ✅ Service Layer: BookAuthorService, RecipeService, CacheService, SupabaseRecipesQuery, Result pattern
- ✅ Business Logic: Author name formatting, book-recipe relationships, caching
- ✅ Constants: Service constants validation, pagination, sorting, cache configuration
- ✅ Custom Exceptions: NotFoundException, ServiceException, ValidationException
- ✅ Component Tests: Edit dialogs for Recipe, Book, and Author with creation date preservation
- ✅ Integration Tests: Complete relationship chains and data integrity
- ✅ Edge Cases: Invalid inputs, boundary conditions, null handling, error scenarios
- ✅ Data Relationships: Book-Author-Recipe associations and many-to-many mappings
For detailed information, visit our comprehensive documentation:
- 📋 Complete Documentation - Full project overview and guides
- 🛠️ Development Guide - Coding standards and best practices
- 🔌 API Reference - Data models and service documentation
- 🏗️ Architecture Guide - System design and technical decisions
- 🚀 Deployment Guide - Hosting and CI/CD setup
- Always create a feature branch (never work directly on main)
- Write comprehensive unit tests for all new functionality
- Run tests before committing - ensure
dotnet testpasses - Validate all changes using
git diffandgit show --stat - Run and test the application before committing
- Update documentation when making changes
- Get user approval before creating commits or PRs
- Use GitHub MCP server for all GitHub operations
# Clean and rebuild
dotnet clean && dotnet build
# Run all tests
dotnet test
# Run with hot reload
dotnet run
# Run on specific port
dotnet run --urls "http://localhost:5030"
# Publish for production
dotnet publish -c ReleaseRecettesIndex/
├── 📁 .github/
│ ├── 📁 workflows/ # GitHub Actions CI/CD
│ └── 📄 copilot-instructions.md # AI agent development guidelines
├── 📁 src/ # Main application source
│ ├── 📁 Configuration/ # App configuration
│ ├── 📁 Layout/ # App layout components
│ ├── 📁 Models/ # Data models with validation
│ ├── 📁 Pages/ # Blazor pages and dialogs
│ ├── 📁 Services/ # Business logic services
│ │ ├── 📁 Abstractions/ # Service interfaces
│ │ ├── 📁 Exceptions/ # Custom exception types
│ │ ├── RecipeService.cs
│ │ ├── BookAuthorService.cs
│ │ ├── CacheService.cs
│ │ └── SupabaseRecipesQuery.cs
│ ├── 📁 Shared/ # Shared components
│ ├── 📁 wwwroot/ # Static assets
│ │ └── staticwebapp.config.json # Azure Static Web Apps config
│ ├── 📄 Program.cs # App entry point
│ └── 📄 _Imports.razor # Global imports
├── 📁 tests/ # Unit test project (318 tests)
│ ├── � Integration/ # Integration tests
│ ├── � Models/ # Model tests
│ ├── � Pages/ # Component tests
│ ├── � Services/ # Service layer tests
│ │ └── � Exceptions/ # Exception tests
│ └── 📄 RecettesIndex.Tests.csproj # Test project file
├── 📁 docs/ # Project documentation
└── 📄 RecettesAI.slnx # Solution file
We welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Follow our development workflow (see documentation)
- Make your changes and test thoroughly
- Update documentation to reflect your changes
- Commit with clear messages:
git commit -m "Add amazing feature" - Push to your fork:
git push origin feature/amazing-feature - Create a Pull Request
- Follow C# conventions and use nullable reference types
- Use MudBlazor components for consistent UI
- Implement proper async/await patterns
- Include error handling and loading states
- Write comprehensive unit tests for all new features - mandatory before PRs
- Achieve high test coverage - aim for 100% coverage of business logic
- Follow testing conventions - use descriptive test file names and Arrange-Act-Assert pattern
- Keep documentation up to date
This project is licensed under the MIT License - see the LICENSE file for details.
- 📚 Check the documentation
- 🐛 Report issues on GitHub
- 💬 Ask questions in Discussions
- Built with Blazor WebAssembly
- UI powered by MudBlazor
- Backend services by Supabase
- Icons from Material Design Icons
Made with ❤️ for home cooks who love to organize their recipes