M
Marcos Polischuk

Patient Clinic History App

Bootstrap Login Form demonstrates EditForm validation and ValidationSummary alongside a small clinic dashboard card grid. Shows Navigation via NavLink and uses Bootstrap form-control styling and cards.

LIVE DEMO
Generated using Instruct UI - An AI for Blazor UI Generation
## What's implemented - Login form using EditForm with DataAnnotations validation and ValidationSummary. - Dashboard summary with three Bootstrap cards showing Patients, Turns, and Clinic History counts. - Navigation links (NavLink) and a Home button that uses NavigationManager. - Inline mock authentication logic and mock counters for demo purposes. ## Key components - EditForm, DataAnnotationsValidator, ValidationSummary, ValidationMessage - InputText, InputCheckbox (@bind-Value) - NavLink, button with @onclick and NavigationManager - Bootstrap cards, grid (row/col-*), and btn/form-control classes ## How it works - The login page binds a LoginViewModel to EditForm and relies on DataAnnotations for field validation; OnValidSubmit invokes HandleLogin. - ValidationMessage and ValidationSummary render per-property and overall errors; a local errorMessage string surfaces authentication failure. - The dashboard page renders three integer fields (patientsCount, turnsCount, historyCount) and uses NavLink to navigate to list pages. - NavigationManager is used for imperative navigation (GoToHome and post-login redirect). ## Styling - Uses Bootstrap classes: container, row, col-*, card, text-bg-*, btn, form-control, d-grid, and responsive grid utilities. - Layout is responsive via Bootstrap columns (col-12 col-md-4) and card sizing; icons use Font Awesome classes (fa-*) for visual affordances. ## Reuse steps 1. Add pages/LoginPage.razor, pages/DashboardPage.razor and a LoginViewModel class; include DataAnnotations namespace. 2. Ensure Bootstrap CSS and Font Awesome are referenced (index.html/_Host.cshtml) or use a Bootstrap-enabled layout. 3. Keep EditForm + DataAnnotationsValidator; adapt model attributes for server validation. 4. Wire real authentication and data services via DI (register services in Program.cs) and replace mock counters with API calls. 5. Add route protection (AuthorizeView or AuthorizeRoute) and replace placeholder links with real pages. ## Limitations & next steps - This is a small, single-page demo set generated by Instruct UI and uses mock authentication and static counters. - No backend API, auth service, or state management is wired; replace mock logic with HttpClient or Identity services. - Add server-side validation, secure routing, error handling, and tests for production use. - Consider accessibility improvements, localization, and form UX (loading state, password policies).