Skip to content

albert118/InMeal

Repository files navigation

In Meal

In Meal is released under the MIT license In Meal uses Webpack In Meal uses ESLint In Meal is built with React In Meal is deployed using Docker

A modern and clean interface for managing recipes and ingredients, In Meal acts as a digital cookbook without bloat.

🍇 Features

This is still a work in progress but currently supports simple recipe and ingredient management.

Designed to be responsive with tablets in mind from the start. No more squinting at small buttons or "mouse-friendly" UX 🪤.

  • Minimal design avoids bloating your experience with unnecessary reviews or comments 😁.
  • Bulk editing for ingredients, no more typos across all your recipes 🔏!
  • Searchable, recipes and ingredients are easy to find 🔎.
  • Batteries included meta-data, easily include common meta-data for recipes such as servings or cook-time 🔋.

🎯 Quick Start

You will require a database to run this stack!

This example assumes you have the database pre-configured. Mariadb is the recommended relational database.

With a valid connection string, ensure you update appsettings.Development.json within the InMeal.Api project with your conenction string. By default, migrations will be enabled on development startup. Your first startup will take longer as a result.

Toggling migrations on startup
Simply edit the `appsettings.{EnvironmentName}.json` of your choice and set `EnableMigrationsOnStartup` as
preferred.

Then trust the dotnet dev certs,

dotnet dev-certs https --trust

Finally, serve the development configuration locally,

npx nx run serve-stack

This runs,

  • a Vite dev server for the frontend,
  • a DotNet kestral server for the API
  • a Uvicorn (FastAPI) server for the image micro service

All are automatically configured for development mode with hot-reload, HMR, logging, etc. enabled.

🧪 Running the Tests

Like any nx project, simply run npx nx run-many -t test or for a specific project npx nx run @project:test.

  • The Js projects utilise Jest.
  • The dotnet projects utilise moq + autofixture + fluent

📋️ Project Overview

Project Description
InMeal A dotnet API using EF Core + MariaDb
Food UI (aka. "FUI") A Vite + React UI built with Carbon Design System and heavy modification
Generative Recipe Images (aka. "GRI) A Python FastAPI REST microservice for serving (AI) generative images

😎 Building for Production

Ensure you have a valid MariaDb/MySQL instance you can connect to before continuing.

Configure your environment with a db connection string in a fresh dotenv file,

cp .env.example .env
nano .env

To get the app up and running we simply need to build and run the docker images using Docker compose,

docker compose up

Done 🎈! You should be viewing successful docker container logs in your console. Visit the app on http:https://localhost:3002/

Note: nx docker-build will determine you need to build the dotnet projects. nx-dotnet has issues when running in parallel, as it and msbuild conflict on file-locks... To avoid this problem, the underlying script builds the dotnet projects sequentially before building the containers.

👀 Examples

home/dashboard manage recipes view recipe edit recipe

🗺️ Roadmap

  • Introduce Nx to repo
  • Move away from create-react-app + webpack (use Vite instead)
  • improved dummy images (replace demo image)
  • improve component library with MUI
  • apply filters when clicking a badge
  • generative (AI) images
  • add sections to recipe steps
  • add settings to page to extend/edit meal types and categories
  • favourites list
  • recommended options on the homepage
  • improve background design as well as overall contrast readability
  • "always on" feature for mobile