An Angular application for managing users with features like listing, creating, editing, and deleting users. Built with Angular 18, Angular Material, and Tailwind CSS.
- User list with pagination
- Create and edit users
- Delete users with confirmation
- Responsive material design
- Mock authentication (Bearer token)
- Toast notifications
- Breadcrumb navigation
Before you begin, ensure you have met the following requirements:
- Node.js (v20.11.1 or higher)
- Git
- Clone the repository
git clone
cd turin-userhub
- Install dependencies
npm install
Run the development server:
ng serve
Navigate to http://localhost:4200/
. The application will automatically reload if you change any of the source files.
src/
├── app/
│ ├── core/ # Core functionality
│ │ ├── interceptors/ # HTTP interceptors
│ │ ├── models/ # Interfaces
│ │ └── services/ # API services
│ ├── features/ # Feature modules
│ │ └── users/ # User management feature
│ │ ├── components/ # User-related components
│ │ └── routes.ts # User routing
│ ├── shared/ # Shared components
│ └── app.component.ts # Root component
└── styles/ # Global styles
- Angular 18
- Angular Material
- Tailwind CSS
- RxJS
- TypeScript
The application uses a mock API with the following endpoints:
- GET /users - List users
- GET /users/:id - Get single user
- POST /users - Create user
- PUT /users/:id - Update user
- DELETE /users/:id - Delete user
All API requests include a mock Bearer token for authentication demonstration.
To view the API documentation, visit Reqres api docs.
ng serve
- Start development serverng build
- Build the projectng test
- Run unit testsng lint
- Lint the codeng e2e
- Run end-to-end tests
To build the project for production:
ng build --configuration production
The build artifacts will be stored in the dist/
directory.
The application includes two environment configurations, I have used reqres.in as the API base URL. You can change the API URL in the environment files:
- Development (
environment.ts
)
export const environment = {
production: false,
apiUrl: "https://reqres.in/api",
};
- Production (
environment.prod.ts
)
export const environment = {
production: true,
apiUrl: "https://reqres.in/api",
};