A responsive Dynamic Angular Dashboard with user authentication, API integration, state management using Angular Signals, and performance optimizations.
Before accessing the live demo, please visit this link to load the demo usernames and passwords for login.
Live Demo - Angular Dashboard.
- User Authentication → JWT-based login & logout
- Dynamic Data Table → Fetches data from JSONPlaceholder
- Filter/Search, Sorting, Pagination → Built with Angular Material Table
- State Management → Uses Angular Signals
- Lazy Loading & Performance Optimizations → Uses OnPush Change Detection and async pipe
- Dark Mode Toggle
- Auth Unit Test
git clone https://github.com/chiragobhan/dynamic-angular-dashboard.git
cd dynamic-angular-dashboardnpm installWe use json-server to simulate an API for user authentication. Users are stored in db.json:
{
"users": [
{ "id": 1, "username": "admin", "password": "password", "token": "mock-jwt-token" },
{ "id": 2, "username": "testuser", "password": "test123", "token": "mock-jwt-token" }
]
}npx json-server --watch db.json --port 3000ng serveThen open http://localhost:4200/ in your browser.
- Users login via
json-serverAPI (Mock backend) - JWT token is stored in
localStorage AuthGuardprotects routes, and prevents logged-out users from accessing/dashboard
- Angular Signals manage authentication state
- Reactive
signal()ensures instant UI updates on login/logout
- The dashboard content is lazy-loaded and uses OnPush Change Detection
- API requests are optimized via Angular’s
async pipe - Pagination, Sorting, and Filtering happen on the frontend for better UX
- Uses
localStorageto persist user theme - Applied via
document.body.classList.toggle('dark-theme')
To run unit tests:
ng testThis will open the Karma test runner and execute auth unit test.
Disclaimer: This project is an assignment completed for Pillway. All logos and branding elements belong to Pillway and are used solely for demonstration purposes.