{"id":18799764,"url":"https://github.com/vb-consulting/pdd-demo","last_synced_at":"2025-09-11T12:39:26.834Z","repository":{"id":45721034,"uuid":"511146619","full_name":"vb-consulting/pdd-demo","owner":"vb-consulting","description":"PostgreSQL Driven Development Demo Web Application With PgRoutiner, .NET and Svelte","archived":false,"fork":false,"pushed_at":"2023-01-29T12:23:30.000Z","size":6946,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-07T22:16:16.558Z","etag":null,"topics":["dotnet","postgresql","svelte"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vb-consulting.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-07-06T13:22:52.000Z","updated_at":"2023-08-25T19:02:02.000Z","dependencies_parsed_at":"2023-02-15T22:45:47.410Z","dependency_job_id":null,"html_url":"https://github.com/vb-consulting/pdd-demo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vb-consulting%2Fpdd-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vb-consulting%2Fpdd-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vb-consulting%2Fpdd-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vb-consulting%2Fpdd-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vb-consulting","download_url":"https://codeload.github.com/vb-consulting/pdd-demo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231774717,"owners_count":18424671,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["dotnet","postgresql","svelte"],"created_at":"2024-11-07T22:16:21.719Z","updated_at":"2024-12-29T18:48:55.460Z","avatar_url":"https://github.com/vb-consulting.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![build-test-publish](https://github.com/vb-consulting/pdd-demo/actions/workflows/build-test-publish.yml/badge.svg)](https://github.com/vb-consulting/pdd-demo/actions/workflows/build-test-publish.yml)\n\n# PDD Demo Web Application\n\nThis is a **proof-of-concept** demo application with a made-up, fictional domain.\n\n## Tech Stack\n\n- Backend: PostgreSQL 15.\n- Middleware: .NET7 and C# with [PgRoutiner](https://github.com/vb-consulting/PgRoutiner) local tool for code generation.\n- Frontend Razor Pages with SvelteJS from [RazorSvelte](https://github.com/vb-consulting/RazorSvelte) template.\n\n## Solution Structure\n\n- [`/PDD.Database`](/PDD.Database) - shared library that contains all data access code and all database scripts as well as `PgRoutiner` configuration. All code in this project is automatically generated on command.\n- [`/PDD.DatabaseTests`](/PDD.DatabaseTests) - unit tests project.\n- [`/PDD.Shared/DatabaseSeeder`](/PDD.Shared/DatabaseSeeder) - database seeder console application project that will generate fake and random data in the database on command.\n- [`/PDD.Shared/DatabaseShared`](/PDD.Shared/DatabaseShared) - database access shared references.\n- [`/PDD.WebApp`](/PDD.WebApp) - web application project.\n\n## Installation\n\n**Dockerfile with a full example coming soon.**\n\n```\n$ git clone https://github.com/vb-consulting/pdd-demo.git\n$ cd pdd-demo\n$ cd PDD.WebApp\n$ npm install\n```\n\nNote: `npm install` will install the required NPM libraries and the `PgRoutiner` **local tool** as well. To install `PgRoutiner` as global tool run this command `$ dotnet tool install --global dotnet-pgroutiner`\n\nTo install the database, first, create an empty database on your server. To do this and database client will do (`psql` or `pgAdmin` for example). But you can also run `pgroutiner -c \"Server=localhost;Db=postgres;Port=5432;User Id=postgres;Password=postgres;\" -x \"create database pdd\"` if you have `PgRoutiner` as a global tool or `dotnet tool run pgroutiner -c \"Server=localhost;Db=postgres;Port=5432;User Id=postgres;Password=postgres;\" -x \"create database test\"` if you have `PgRoutiner` as a local tool.\n\nNext, add `appsettings.Development.json` to your `/PDD.WebApp` dir with the following content:\n\n```json\n{\n  \"ConnectionStrings\": {\n    \"DatabaseConnection\": \"Server=localhost;Db=pdd;Port=5434;User Id=postgres;Password=postgres;\"\n  },\n\n  \"AppendCommandHeaders\": true,\n  \"LogCommands\": true\n}\n```\n\nNote: `appsettings.Development.json` is git ignored and you can set the database port, name username and password to your environment.\n\nFinally, create the initial schema in your new database:\n\n- To create an empty schema run the following command `pgroutiner -x ../PDD.Database/Scripts/schema.sql` (use `dotnet tool run` for local tools). This will use your application connection string to execute `../PDD.Database/Scripts/schema.sql` schema file.\n\n- To recreate schema and add initial fake and random data, run the [`/PDD.Shared/DatabaseSeeder`](/PDD.Shared/DatabaseSeeder) command line tool.\n\nFinally, run the application `dotnet run`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvb-consulting%2Fpdd-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvb-consulting%2Fpdd-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvb-consulting%2Fpdd-demo/lists"}