A TypeScript-based backend API demonstrating REST + GraphQL parity, advanced filtering, and PostgreSQL-powered query logic.
This project demonstrates how REST and GraphQL can share the same repository layer and PostgreSQL functionsβavoiding duplicated business logic while supporting multiple API paradigms.
Modern applications often need to support multiple API paradigms at the same time.
This project was built to demonstrate how REST and GraphQL APIs can coexist while sharing the same PostgreSQL function layer and repository architecture.
The goal was to show:
- reusable backend architecture
- centralized business logic
- API flexibility
- scalable query patterns
- production-minded TypeScript organization
Rather than duplicating logic across separate APIs, both REST and GraphQL share the same repository and PostgreSQL query layer, keeping the system predictable, maintainable, and easier to evolve.
flowchart TD
subgraph UI["π¨ Frontend Layer"]
ReactUI["React Movie Dashboard<br/>Filtering β’ CRUD β’ API Toggle"]
end
subgraph API["βοΈ API Layer"]
NodeAPI["NodeMovieApi<br/>TypeScript β’ Express<br/>REST + GraphQL"]
DotNetAPI["DotNetMovieApi<br/>.NET Minimal APIs β’ C#<br/>REST + GraphQL"]
end
subgraph DATA["π Data Platform Layer"]
Functions["PostgreSQL Function Layer<br/>Filtering β’ Paging β’ Sorting β’ CRUD"]
Tables["Relational Model<br/>movies β’ genres β’ movie_genres"]
end
ReactUI --> NodeAPI
NodeAPI --> Functions
Functions --> Tables
ReactUI -. Alternative implementation .-> DotNetAPI
DotNetAPI -. Shares same data layer .-> Functions
classDef frontend fill:#e0f2fe,stroke:#0284c7,stroke-width:2px,color:#0f172a;
classDef primaryApi fill:#dcfce7,stroke:#16a34a,stroke-width:3px,color:#0f172a;
classDef secondaryApi fill:#f3f4f6,stroke:#9ca3af,stroke-width:1px,color:#374151;
classDef data fill:#ede9fe,stroke:#7c3aed,stroke-width:2px,color:#0f172a;
class ReactUI frontend;
class NodeAPI primaryApi;
class DotNetAPI secondaryApi;
class Functions,Tables data;
This repository is the Node.js / TypeScript implementation of a multi-stack movie platform that shares a common PostgreSQL function layer with the .NET API.
sequenceDiagram
participant UI as React Dashboard
participant API as NodeMovieApi
participant Repo as Repository Layer
participant PG as PostgreSQL Functions
UI->>API: REST or GraphQL request
alt REST
API->>API: Express route handler
else GraphQL
API->>API: GraphQL resolver
end
API->>Repo: Shared repository call
Repo->>PG: Execute PostgreSQL function
PG-->>Repo: Query results
Repo-->>API: Typed response
API-->>UI: JSON / GraphQL response
- Node.js + TypeScript
- Express 5
- PostgreSQL (reusable SQL function layer)
- GraphQL Yoga
- Swagger / OpenAPI
- Zod (validation)
- Pino (structured logging)
- Full CRUD for movies (REST + GraphQL)
- Advanced filtering, sorting, and pagination
- Shared repository layer across REST and GraphQL
- PostgreSQL-backed query logic via functions
- Centralized error handling with correlation IDs
- Request logging and CORS support
- Swagger UI for REST exploration
GET /moviesGET /movies/{id}POST /moviesPUT /movies/{id}PATCH /movies/{id}DELETE /movies/{id}GET /genresGET /genres/{id}GET /health
π Swagger UI:
http://localhost:5001/swagger
GET /graphqlPOST /graphql
query {
movies(filters: { search: "avatar", searchMode: "general", page: 1, pageSize: 10 }) {
items {
id
movieName
releaseDate
genres
}
totalCount
totalPages
}
}mutation {
updateMovie(
id: "00000000-0000-0000-0000-000000000000"
patch: { movieName: "Updated Title", genreNames: ["Action", "Sci-Fi"] }
) {
id
movieName
genres
updatedAt
}
}The /movies endpoint supports:
- Search (
general,starts,ends,contains) - Pagination (
page,pageSize) - Sorting (
sortBy,sortDirection) - Date range filtering
- Financial filters (budget, gross)
- Genre filtering
- Node.js
- PostgreSQL
npm install
npm run devNODE_ENV=development
PORT=5001
CORS_ALLOW_ORIGINS=http://localhost:5173,http://localhost:3000
POSTGRES_CONNECTION_STRING=postgresql://user:password@localhost:55432/wickers_dbsrc/
βββ graphql/ # GraphQL schema + resolvers
βββ repositories/ # Shared data access layer
βββ routes/ # REST endpoints
βββ middleware/ # Logging, errors, CORS
βββ validation/ # Zod validation schemas
βββ db/ # PostgreSQL integration
βββ types/ # Shared TypeScript types
βββ server.ts # App entry point
π¬ DotNetMovieApi
ASP.NET Core Minimal API implementation built on top of the Postgres Movie Platform, exposing shared PostgreSQL functions through REST and GraphQL endpoints. Project
π₯ Movie-UI-Dashboard
React + TypeScript frontend application showcasing REST and GraphQL integration, advanced filtering, pagination, sorting, and reusable UI architecture. Project
π§ DevAssist-AI
Production-minded Retrieval-Augmented Generation (RAG) application using OpenAI embeddings, semantic retrieval, and centralized AI orchestration workflows. Project
Centralized PostgreSQL data platform featuring Dockerized infrastructure, overloaded SQL functions, reusable query architecture, and shared business logic powering multiple APIs and applications. Project
- Demonstrates real-world backend architecture patterns
- Demonstrates GraphQL + REST parity without duplicated business logic
- Uses PostgreSQL functions for complex querying
- Designed as a portfolio-ready API demonstrating production-minded engineering concerns
This project emphasizes:
- centralized query logic
- reusable repository patterns
- API consistency
- scalable filtering and pagination
- separation of concerns
- typed validation with Zod
- structured logging
- PostgreSQL-backed business logic
The architecture is designed to support multiple API consumers while keeping the underlying data access predictable and maintainable.
- Authentication (JWT)
- Rate limiting
- Dockerized full-stack environment
- C# API parity
- πΌ LinkedIn
βΆοΈ YouTube- π Portfolio
- π§ Email: stevenwickers@gmail.com
Steven Wickers Senior Frontend Engineer
React β’ TypeScript β’ Node.js β’ C# β’ PostgreSQL β’ Cloud
Node.js API, TypeScript backend, PostgreSQL, GraphQL, REST API, Swagger, OpenAPI, backend architecture






