- Notifications
You must be signed in to change notification settings - Fork25
Multi-player MS Paint application. Built with Akka.NET, Blazor, and .NET Aspire.
License
petabridge/DrawTogether.NET
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
A collaborative browser-based drawing program written in .NET. Think of it like "multi-player MS paint."
Want to understand how DrawTogether was built and how it works? Please see our videos on the subject:
- Building Real-Time Web Applications with Blazor and Akka.NET
- Application Design with Actors Made Easy: Think Locally, Act Globally
First things first, you will need to launch the dependencies for DrawTogether.NET - make sure you havedocker installed locally - the easiest way to do this is with.NET Aspire:
dotnet run --project src/DrawTogether.AppHost/DrawTogether.AppHost.csproj
This will:
- Start the SQL Server database
- Run the migration service to initialize the database
- Launch the DrawTogether web application
- Open the Aspire dashboard in your browser
The Aspire dashboard will show you all running services with their statuses and endpoints.
Out of the box DrawTogether.NET supports Kubernetes deployments, however, if you want to run it locally you'll need to make sure that you haveNginx Ingress enabled.
This is how to deploy the most recent version of Nginx Ingress on Docker Desktop at the time of writing this:
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.10.1/deploy/static/provider/cloud/deploy.yaml
Next, you will need to build the Docker images for both the application and migration service:
dotnet publish --os linux --arch x64 -c Release -t:PublishContainer
This will tag local Docker images with the following labels:
drawtogether:latestanddrawtogether:{VERSION}drawtogether-migrationservice:latestanddrawtogether-migrationservice:{VERSION}
The version number is pulled fromDirectory.Build.props and automatically applied during deployment.
The K8s manifests useKustomize for configuration management:
- Base configuration (
k8s/base/): Contains all core Kubernetes manifests without version tags - Environment overlays:
k8s/overlays/local/: StatefulSet deployment with stable pod namesk8s/overlays/deployment/: Deployment-based configuration with reduced rebalancing overhead
To deploy or update all services to your local Kubernetes cluster:
# Deploy with StatefulSet (default)./k8s/deploy.ps1# Deploy with Deployment strategy (reduced rebalancing during updates)./k8s/deploy.ps1-Strategy deployment
This script will:
- Extract the version from
Directory.Build.props - Build Docker images if they don't exist for the current version
- Update the Kustomize overlay with the current version
- Create the
drawtogethernamespace if needed - Apply all Kubernetes manifests using Kustomize
- Wait for the rollout to complete (with zero-downtime rolling updates)
Deployment Strategies:
- statefulset (default): Stable pod names, predictable scaling, more rebalancing during updates
- deployment: Dynamic pod names, surge updates, less rebalancing overhead
This script is idempotent - run it for both initial deployment and updates. Kubernetes automatically performs zero-downtime rolling updates when you change the image version.
DrawTogether will be available athttp://drawtogether.localdev.me
To remove all DrawTogether resources from Kubernetes:
./k8s/destroyAll.ps1
This deletes the entiredrawtogether namespace and all resources within it.
We welcome contributions! If you'd like to contribute to DrawTogether.NET, please see ourContributing Guide for information on:
- Setting up your development environment
- Working with Entity Framework migrations
- Configuring optional features (email, etc.)
- Running tests
- Submitting pull requests
For questions or issues, please check theexisting issues or create a new one.
About
Multi-player MS Paint application. Built with Akka.NET, Blazor, and .NET Aspire.
Topics
Resources
License
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Uh oh!
There was an error while loading.Please reload this page.
Contributors6
Uh oh!
There was an error while loading.Please reload this page.
