Lightweight ASP.NET Core (.NET 8, C# 12) Web API for logging and retrieving survey / navigation related time‑series data in PostgreSQL. Uses Dapper for data access and a hand-crafted schema (see init/NE_schema_postgres.sql). Currently only a minimal subset of writer/reader operations is implemented (Folders, minimal Block creation, Roll insert & latest Roll query) with many extension points stubbed.
- Create folder hierarchy (
/Interpreter/folder) - Create minimal survey blocks (
/Interpreter/block-min) - Insert roll samples (
/Interpreter/rollPOST) - Retrieve most recent roll sample for a block (
/Interpreter/rollGET) - Dockerized Postgres + API (via
docker-compose.yml) - Swagger UI in Development environment
- ASP.NET Core 8 Web API
- Dapper + Npgsql
- PostgreSQL 15 (initialized from
init/NE_schema_postgres.sql) - Dependency Injection (interfaces:
IDataWriter,IDataReader) - Docker / Docker Compose
- PostgresDataLoggerService/
- Program.cs (service registration + pipeline)
- Controllers/InterpreterController.cs (current API endpoints)
- Data/
- Interfaces/ (abstractions)
- PostgresDataAccess.cs (implementation; many methods NotImplemented)
- appsettings.json (base connection string; overridden in containers)
- init/NE_schema_postgres.sql (full schema bootstrap)
- docker-compose.yml (API + DB)
On first docker-compose up, Postgres runs the schema script mounted at /docker-entrypoint-initdb.d.
Connection string override (compose):
ConnectionStrings__DefaultConnection=Host=db;Port=5432;Database=mydb;Username=postgres;Password=postgres
Before installing, make sure your system meets the requirements:
- Windows 10 64-bit (Pro, Enterprise, or Education) or Windows 11
- Hardware virtualization enabled in BIOS
- WSL 2 (Windows Subsystem for Linux) feature enabled
(Docker Desktop uses WSL 2 as its backend on Windows)
- Go to the official Docker website:
https://www.docker.com/products/docker-desktop/ - Click “Download for Windows”.
- Save the installer file (e.g.,
Docker Desktop Installer.exe).
- Run the downloaded installer.
- In the setup wizard:
- Ensure “Use WSL 2 instead of Hyper-V” is checked (recommended).
- Click OK and continue the installation.
- When installation finishes, restart your computer if prompted.
- After reboot, launch Docker Desktop from the Start Menu.
- Accept the service agreement if asked.
- Wait for Docker to start — you’ll see a whale icon 🐳 in the system tray once it’s running.
- Go to the official PostgreSQL website:
https://www.postgresql.org/download/windows/ - Click “Download the installer” — this redirects to EnterpriseDB.
- Download the latest Windows x86-64 version.
- Run the downloaded
.exefile. - Follow the setup wizard:
- Keep default installation paths.
- Make sure pgAdmin 4 is selected.
- Set a password for the postgres user (remember this!).
- Leave the default port
5432.
- Complete the installation.
- Launch pgAdmin 4 from the Start Menu.
- Set a master password (used to store your saved connections securely).
- In the sidebar, double-click PostgreSQL 16 (or your version).
- Enter the password you set for the postgres user.
- Launch pgAdmin 4 from the Start Menu.
- Enter your master password (if prompted).
- In pgAdmin, right-click Servers → Create → Server…
- In the General tab:
- Name:
Docker Postgres
- Name:
- In the Connection tab:
- Host name / address:
localhost - Port:
5432 - Username:
postgres - Password:
admin
(Optional: check “Save Password”)
- Host name / address:
- Click Save.
You should now see Docker Postgres under the Servers list.
Expand it to view:
- Databases
- Roles
- Schemas