Skip to content

SharqyCode/angular-bookstore-frontend

Repository files navigation

Here’s a polished README.md you can use for your GitHub repository — complete with setup instructions, project overview, and feature list.


📚 Bookstore Angular App

A modern Angular application for managing a collection of books — featuring CRUD operations, routing, guards, reactive forms, and reusable components. This project is built using standalone Angular components and demonstrates all key Angular concepts.


🚀 Features

  • CRUD Operations (Create, Read, Update, Delete books)
  • 🔒 Authentication & Route Guards
  • 📖 Routing & Navigation
  • 💡 Reusable Components, Pipes, and Directives
  • 🧩 Reactive Forms for Book Management
  • 🎨 Bootstrap-based Responsive UI
  • ⚙️ HTTP Services & Interceptors
  • 🧭 Lifecycle Hooks and Data Binding

🏗️ Project Structure

bookstore-frontend/
│
├── angular.json
├── package.json
├── tsconfig.json
│
└── src/
    ├── app/
    │   ├── core/
    │   │   ├── guards/
    │   │   ├── interceptors/
    │   │   ├── services/
    │   │   └── core.module.ts
    │   ├── shared/
    │   │   ├── components/
    │   │   ├── directives/
    │   │   ├── pipes/
    │   │   └── shared.module.ts
    │   ├── features/
    │   │   ├── books/
    │   │   │   ├── components/
    │   │   │   ├── pages/
    │   │   │   └── books.module.ts
    │   │   └── auth/
    │   │       └── auth.module.ts
    │   ├── pages/
    │   ├── models/
    │   ├── app-routing.module.ts
    │   ├── app.component.*
    │   └── app.module.ts
    │
    ├── assets/
    ├── environments/
    ├── index.html
    ├── main.ts
    └── styles.css

🧠 Key Concepts Demonstrated

Angular Concept Where It’s Used
Interpolation / Binding Book list and detail views
@Input / @Output Between book-item and book-list components
Lifecycle Hooks Used in components to track data flow
Directives Custom highlight directive
Reactive Forms Book creation & editing forms
Routing & Guards Navigation and route protection
Services & HTTPClient Book and Auth services
Pipes Custom search pipe for filtering books

⚙️ Installation & Setup

  1. Clone the repository

    git clone https://github.com/your-username/bookstore-frontend.git
    cd bookstore-frontend
  2. Install dependencies

    npm install
  3. Run the development server

    ng serve

    The app will be live at http://localhost:4200/

  4. Build for production

    ng build --prod

🧩 API Connection

This app expects a Bookstore API backend exposing REST endpoints such as:

Method Endpoint Description
GET /api/books Fetch all books
GET /api/books/:id Fetch single book
POST /api/books Add a new book
PUT /api/books/:id Update existing book
DELETE /api/books/:id Delete a book

Set your API base URL in:

src/environments/environment.ts

🧰 Dependencies

  • @angular/core
  • @angular/router
  • @angular/forms
  • @angular/common/http
  • rxjs
  • bootstrap

Install Bootstrap:

npm install bootstrap

Then import it in angular.json under styles.


🎨 UI Example

  • Home Page: Overview and navigation
  • Books Page: List of all books with options to view, edit, or delete
  • Add/Edit Page: Form with validation using reactive forms
  • Login Page: Authenticates user and enables route protection

🧑‍💻 Authors

Ebraheem Elsharkawy Frontend Developer | Angular Enthusiast 📧 [ebraheemelsharkawy@gmail.com] 💼 LinkedIn

Abdelrahman Zenhom Frontend Developer | Angular Enthusiast 📧 [exampley@gmail.com] 💼 LinkedIn

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •