Skip to content

ahmetatar/weaify

Repository files navigation

Weaify

A full-stack AI-powered diet planning application built with Angular, NestJS, and Google Gemini AI. The application helps users generate personalized diet plans based on their dietary requirements and preferences.

🚀 Features

  • AI-Powered Diet Planning: Leverages Google Gemini 2.5 Flash to generate personalized diet plans
  • Full-Stack Architecture: Angular frontend with NestJS backend
  • Monorepo Structure: Organized using Nx for efficient development and build processes
  • Type-Safe: Shared TypeScript types between frontend and backend
  • Modern Tech Stack: Built with the latest Angular 20 and NestJS 11

📋 Project Structure

weaify/
├── apps/
│   ├── backend/          # NestJS backend application
│   │   └── src/
│   │       └── app/
│   │           └── diet-planner/
│   └── web/              # Angular frontend application
│       └── src/
│           └── app/
│               └── diet-feature/
├── libs/
│   ├── shared-types/     # Shared TypeScript types and contracts
│   ├── web-core/         # Core web utilities and state management
│   └── web-shared-components/  # Reusable Angular components

🛠️ Tech Stack

Frontend

  • Angular 20 - Modern web framework
  • NgRx Signals - State management
  • Vite - Build tool and dev server
  • SCSS - Styling

Backend

  • NestJS 11 - Node.js framework
  • Google Gemini AI - AI-powered content generation
  • Webpack - Module bundler

Development Tools

  • Nx 22 - Monorepo management
  • TypeScript 5.9 - Type-safe development
  • ESLint - Code linting
  • Jest/Vitest - Testing frameworks
  • Prettier - Code formatting

📦 Prerequisites

  • Node.js (version 20 or higher recommended)
  • npm or yarn
  • Google Gemini API key (for AI features)

🚀 Getting Started

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/weaify.git
cd weaify
  1. Install dependencies:
npm install
  1. Set up environment variables: Create a .env file in the backend app directory with your Google Gemini API key:
GOOGLE_GENAI_API_KEY=your_api_key_here

Development

Start the backend server:

npx nx serve backend

Start the frontend development server:

npx nx serve web

The web application will be available at http://localhost:4200 and the backend API at http://localhost:3000.

Building for Production

Build the backend:

npx nx build backend

Build the frontend:

npx nx build web

Production builds will be output to the dist/ directory.

🧪 Testing

Run tests for all projects:

npx nx run-many --target=test

Run tests for a specific project:

npx nx test web
npx nx test backend

🔍 Linting

Lint all projects:

npx nx run-many --target=lint

Lint a specific project:

npx nx lint web
npx nx lint backend

📚 Libraries

shared-types

Contains shared TypeScript interfaces, types, and contracts used across the frontend and backend, ensuring type safety throughout the application.

web-core

Core utilities for the web application, including state management utilities and common functionality.

web-shared-components

Reusable Angular components used across the web application:

  • Button options component
  • Loading screen component

🏗️ Architecture

The application follows a monorepo architecture using Nx, with clear separation between:

  • Applications: Deployable frontend and backend apps
  • Libraries: Shared code and utilities
  • Contracts: Shared types and interfaces for type-safe communication

The diet planner feature uses Google Gemini AI to generate personalized diet plans based on user input, including daily calorie requirements, macronutrient distribution (protein, carbs, fats), and detailed meal plans.

📄 License

This project is licensed under the MIT License.

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📞 Support

For questions or support, please open an issue in the GitHub repository.

About

This is an experimental application illustrating an LLM query with an optimized prompt.

Resources

Stars

Watchers

Forks

Contributors