-
Notifications
You must be signed in to change notification settings - Fork 0
Local Setup Guide
Get DocAnalytics running on your machine from a clean clone.
| Tool | Version | Notes |
|---|---|---|
| .NET SDK | 10.x |
dotnet --version should print 10.*
|
| PostgreSQL | 18 | Includes psql and (optionally) pgAdmin |
| Git | any recent | |
| IDE | Visual Studio 2026 / VS Code / Rider | |
| dotnet-ef tool | latest |
dotnet tool install --global dotnet-ef (open a fresh terminal after) |
💡 During PostgreSQL install you set a password for the
postgressuperuser. Remember it — it goes in your connection string.
git clone https://github.com/Akash29g/Document_Processing_Analytics.git
cd Document_Processing_AnalyticsOpen DocAnalytics.slnx via File → Open → Project/Solution. Do not create a new project.
appsettings.json ships with a blank password + placeholder JWT key. Provide real values via .NET user-secrets:
# PostgreSQL connection string (replace YOUR_LOCAL_PW)
dotnet user-secrets set "ConnectionStrings:Default" "Host=localhost;Port=5432;Database=docanalytics;Username=postgres;Password=YOUR_LOCAL_PW" --project DocAnalytics.Api
# JWT signing key (must be >= 32 characters)
dotnet user-secrets set "Jwt:Key" "any-32+-character-secret-key-for-local-dev" --project DocAnalytics.ApiVerify: dotnet user-secrets list --project DocAnalytics.Api
⚠️ Username/Passwordmust match a real PostgreSQL role or you'll hit28P01.Jwt:Key< 32 chars throwsIDX10720. See FAQ and Troubleshooting.
You don't create tables — or even the database — by hand. EF Core does it:
dotnet ef database update --project DocAnalytics.Data --startup-project DocAnalytics.ApiIf docanalytics doesn't exist, EF runs CREATE DATABASE automatically, then builds all 12 tables. More in Database and Migrations.
Why two
--projectflags?--project DocAnalytics.Dataholds theDbContext+ migrations;--startup-project DocAnalytics.Apiholds the connection string + DI. Omitting the startup project causesUnable to resolve service for type 'DbContextOptions<AppDbContext>'.
# Option 1 — auto-opens Swagger + hot-reloads (best for dev)
dotnet watch run --project DocAnalytics.Api
# Option 2 — plain run; copy the printed URL into a browser yourself
dotnet run --project DocAnalytics.ApiFor Option 2, note the port (e.g. Now listening on: http://localhost:5256) and open http://localhost:<port>/swagger.
First run also seeds the database. Keep this terminal open; use a second terminal for
curl/git/dotnet ef.Ctrl + Cstops the app.
See API Reference for the full Swagger walkthrough and seed credentials.