Skip to content
patarasPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

18 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Enterprise Application Development with Claude Code - A Complete Guide

Overview

This project serves as a comprehensive guide and reference implementation for building enterprise-grade applications using Claude Code. It demonstrates best practices across the entire software development lifecycle, from initial concept through deployment and maintenance.

This guide showcases how to leverage Claude Code's capabilities to build a production-ready, full-stack application with modern technologies and enterprise-level quality standards.

Project Purpose

This is a sample and guide project that demonstrates:

  • How to structure and execute a professional development workflow
  • Best practices for enterprise application development
  • Integration of modern frontend and backend technologies
  • Cloud-native architecture patterns with Azure
  • Quality assurance and testing strategies
  • Comprehensive documentation practices

Technology Stack

Frontend

  • Framework: React 18+ with TypeScript
  • Build Tool: Vite
  • Component Library: Material-UI (MUI) 7
  • State Management: TanStack Query (React Query)
  • Routing: React Router (route-driven components)
  • Form Management: Formik with Yup validation
  • HTTP Client: Axios

Backend

  • Framework: .NET 10
  • Architecture: Domain-driven design with Controller/Command pattern
  • API Style: RESTful APIs

Data Layer

  • Primary Database: Azure CosmosDB (SQL API) - General storage and transactions
  • Reporting Database: Microsoft SQL Server - Analytics and quick queries
  • Storage: Azure Blob Storage
  • Queuing: Azure Storage Queues

Azure Services

  • Azure Functions
  • Azure Blob Storage
  • Azure Storage Queues
  • Azure CosmosDB
  • Azure SQL Database

Infrastructure as Code

  • Deployment: Azure Bicep scripts

Testing

  • Unit tests for business logic
  • Regression tests using Virtuoso API
  • Accessibility testing

Development Lifecycle

1. Idea Phase

Objective: Transform concepts into actionable development items

Activities:

  • Brainstorming: Document initial concepts and problem statements
  • Domain Modeling: Establish core domain entities and relationships
  • Data Dictionary: Create and maintain consistent terminology
    • Define business terms
    • Map technical implementations
    • Maintain glossary for cross-team communication

Deliverables:

  • Initial concept document
  • Domain model diagrams
  • Data dictionary (ongoing maintenance)

2. Design Phase

Objective: Create detailed specifications and architectural decisions

2.1 User Stories & Story Mapping

  • User Stories: Write clear, testable user stories

    • Format: "As a [user type], I want to [action] so that [benefit]"
    • Include acceptance criteria
    • Estimate complexity
  • Story Mapping: Organize stories into logical flows

    • Map user journeys
    • Identify MVPs and releases
    • Prioritize features
  • Release Planning: Define release boundaries

    • Group stories into releases
    • Identify dependencies
    • Set milestones

2.2 Wireframes & UI Design

  • Interactive Wireframes: React-based working prototypes

    • Functional components with state management
    • User interaction flows
    • State control demonstrations
    • Responsive layouts
  • Accessibility Considerations: Plan for WCAG 2.1 AA compliance

    • Keyboard navigation
    • Screen reader compatibility
    • Color contrast ratios
    • ARIA labels and roles

2.3 Architecture & Technology Decisions

  • Decision Analysis Tables: Document key choices

    • Compare options (libraries, patterns, services)
    • List pros and cons
    • Score criteria (performance, maintainability, cost, team expertise)
    • Record final decisions and rationale
  • Architecture Diagrams:

    • System context diagrams
    • Component diagrams
    • Data flow diagrams
    • Deployment diagrams

Design Principles:

  • Domain/Feature-Based Structure: Organize code by business domain
  • Pattern-Based Coding: Favor consistent patterns over clever solutions
  • Maintainability Over Complexity: Choose clarity over cleverness
  • Consistent Terminology: Use data dictionary terms throughout

Deliverables:

  • User stories with acceptance criteria
  • Story maps with release definitions
  • Working wireframes
  • Decision analysis tables
  • Architecture documentation

3. Implementation Phase

Objective: Build the application following established patterns and best practices

3.1 Project Structure

