A modern Angular application showcasing best practices, component architecture, and responsive design patterns.
- Modern Angular Architecture: Built with the latest Angular features and best practices
- Responsive Design: Mobile-first approach using CSS Grid and Flexbox
- Component Library: Reusable UI components with consistent styling
- State Management: Efficient state handling with Angular services
- Type Safety: Full TypeScript implementation for better development experience
- Testing Ready: Comprehensive testing setup with Jasmine and Karma
- Performance Optimized: Lazy loading, OnPush change detection, and bundle optimization
Before running this project, make sure you have the following installed:
- Node.js (v18 or higher)
- npm (v9 or higher)
- Angular CLI (v17 or higher)
# Install Angular CLI globally
npm install -g @angular/cli-
Clone the repository
git clone https://github.com/ctvs/sample.git cd sample -
Install dependencies
npm install
-
Start the development server
ng serve
-
Open your browser Navigate to
http://localhost:4200/
src/
├── app/
│ ├── components/ # Reusable UI components
│ ├── pages/ # Page components
│ ├── services/ # Business logic and API services
│ ├── models/ # TypeScript interfaces and types
│ ├── guards/ # Route guards
│ ├── interceptors/ # HTTP interceptors
│ ├── pipes/ # Custom pipes
│ └── shared/ # Shared modules and utilities
├── assets/ # Static assets (images, icons, etc.)
├── environments/ # Environment configurations
└── styles/ # Global styles and themes
| Command | Description |
|---|---|
ng serve |
Start development server |
ng build |
Build the project for production |
ng test |
Run unit tests |
ng e2e |
Run end-to-end tests |
ng lint |
Lint the codebase |
ng generate component <name> |
Generate a new component |
ng generate service <name> |
Generate a new service |
This project uses:
- SCSS for enhanced CSS capabilities
- Angular Material for UI components
- CSS Custom Properties for theming
- Responsive Design principles
# Run tests once
ng test
# Run tests in watch mode
ng test --watch
# Generate code coverage report
ng test --code-coverageng e2eng build --configuration production- Tree shaking for unused code elimination
- Minification and compression
- Lazy loading for route-based code splitting
- Service worker for caching (if enabled)
Create environment files for different stages:
// src/environments/environment.prod.ts
export const environment = {
production: true,
apiUrl: 'https://api.yourapp.com',
// Add your production config here
};ng deploy --base-href=/sample/- Netlify: Drag and drop the
dist/folder - Vercel: Connect your GitHub repository
- Firebase: Use
ng deploy @angular/fire
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow Angular Style Guide
- Use TypeScript strict mode
- Write unit tests for new features
- Follow conventional commit messages
This project is licensed under the MIT License - see the LICENSE file for details.
Chandrahass Tvs
- GitHub: @ctvs
- Angular team for the amazing framework
- Community contributors and open source projects
- Angular Material for UI components
⭐ Star this repository if you find it helpful!