Skip to content

Latest commit

 

History

History
161 lines (137 loc) · 5.4 KB

File metadata and controls

161 lines (137 loc) · 5.4 KB

Alex Lee Developer Exercise - Implementation Progress

🎯 Project Overview

Repository: ajacobm/alex-lee
Architecture: .NET 8 + React.js + SQLite + Docker + GitHub Actions
Started: 2025-01-17

📋 Requirements Checklist

C# Problems

  • 1. String Interleaving Function (extension method + unit tests)
  • 2. Palindrome Checker (extension method + unit tests)
  • 3. Parallel File Search (Task.Parallel/PLINQ + unit tests)

SQL Problems

  • 4. Line Number Query (ROW_NUMBER() OVER PARTITION)
  • 5. Duplicate Detection Query
  • 6. Stored Procedure (EF Core migration)

React Problems

  • 7. Purchase Detail Grid (with filters, Alex Lee styling)
  • 8. Create/Update Modal (form validation, API integration)

Architecture Components

  • Backend (.NET 8 WebAPI)
  • Frontend (React 18 + create-react-app)
  • Database (SQLite + EF Core)
  • Docker (multi-stage builds)
  • CI/CD (GitHub Actions)
  • Authentication (JWT + cookies)

🚀 Implementation Timeline

Phase 1: Backend Foundation (In Progress)

  • Project structure planning
  • .NET 8 solution structure created
  • Domain models (records) implemented
  • C# algorithm implementations (string interleaving, palindrome, parallel file search)
  • Unit test foundation (29 tests passing)
  • CQRS pattern structure (commands/queries defined)
  • EF Core + SQLite configuration
  • .NET 8 WebAPI setup
  • Command/Query handlers implementation

Phase 2: Database & API

  • SQL schema migration
  • Purchase detail entities
  • Repository pattern
  • API endpoints (CRUD)
  • Swagger documentation
  • Middleware (auth, logging, CORS)

Phase 3: Frontend Foundation

  • React app initialization
  • Alex Lee branding/styling
  • API service layer
  • State management setup
  • Component structure

Phase 4: Feature Implementation

  • Purchase detail grid
  • Filtering functionality
  • Modal CRUD operations
  • Form validation
  • Error handling

Phase 5: DevOps & Deployment

  • Dockerfiles (backend/frontend)
  • Docker Compose
  • GitHub Actions workflows
  • Testing automation
  • Release pipeline

📁 Project Structure

alex-lee/
├── .github/workflows/          # CI/CD pipelines
├── backend/
│   ├── src/
│   │   ├── AlexLee.Api/        # WebAPI controllers
│   │   ├── AlexLee.Application/ # CQRS handlers
│   │   ├── AlexLee.Domain/     # Record models
│   │   ├── AlexLee.Infrastructure/ # EF Core
│   │   └── AlexLee.Algorithms/ # C# problems 1-3
│   ├── tests/
│   │   └── AlexLee.Tests/      # Unit tests
│   ├── Dockerfile
│   └── alexlee.db              # SQLite database
├── frontend/
│   ├── src/
│   │   ├── components/         # React components
│   │   ├── services/           # API clients  
│   │   ├── hooks/              # Custom hooks
│   │   └── styles/             # Alex Lee theme
│   ├── Dockerfile
│   └── package.json
├── docker-compose.yml
├── README.md
└── PROGRESS.md

🔧 Current Status: Setting Up Backend

Next Steps:

  1. Create .NET 8 solution structure
  2. Configure EF Core with SQLite
  3. Implement domain models as records
  4. Add CQRS pattern with MediatR
  5. Implement C# algorithm problems with unit tests

📝 Notes

  • Using backend-first approach to establish data contracts
  • Frontend will consume OpenAPI specs for type safety
  • CI/CD will build Docker images for both services
  • SQLite bundled with backend (no separate container)

✅ Completed So Far

✅ C# Problems (Fully Implemented)

  1. String Interleaving Extension Method

    • "abc".InterleaveWith("123") returns "a1b2c3"
    • Full unit test coverage (7 test cases)
  2. Palindrome Checker Extension Method

    • Handles strings, numbers, punctuation, case-insensitive
    • Returns "Palindrome" or "Not Palindrome" as required
    • Full unit test coverage (8 test cases)
  3. Parallel File Search Utility

    • Uses Parallel.ForEach for concurrent file processing
    • Thread-safe collections and atomic counters
    • Returns file count, line count, occurrence count
    • Full unit test coverage (5 test cases)

✅ Backend Architecture (Foundation Complete)

  • Solution Structure: 6 projects (Api, Application, Domain, Infrastructure, Algorithms, Tests)
  • Domain Models: Immutable records for PurchaseDetailItem with all required fields
  • CQRS Pattern: Commands and Queries with MediatR
  • EF Core DbContext: SQLite configuration with seeded sample data
  • Command/Query Handlers: Full CRUD operations implemented
  • SQL Problem Solutions Integrated:
    • Problem #4: Line numbering with ROW_NUMBER() patterns
    • Problem #5: Duplicate detection grouping logic

🔧 Next Steps Required

  1. Complete WebAPI (controllers, Swagger, middleware)
  2. Create migrations and initialize SQLite database
  3. Add authentication (JWT + cookies)
  4. Docker configuration (Dockerfiles + compose)
  5. GitHub CI/CD pipeline setup
  6. Frontend React app initialization

🚀 Ready for Production Pipeline

The current backend foundation is solid and ready for:

  • Unit testing automation (29 tests passing)
  • Database migration deployment
  • API endpoint exposure
  • Frontend integration

Last Updated: 2025-01-17 03:30 UTC