Frontend Structure
frontend/
├── src/
│   ├── features/           # Feature-based modules
│   │   ├── [domain-name]/
│   │   │   ├── components/ # Feature-specific components
│   │   │   ├── hooks/      # Feature-specific hooks
│   │   │   ├── api/        # Feature API calls
│   │   │   ├── types/      # Feature TypeScript types
│   │   │   └── routes/     # Feature routes
│   ├── shared/             # Shared utilities
│   │   ├── components/     # Reusable components
│   │   ├── hooks/          # Shared hooks
│   │   ├── utils/          # Helper functions
│   │   └── types/          # Shared types
│   ├── layouts/            # Page layouts
│   ├── routes/             # Route configuration
│   └── theme/              # MUI theme configuration
Backend Structure
backend/
├── src/
│   ├── Domain/             # Top-level domain organization
│   │   ├── [DomainName]/
│   │   │   ├── Controllers/    # API endpoints
│   │   │   ├── Commands/       # Command handlers (CQRS)
│   │   │   ├── Queries/        # Query handlers (CQRS)
│   │   │   ├── Models/         # Domain models
│   │   │   ├── Services/       # Business logic
│   │   │   ├── Validators/     # Input validation
│   │   │   └── Interfaces/     # Contracts
│   ├── Infrastructure/     # Cross-cutting concerns
│   │   ├── Data/
│   │   │   ├── CosmosDB/
│   │   │   └── SqlServer/
│   │   ├── Azure/
│   │   │   ├── Functions/
│   │   │   ├── Storage/
│   │   │   └── Queues/
│   └── Shared/             # Shared utilities

3.2 Coding Standards

Frontend Standards
  • Use functional components exclusively
  • Implement custom hooks for reusable logic
  • Use TanStack Query for server state
  • Use React Context or state libraries for client state
  • Route-driven architecture: Components mounted via routing
  • Use MUI 7 components with custom theming
  • Formik + Yup: All forms with validation schemas
  • Axios interceptors: Centralized error handling and auth
Backend Standards
  • Controller/Command Pattern: Thin controllers, business logic in commands
  • CQRS: Separate read and write operations
  • Dependency Injection: Use built-in .NET DI container
  • Repository Pattern: Abstract data access
  • Unit of Work: Transaction management
  • DTOs: Separate API models from domain models
Code Quality Standards
  • Meaningful names: Use data dictionary terms
  • Single Responsibility: Functions/classes do one thing
  • DRY Principle: Extract common logic
  • SOLID Principles: Follow object-oriented best practices
  • Pattern-based: Consistent patterns across codebase

3.3 Database Design

CosmosDB (Primary Storage)
  • Document-based storage for transactional data
  • Partition key strategy for scalability
  • Consistency levels per use case
  • Change feed for event streaming
SQL Server (Reporting)
  • Normalized schema for analytics
  • Indexed views for common queries
  • Stored procedures for complex reports
  • Regular sync from CosmosDB

Deliverables:

  • Functional application code
  • Consistent code patterns
  • Database schemas and migrations
  • Azure function implementations

4. Testing Phase

Objective: Ensure quality, reliability, and accessibility

4.1 Unit Testing

  • Coverage: All non-trivial business logic

  • Frontend Testing:

    • React Testing Library
    • Test custom hooks
    • Test utility functions
    • Mock API calls
  • Backend Testing:

    • xUnit or NUnit
    • Test commands and queries
    • Test business logic
    • Mock external dependencies

4.2 Regression Testing

  • Automated Tests: Virtuoso API integration
  • Test Scenarios: Cover critical user paths
  • CI/CD Integration: Run on every deployment

4.3 Accessibility Testing

  • Automated Tools: axe-core, Lighthouse
  • Manual Testing: Keyboard navigation, screen readers
  • WCAG 2.1 AA Compliance: Verify all criteria

4.4 Testing Strategy

  • Write tests alongside implementation
  • Aim for meaningful coverage, not 100%
  • Test behavior, not implementation
  • Maintain test data fixtures

Deliverables:

  • Unit test suite with good coverage
  • Automated regression tests
  • Accessibility audit reports
  • Test documentation

Documentation Standards

Code Documentation

Component Documentation

  • Purpose: What the component does
  • Props: TypeScript interfaces with descriptions
  • Usage Examples: Common use cases
  • Accessibility: ARIA attributes and keyboard support

API Documentation

  • Endpoints: URL, HTTP method, purpose
  • Request/Response: Schemas and examples
  • Error Codes: Possible errors and meanings
  • Authentication: Required permissions

Command Documentation

  • Purpose: Business operation description
  • Inputs: Parameter descriptions
  • Outputs: Return value description
  • Side Effects: Database changes, external calls

