.NET portfolio project

RoyalVilla

Building and deploying a villa catalog

I built an ASP.NET Core API and a website for browsing villas, then packaged both with Docker and automated deployment to my VPS.

Project stack
Applications
ASP.NET Core 10
Database
PostgreSQL 17
Runtime
Docker Compose
Delivery
GitHub Actions · Dokploy

From API to application

A public catalog with admin editing

Visitors can compare nightly rates, capacity and floor area. Administrators can add or edit a listing in the website, and the API enforces who can change a villa or its amenities.

I built the API and its MVC client, connected them to PostgreSQL through EF Core, and wrote the Docker and GitHub Actions configuration that delivers the application.

Catalog
Public reads through the v1 API
Accounts
Customer registration and administrator permissions
API versions
The v2 villa read endpoints demonstrate version routing.

How a villa reaches the page

Website

Razor renders the catalog

An MVC controller calls /api/v1/villa over HTTP and passes the result to a Razor view. If the API is unavailable, the site returns HTTP 503. A successful read with zero villas gets its own empty state.

API

The API authorizes edits

The website uses a cookie for browser sign-in and sends a JWT with authenticated API requests. The API checks the administrator role before changing catalog data.

Storage

One application owns the data

Only the API connects to PostgreSQL. Entity Framework Core manages the schema and the relationship between villas and amenities. The website and API share C# request and response types.

How changes reach the VPS

Docker Compose

Start services in dependency order

Compose waits for PostgreSQL before starting the API. The website waits until the API health check can connect to the database. A named volume keeps catalog data when containers are replaced.

GitHub Actions

Test against PostgreSQL

Pull requests and pushes to master trigger a Release build. Integration tests use PostgreSQL 17 to check registration, access rules and catalog changes. MVC tests also cover an unreachable API.

Dokploy

Deploy a verified revision

After the build and tests pass on master, a separate job sends the commit information to Dokploy. Dokploy manages the Compose deployment on my VPS.

The catalog and its API

Source files

The application and its deployment configuration share a repository.

Images
Multi-stage Dockerfile
Services
Production Compose configuration
Pipeline
GitHub Actions workflow