StarterApp

The purpose of this app is to act as a starting point for further development. It provides some basic features including:

  • Database integration and migrations
  • Role-based security
  • Local authentication
  • Example navigation

This version of the app uses PostgreSQL for data storage and Entity Framework Core for object-relational mapping and migrations.

To fully understand how it works, you should follow an appropriate set of tutorials such as this one which covers all of the main concepts and techniques used here. However, if you want to jump straight in and work out any problems as you go along, that will also work. The code uses structured comments for use with the Doxygen documentation generator tool.

You can use any development environment with this project including

The instructions assume you will be using VSCode since that is a lowest-common-denominator choice.

Compatibility

This app is built using the following tool versions.

Name Version
.NET 8.0 / 9.0
PostgreSQL Docker image 16

Getting started

Prerequisites

Before using this app, ensure you have:

  1. .NET SDK 8.0 or later installed
  2. Docker installed and running
  3. PostgreSQL container running (see dev-environment tutorial)

Configuration

  1. Copy StarterApp.Database/appsettings.json.template to StarterApp.Database/appsettings.json
  2. Update the connection string with your PostgreSQL credentials:
    1
    2
    3
    4
    5
    
    {
      "ConnectionStrings": {
        "DevelopmentConnection": "Host=localhost;Username=student_user;Password=password123;Database=starterapp"
      }
    }
    

Initial Setup

  1. Navigate to the Migrations project and create the initial migration:
    1
    2
    
    cd StarterApp.Migrations
    dotnet ef migrations add InitialCreate
    
  2. Apply the migration to create the database:
    1
    
    dotnet ef database update
    
  3. Build and run the application:
    1
    2
    3
    
    cd ../StarterApp
    dotnet build
    dotnet run
    

Tutorial

For a comprehensive guide on using this app and understanding its architecture, see the MAUI + MVVM + Database Tutorial.


This site uses Just the Docs, a documentation theme for Jekyll.