This project demonstrates clean code principles and design patterns in an Angular application.
https://test-app.josematos.work
https://storybook.josematos.work
This is a simple Angular application generated with Angular CLI. It includes:
- An Angular library module (my-library)
- Example components, services, models, etc.
- Unit and end-to-end tests
- Continuous integration setup
The codebase follows principles like:
- Meaningful naming conventions
- Small focused functions/classes
- DRY (Don't Repeat Yourself) principles
- Consistent code style and formatting
- Extensive commenting for complex logic
- Avoiding deep nesting and complex conditions
Some patterns used in the code:
- Dependency Injection for services, repos, etc
- Singleton services
- Model-View-Controller pattern with Angular components
- Repository pattern for abstracting data access
- Pub/sub pattern for event handling
- Strategy pattern for swappable algorithms
- Facade pattern to simplify interfaces
Instructions for setting up the project locally:
- Clone the repo
- Install dependencies with
npm install
- Start dev server with
ng serve
- Run tests with
ng test