Skip to content

pmollerus23/FlipYourCode

Repository files navigation

PortfolioApp

A full-stack portfolio and showcase application demonstrating advanced software engineering skills, modern web development practices, and robust cloud-ready architecture. This project serves as a technical centerpiece highlighting proficiency in scalable backend services, secure authentication, AI integration, and interactive frontend experiences.

Features

  • Secure Authentication: OAuth2/OIDC flows with Auth0 and JWT bearer token validation
  • AI-Powered Chat: Interactive chat widget with Retrieval-Augmented Generation (RAG) for intelligent Q&A
  • Vector Search: PostgreSQL with pgvector extension for semantic search capabilities
  • User Profile Management: Complete user profile CRUD operations via Auth0 Management API
  • Cloud-Ready: Azure Key Vault integration for secure secret management
  • Containerized: Docker support for local development and cloud deployment
  • Modern Frontend: React with TypeScript, Vite build tooling, and responsive design
  • API Documentation: OpenAPI/Swagger documentation for RESTful endpoints

Tech Stack

Backend (server/)

  • Framework: ASP.NET Core 9.0 (C#)
  • Authentication: Auth0, Microsoft Identity Web, JWT Bearer
  • Cloud Services: Azure Key Vault, Azure Identity
  • Database: PostgreSQL with pgvector extension
  • AI Integration: OpenAI SDK for generative AI and RAG workflows
  • API: RESTful endpoints with OpenAPI/Swagger
  • Containerization: Docker

Frontend (webapp/)

  • Framework: React 18 with TypeScript
  • Build Tool: Vite
  • UI Components: Modular component architecture with custom theming
  • PDF Handling: Embedded PDF viewer and worker
  • Chat Interface: Interactive AI-powered chat widget
  • Tooling: ESLint, PostCSS

Database (db/)

  • Database: PostgreSQL 17
  • Extensions: pgvector for vector similarity search
  • Migrations: SQL-based schema migrations

Prerequisites

  • Docker and Docker Compose
  • Node.js 18+ (for local frontend development)
  • .NET 9.0 SDK (for local backend development)

Quick Start

1. Clone the Repository

git clone <repository-url>
cd PortfolioApp

2. Set Up Environment Variables

Copy the example environment files and configure your secrets:

cp .env.example .env
cp .env.development.example .env.development

Edit .env.development and fill in your actual values for:

  • Database credentials
  • Auth0 configuration (domain, client IDs, audience)
  • OpenAI API key
  • Other service credentials

See docs/ENVIRONMENT.md for detailed configuration instructions.

3. Run with Docker Compose

Development Mode (with hot reload)

docker-compose -f compose.yaml -f compose.dev.yaml up --build

Production Mode

docker-compose up --build

4. Access the Application

Project Structure

PortfolioApp/
├── server/              # .NET backend API
│   ├── Controllers/     # API endpoints
│   ├── Services/        # Business logic and integrations
│   ├── Models/          # Data models and DTOs
│   ├── Migrations/      # Database migrations
│   └── Program.cs       # Application entry point
├── webapp/              # React frontend
│   ├── src/
│   │   ├── components/  # React components
│   │   ├── lib/         # API clients and utilities
│   │   ├── styles/      # CSS and styling
│   │   └── App.tsx      # Main application component
│   ├── public/          # Static assets
│   └── vite.config.ts   # Vite configuration
├── db/                  # Database initialization
│   └── init/            # SQL initialization scripts
├── docs/                # Documentation
│   ├── codebase.md      # Codebase overview
│   ├── ENVIRONMENT.md   # Environment variable guide
│   ├── DOCKER.md        # Docker setup guide
│   └── *.mermaid        # Architecture diagrams
├── compose.yaml         # Production Docker Compose
├── compose.dev.yaml     # Development Docker Compose
└── README.md            # This file

Development

Backend Development

cd server
dotnet restore
dotnet run

The API will be available at http://localhost:5000.

Frontend Development

cd webapp
npm install
npm run dev

The frontend will be available at http://localhost:5173 (Vite dev server).

Database Management

The PostgreSQL database is automatically initialized with the pgvector extension when running via Docker Compose. See db/init/ for initialization scripts.

Configuration

Auth0 Setup

  1. Create an Auth0 account and application
  2. Configure Auth0 SPA application for the frontend
  3. Configure Auth0 API and Machine-to-Machine application for the backend
  4. Set up Auth0 Management API credentials
  5. Update .env.development with your Auth0 credentials

See docs/AUTH0_PROFILE_WORKFLOW.md for detailed Auth0 integration information.

OpenAI Integration

  1. Obtain an OpenAI API key
  2. Add the key to .env.development as OpenAI__ApiKey
  3. Configure OpenAI settings in server/appsettings.json

Azure Key Vault (Optional)

For production deployments, configure Azure Key Vault for secure secret management:

  1. Create an Azure Key Vault instance
  2. Configure Azure Identity credentials
  3. Update server/appsettings.json with Key Vault settings

Docker Commands

Build specific service

docker-compose build server
docker-compose build webapp
docker-compose build database

View logs

docker-compose logs -f server
docker-compose logs -f webapp
docker-compose logs -f database

Stop and remove containers

docker-compose down
docker-compose down -v  # Also remove volumes

Rebuild without cache

docker-compose build --no-cache

Documentation

Architecture

The application follows a clean architecture pattern with clear separation of concerns:

  • Frontend: React SPA consuming RESTful APIs
  • Backend: ASP.NET Core API with service layer architecture
  • Database: PostgreSQL with vector search capabilities
  • Authentication: Auth0 for OAuth2/OIDC flows
  • AI Integration: OpenAI SDK for generative and RAG features

See the architecture diagrams in docs/*.mermaid for visual representations.

Security

  • All secrets managed via environment variables and .gitignore
  • JWT bearer token authentication
  • Auth0 OAuth2/OIDC flows
  • Azure Key Vault support for production
  • Secure API endpoints with authorization
  • HTTPS recommended for production deployments

Contributing

This is a portfolio project, but suggestions and feedback are welcome. Please open an issue to discuss proposed changes.

License

This project is proprietary and serves as a portfolio piece.

Contact

For questions or inquiries about this project, please contact the repository owner.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors