This repository contains the source code for my personal website and blog, dsanchezcr.com. The site is built using Docusaurus, a modern static website generator with a .NET 9 API backend.
This website serves as a platform to share my thoughts on technology, software development, and other interests through blog posts. It also includes information about my projects, professional background, volunteering experience, and a video games section showcasing my gaming profiles across Xbox, PlayStation, Nintendo Switch, and Meta Quest.
The site uses Azure Static Web Apps with a managed API architecture:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Azure Static Web Apps โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Docusaurus Site โ โ .NET 9 Managed API โ โ
โ โ (React/MDX) โ โ (Azure Functions) โ โ
โ โ โ โ โ โ
โ โ โข Blog posts โ โ โข /api/contact โ โ
โ โ โข Static pages โ โ โข /api/verify โ โ
โ โ โข i18n (en/es/pt) โ โ โข /api/weather โ โ
โ โ โข Volunteering โ โ โข /api/online-users โ โ
โ โ โข Video Games โ โ โข /api/nlweb/ask โ โ
โ โ (Xbox/PSN/NSW/ โ โ โ โ
โ โ Meta Quest) โ โ โ โ
โ โ โ โ โข /api/health โ โ
โ โ โ โ โข /api/reindex โ โ
โ โ โ โ โข /api/gaming/xbox โ โ
โ โ โ โ โข /api/gaming/playstation โ โ
โ โ โ โ โข /api/gaming/refresh โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Both frontend and backend are deployed together from a single repository, with the API served from the same domain under /api.
- Docusaurus v3: Static site generator
- React: UI components
- MDX: Content authoring
- Internationalization: English, Spanish, Portuguese
- .NET 9: Runtime
- Azure Functions: Serverless compute (isolated worker model)
- Azure Communication Services: Email delivery
- Azure OpenAI: AI chat assistant
- Azure AI Search: RAG for contextual AI responses
- Azure Table Storage: Token & gaming profile persistence
- OpenXBL API: Xbox Live profile data
- PSN API: PlayStation Network profile & trophy data
- Azure Static Web Apps: Hosting
- Bicep: Infrastructure as Code
- Application Insights: Monitoring
- Node.js v22 or later
- .NET 9 SDK
- Azure Functions Core Tools v4
- SWA CLI (optional, for full local emulation)
git clone https://github.com/dsanchezcr/website.git
cd website
npm install
dotnet restore api/api.csprojOption 1: SWA CLI (Recommended) - Full emulation with API integration
npm install -g @azure/static-web-apps-cli
swa startAccess at http://localhost:4280 (API available at /api/*)
Option 2: Frontend Only
npm startAccess at http://localhost:3000
Option 3: API Only
cd api
dotnet build
func start --csharpAccess at http://localhost:7071
# Build frontend
npm run build
# Build API
cd api && dotnet build --configuration ReleaseBuild artifacts:
- Frontend:
build/ - API:
api/bin/Release/net9.0/
| Language | Path Prefix | Translation Directory |
|---|---|---|
| English | / (default) |
- |
| Spanish | /es/ |
i18n/es/ |
| Portuguese | /pt/ |
i18n/pt/ |
| Endpoint | Method | Description |
|---|---|---|
/api/contact |
POST | Submit contact form (initiates email verification) |
/api/verify |
GET | Complete email verification |
/api/weather |
GET | Weather data for predefined locations |
/api/online-users |
GET | Visitor analytics (24-hour count) |
/api/nlweb/ask |
POST | AI chat assistant with RAG |
/api/health |
GET | Health check for all services |
/api/reindex |
POST | Update search index (called by GitHub Actions) |
/api/gaming/xbox |
GET | Xbox Live profile, gamerscore, and recent games |
/api/gaming/playstation |
GET | PSN profile, trophies, and recent games |
/api/gaming/refresh |
POST | Admin: trigger gaming data refresh |
Push to main or create a PR to trigger automatic deployment via azure-static-web-app.yml.
Deploy infrastructure using the Bicep templates in infra/:
az deployment group create \
--resource-group <resource-group> \
--template-file infra/main.bicep \
--parameters infra/main.parameters.json \
--parameters \
azureCommunicationServicesConnectionString="<secret>" \
recaptchaSecretKey="<secret>" \
azureOpenAIEndpoint="<endpoint>" \
azureOpenAIKey="<secret>"See infra/README.md for complete deployment instructions.
โโโ api/ # .NET 9 Azure Functions API
โ โโโ SendEmail.cs # Contact form endpoint
โ โโโ VerifyEmail.cs # Email verification
โ โโโ GetWeather.cs # Weather data
โ โโโ GetOnlineUsers.cs # Analytics
โ โโโ ChatWithOpenAI.cs # AI chat with RAG
โ โโโ HealthCheck.cs # Health monitoring
โ โโโ ReindexContent.cs # Search index updates
โ โโโ GetXboxProfile.cs # Xbox Live profile data
โ โโโ GetPlayStationProfile.cs # PSN profile & trophies
โ โโโ RefreshGamingProfiles.cs # Admin refresh endpoint
โ โโโ Services/ # TokenStorage, Search, GamingCache
โโโ blog/ # Blog posts (MDX)
โโโ videogames/ # Video Games docs section
โ โโโ xbox/ # Xbox & PC games
โ โโโ playstation/ # PlayStation games
โ โโโ nintendo-switch/ # Nintendo Switch games
โ โโโ meta-quest/ # Meta Quest games
โโโ src/
โ โโโ components/ # React components
โ โ โโโ VideoGames/ # Gaming widgets (XboxProfile, PSNProfile, GameCard)
โ โโโ pages/ # Static pages
โ โโโ config/ # Environment configuration
โโโ i18n/ # Translations (es/, pt/)
โโโ infra/ # Bicep templates
โโโ static/ # Static assets + SWA config
โโโ .github/workflows/ # CI/CD pipelines
The website includes a video games section at /videogames showcasing gaming profiles across three platforms:
| Platform | Features | Data Source |
|---|---|---|
| Xbox & PC | Live profile (gamertag, gamerscore), recently played games | OpenXBL API |
| PlayStation | Trophy summary, recently played games, PSN profile | PSN Internal API |
| Nintendo Switch | Manual game cards with status updates | User-curated content |
| Meta Quest | Manual VR/MR game lists | User-curated content |
Key features:
- Live profile data fetched from gaming APIs
- Dual-layer caching (in-memory + Azure Table Storage) for resilience
- Automatic fallback to cached data when APIs are unavailable
- Clickable game cards linking to Xbox/PlayStation store pages
- Custom
GameCardcomponent for manual game entries with status updates - Full i18n support (English, Spanish, Portuguese)
Required environment variables for gaming APIs:
XBOX_API_KEY # API key from https://xbl.io
XBOX_GAMERTAG_XUID # Numeric Xbox User ID (XUID)
PSN_NPSSO_TOKEN # NPSSO token from https://ca.account.sony.com/api/v1/ssocookie
GAMING_REFRESH_KEY # Secret key for admin refresh endpoint
Contributions, issues, and feature requests are welcome! Feel free to check the issues page.
This project is private and the code is proprietary. However, the blog content, unless otherwise stated, is open for sharing and referencing with appropriate attribution.
Thank you for visiting my repository!