Skip to main content

Photography Project Management API

A modern REST API for managing photography projects with JWT authentication, role-based access control, and PostgreSQL storage.

Quick start

Get your API up and running in minutes with these simple steps

1

Set up PostgreSQL database

Start a PostgreSQL instance using Docker:
docker run --name postgres-xgp \
  -e POSTGRES_USER=postgres \
  -e POSTGRES_PASSWORD=tuPassword \
  -e POSTGRES_DB=XgpPhotoDb \
  -p 5432:5432 \
  -d postgres:16
2

Configure connection string

Update your appsettings.json with the database connection:
{
  "ConnectionStrings": {
    "DefaultConnection": "Host=localhost;Database=XgpPhotoDb;Username=postgres;Password=tuPassword"
  },
  "Jwt": {
    "Key": "your-secret-key-min-32-characters",
    "Issuer": "XgpPhotoApi",
    "Audience": "XgpPhotoClient"
  }
}
3

Run the API

Start the application and run migrations:
dotnet restore
dotnet ef database update
dotnet run
The API will be available at http://localhost:5000 with Swagger UI at /swagger.
4

Make your first request

Authenticate and get a JWT token:
curl -X POST http://localhost:5000/api/auth/login \
  -H "Content-Type: application/json" \
  -d '{
    "email": "[email protected]",
    "password": "XgpPhoto!2025$Secure",
    "clientId": "xgp-web",
    "clientSecret": "Y0urCl13ntS3cret!2025"
  }'
Use the returned token to access protected endpoints.

Key features

Everything you need to build a photography project management system

JWT Authentication

Secure authentication with role-based authorization (Admin/User roles)

Project Management

Create and manage photography projects with image galleries and metadata

PostgreSQL Storage

Robust data persistence with Entity Framework Core migrations

Clean Architecture

Organized codebase with separation of concerns (API/Application/Domain/Infrastructure)

Swagger Documentation

Interactive API documentation with built-in testing capabilities

Docker Ready

Containerized deployment with Docker and docker-compose support

Ready to get started?

Build your photography project management system with our comprehensive API. Follow the quickstart guide to have your first project created in minutes.

Get Started Now

Build docs developers (and LLMs) love