Skip to content

alobuuls/angular-jsonplaceholder-client

Repository files navigation

πŸ“° Angular JSONPlaceholder Client

Angular TypeScript JSONPlaceholder API Completed

Repository GitHub Stars Last Commit


πŸ“‘ Table of Contents


🌐 Live Demo

πŸ”— https://alobuuls.github.io/angular-jsonplaceholder-client/


πŸ“– Description

Note

Angular application that consumes the JSONPlaceholder API to display posts using a modular, scalable, and maintainable architecture.

The project demonstrates API consumption with HttpClient, lazy-loaded modules, HTTP interceptors, custom pipes, routing organization, and reusable Angular modules following enterprise-level development practices.


βš™οΈ System Requirements

Before running the project, make sure you have installed:

  • πŸ“¦ Node.js: v12.14.x – v14.x (recommended: v14.21.3 LTS)
  • πŸ“¦ npm: v6+
  • πŸ…°οΈ Angular CLI: v12.x

πŸ” Verify Installed Versions

Run the following commands in your terminal:

node -v
npm -v
ng version

πŸš€ Project Installation

1️⃣ Clone the repository

git clone git@github.com:alobuuls/angular-jsonplaceholder-client.git

cd angular-jsonplaceholder-client

2️⃣ Install dependencies

npm install

▢️ Run the Project

Start the development server:

ng serve

Then open:

http://localhost:4200

🧠 Project Architecture

The application follows a modular architecture focused on scalability and maintainability.

πŸ“¦ Core Module

Responsible for:

  • Global application configuration
  • Singleton services
  • Shared infrastructure
  • Application-level dependencies

πŸ“¦ Shared Module

Responsible for:

  • Reusable pipes
  • Shared utilities
  • Common functionality
  • Cross-module resources

πŸ“¦ Posts Module

Responsible for:

  • Post management
  • API integration
  • Feature-specific routing
  • Lazy-loaded functionality

πŸ“¦ Services

Responsible for:

  • HTTP communication
  • API abstraction
  • Data retrieval
  • Observable management

πŸ“¦ Interceptors

Responsible for:

  • HTTP request customization
  • Header injection
  • Request preprocessing
  • Cross-cutting concerns

✨ Features

  • πŸ“° JSONPlaceholder posts visualization
  • πŸ“‘ REST API consumption
  • ⚑ Lazy loading modules
  • πŸ” HTTP interceptors
  • πŸ§ͺ Custom Angular pipe
  • 🧭 Modular routing
  • 🎯 Strong typing with TypeScript
  • πŸ”„ Reactive programming with RxJS
  • 🧩 Reusable modules
  • πŸš€ Scalable architecture

πŸ›  Technologies Used

Technology Purpose
Angular 12 Front-End Framework
TypeScript Application Logic
RxJS Reactive Programming
HttpClient API Communication
JSONPlaceholder API Data Source
HTML5 Structure
CSS3 Styling

πŸ“ Project Structure

src/

β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ core/
β”‚   β”‚
β”‚   β”œβ”€β”€ interceptor/
β”‚   β”‚   β”œβ”€β”€ auth.interceptor.ts
β”‚   β”‚   └── general-headers.interceptor.ts
β”‚   β”‚
β”‚   β”œβ”€β”€ interfaces/
β”‚   β”‚   └── api-jsonplaceholder.interface.ts
β”‚   β”‚
β”‚   β”œβ”€β”€ pages/
β”‚   β”‚   └── posts/
β”‚   β”‚
β”‚   β”œβ”€β”€ pipes/
β”‚   β”‚   └── day.pipe.ts
β”‚   β”‚
β”‚   β”œβ”€β”€ services/
β”‚   β”‚   └── api-json-placeholder.service.ts
β”‚   β”‚
β”‚   β”œβ”€β”€ shared/
β”‚   β”œβ”€β”€ app.routes.ts
β”‚   └── app.module.ts
β”‚
β”œβ”€β”€ environments/
β”œβ”€β”€ main.ts
└── README.md

πŸ”₯ Best Practices Implemented

  • Modular architecture
  • Lazy loading by feature
  • Separation of concerns
  • Reusable shared modules
  • HTTP interceptor pattern
  • Service abstraction layer
  • Strong typing with interfaces
  • RxJS observable patterns
  • Scalable project organization
  • Enterprise-oriented structure

🎯 Project Goal

Practice and strengthen Angular architecture concepts through the implementation of a client application consuming a REST API:

  • API Consumption
  • Angular Modules
  • Lazy Loading
  • HTTP Interceptors
  • Routing Architecture
  • RxJS Fundamentals
  • Reusable Components
  • TypeScript Interfaces
  • Scalable Front-End Development

πŸ“„ License

This project is intended for educational and portfolio purposes.

Created by Alondra Francisco.

About

Angular 12 app that consumes JSONPlaceholder API using modular architecture with Core/Shared modules, HTTP interceptors, and a Posts feature module.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors