Skip to content

waqas1412/Recipe-Book

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

25 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🍳 Recipe Book - Angular Application

A modern, full-featured recipe management application built with Angular 16, featuring authentication, state management with NgRx, and Firebase integration.

Angular TypeScript NgRx Firebase Bootstrap

✨ Features

πŸ” Authentication System

  • User Registration & Login: Secure authentication using Firebase Authentication
  • Token Management: Automatic token refresh and expiration handling
  • Route Protection: Guarded routes requiring authentication
  • Auto-login: Persistent user sessions with localStorage

πŸ“ Recipe Management

  • CRUD Operations: Create, read, update, and delete recipes
  • Recipe Details: View comprehensive recipe information with images
  • Ingredient Management: Add, edit, and manage recipe ingredients
  • Image Support: Recipe images with URL-based storage

πŸ›’ Shopping List

  • Dynamic Shopping List: Add ingredients from recipes to shopping list
  • State Management: NgRx-powered shopping list with real-time updates
  • Edit & Delete: Modify shopping list items with inline editing
  • Bulk Operations: Add multiple ingredients at once

πŸ—οΈ Architecture & State Management

  • NgRx Store: Centralized state management for authentication and shopping list
  • NgRx Effects: Side effect handling for authentication flows
  • Lazy Loading: Feature modules loaded on-demand for better performance
  • Reactive Forms: Form validation and user input handling

πŸ”§ Technical Features

  • HTTP Interceptors: Automatic token injection for API requests
  • Route Resolvers: Data pre-loading for better UX
  • Responsive Design: Bootstrap-based responsive layout
  • Firebase Integration: Real-time database for recipe storage
  • Error Handling: Comprehensive error management and user feedback

πŸš€ Getting Started

Prerequisites

  • Node.js (v16 or higher)
  • Angular CLI (npm install -g @angular/cli)
  • Firebase account for backend services

Installation

  1. Clone the repository

    git clone <your-repo-url>
    cd Angular_Project
  2. Install dependencies

    npm install
  3. Configure Firebase

    • Create a Firebase project
    • Enable Authentication and Realtime Database
    • Update src/environments/environment.ts with your Firebase API key:
    export const environment = {
      production: false,
      firebaseAPIKey: 'your-firebase-api-key'
    };
  4. Run the application

    ng serve

    Navigate to http://localhost:4200/

πŸ“ Project Structure

src/app/
β”œβ”€β”€ auth/                    # Authentication module
β”‚   β”œβ”€β”€ store/              # NgRx auth state management
β”‚   β”œβ”€β”€ auth.component.*    # Login/signup forms
β”‚   β”œβ”€β”€ auth.service.ts     # Firebase auth service
β”‚   └── auth.guard.ts       # Route protection
β”œβ”€β”€ recipes/                # Recipe management module
β”‚   β”œβ”€β”€ recipe-detail/      # Recipe viewing component
β”‚   β”œβ”€β”€ recipe-edit/        # Recipe creation/editing
β”‚   β”œβ”€β”€ recipe-list/        # Recipe listing
β”‚   β”œβ”€β”€ recipe.service.ts   # Recipe business logic
β”‚   └── recipe.model.ts     # Recipe data model
β”œβ”€β”€ shopping-list/          # Shopping list module
β”‚   β”œβ”€β”€ store/              # NgRx shopping list state
β”‚   β”œβ”€β”€ shopping-edit/      # Shopping list editing
β”‚   └── shopping-list.service.ts
β”œβ”€β”€ shared/                 # Shared components & services
β”‚   β”œβ”€β”€ alert/              # Alert component
β”‚   β”œβ”€β”€ loading-spinner/    # Loading indicator
β”‚   β”œβ”€β”€ dropdown.directive.ts
β”‚   └── data-storage.service.ts
└── store/                  # Root NgRx store configuration

��️ Built With

πŸ”§ Development

Available Scripts

# Development server
npm start
ng serve

# Build for production
npm run build
ng build --configuration production

# Run tests
npm test
ng test

# Watch mode
npm run watch
ng build --watch --configuration development

Code Generation

# Generate components
ng generate component component-name

# Generate services
ng generate service service-name

# Generate modules
ng generate module module-name

πŸš€ Deployment

Firebase Hosting

  1. Build the application

    npm run build
  2. Deploy to Firebase

    firebase deploy

The application is configured for Firebase hosting with the build output in dist/todos-app/.

πŸ“± Features Overview

Authentication Flow

  • User registration and login with email/password
  • Automatic token management and refresh
  • Protected routes requiring authentication
  • Persistent sessions across browser sessions

Recipe Management

  • Create new recipes with images and descriptions
  • Edit existing recipes with form validation
  • Delete recipes with confirmation
  • View detailed recipe information

Shopping List Integration

  • Add recipe ingredients to shopping list
  • Edit shopping list items inline
  • Delete items from shopping list
  • Real-time state updates with NgRx

🀝 Contributing

  1. Fork the project
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“„ License

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

πŸ™ Acknowledgments

  • Angular team for the excellent framework
  • NgRx team for state management solutions
  • Firebase for backend services
  • Bootstrap for responsive design components

Note: This application was generated with Angular CLI version 15.0.4 and has been upgraded to Angular 16.

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors