# BYOP Sample Application - Copilot Instructions This is a multi-component web application designed for testing the BYOP (Build Your Own Platform) engine. When working on this project: ## Project Context - **Frontend**: React 18 application with modern UI components - **Backend**: Node.js/Express API with PostgreSQL integration - **Database**: PostgreSQL with initialization scripts - **Deployment**: Docker containerization with multi-stage builds ## Coding Guidelines ### Frontend (React) - Use functional components with hooks - Implement proper error handling and loading states - Follow React best practices for state management - Use modern CSS with flexbox/grid layouts - Ensure responsive design principles ### Backend (Node.js) - Use async/await for database operations - Implement proper error handling middleware - Follow RESTful API design principles - Include input validation and sanitization - Use environment variables for configuration ### Docker & Deployment - Create multi-stage builds for production optimization - Include health checks in containers - Use non-root users for security - Optimize image sizes and build times - Follow Docker best practices ## Testing Considerations When suggesting code changes, consider: - Component isolation for BYOP testing - Environment variable flexibility - Health check endpoints - Graceful shutdown handling - Database connection resilience ## BYOP-Specific Features - Each component should be independently deployable - Include proper service discovery configuration - Implement Traefik-compatible labeling - Support for different deployment environments - Clear separation of concerns between services