Proposal Management System - AI-powered proposal generation and management
Find a file
Adam Moussa d2e12d3940 Implement Backend API Core (Phase 1)
Complete API layer with Clean Architecture:
- Application DTOs (proposals, line items, customers, users, files, audit, dashboard)
- Service interfaces (IProposalService, ILineItemService, ICustomerService, IAuditService, IS3Service, IJobPublisher)
- FluentValidation validators for all create requests
- Infrastructure service implementations (ProposalService, LineItemService, CustomerService, AuditService, S3Service, SqsJobPublisher, ProposalNumberGenerator)
- Secrets Manager connection string resolver for RDS
- API controllers: Proposals (CRUD + approve/send/revise), LineItems (CRUD + bulk), Customers, Users, Files (presigned upload/download), Admin (dashboard)
- Middleware: GlobalExceptionHandler (ProblemDetails), ValidationFilter (FluentValidation pipeline)
- CurrentUserService (Cognito JWT claims -> User entity, auto-provisioning)
- Full DI configuration in Program.cs with Lambda hosting
- Role-based authorization (dispatchers, admins, sysadmins)
- CORS configured for proposals.seahaven.com + localhost
2026-05-16 18:49:48 -04:00
.github Initial scaffold: monorepo structure, CDK stacks, CI/CD, domain model 2026-05-16 18:40:46 -04:00
api Implement Backend API Core (Phase 1) 2026-05-16 18:49:48 -04:00
infra Initial scaffold: monorepo structure, CDK stacks, CI/CD, domain model 2026-05-16 18:40:46 -04:00
lambdas Initial scaffold: monorepo structure, CDK stacks, CI/CD, domain model 2026-05-16 18:40:46 -04:00
mobile Initial scaffold: monorepo structure, CDK stacks, CI/CD, domain model 2026-05-16 18:40:46 -04:00
shared/api-contracts Initial scaffold: monorepo structure, CDK stacks, CI/CD, domain model 2026-05-16 18:40:46 -04:00
web Initial scaffold: monorepo structure, CDK stacks, CI/CD, domain model 2026-05-16 18:40:46 -04:00
.gitignore Initial scaffold: monorepo structure, CDK stacks, CI/CD, domain model 2026-05-16 18:40:46 -04:00
README.md Initial scaffold: monorepo structure, CDK stacks, CI/CD, domain model 2026-05-16 18:40:46 -04:00

Proposal Management System

AI-powered proposal generation and management system for Sea Haven Industries. Enables dispatchers to submit proposal requests, uses Bedrock RAG to auto-generate draft line items from historical data, and provides admins with a pricing/approval workspace with professional PDF output.

Architecture

Layer Technology
Backend API .NET 8 / ASP.NET Core on Lambda (Amazon.Lambda.AspNetCoreServer)
Database RDS PostgreSQL 15 + EF Core
Frontend Web React 19 + MUI v7 + TypeScript
Mobile React Native (iOS-first)
IaC CDK (TypeScript) - 3 stacks
AI/RAG Bedrock Knowledge Base + Claude (Bedrock Runtime)
PDF Processing Python 3.12 Lambdas
Auth Cognito User Pool + Google OAuth
Storage S3 (PDFs, attachments, library)
Notifications Slack Bot API

AWS Resources

  • Stack prefix: proposal-system-*
  • Account: 328440206208
  • Region: us-east-1
Resource Name
Lambda (.NET 8) proposal-system-api
API Gateway HTTP API proposal-system-gateway
RDS PostgreSQL proposal-system-db
S3 Buckets proposal-system-uploads, proposal-system-generated, proposal-system-library
Bedrock Knowledge Base proposal-system-kb
Lambda (Python) proposal-system-pdf-extract, proposal-system-pdf-generate, proposal-system-library-ingest
Cognito User Pool proposal-system-auth
CloudFront proposal-system-web
SQS Queue proposal-system-jobs + DLQ

Repository Structure

proposal-system/
├── infra/          # CDK app (TypeScript) - 3 stacks
├── api/            # .NET 8 Web API (Lambda-hosted)
├── web/            # React 19 + MUI frontend
├── mobile/         # React Native app (iOS)
├── lambdas/        # Python 3.12 processing functions
├── shared/         # Shared TypeScript types/contracts
└── .github/        # CI/CD workflows

Local Development

Prerequisites

  • .NET 8 SDK
  • Node.js 24
  • Python 3.12
  • AWS CDK CLI (npm install -g aws-cdk@2.253.1)

Backend API

cd api
dotnet restore
dotnet run --project src/ProposalSystem.Api

Web Frontend

cd web
npm install
npm run dev

Infrastructure

cd infra
npm install
npx cdk synth
npx cdk deploy --all

CI/CD

  • CI: Runs on pull requests to main (dotnet build/test, tsc, ruff, cdk synth)
  • Deploy: Runs on push to main (cdk deploy, frontend S3 sync, CloudFront invalidation)
  • OIDC Role: githubdeploy-proposal-system

Data Flow

  1. Dispatcher submits proposal request (web or mobile)
  2. API creates proposal record, publishes SQS message
  3. If vendor PDF attached: pdf-extract Lambda parses and structures data
  4. Suggestion engine queries Bedrock KB for similar proposals, generates line items via Claude
  5. Admin reviews/edits line items in workspace
  6. On approval: pdf-generate Lambda creates branded PDF
  7. On send: library-ingest Lambda adds to KB for future matching
  8. Slack notifications at key status transitions