Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
// Dev Container Configuration for Secret Santa
// Dev Container Configuration for Zava Gift Exchange
// SECURITY NOTE: This configuration mounts the Docker socket (/var/run/docker.sock)
// which gives the container full root access to the host Docker daemon.
// This is standard for Docker-outside-of-Docker workflows and appropriate for
// trusted development environments (local dev, GitHub Codespaces).
// Do NOT use this configuration in untrusted or production environments.
"name": "Secret Santa Development",
"name": "Zava Gift Exchange Development",
"image": "mcr.microsoft.com/devcontainers/typescript-node:20",
"features": {
"ghcr.io/devcontainers/features/azure-cli:1": {},
Expand Down Expand Up @@ -65,7 +65,7 @@
}
},
"postCreateCommand": "bash .devcontainer/setup.sh",
"postStartCommand": "echo '🎁 Secret Santa development environment ready!\\n\\nℹ️ If you see extension errors:\\n - Wait for VS Code extensions to finish installing\\n - Reload the window if needed (Ctrl+Shift+P > Reload Window)\\n\\n🚀 Press F5 to start debugging!'",
"postStartCommand": "echo '🎁 Zava Gift Exchange development environment ready!\\n\\nℹ️ If you see extension errors:\\n - Wait for VS Code extensions to finish installing\\n - Reload the window if needed (Ctrl+Shift+P > Reload Window)\\n\\n🚀 Press F5 to start debugging!'",
"remoteUser": "root",
"containerEnv": {
"NODE_ENV": "development",
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Bug Report
about: Report a bug or issue with Secret Santa
about: Report a bug or issue with Zava Gift Exchange
title: '[BUG] '
labels: bug
assignees: ''
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Feature Request
about: Suggest a new feature or enhancement for Secret Santa
about: Suggest a new feature or enhancement for Zava Gift Exchange
title: '[FEATURE] '
labels: enhancement
assignees: ''
Expand Down
34 changes: 17 additions & 17 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
# Copilot Instructions for Secret Santa
# Copilot Instructions for Zava Gift Exchange

## Project Overview
Multilingual Secret Santa gift exchange app built with React + Vite frontend and Azure Functions API, deployed on Azure Static Web Apps with Cosmos DB.
Multilingual Zava Gift Exchange exchange app built with React + Vite frontend and Azure Functions API, deployed on Azure Static Web Apps with Cosmos DB.

## Environment Strategy
- **PR**: Ephemeral resource group per PR (`secretsanta-pr-{number}`) with Free tier resources
- **QA**: Isolated resource group (`secretsanta-qa`) with Free tier for cost-effective testing
- **Production**: Production resource group (`secretsanta`) with production-ready tiers
- **PR**: Ephemeral resource group per PR (`zavaexchangegift-pr-{number}`) with Free tier resources
- **QA**: Isolated resource group (`zavaexchangegift-qa`) with Free tier for cost-effective testing
- **Production**: Production resource group (`zavaexchangegift`) with production-ready tiers

| Environment | Resource Group | Static Web App | Cosmos DB | Email |
|-------------|---------------|----------------|-----------|-------|
| PR | `secretsanta-pr-{n}` | Free | Serverless | ❌ |
| QA | `secretsanta-qa` | Free | Free Tier | ✅ |
| Production | `secretsanta` | Standard | Serverless | ✅ |
| PR | `zavaexchangegift-pr-{n}` | Free | Serverless | ❌ |
| QA | `zavaexchangegift-qa` | Free | Free Tier | ✅ |
| Production | `zavaexchangegift` | Standard | Serverless | ✅ |

Each environment has its own isolated resources. All environments auto-configure: Cosmos DB, App Insights, ACS (email for QA/Prod).

Note: Staging environments are ENABLED in Static Web Apps to support GitHub Actions deployments via deployment token.

## Project Structure
```
secretsanta/
zavaexchangegift/
├── src/ # React frontend
│ ├── components/ # UI components
│ │ └── ui/ # shadcn/ui components
Expand All @@ -34,7 +34,7 @@ secretsanta/
├── infra/ # Bicep infrastructure
│ ├── main.bicep # Main template
│ ├── parameters.dev.json # PR environments
│ ├── parameters.qa.json # QA environment (isolated in secretsanta-qa RG)
│ ├── parameters.qa.json # QA environment (isolated in zavaexchangegift-qa RG)
│ └── parameters.prod.json # Production
├── docs/ # Documentation
│ ├── getting-started.md # Local development guide
Expand Down Expand Up @@ -159,24 +159,24 @@ Only ONE secret is needed:

### Resource Group Naming
All resource groups are **created automatically** by the CI/CD workflow:
- **PR Deployments**: `secretsanta-pr-{PR_NUMBER}` (created automatically, deleted when PR closes)
- **QA Environment**: `secretsanta-qa` (created automatically on first push to main)
- **Production**: `secretsanta` (created automatically on first push to main)
- **PR Deployments**: `zavaexchangegift-pr-{PR_NUMBER}` (created automatically, deleted when PR closes)
- **QA Environment**: `zavaexchangegift-qa` (created automatically on first push to main)
- **Production**: `zavaexchangegift` (created automatically on first push to main)

### Manual Deployment (Optional)
If you need to deploy manually outside the CI/CD workflow:
```bash
# Deploy QA environment (creates RG if needed)
az group create --name secretsanta-qa --location centralus
az group create --name zavaexchangegift-qa --location centralus
az deployment group create \
--resource-group secretsanta-qa \
--resource-group zavaexchangegift-qa \
--template-file infra/main.bicep \
--parameters infra/parameters.qa.json deploymentId=qa-stable

# Deploy Production environment (creates RG if needed)
az group create --name secretsanta --location centralus
az group create --name zavaexchangegift --location centralus
az deployment group create \
--resource-group secretsanta \
--resource-group zavaexchangegift \
--template-file infra/main.bicep \
--parameters infra/parameters.prod.json deploymentId=prod-stable
```
Expand Down
2 changes: 1 addition & 1 deletion .github/dependabot.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@
"build/"
],
"contact": "github@dsanchezcr.com",
"policy": "https://github.com/dsanchezcr/secretsanta/blob/main/SECURITY.md"
"policy": "https://github.com/dsanchezcr/zavaexchangegift/blob/main/SECURITY.md"
}
10 changes: 5 additions & 5 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# ============================================================================
# Secret Santa - CI/CD Pipeline
# Zava Gift Exchange - CI/CD Pipeline
# ============================================================================
# Environment Strategy:
# - PR: Ephemeral resource group per PR (auto-created and deleted)
# - QA: Isolated resource group (`secretsanta-qa`) (deployed on main)
# - QA: Isolated resource group (`zavaexchangegift-qa`) (deployed on main)
# - Prod: Production environment (deployed on main after QA E2E tests pass)
#
# Note: Staging environments are ENABLED for GitHub Actions deployments.
Expand Down Expand Up @@ -35,9 +35,9 @@ on:
env:
NODE_VERSION: '20'
AZURE_LOCATION: 'centralus'
PROJECT_NAME: 'secretsanta'
AZURE_RESOURCE_GROUP: 'secretsanta'
AZURE_QA_RESOURCE_GROUP: 'secretsanta-qa'
PROJECT_NAME: 'zavaexchangegift'
AZURE_RESOURCE_GROUP: 'zavaexchangegift'
AZURE_QA_RESOURCE_GROUP: 'zavaexchangegift-qa'

permissions:
id-token: write
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Contributing to Secret Santa
# Contributing to Zava Gift Exchange

Thank you for your interest in contributing! 🎁

Expand All @@ -16,8 +16,8 @@ See [README.md](../README.md) for detailed setup.

```bash
# 1. Clone your fork
git clone https://github.com/YOUR_USERNAME/secretsanta.git
cd secretsanta
git clone https://github.com/YOUR_USERNAME/zavaexchangegift.git
cd zavaexchangegift

# 2. Start Docker containers (runs Cosmos DB emulator)
docker-compose up -d
Expand Down
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# 🎁 Secret Santa
# 🎁 Zava Gift Exchange

Secret Santa gift exchange web application built with React + Vite, Azure Functions, and Azure Cosmos DB.
Zava Gift Exchange gift exchange web application built with React + Vite, Azure Functions, and Azure Cosmos DB.

[![CI/CD](https://github.com/dsanchezcr/secretsanta/actions/workflows/ci-cd.yml/badge.svg)](https://github.com/dsanchezcr/secretsanta/actions/workflows/ci-cd.yml)
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/dsanchezcr/secretsanta?quickstart=1)
[![CI/CD](https://github.com/dsanchezcr/zavaexchangegift/actions/workflows/ci-cd.yml/badge.svg)](https://github.com/dsanchezcr/zavaexchangegift/actions/workflows/ci-cd.yml)
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/dsanchezcr/zavaexchangegift?quickstart=1)

## ✨ Features

Expand All @@ -24,9 +24,9 @@ Secret Santa gift exchange web application built with React + Vite, Azure Functi

| Environment | Resource Group | Static Web App | Cosmos DB | Lifecycle |
|-------------|----------------|----------------|-----------|------------|
| **PR Preview** | `secretsanta-pr-{number}` | Free | Serverless | Created on PR open, deleted on close |
| **QA** | `secretsanta-qa` | Free | Free Tier | Persistent (isolated from prod) |
| **Production** | `secretsanta` | Standard | Serverless | Persistent (unlimited scaling) |
| **PR Preview** | `zavaexchangegift-pr-{number}` | Free | Serverless | Created on PR open, deleted on close |
| **QA** | `zavaexchangegift-qa` | Free | Free Tier | Persistent (isolated from prod) |
| **Production** | `zavaexchangegift` | Standard | Serverless | Persistent (unlimited scaling) |

Each environment has its **own Static Web App** and **own Cosmos DB** (QA is completely isolated).
All environments are **automatically configured** with:
Expand Down Expand Up @@ -80,7 +80,7 @@ All prerequisites work the same way on **Windows, macOS, and Linux**.

**GitHub Codespaces** - No installation required, develop entirely in the browser:

1. Click: [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/dsanchezcr/secretsanta?quickstart=1)
1. Click: [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/dsanchezcr/zavaexchangegift?quickstart=1)
2. Wait ~60 seconds for container to build
3. Press **F5** in VS Code (browser-based)
4. Click notification to open frontend in browser
Expand All @@ -95,8 +95,8 @@ Run everything on your machine:

```bash
# Clone repository
git clone https://github.com/dsanchezcr/secretsanta.git
cd secretsanta
git clone https://github.com/dsanchezcr/zavaexchangegift.git
cd zavaexchangegift

# Start full-stack (Docker + API + Frontend)
npm install
Expand All @@ -119,7 +119,7 @@ Open: http://localhost:5173
2. **Configure GitHub OIDC Authentication**:
```bash
# Create service principal
az ad sp create-for-rbac --name "secretsanta-github" \
az ad sp create-for-rbac --name "zavaexchangegift-github" \
--role contributor \
--scopes /subscriptions/{subscription-id} --json-auth
```
Expand All @@ -129,7 +129,7 @@ Open: http://localhost:5173

4. **Create Production Resource Group**:
```bash
az group create --name secretsanta --location centralus
az group create --name zavaexchangegift --location centralus
```

5. **Open a PR** - Full infrastructure is created automatically!
Expand All @@ -142,8 +142,8 @@ The fastest way to get running is with VS Code's integrated debugger:

```bash
# 1. Clone repository
git clone https://github.com/dsanchezcr/secretsanta.git
cd secretsanta
git clone https://github.com/dsanchezcr/zavaexchangegift.git
cd zavaexchangegift

# 2. Start Docker containers (all platforms)
docker-compose up -d
Expand Down
11 changes: 3 additions & 8 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Security Policy

Thank you for helping keep Secret Santa secure!
Thank you for helping keep Zava Gift Exchange secure!

## Reporting Security Issues

If you believe you have found a security vulnerability, please report it privately to us.

**Please do not report security vulnerabilities through public GitHub issues, discussions, or pull requests.**

Instead, please send an email to **github@dsanchezcr.com**.
Instead, please send an email.

Include as much of the information listed below as you can to help us better understand and resolve the issue:

Expand Down Expand Up @@ -81,9 +81,4 @@ We follow responsible disclosure practices:
3. Security update released
4. Vulnerability publicly disclosed after update is available

If you prefer a different disclosure timeline, please let us know in your initial report.

## Questions?

For security questions that aren't vulnerabilities, feel free to open a discussion or email github@dsanchezcr.com.

If you prefer a different disclosure timeline, please let us know in your initial report.
Copy link

Copilot AI Jan 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The SECURITY.md file removes the "Questions?" section and associated contact information at the end of the file. This eliminates a channel for non-vulnerability security questions, reducing accessibility for security discussions.

Suggested change
If you prefer a different disclosure timeline, please let us know in your initial report.
If you prefer a different disclosure timeline, please let us know in your initial report.
## Questions?
For general security questions about Zava Exchange Gift, clarification about this policy, or to discuss security-related best practices (that do not involve disclosing a new vulnerability), you can contact us at:
- **Email (general security questions only)**: `security@example.com`
Please do not include sensitive vulnerability details in general security questions. For potential vulnerabilities, follow the "Reporting Security Issues" process described above.

Copilot uses AI. Check for mistakes.
2 changes: 1 addition & 1 deletion api/local.settings.json.example
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"FUNCTIONS_WORKER_RUNTIME": "node",
"COSMOS_ENDPOINT": "https://localhost:8081",
"COSMOS_KEY": "C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==",
"COSMOS_DATABASE_NAME": "secretsanta",
"COSMOS_DATABASE_NAME": "zavaexchangegift",
"COSMOS_CONTAINER_NAME": "games",
"APPLICATIONINSIGHTS_CONNECTION_STRING": "",
"ACS_CONNECTION_STRING": "",
Expand Down
8 changes: 2 additions & 6 deletions api/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions api/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "secretsanta-api",
"name": "zavaexchangegift-api",
"version": "1.0.0",
"description": "Azure Functions API for Secret Santa",
"description": "Azure Functions API for Zava Gift Exchange",
"main": "dist/index.js",
"scripts": {
"setup": "node ../scripts/setup-local-settings.js",
Expand Down
6 changes: 3 additions & 3 deletions api/src/__tests__/createGame.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ describe('createGame function', () => {

it('should create a game successfully with valid data', async () => {
const requestBody = {
name: 'Christmas 2025',
name: 'Party 2025',
amount: '20',
currency: 'USD',
date: '2025-12-25',
date: '2026-12-25',
location: 'Office',
allowReassignment: true,
generalNotes: 'Bring wrapped gifts',
Expand All @@ -86,7 +86,7 @@ describe('createGame function', () => {

const game = response.jsonBody as Game
expect(game.code).toBe('123456')
expect(game.name).toBe('Christmas 2025')
expect(game.name).toBe('Party 2025')
expect(game.participants).toHaveLength(3)
expect(game.assignments).toHaveLength(3)
})
Expand Down
4 changes: 2 additions & 2 deletions api/src/__tests__/types.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ describe('types', () => {
const game: Game = {
id: 'game-1',
code: '123456',
name: 'Christmas Exchange',
name: 'Gift Exchange',
amount: '20',
currency: 'USD',
date: '2025-12-25',
Expand All @@ -84,7 +84,7 @@ describe('types', () => {

expect(game.id).toBe('game-1')
expect(game.code).toBe('123456')
expect(game.name).toBe('Christmas Exchange')
expect(game.name).toBe('Gift Exchange')
expect(game.currency).toBe('USD')
expect(game.allowReassignment).toBe(true)
expect(game.reassignmentRequests).toHaveLength(0)
Expand Down
2 changes: 1 addition & 1 deletion api/src/functions/health.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ async function checkDatabaseHealth(): Promise<DependencyCheck> {
status: 'ok',
latencyMs: Date.now() - start,
details: {
database: process.env.COSMOS_DATABASE_NAME || 'secretsanta',
database: process.env.COSMOS_DATABASE_NAME || 'zavaexchangegift',
container: process.env.COSMOS_CONTAINER_NAME || 'games'
}
}
Expand Down
2 changes: 1 addition & 1 deletion api/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Secret Santa API - Azure Functions Entry Point
* Zava Gift Exchange API - Azure Functions Entry Point
* This file imports all function handlers to register them with the runtime
*/

Expand Down
2 changes: 1 addition & 1 deletion api/src/shared/cosmosdb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export async function initializeStorage(): Promise<void> {

cosmosClient = new CosmosClient(clientOptions)

const databaseId = process.env.COSMOS_DATABASE_NAME || 'secretsanta'
const databaseId = process.env.COSMOS_DATABASE_NAME || 'zavaexchangegift'
Copy link

Copilot AI Jan 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Cosmos DB database name has been changed from "secretsanta" to "zavaexchangegift". This is a breaking change that will require data migration for existing deployments. The fallback default value in the code will create a new database instead of accessing the existing one, potentially causing data loss in production.

Copilot uses AI. Check for mistakes.
const containerId = process.env.COSMOS_CONTAINER_NAME || 'games'

// Create database and container if they don't exist
Expand Down
Loading
Loading