How pragadeesvp/sterna_assesment works
Purpose and Runtime
This is an Angular 21 single-page desktop-oriented preview application for a login-gated dashboard. It is built and served through Angular CLI, with the browser as its runtime; the README identifies a Netlify-hosted demo but no backend API or external data service.
Entry bootstrap:
• src/main.ts
• src/app/app.module.ts
• src/app/app.component.ts
Application Shell and Composition
AppModule assembles the application’s components, routing, Angular Material theme, and shared Angular dependencies. The root component provides the top-level router outlet and global styling boundary.
Key shell paths:
• src/app/app.component.ts
• src/app/app.component.html
• src/material-theme.scss
Global document and application styles originate in:
• src/index.html
• src/styles.css
Route-Controlled Screens
Routing separates the public login screen from protected application views. The major route-level destinations are login, dashboard, and location; the layout component likely acts as the authenticated page frame around protected content.
Route and screen paths:
• src/app/app-routing.module.ts
• src/app/login/login.component.ts
• src/app/dashboard/dashboard.component.ts
• src/app/location/location.component.ts
Authentication Boundary
Authentication is client-side and intentionally lightweight: the README supplies accepted email identities and states that any six-letter password is valid. The route guard is the enforcement boundary preventing unauthenticated navigation to protected routes.
Authentication paths:
• src/app/login/login.component.ts
• src/app/guards/auth.guard.ts
• src/app/app-routing.module.ts
Primary control flow: user submits login credentials → login component establishes client-side authenticated state → router navigates toward protected content → guard permits or redirects navigation based on that state.
Authenticated Layout and Navigation
The layout component owns persistent authenticated UI structure, such as navigation and content placement, while routed feature components render inside that frame. This isolates chrome/navigation concerns from dashboard and location-specific presentation.
Layout paths:
• src/app/layout/layout.component.ts
• src/app/layout/layout.component.html
• src/app/app-routing.module.ts
Data Provisioning
A centralized Angular service is the application’s data-access boundary. Given the absence of server configuration or documented API dependencies, it likely provides in-memory/static data consumed by dashboard and location views rather than performing remote persistence.
Data boundary paths:
• src/app/services/data.service.ts
• src/app/dashboard/dashboard.component.ts
• src/app/location/location.component.ts
Primary data flow: feature component requests view data from DataService → component transforms/binds it into its template → Angular change detection renders the dashboard or location view.
Infrastructure and Delivery
The project uses Angular CLI configuration for local serve and production builds, npm for dependency management, and appears deployable as static frontend assets; the demo is hosted on Netlify. Angular Material theming is configured locally rather than via an external design-system service.
Infrastructure paths:
• angular.json
• package.json
• src/material-theme.scss
Main entry points: app-routing.module.ts Application routes · app.module.ts App module · layout.component.ts Authenticated layout · main.ts Application bootstrap
Components 14
Browser Application
- Document & global styles
src/index.html - Application bootstrap
src/main.ts - App module · Assembles routing, components, Material, and shared dependencies.
src/app/app.module.ts - Root app shell · Provides the top-level router outlet and styling boundary.
src/app/app.component.ts - Application routes · Separates public login from protected views.
src/app/app-routing.module.ts
Authentication
- Login screen · Establishes lightweight client-side authentication state.
src/app/login/login.component.ts - Auth guard · Permits or redirects protected navigation.
src/app/guards/auth.guard.ts
Authenticated Features
- Authenticated layout · Owns persistent navigation and routed content placement.
src/app/layout/layout.component.ts - Dashboard
src/app/dashboard/dashboard.component.ts - Location
src/app/location/location.component.ts - Data service · Provides static or in-memory view data without a backend API.
src/app/services/data.service.ts
Build & Styling
- Angular CLI · Builds and serves the SPA as static assets.
angular.json - npm dependencies
package.json - Material theme
src/material-theme.scss
Connections 17
- npm dependencies → Angular CLI: provides tooling
- Angular CLI → Application bootstrap: builds and serves
- Document & global styles → Application bootstrap: hosts app
- Material theme → App module: styles Material UI
- Application bootstrap → App module: boots
- App module → Root app shell: declares
- App module → Application routes: configures
- Root app shell → Application routes: renders outlet
- Application routes → Login screen: public route
- Login screen → Application routes: navigates after login
- Application routes → Auth guard: checks protected routes
- Auth guard → Authenticated layout: permits or redirects
- Application routes → Authenticated layout: protected frame
- Authenticated layout → Dashboard: hosts routed view
- Authenticated layout → Location: hosts routed view
- Data service → Dashboard: supplies view data
- Data service → Location: supplies view data