Skip to content

Enterprise Web Application Framework with Clean Architecture, React, PostgreSQL, and Stripe integration

License

mwhayford/enterprise-web-framework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

92 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Enterprise Web Application Framework

A comprehensive, production-ready web application framework built with modern technologies and enterprise-grade architecture patterns.

πŸ—οΈ Architecture Overview

This project implements a Clean Architecture pattern with CQRS (Command Query Responsibility Segregation) using MediatR, providing a scalable and maintainable foundation for enterprise applications.

Technology Stack

Backend:

  • ASP.NET Core 8.0 - Web API framework
  • Entity Framework Core 8.0 - ORM with PostgreSQL
  • MediatR - CQRS implementation
  • FluentValidation - Input validation
  • AutoMapper - Object mapping
  • ASP.NET Core Identity - Authentication & Authorization
  • JWT Bearer Tokens - Stateless authentication
  • Google OAuth 2.0 - Social authentication
  • Stripe.NET - Payment processing
  • Serilog - Structured logging
  • Swagger/OpenAPI - API documentation

Frontend:

  • Vite 5.x - Build tool and dev server
  • React 18.x - UI framework
  • TypeScript 5.x - Type safety
  • Tailwind CSS 3.x - Utility-first CSS
  • React Router 6.x - Client-side routing
  • React Query (TanStack Query) - Server state management
  • React Hook Form - Form handling
  • Zod - Schema validation
  • Axios - HTTP client
  • Stripe.js - Payment integration

Infrastructure:

  • PostgreSQL 15+ - Primary database
  • Redis - Caching and session storage
  • Elasticsearch 8.x - Full-text search
  • Apache Kafka - Event streaming and message queuing
  • Snowflake - Data warehouse (planned)
  • Docker - Containerization
  • Kubernetes (EKS) - Container orchestration
  • Terraform - Infrastructure as Code

DevOps & Quality:

  • NUnit - Unit testing
  • TestContainers - Integration testing
  • Playwright - End-to-end testing
  • ESLint & Prettier - Code quality
  • StyleCop & Roslynator - .NET code analysis
  • GitHub Actions - CI/CD pipeline

πŸš€ Quick Start

Prerequisites

  • .NET 8.0 SDK
  • Node.js 18+ and npm
  • Docker and Docker Compose
  • PostgreSQL (or use Docker)
  • Git

Local Development Setup

  1. Clone the repository

    git clone <repository-url>
    cd Core
  2. Start infrastructure services

    cd docker
    docker-compose up -d postgres redis elasticsearch kafka
  3. Configure environment variables

    # Backend
    cp src/backend/RentalManager.API/appsettings.Development.json.example src/backend/RentalManager.API/appsettings.Development.json
    
    # Frontend
    cp src/frontend/env.example src/frontend/.env.development
  4. Start the backend

    cd src/backend
    dotnet restore
    dotnet run --project RentalManager.API
  5. Start the frontend

    cd src/frontend
    npm install
    npm run dev
  6. Access the application

Docker Development

For a fully containerized development environment:

cd docker
docker-compose -f docker-compose.yml -f docker-compose.dev.yml up

πŸ“ Project Structure

Core/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ backend/                 # .NET Backend
β”‚   β”‚   β”œβ”€β”€ RentalManager.API/           # Web API layer
β”‚   β”‚   β”œβ”€β”€ RentalManager.Application/   # CQRS handlers, DTOs, validators
β”‚   β”‚   β”œβ”€β”€ RentalManager.Domain/        # Entities, value objects, domain events
β”‚   β”‚   β”œβ”€β”€ RentalManager.Infrastructure/ # EF Core, external services
β”‚   β”‚   └── RentalManager.Database/      # Database schema management
β”‚   └── frontend/               # React Frontend
β”‚       β”œβ”€β”€ src/
β”‚       β”‚   β”œβ”€β”€ components/     # Reusable UI components
β”‚       β”‚   β”œβ”€β”€ pages/          # Page components
β”‚       β”‚   β”œβ”€β”€ hooks/          # Custom React hooks
β”‚       β”‚   β”œβ”€β”€ services/       # API services
β”‚       β”‚   β”œβ”€β”€ types/          # TypeScript type definitions
β”‚       β”‚   β”œβ”€β”€ utils/          # Utility functions
β”‚       β”‚   └── contexts/       # React contexts
β”œβ”€β”€ tests/                      # Test projects
β”‚   β”œβ”€β”€ RentalManager.UnitTests/         # NUnit unit tests
β”‚   β”œβ”€β”€ RentalManager.IntegrationTests/  # Integration tests
β”‚   └── RentalManager.E2ETests/          # Playwright E2E tests
β”œβ”€β”€ docker/                     # Docker configurations
β”œβ”€β”€ kubernetes/                 # K8s manifests
β”œβ”€β”€ terraform/                  # Infrastructure as Code
└── docs/                       # Documentation

πŸ”§ Key Features

Authentication & Authorization

  • Google OAuth 2.0 integration
  • JWT token authentication with refresh tokens
  • Role-based and policy-based authorization
  • Secure password policies

Payment Processing

  • Stripe integration for credit/debit cards and ACH
  • Subscription billing with prorated changes
  • One-time payments with idempotency
  • Webhook handling for payment events
  • Payment method management
  • Refund processing

User Management

  • User registration and profile management
  • Account verification and email notifications
  • User preferences and settings
  • Admin user management

Search & Analytics

  • Elasticsearch full-text search
  • Event streaming with Apache Kafka
  • Data warehouse integration (Snowflake)
  • Real-time search indexing

Background Processing

  • Hangfire for scheduled jobs
  • Kafka consumers for event processing
  • Async workflows for underwriting
  • Email notifications and reporting

πŸ§ͺ Testing

Unit Tests

cd tests/RentalManager.UnitTests
dotnet test

Integration Tests

cd tests/RentalManager.IntegrationTests
dotnet test

End-to-End Tests

cd tests/RentalManager.E2ETests
npm install
npx playwright test

πŸš€ Deployment

Docker Production Build

cd docker
docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d

Kubernetes Deployment

cd kubernetes
kubectl apply -f .

Terraform Infrastructure

cd terraform
terraform init
terraform plan
terraform apply

πŸ“š Documentation

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ†˜ Support

  • Documentation: Check the docs folder
  • Issues: Create an issue on GitHub
  • Discussions: Use GitHub Discussions for questions

πŸ—ΊοΈ Roadmap

  • Phase 1: Core authentication and user management
  • Phase 2: Payment processing and subscriptions
  • Phase 3: Search and analytics capabilities
  • Phase 4: Advanced features and optimizations
  • Phase 5: Mobile app integration

Built with ❀️ using modern web technologies

About

Enterprise Web Application Framework with Clean Architecture, React, PostgreSQL, and Stripe integration

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published