{"id":30808580,"url":"https://github.com/donpotts/mycustomers","last_synced_at":"2026-04-04T20:31:11.701Z","repository":{"id":313142199,"uuid":"1050202796","full_name":"donpotts/MyCustomers","owner":"donpotts","description":"A compact full‑stack sample: .NET 9 Minimal APIs + EF Core (Postgres), Blazor WASM, Next.js, and Expo — includes an Aspire AppHost to orchestrate the stack for local dev.","archived":false,"fork":false,"pushed_at":"2025-09-04T05:32:46.000Z","size":304,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-04T07:03:58.363Z","etag":null,"topics":["aspire","blazor-wasm","dotnet","expo","postgresql","react-native","react-nextjs","web-api"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/donpotts.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-04T05:17:01.000Z","updated_at":"2025-09-04T05:32:49.000Z","dependencies_parsed_at":"2025-09-04T07:14:05.574Z","dependency_job_id":null,"html_url":"https://github.com/donpotts/MyCustomers","commit_stats":null,"previous_names":["donpotts/mycustomers"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/donpotts/MyCustomers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donpotts%2FMyCustomers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donpotts%2FMyCustomers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donpotts%2FMyCustomers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donpotts%2FMyCustomers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/donpotts","download_url":"https://codeload.github.com/donpotts/MyCustomers/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donpotts%2FMyCustomers/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31413267,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T20:09:54.854Z","status":"ssl_error","status_checked_at":"2026-04-04T20:09:44.350Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aspire","blazor-wasm","dotnet","expo","postgresql","react-native","react-nextjs","web-api"],"created_at":"2025-09-06T03:48:12.779Z","updated_at":"2026-04-04T20:31:11.688Z","avatar_url":"https://github.com/donpotts.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## 🚀 My Customers\n\nA modern, full-stack sample for customer management built with .NET, Blazor, Next.js, and React Native (Expo). This repository contains multiple projects that together demonstrate a production-ready architecture: API, web frontends, mobile client, infrastructure, and hosting orchestration.\n\n---\n\n## 🧭 Quick overview\n\n- MyCustomers.AppHost — Aspire-based app host that can orchestrate the whole stack (Postgres, API, frontends) for local development and dashboarding.\n- MyCustomers.WebApi — Minimal Web API (ASP.NET Core / .NET 9) exposing customer and identity endpoints.\n- MyCustomers.Infrastructure \u0026 MyCustomers.Infrastructure.Persistence — EF Core persistence, repositories, DB context and mapping.\n- MyCustomers.Application \u0026 MyCustomers.Application.Contracts — Application layer (services, DTOs) and contracts used by frontends.\n- MyCustomersApp — Blazor WebAssembly front-end (MudBlazor) configured to talk to the Web API.\n- MyCustomers.WebFrontend — Next.js (React) web frontend (TypeScript) used for modern SSR/SSG and NextAuth integration.\n- MyCustomersRN — React Native (Expo) mobile client; also exposes a web dev server used by the AppHost dashboard.\n- MyCustomers.ServiceDefaults — Shared service defaults: telemetry, health checks, service discovery, resilience.\n\n---\n\n## 🏗️ Architecture \u0026 patterns\n\n- Clean layered architecture: Domain → Infrastructure → Application → WebApi / Frontends.\n- Persistence: EF Core with PostgreSQL (see `MyCustomers.Infrastructure.Persistence/ApplicationDbContext.cs`).\n- Authentication: ASP.NET Core Identity + JWT used by frontends (Blazor App registers HttpClients for authenticated and public API calls).\n- Observability: OpenTelemetry instrumentation is configured in `MyCustomers.ServiceDefaults`.\n\n---\n\n## 🔌 Important HTTP endpoints\n\nThe projects use a set of conventional endpoints. The API includes (examples):\n\n- POST /api/identity/login — authentication\n- POST /api/identity/register — register\n- GET /api/customers — list customers\n- GET /api/customers/{id} — get a customer\n- POST /api/customers — create\n- PUT /api/customers/{id} — update\n- DELETE /api/customers/{id} — delete\n\nRefer to `MyCustomers.WebApi/Program.cs` for registrations, OpenAPI and how endpoints are mapped.\n\n---\n\n## 🧰 Tech stack\n\n- Backend: .NET 9, ASP.NET Core Minimal APIs\n- Persistence: Entity Framework Core, PostgreSQL\n- Auth: ASP.NET Core Identity, JWT\n- Frontend (web): Blazor WebAssembly (MudBlazor), Next.js + React\n- Frontend (mobile): React Native (Expo)\n- Orchestration \u0026 Local developer experience: Aspire AppHost (see `MyCustomers.AppHost`)\n- Observability: OpenTelemetry\n\n---\n\n## ⚙️ Prerequisites\n\n- .NET 9 SDK\n- Node.js (18+) + npm or pnpm\n- Docker (optional, recommended when using `MyCustomers.AppHost` to bring up Postgres via Aspire)\n- Expo CLI (for running the RN app locally): npm i -g expo-cli (optional)\n\n---\n\n## ▶️ Recommended: Run the full stack with AppHost (Aspire)\n\nThe `MyCustomers.AppHost` project is configured to orchestrate Postgres, the Web API, and the frontends for a seamless local dev experience.\n\nFrom the repo root (PowerShell / pwsh):\n\n```powershell\ndotnet run --project .\\MyCustomers.AppHost\\MyCustomers.AppHost.csproj\n```\n\nThis will: create a local Postgres instance (with a `mycustomersdb` database), start the Web API, and expose the web frontends (Next.js, Expo web, and Blazor) in the Aspire dashboard.\n\nNotes:\n- The AppHost project will run npm install for local package.json files when needed (see the csproj Target).\n- When developing without Docker/Aspire you can run projects individually (see below).\n\n---\n\n## ▶️ Run projects individually\n\nBuild the solution first:\n\n```powershell\ndotnet build .\\MyCustomers.slnx\n```\n\nRun the Web API:\n\n```powershell\ndotnet run --project .\\MyCustomers.WebApi\\MyCustomers.WebApi.csproj\n```\n\nRun the Blazor WASM app (MyCustomersApp):\n\n```powershell\ndotnet run --project .\\MyCustomersApp\\MyCustomersApp.csproj\n```\n\nRun the Next.js frontend (MyCustomers.WebFrontend):\n\n```powershell\ncd .\\MyCustomers.WebFrontend\nnpm install\nnpm run dev\n```\n\nRun the React Native (Expo) app (MyCustomersRN) — web or device:\n\n```powershell\ncd .\\MyCustomersRN\nnpm install\nnpx expo start\n```\n\nIf you run projects individually, ensure a PostgreSQL instance is available and connection strings are configured appropriately. The AppHost will create and wire up a Postgres instance automatically when used.\n\n---\n\n## 🧪 Tests \u0026 validation\n\nThis repository does not include a dedicated test project in the root. Use `dotnet build` to validate compilation across projects.\n\n---\n\n## 📁 Notable files\n\n- `MyCustomers.AppHost/` — orchestration + local dev dashboard (Aspire)\n- `MyCustomers.WebApi/Program.cs` — API bootstrap and endpoint mapping\n- `MyCustomers.Infrastructure.Persistence/ApplicationDbContext.cs` — EF Core DB context\n- `MyCustomersApp/Program.cs` — Blazor WASM host and HttpClient wiring\n- `MyCustomers.WebFrontend/package.json` — Next.js frontend config\n- `MyCustomersRN/package.json` — Expo React Native config\n\n---\n\n## 🧭 Next steps / developer tips\n\n- Use `MyCustomers.AppHost` while onboarding a new machine — it wires up the DB and web apps for you.\n- Review `Directory.Packages.props` for centralized NuGet versions.\n- OpenTelemetry exporters can be enabled via environment variables (see `MyCustomers.ServiceDefaults`).\n\n---\n\n## 📫 Contact\n\nFor questions or help, reach out: Don.Potts@DonPotts.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdonpotts%2Fmycustomers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdonpotts%2Fmycustomers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdonpotts%2Fmycustomers/lists"}