Design Document #
This document details the visual style, component layout, and client-side design system used on the platform. The UI is built using clean vanilla CSS alongside glassmorphic headers, fluid animations, and a responsive theme matching both dark and light modes.
1. Design Principles #
- Structural Symmetry & Clean Grids: Layouts align systematically to a centered column (max width
1000px) with unified gutter spaces to project logic and organization. - Glassmorphism & Depth: Semi-transparent backdrop blur effects (
backdrop-filter: blur(12px)) are applied to the header to layer content cleanly over animated backgrounds. - Reactive Interaction: Dynamic transitions (
cubic-bezier(0.165, 0.84, 0.44, 1)) and hover transformations indicate interactivity throughout buttons, fields, and cards. - System-Native Typography: The typography scales cleanly down to mobile viewports using legible weights and clean letter spacings.
2. Design System #
Light Theme Palette
Primary Blue
#007bff
Bayern Red
#dc3545
Card Background
#ffffff
Primary Dark Text
#1a1a1b
Dark Theme Palette
Primary Blue (Dark)
#3793ff
Bayern Red (Dark)
#ff4d5a
Card Background (Dark)
#1e293b
Primary Light Text
#f8fafc
Typography
| Usage | Font-Family | Sizes & Weights |
|---|---|---|
| Headers & Body Text | 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif |
Body: 1rem (Regular)H1: 2.5rem (Bold)H2: 1.8rem (Semi-Bold) |
| Nav Links | 'Inter' |
0.75rem, Uppercase, 600 weight, 0.5px letter-spacing |
| Code / Metadata | monospace (or system defaults) |
0.9rem (Regular) |
3. Component Architecture #
The UI is structured around reusable template fragments and script modules:
| Component Module | File Reference | Description & Reusability |
|---|---|---|
| Global Shell & Header | [base.html](file:///c:/New%20folder/ronilprasad8/ronilprasad8/templates/base.html) |
Defines the universal layout, structural metadata, loading of CSS/FontAwesome scripts, and the persistent navbar. |
| Global Chat Widget | Embedded in base.html + [chatbot.js](file:///c:/New%20folder/ronilprasad8/ronilprasad8/static/js/chatbot.js) |
The floating circular launcher and transition panel that handles authenticated messaging. Hidden dynamically on the dedicated chat view. |
| Interactive Auth Cards | [login.html](file:///c:/New%20folder/ronilprasad8/ronilprasad8/templates/login.html) |
Manages tabbed states (Login / Sign Up / Forgot Password) dynamically using vanilla JS and styled CSS forms. |
| Project Cards | [project.html](file:///c:/New%20folder/ronilprasad8/ronilprasad8/templates/project.html) |
Modular structured grids for detailing items with smooth scale transitions on hover (transform: translateY(-5px)). |
| Social Link Tiles | [contact.html](file:///c:/New%20folder/ronilprasad8/ronilprasad8/templates/contact.html) |
Grid of responsive elements mapping out direct lines to external profiles. |
4. UI/UX Patterns #
- Dynamic Active Indicators: Navigation links expand their lower underline borders smoothly to
100%when hovered, and maintain high-visibility indicators when active. - Dual Banner Alert State: The authentication screens utilize green success banners and red error banners that auto-scroll into view during failures to guide user input.
- Character Typing Feedback: The chatbot simulates real-time typing using typewriter animations alongside animated dot indicators (
.typing) to manage load perception. - Mobile-First Viewport Bounds: UI panels automatically wrap (
flex-wrap: wrap) and constrain their dimensions using viewport calculations (max-width: calc(100vw - 40px)) on smaller devices.
5. State Management #
Since the application does not use heavy Javascript frameworks (like React, Vue, or Angular), state is managed client-side using Vanilla JS coupled to Firebase events:
- Auth State propagation: The
onAuthStateChangedlistener acts as the global state store. Upon firing, it mutates navigation bars, updates form placeholders, and enables/disables conversational inputs. - Memory Context state: The
chatHistoryarray in JS holds the last 10 messages. This array acts as the short-term memory block, passed via HTTP post requests to keep conversations in sync. - Firestore Knowledge arrays: Per-user learned facts are loaded into local JS arrays upon authentication, ensuring the chatbot doesn't need to poll the database during every conversation exchange.
6. Accessibility Notes #
The codebase employs several standards to maintain basic accessibility guidelines:
- Keyboard Navigation: Interactive cards, inputs, and form controls are built using native HTML tags (
input,button,a) so they remain focusable. - Semantic Layouts: Use of semantic tags (
nav,main,aside,footer,section) to structure page regions. - Aria Descriptions: Inline button widgets include detailed
aria-labeltags (e.g.aria-label="Send Message") for screen reader systems.