Database Documentation

  • Tables/Collections: Schema and purpose
  • Relationships: Foreign keys and references
  • Indexes: Performance optimization notes
  • Triggers/Procedures: Business logic documentation

Azure Resource Documentation

  • Service Purpose: Why it's used
  • Configuration: Key settings
  • Scaling: Performance considerations
  • Cost: Resource consumption estimates

Feature Documentation

User-Facing Documentation

  • Feature Guides: How to use each feature
  • Screenshots: Visual walkthroughs
  • FAQs: Common questions
  • Troubleshooting: Problem resolution

Technical Documentation

  • Architecture Decisions: ADRs (Architecture Decision Records)
  • Integration Points: External dependencies
  • Deployment Guide: Step-by-step deployment
  • Monitoring: Logging and alerting

Deployment

Infrastructure as Code

All Azure resources are provisioned using Bicep scripts:

Bicep Organization

infrastructure/
├── main.bicep              # Main orchestration
├── modules/
│   ├── cosmosdb.bicep      # CosmosDB resources
│   ├── sqlserver.bicep     # SQL Server resources
│   ├── storage.bicep       # Blob and Queue storage
│   ├── functions.bicep     # Azure Functions
│   ├── webapp.bicep        # Web App hosting
│   └── networking.bicep    # VNets, NSGs, etc.
├── parameters/
│   ├── dev.parameters.json
│   ├── staging.parameters.json
│   └── prod.parameters.json
└── scripts/
    └── deploy.sh           # Deployment automation

Deployment Process

  1. Validate: Test Bicep syntax and parameters
  2. Preview: Run what-if analysis
  3. Deploy: Apply infrastructure changes
  4. Verify: Check resource health
  5. Configure: Set application settings
  6. Deploy Code: Push application code
  7. Test: Run smoke tests

Environment Strategy

  • Development: Minimal resources, frequent deployments
  • Staging: Production-like, integration testing
  • Production: Full resources, change control

Getting Started with Claude Code

This guide demonstrates how to use Claude Code throughout the development process:

1. Planning with Claude Code

  • Generate user stories from requirements
  • Create story maps and release plans
  • Build data dictionaries
  • Design architecture decision tables

2. Design with Claude Code

  • Create React wireframe components
  • Generate TypeScript interfaces
  • Design database schemas
  • Create Bicep templates

3. Implementation with Claude Code

  • Scaffold project structure
  • Generate boilerplate code
  • Implement features following patterns
  • Write unit tests

4. Documentation with Claude Code

  • Generate API documentation
  • Create component documentation
  • Write deployment guides
  • Maintain data dictionary

5. Testing with Claude Code

  • Write unit tests
  • Create test fixtures
  • Generate accessibility tests
  • Build regression test suites

Project Milestones

Phase 1: Foundation

  • Project setup and tooling
  • Core infrastructure (Bicep)
  • Authentication and authorization
  • Base UI components and routing

Phase 2: Core Features

  • Implement primary domain features
  • Database integration (CosmosDB + SQL)
  • Azure Functions implementation
  • Storage and queue integration

Phase 3: Quality & Polish

  • Comprehensive testing
  • Accessibility compliance
  • Performance optimization
  • Complete documentation

Phase 4: Production Readiness

  • Security audit
  • Load testing
  • Monitoring and alerting
  • Production deployment

Key Success Criteria

  1. Maintainability: Code is easy to understand and modify
  2. Testability: High test coverage of business logic
  3. Accessibility: WCAG 2.1 AA compliant
  4. Documentation: All components well-documented
  5. Performance: Fast load times and responsive UI
  6. Scalability: Architecture supports growth
  7. Reliability: Robust error handling and recovery

Best Practices Demonstrated

  • Domain-driven design with clear boundaries
  • Consistent terminology from data dictionary
  • Pattern-based, maintainable code
  • Comprehensive testing strategy
  • Infrastructure as Code
  • Detailed documentation at all levels
  • Accessibility-first approach
  • Modern frontend architecture
  • Cloud-native backend patterns

Resources

Frontend Resources

Backend Resources

Testing Resources

Infrastructure Resources

License

This is a sample/guide project. Feel free to use it as a reference for your own projects.

Contributing

This project serves as a guide. Contributions that improve the documentation or demonstrate additional best practices are welcome.


Built with Claude Code - Demonstrating enterprise-grade development practices from concept to deployment.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages