๐ https://alobuuls.github.io/angular-posts-crud/
Note
An Angular 16 CRUD application that consumes REST APIs and implements advanced user experience patterns, route protection, reusable architecture, state management, and reactive programming.
The project demonstrates real-world Angular development practices including CRUD operations, feature modules, route guards, LocalStorage persistence, dynamic loading states, centralized error handling, reusable services, and scalable application architecture.
Before running the project, make sure you have installed:
- ๐ฆ Node.js:
v16.14.x โ v18.x(recommended: v18 LTS) - ๐ฆ npm:
v8+ ๐ ฐ๏ธ Angular CLI:v16.x
nvm install 18
nvm use 18Run the following commands in your terminal:
node -v
npm -v
ng versiongit clone git@github.com:alobuuls/angular-posts-crud.git
cd angular-posts-crudnpm installStart the development server:
ng serveThen open:
http://localhost:4200
The application follows a modular architecture based on Core, Shared, Feature Modules, Route Guards, and reusable services.
Responsible for:
- Listing posts
- Creating posts
- Editing posts
- Viewing post details
- Deleting posts
Responsible for:
- Movies management
- Games management
- Devices management
- Route organization
- Child routes configuration
Responsible for:
- Preventing accidental navigation
- Detecting unsaved form changes
- Displaying confirmation dialogs
- Protecting user-entered data
Responsible for:
- Centralized error handling
- API error mapping
- State management
- User feedback
Responsible for:
- Confirmation dialogs
- Success notifications
- Error notifications
- User interaction feedback
Responsible for:
- Reusable functionality
- Shared components
- Application-wide services
- Modular organization
- ๐ List records
- ๐ View details by ID
- โ Create records
- โ๏ธ Edit records
- ๐๏ธ Delete records
- ๐พ Auto-save form progress in LocalStorage
- ๐ก๏ธ Navigation protection for unsaved changes
โ ๏ธ Confirmation dialogs before deleting data- ๐ซ Prevent duplicate form submissions
- ๐ Inline loading indicators inside buttons
- ๐ข Friendly feedback messages
- ๐พ Form persistence after page refresh
- ๐ Change detection on edit forms
- โก Skip unnecessary update requests
- ๐ Validation before submission
Dynamic loading messages such as:
Loading...
Getting data...
We are about to finish this...
Almost there...
Just a second more...
- โณ Loading State
- โ Success State
- ๐ญ Empty State
- โ Error State
- ๐ก๏ธ Route Guards
- ๐งญ Child Routes
- ๐ซ Custom 404 Page
- ๐ฆ Feature Module Routing
| Technology | Purpose |
|---|---|
| Angular 16 | Front-End Framework |
| TypeScript | Application Logic |
| RxJS | Reactive Programming |
| Angular Router | Navigation |
| Route Guards | Route Protection |
| LocalStorage API | Form Persistence |
| Reactive Forms | Form Management |
| Feature Modules | Modular Architecture |
| Services | Business Logic |
| REST APIs | Data Source |
angular-posts-crud/
โโโ src/app/
โ
โโโ core/
โ โโโ menu/
โ
โโโ shared/
โ
โโโ guards/
โ โโโ pending-changes-form.guard.ts
โ
โโโ services/
โ โโโ posts.service.ts
โ โโโ alerts.service.ts
โ โโโ errHandler.service.ts
โ
โโโ interfaces/
โ
โโโ helpers/
โ
โโโ pages/
โ โโโ posts/
โ โโโ movies/
โ โโโ games/
โ โโโ devices/
โ โโโ 404/
โ
โโโ app.routes.ts
โโโ app.routing.module.ts
โโโ app.module.ts
- Feature Module Architecture
- Core Module Pattern
- Shared Module Pattern
- Route Guards
- Reactive Forms
- Child Routing
- Separation of Concerns
- Centralized Error Handling
- Reusable Services
- Strong Typing with TypeScript
- LocalStorage Persistence
- Smart Form Validation
- UX-Oriented Design
- State Management Patterns
- Scalable Angular Structure
Practice and strengthen advanced Angular concepts through the implementation of a real-world CRUD application.
Key concepts covered:
- CRUD Operations
- REST API Consumption
- Reactive Programming with RxJS
- Route Guards
- Child Routes
- Reactive Forms
- LocalStorage Persistence
- Error Handling
- Loading States
- Feature Modules
- Core & Shared Modules
- Dependency Injection
- TypeScript Best Practices
- Front-End Architecture
This project is intended for educational and portfolio purposes.
Created by Alondra Francisco.