glanzlicht / GastroOS
Verified secure showcase
500 Files 1 MB Public size 31 Redacted TypeScript · SQL · JSON · Markdown · DOCKERIGNORE · EXAMPLE

Project overview

GastroOS is a verified code showcase with 500 visible project entries across 3 top-level modules. The primary detected language is TypeScript; protected files remain visible in the structure while their contents stay private.

README

GastravaOS

GastravaOS is a modular Hospitality Operational Intelligence Platform.

The technical repository name remains GastroOS for compatibility. The product is presented publicly as GastravaOS.

Product preview

GastravaOS operations dashboard

GastravaOS is designed for hospitality operations ranging from small venues to larger multi-location organizations. The platform combines operational workflows, resilient data handling and role-specific user experiences without exposing internal complexity to operators.

What this repository demonstrates

This repository is presented as a technical portfolio showcase, not as a complete product blueprint.

It demonstrates work across:

  • backend engineering with Node.js, TypeScript, NestJS and REST/OpenAPI;
  • PostgreSQL data modeling, explicit SQL migrations and transactional consistency;
  • Flutter application architecture with Riverpod, go_router, Drift/SQLite and Dio;
  • operational workflows across hospitality domains;
  • offline-capable client foundations and synchronization patterns;
  • real-time state reconciliation and event-driven integration patterns;
  • integrations for storage, payments, fiscal/accounting systems and external platforms;
  • Docker-based development, CI, observability and runtime verification;
  • tenant-aware security, audit-oriented design and permission boundaries;
  • applied AI around deterministic domain data and human-controlled actions.

Technology stack

AreaTechnology
BackendNode.js 24 LTS, TypeScript, NestJS 11
APIREST / OpenAPI
DatabasePostgreSQL 18, Drizzle ORM, explicit SQL migrations
FrontendFlutter, Riverpod, go_router
Local dataDrift / SQLite
NetworkingDio, json_serializable
InfrastructureDocker Compose, S3-compatible storage
ArchitectureModular monolith, transactional outbox
QualityAutomated tests, CI, observability and runtime verification

Engineering approach

The codebase is organized around clear boundaries and reusable platform capabilities rather than one large feature layer.

Recurring engineering principles include:

  • deterministic and auditable domain state;
  • separation of operational truth from presentation;
  • role- and context-specific interfaces;
  • resilience under intermittent connectivity;
  • explicit integration adapters;
  • composable capabilities instead of duplicated vertical implementations;
  • controlled exposure of sensitive business, security and product logic.

Portfolio boundary

The public showcase intentionally omits detailed roadmaps, ADRs, security internals, commercial logic, AI prompts, operational playbooks and reconstructable product strategy.

Those materials remain in the private repository. The public view is optimized so technical reviewers can evaluate engineering breadth and implementation quality without receiving a reconstruction guide for the product.

Local development

The repository uses a versioned pnpm dependency graph.

corepack enable
pnpm install --frozen-lockfile

Project-specific runtime and verification details remain in the private engineering documentation.

Status

GastravaOS is under active development. The repository contains a broad implementation foundation and ongoing product work rather than a finished commercial release.

The public showcase focuses on engineering capability, architecture quality and implementation breadth while deliberately omitting core IP.

apps/backend/src/common/auth/oidc-auth.provider.tsTypeScript
import { Injectable } from '@nestjs/common';
import type { Request } from 'express';
import { createHash } from 'node:crypto';
import { createRemoteJWKSet,jwtVerify,type JWTPayload } from 'jose';
import { DatabaseService } from '../../infrastructure/database/database.service';
import type { AuthProvider } from './auth-provider';
import type { AuthenticatedPrincipal } from './authenticated-principal';
@Injectable()
export class OidcAuthProvider implements AuthProvider {
private readonly issuer=process.env.OIDC_ISSUER;
private readonly audience=process.env.OIDC_AUDIENCE;
private readonly jwksUri=process.env.OIDC_JWKS_URI;
private readonly jwks=this.jwksUri
? createRemoteJWKSet(new URL(this.jwksUri),{
cooldownDuration:30_000,
cacheMaxAge:10*60_000,
timeoutDuration:5_000,
})
: null;
constructor(private readonly database:DatabaseService) {}
async authenticate(request:Request):Promise<AuthenticatedPrincipal|null> {
if(process.env.AUTH_ADAPTER!=='oidc') return null;
if(!this.issuer || !this.audience || !this.jwks) throw new Error('auth.oidc_not_configured');
const header=request.header('authorization')??'';
const match=/^Bearer\s+(.+)$/i.exec(header);
if(!match) return null;
let payload:JWTPayload;
try {
const verified=await jwtVerify(match[1],this.jwks,{
issuer:this.issuer,
audience:this.audience,
clockTolerance:Number(process.env.OIDC_CLOCK_TOLERANCE_SECONDS??30),
});
payload=verified.payload;
} catch {
return null;
}
const subject=String(payload.sub??'');
if(!subject || !payload.iat) return null;
const users=await this.database.query<any>(
`select ua.id,ua.external_auth_subject,ua.preferred_locale,ua.status,
uas.revoked_before,uas.require_step_up_after
from user_accounts ua
left join user_auth_security_state uas on uas.user_account_id=ua.id
where ua.external_auth_subject=$1 and ua.status='active'
limit 1`,
[subject],
);
const user=users[0];
if(!user) return null;
const issuedAt=Number(payload.iat);
if(user.revoked_before && issuedAt*1000<=new Date(user.revoked_before).getTime()) return null;
const sessionId=payload.sid?String(payload.sid):undefined;
const tokenId=payload.jti?String(payload.jti):undefined;
const identifier=sessionId??tokenId;
if(identifier) {
const hash=createHash('sha256')
.update(`${process.env.SECURITY_HASH_SALT??'dev-only'}:${identifier}`)
.digest('hex');
const revoked=await this.database.query<any>(
`select 1 from revoked_auth_sessions
where session_identifier_hash=$1
and (expires_at is null or expires_at>now())
limit 1`,
[hash],
);
if(revoked[0]) return null;
}
const rawAmr=(payload as any).amr;
const amr=Array.isArray(rawAmr)?rawAmr.map(String):rawAmr?[String(rawAmr)]:[];
return {
userId:user.id,
authSubject:subject,
locale:user.preferred_locale||'en-GB',
issuedAt,
authTime:(payload as any).auth_time?Number((payload as any).auth_time):undefined,
sessionId,
tokenId,
acr:(payload as any).acr?String((payload as any).acr):undefined,
amr,
};
}
}

Architecture

High-level modules detected from the verified public snapshot. Protected implementation details are intentionally omitted.

appsmodule
.vscodemodule
.githubmodule

Technology stack

TypeScriptSQLMarkdownJSONGITIGNOREDOCKERIGNORENode.js / JavaScript ecosystem
TypeScript68.8%
SQL20.0%
Markdown10.9%
JSON0.3%
GITIGNORE0.1%
DOCKERIGNORE0.0%
CJS0.0%
MJS0.0%