BUILD A PRODUCTION-GRADE ROLE-BASED PUBLIC LIVE DEMO
## Your Responsibility
Act as a Principal Software Architect, Senior Full-Stack Engineer, UI/UX Designer, Application Security Engineer, QA Automation Lead, and DevOps Engineer.
You are working inside an existing software application.
Your assignment is to **inspect, design, implement, integrate, test, and prepare to launch a fully interactive, publicly accessible, role-based Live Demo and Product Preview system**.
This must become a real, working application feature—not a proposal, static screenshot, dummy landing page, or disconnected prototype.
**Primary business goal:** Allow prospective users to see exactly what they will experience after signing in, including the application's important features, dashboards, data, modules, and workflows, without creating an account or accessing real customer data.
Work autonomously using the existing repository, application architecture, testing conventions, and deployment configuration.
Do not assume any specific technology stack. Adapt to the actual application.
---
## PHASE 1 — AUTOMATIC APPLICATION DISCOVERY
Before implementing anything:
1. Analyze the complete repository structure and identify the frontend, backend, databases, authentication, authorization, routing, business logic, and deployment architecture.
2. Identify all actual user roles, permission groups, personas, and tenant types supported by the application.
3. Discover all authenticated pages, navigation items, features, business workflows, dashboards, forms, lists, reporting interfaces, and integrations.
4. Inspect the real data models and API contracts required to render these features.
5. Understand role-to-feature permissions and feature dependencies.
6. Identify existing reusable UI components, layouts, services, seeders, fixtures, and test infrastructure.
7. Identify security-sensitive functionality that cannot safely appear in a public demonstration.
8. Identify the application's actual registration, subscription, contact-sales, and authentication entry points.
Generate an internal **Role × Feature × Route × Data Dependency Matrix**.
Do not invent user roles or product capabilities that do not exist. If a feature is incomplete, distinguish it clearly from implemented functionality.
Do not redesign or replace the existing application.
## PHASE 2 — BUILD A PUBLIC DEMO ENTRY POINT
Introduce a prominent and professionally designed public feature named:
**Live Demo / Explore Product / Preview Dashboard**
Integrate it into appropriate existing public entry points:
- Main website navigation.
- Landing page, ideally near the primary call to action.
- Login and registration pages.
- Product feature or pricing pages, where relevant.
Use the application's existing branding, design system, typography, and responsive styling.
Provide a canonical route such as `/demo` or an equivalent route matching the current routing conventions.
No registration, real login, email, password, or payment should be required.
### Public Demo Hub
Build a central Demo Hub containing:
- A clear product introduction.
- A role selection interface based on discovered roles.
- A complete feature overview organized by modules.
- Preview cards explaining each role's benefits.
- An optional guided product tour.
- Sample feature highlights or previews.
- A prominent button to launch the selected role's demo.
- Clear conversion actions for registration, login, or contacting sales.
Support direct links to approved role-specific demonstrations.
Every role should be clearly understandable to a first-time visitor.
When the application has many roles, provide role grouping, search, or filters instead of an overwhelming list.
## PHASE 3 — REALISTIC ROLE-BASED PRODUCT PREVIEW
For each public-safe role, reproduce the actual authenticated user experience using the existing UI wherever feasible.
The demo must display what a legitimate user with that role would normally be permitted to see.
Include applicable real application features, such as:
- Dashboard and overview screens.
- Navigation menus and submenus.
- Summary cards and KPI widgets.
- Data tables and detail pages.
- Charts and analytical reports.
- Search, sorting, filtering, and pagination.
- User profile and account views.
- Transactions, bookings, orders, listings, requests, or other relevant business entities.
- Status tracking and workflow history.
- Notifications and activity feeds.
- Calendar, schedules, and timeline views.
- Settings previews.
- Other discovered role-specific features.
These are illustrative categories. Implement only features that exist in the application.
### Make the Demo Feel Complete
Every important supported screen should look like a realistic, populated application.
Avoid empty states, meaningless placeholder labels, broken images, generic "Lorem ipsum" text, and blank charts.
The initial dashboard must immediately communicate the role's major capabilities.
For complex applications, add a **Feature Explorer** or **Capabilities Overview** that allows visitors to see all important modules in one organized view.
Preserve the original look, branding, navigation, and information architecture so that the preview accurately represents the actual product.
## PHASE 4 — PRODUCTION-QUALITY SYNTHETIC SAMPLE DATA
Design a synthetic sample dataset adapted to the application's real data schema.
The sample data must be:
- Realistic, detailed, complete, and visually convincing.
- Entirely fabricated or generated from explicitly public, non-sensitive fixtures.
- Consistent across related pages and business entities.
- Appropriate for each role.
- Representative of multiple statuses and business scenarios.
- Sufficient to demonstrate search, sorting, filters, pagination, and drill-downs.
- Deterministically generated where practical.
- Reproducible and easy to reset.
- Free of actual customer, employee, patient, payment, or proprietary records.
Generate realistic names, dates, descriptions, products, projects, metrics, transactions, statuses, and historical records appropriate to the domain.
Ensure totals reconcile across the dashboard, charts, reports, and underlying detail records.
Where the real application has legitimate business data relationships, preserve those relationships in the synthetic fixtures.
Populate every important supported feature with meaningful data.
Do not copy the production database to create the demo.
## PHASE 5 — SECURE READ-ONLY DEMO ARCHITECTURE
This is a mandatory, non-negotiable requirement.
The public demo must never have the authority to modify production data, change real account settings, invoke privileged operations, or trigger real-world side effects.
Choose the safest architecture appropriate to the existing application:
**Option A — Frontend Demo Adapter:** Reuse the actual application UI with synthetic data fixtures and mocked application services.
**Option B — Isolated Demo Environment:** Use a dedicated demo application/database/tenant with synthetic records, strong isolation, and server-enforced read-only authorization.
**Option C — Hybrid:** Use the real UI with a combination of local demo fixtures and a dedicated read-only demo backend.
Select based on the repository. Prefer reusing the existing product UI and business presentation logic without duplicating entire screens.
### Mandatory Security Controls
1. Separate demo data completely from production customer data.
2. Never give anonymous visitors real admin, vendor, customer, or service-account credentials.
3. Never use a query parameter or client-controlled flag to bypass real authentication or authorization.
4. Define an explicit, narrowly scoped demo security boundary.
5. Apply deny-by-default authorization to every demo request and endpoint.
6. Block all persistent writes and side effects, including database mutations, email, SMS, notifications, payments, webhooks, file uploads, exports of sensitive data, background jobs, and external integrations.
7. Account for state-changing GET requests, GraphQL mutations, server actions, WebSocket actions, and other nonstandard write paths.
8. Enforce access restrictions at the server/API/service layer as well as in the UI; hiding or disabling buttons is insufficient.
9. Ensure demo sessions cannot read or access real authenticated users' records or cookies.
10. Prevent cross-role and cross-tenant authorization bypass.
11. Never expose real secrets, API keys, access tokens, private configurations, or sensitive logs.
12. Do not expose arbitrary backend endpoints merely to make demo screens work.
13. Restrict demo assets, attachments, and downloads to explicitly approved synthetic material.
14. Add rate limiting or other abuse protections where public demo traffic could cause significant cost or resource consumption.
15. Clearly label the environment **Demo Mode — Sample Data — Read Only**.
Sensitive administration, security, infrastructure, and financial operations must be explicitly curated or excluded where a public preview would create additional risk.
All demo access should be isolated from the real authentication and production data plane.
## PHASE 6 — INTERACTIVE EXPLORATION WITHOUT PERSISTENT WRITES
Although the environment is read-only, make the experience genuinely interactive.
Allow visitors to:
- Navigate across available pages.
- Switch between published demo roles.
- Open records and detail views.
- Search and filter sample data.
- Change chart ranges and report filters.
- Inspect tooltips and menus.
- Browse different example statuses.
- Follow guided workflows.
- Reset the demo to its original state.
Where appropriate, allow local-only, temporary simulation of operations such as creating an order, approving a request, or updating a status.
Simulations must never persist data to production or send real external requests. They should be clearly labeled as simulated.
If an action cannot be safely simulated, explain that it is unavailable in read-only mode and provide a relevant feature explanation or registration CTA.
Do not leave clickable elements broken or misleading.
## PHASE 7 — UX, DISCOVERABILITY, AND CONVERSION
Create a polished demo experience comparable to a professional SaaS product.
Requirements:
- Responsive desktop, tablet, and mobile layouts.
- Consistent colors, spacing, typography, and components.
- Clear role-switching controls.
- Persistent but unobtrusive demo-mode indicator.
- Contextual feature descriptions.
- Optional tooltips and guided onboarding.
- A "Reset Demo" control.
- A "Back to Website" control.
- A clear "Sign Up / Get Started / Contact Sales" call to action.
- Accessible keyboard navigation, labels, focus states, and color contrast.
- Graceful loading, empty, and error states.
- No misleading claims that fictional sample data is genuine customer activity.
- Appropriate search-engine indexing strategy: make the public marketing entry discoverable while considering `noindex` for individual synthetic role dashboards.
Ensure users can understand the product's major capabilities within the first few moments of entering the demo.
## PHASE 8 — ENGINEERING INTEGRATION
Follow existing repository conventions.
Prefer shared components, configuration-driven role definitions, reusable fixtures, and centralized demo data access.
Avoid hardcoded role checks scattered throughout the frontend.
Build a maintainable architecture that allows future roles and application features to be incorporated easily.
Add an appropriate feature flag or configuration control, such as `PUBLIC_DEMO_ENABLED`.
Keep the implementation modular, documented, testable, and compatible with the current application.
Do not introduce major dependencies without a clear justification.
Do not modify real production authorization rules merely to enable the demo.
## PHASE 9 — AUTOMATED TESTING AND QUALITY VALIDATION
Implement and execute automated tests using the repository's existing framework, or an appropriate lightweight testing setup when none exists.
Verify:
- Public demo access without logging in.
- Every published role loads successfully.
- Correct navigation and feature visibility for each role.
- All supported feature pages render with synthetic data.
- No dead links or broken UI actions.
- Search, filtering, sorting, and pagination.
- Role switching and demo reset.
- Desktop and mobile layouts.
- Relevant accessibility checks.
- No real production data exposure.
- Rejection of writes through direct API calls.
- Authorization enforcement and cross-role isolation.
- No real payment, email, webhook, or external service side effects.
- Correct handling of refresh, direct links, session expiry, and error states.
- No impact on existing real-user login or production application workflows.
Use Playwright or an equivalent browser automation framework where practical.
Add targeted negative tests for security-sensitive and mutation endpoints.
Execute build, lint, type-check, unit, integration, and browser tests as applicable. Fix failures caused by your implementation.
Do not claim tests passed unless they actually ran successfully.
## PHASE 10 — RELEASE AND VERIFICATION
Inspect the project's existing CI/CD, hosting, deployment scripts, and release conventions.
Prepare the implementation for a safe production release.
Deploy first to an available staging or preview environment when supported.
Run smoke tests against the deployed environment.
If production deployment is already authorized, the required access is available, and existing project release procedures permit it, deploy using the established workflow with rollback readiness.
Never invent deployment credentials, bypass protected environments, or make destructive infrastructure changes.
If deployment is blocked by missing access or approval, complete all possible implementation and validation work and provide the exact remaining deployment steps.
After release, verify the public demo and role-specific routes through real browser requests.
Do not report the demo as publicly live without verification.
## FINAL REQUIRED DELIVERABLES
Provide:
1. Discovered application architecture and tech stack.
2. Complete role and feature inventory.
3. Implemented Demo Hub and role-specific preview routes.
4. The chosen demo architecture and its security boundaries.
5. Synthetic data and fixture generation strategy.
6. Summary of changed and created files.
7. Automated test files and actual test results.
8. Staging and production deployment status, with evidence.
9. Public URLs for verified deployed demo pages, if available.
10. Remaining limitations, security concerns, and follow-up tasks.
## EXECUTION DIRECTIVE
Do not stop after analyzing the repository or generating a design proposal.
Carry the task through implementation, integration, testing, and permitted deployment using the available project environment.
Make reasonable engineering decisions independently. Ask for intervention only when necessary for access, a consequential product decision, or a potentially destructive operation.
Never fabricate completed work, tests, or deployment results.
**Definition of Done:** A visitor can enter the public Demo Hub, choose an available role, explore a realistic and substantially complete version of that role's actual interface, inspect populated sample data, and understand the product's capabilities without signing in—while production data and operations remain fully protected.