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/modules/inventory/workers/order-consumption.worker.tsTypeScript
import { Injectable } from '@nestjs/common';
import { DatabaseService } from '../../../infrastructure/database/database.service';
import { StockMovementService } from '../application/stock-movement.service';
import { InventoryUnitConversionService } from '../application/inventory-unit-conversion.service';
import { DomainConflictError } from '../../../common/errors/domain-conflict.error';
@Injectable()
export class OrderConsumptionWorker {
constructor(
private readonly database: DatabaseService,
private readonly movements: StockMovementService,
private readonly units: InventoryUnitConversionService,
) {}
async consumeOrder(input: {
organizationId: string;
locationId: string;
orderId: string;
businessDate: string;
}) {
const items = await this.database.query<any>(
`select
oi.id as order_item_id,
oi.quantity::text as order_quantity,
p.recipe_id
from order_items oi
join orders o on o.id=oi.order_id
join products p on p.id=oi.product_id
where o.id=$1
and o.organization_id=$2
and o.location_id=$3
and o.status='submitted'
and oi.status in ('active','comped','remake')`,
[input.orderId, input.organizationId, input.locationId],
);
let movementsCreated = 0;
for (const item of items) {
if (item.recipe_id) {
movementsCreated += await this.consumeRecipe({
...input,
recipeId: item.recipe_id,
sourceOrderItemId: item.order_item_id,
orderQuantity: item.order_quantity,
generation: 1,
reason: 'order_submitted',
});
}
const modifiers = await this.database.query<any>(
`select m.recipe_id, oim.quantity::text as modifier_quantity
from order_item_modifiers oim
join modifiers m on m.id=oim.modifier_id
where oim.order_item_id=$1
and m.recipe_id is not null`,
[item.order_item_id],
);
let generation = 1000;
for (const modifier of modifiers) {
movementsCreated += await this.consumeRecipe({
...input,
recipeId: modifier.recipe_id,
sourceOrderItemId: item.order_item_id,
orderQuantity: modifier.modifier_quantity,
generation: generation++,
reason: 'modifier_consumption',
});
}
}
return { movementsCreated };
}
private async consumeRecipe(input: {
organizationId: string;
locationId: string;
orderId: string;
businessDate: string;
recipeId: string;
sourceOrderItemId: string;
orderQuantity: string;
generation: number;
reason: string;
}): Promise<number> {
const versions = await this.database.query<any>(
`select id,yield_quantity::text
from recipe_versions
where recipe_id=$1 and status='published'
order by published_at desc nulls last,version_number desc
limit 1`,
[input.recipeId],
);
const version = versions[0];
if (!version) return 0;
const leaves = await this.database.query<any>(
`with recursive expanded as (
select
rc.ingredient_id,
rc.subrecipe_id,
rc.quantity::numeric as leaf_quantity,
rc.unit_code,
1::numeric as path_multiplier
from recipe_components rc
where rc.recipe_version_id=$1
union all
select
child.ingredient_id,
child.subrecipe_id,
child.quantity::numeric,
child.unit_code,
expanded.path_multiplier
* expanded.leaf_quantity
/ nullif(subv.yield_quantity,0)
from expanded
join recipes subr on subr.id=expanded.subrecipe_id
join recipe_versions subv
on subv.recipe_id=subr.id and subv.status='published'
join recipe_components child
on child.recipe_version_id=subv.id
where expanded.subrecipe_id is not null
)
select
ingredient_id,
leaf_quantity::text,
unit_code,
path_multiplier::text
from expanded
where ingredient_id is not null`,
[version.id],
);
let created = 0;
for (const leaf of leaves) {
const stock = await this.database.query<any>(
`select
si.id as stock_item_id,
si.base_unit_code,
sil.default_storage_location_id
from stock_items si
join stock_item_locations sil
on sil.stock_item_id=si.id
and sil.location_id=$2
and sil.is_tracked=true
where si.organization_id=$3
and si.ingredient_id=$1
and si.is_active=true
limit 2`,
[leaf.ingredient_id, input.locationId, input.organizationId],
);
if (stock.length !== 1 || !stock[0].default_storage_location_id) {
throw new DomainConflictError('inventory.storage_required', {
ingredientId: leaf.ingredient_id,
});
}
const perRecipeLeaf = await this.units.multiplyDivide({
value: leaf.leaf_quantity,
multiplier: leaf.path_multiplier,
divisor: version.yield_quantity,
});
const requiredInRecipeUnit = await this.units.multiplyDivide({
value: perRecipeLeaf,
multiplier: input.orderQuantity,
divisor: '1',
});
const normalized = await this.units.convert({
quantity: requiredInRecipeUnit,
fromUnitCode: leaf.unit_code,
toUnitCode: stock[0].base_unit_code,
});
try {
await this.movements.append({
organizationId: input.organizationId,
locationId: input.locationId,
stockItemId: stock[0].stock_item_id,
storageLocationId: stock[0].default_storage_location_id,
movementType: 'sale_consumption',
quantityDelta: `-${requiredInRecipeUnit}`,
unitCode: leaf.unit_code,
normalizedQuantityDelta: `-${normalized}`,
normalizedUnitCode: stock[0].base_unit_code,
sourceType: 'order_item',
sourceId: input.sourceOrderItemId,
consumptionGeneration: input.generation,
businessDate: input.businessDate,
reason: input.reason,
});
created++;
} catch (error: any) {
if (String(error?.message ?? error).toLowerCase().includes('duplicate')) continue;
throw error;
}
}
return created;
}
}

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%