Skip to content

shellicar/reference-enterprise

Repository files navigation

@shellicar/reference-enterprise

Node.js npm pnpm TypeScript nvm Docker Checked with Biome AI Assisted VS Code

Built Using

These are some of the key tools and technologies used to build and develop this project:

Vite esbuild TSX

Runs On

These are some of the key dependencies required to run the applications:

@azure/functions GraphQL Nuxt.js Tailwind CSS Zod js-joda Winston OpenTelemetry


@shellicar/reference-enterprise is a software architecture starter repository that provides a structured foundation for building Azure application workloads. This repository demonstrates enterprise-grade project organization with clear separation between customer-facing APIs, internal integrations, worker processes, and multiple web applications.

Unlike the foundational @shellicar/reference-foundation which illustrates individual concepts, this enterprise reference provides a complete project structure that can be used as the basis for creating new Azure application workloads.

Table of Contents

@shellicar TypeScript Ecosystem

Core Libraries

Reference Architectures

Build Tools

Framework

Logging & Monitoring

Overview

@shellicar/reference-enterprise provides a structured foundation for building Azure application workloads with clear architectural boundaries and separation of concerns.

Repository Structure

This repository follows a structured approach to organising enterprise applications:

├── apps/
│   ├── api/                    # Function App - User-facing APIs
│   ├── integration/            # Function App - Internal/non-user APIs
│   ├── worker/                 # App Service - TemporalIO & long-running processes
│   ├── webapp/                 # Main web application for users
│   ├── dashboard/              # Internal staff/line of business dashboard
│   └── admin/                  # Administration interface for mature apps
├── packages/
│   ├── common/                 # Code shared across frontend and backend
│   ├── server-common/          # Common functionality for Function Apps/worker
│   ├── ui/                     # Framework-dependent components (Nuxt) and configuration
│   ├── ui-common/              # Framework-agnostic UI code, validation, schemas
│   ├── ui-schema/              # Schema for frontend applications
│   ├── ui-schema-admin/           # Schema for admin interface (optional)
│   ├── server-schema/          # Schema for APIs
│   ├── server-schema-api/             # Schema specifically for API (optional)
│   ├── server-schema-integration/     # Schema for integration services (optional)
│   └── typescript-config/      # Shared TypeScript configuration
├── infra/                      # Infrastructure as Code (Bicep)
└── deploy/
    └── templates/              # Reusable Azure Pipeline templates

Applications

Application Type Purpose Technology
apps/api Azure Function App User-facing APIs Azure Functions with HTTP triggers
apps/integration Azure Function App Internal/non-user APIs Azure Functions for third-party integrations
apps/worker Azure App Service Long-running processes TemporalIO for workflow orchestration
apps/webapp Web Application Main user interface Vue+Nuxt
apps/dashboard Web Application Internal staff dashboard Vue+Nuxt
apps/admin Web Application Administration interface Vue+Nuxt

Packages

Package Purpose What Goes Here Used By
common Shared code across frontend and backend Utilities, types, constants that work everywhere All apps
server-common Server-side shared functionality Middleware, auth helpers, server utilities api, integration, worker
ui Framework-dependent UI components Nuxt components, framework-specific code webapp, dashboard, admin
ui-common Framework-agnostic UI code Validation logic, Zod schemas, reusable functions webapp, dashboard, admin
schema-server Generated types for server APIs GraphQL codegen types for server-side API consumption Server applications
schema-ui Generated types for frontend APIs GraphQL codegen types for client-side API consumption Frontend applications
schema-api Generated types for API service (optional) GraphQL codegen types specific to API service api
schema-integration Generated types for integration APIs (optional) GraphQL codegen types for third-party/integration APIs integration
schema-admin Generated types for admin APIs (optional) GraphQL codegen types specific to admin interface admin
typescript-config Shared TypeScript configuration TSConfig files, build settings All applications and packages

Infrastructure & Deployment

Work in Progress - This section is under development

Infrastructure as Code

infra/

  • Technology: Bicep templates
  • Purpose: Azure resource definitions
  • Contents: Resource groups, Function Apps, App Services, databases, networking

Deployment Templates

deploy/templates/

  • Purpose: Reusable Azure Pipeline templates
  • Contents: Build, test, and deployment pipeline definitions
  • Benefits: Consistent deployment patterns across applications

Development Tools

Work in Progress - This section is under development

This repository includes several development tools to maintain code quality and consistency:

Code Quality

  • Biome: Linting and formatting
  • Lefthook: Git hooks for pre-commit checks
  • GitVersion: Semantic versioning based on Git history

Build System

  • Turbo: Monorepo task orchestration
  • pnpm Workspaces: Package management and dependency resolution

Getting Started

Prerequisites

  • Git
  • Basic understanding of Azure services
  • Azure subscription (for deployment)

Setup

Automated Setup (Recommended)

Run the setup script to automatically install all required tools and dependencies:

Linux/macOS:

./setup.sh

Windows:

.\setup.ps1

The setup script will:

  • Install prerequisites (Homebrew on macOS)
  • Install Node Version Manager (NVM)
  • Install Node.js version from .nvmrc
  • Enable Corepack for package manager management
  • Install pnpm via Corepack
  • Install Azure Functions Core Tools
  • Install Docker (optional)

Manual Setup

If you prefer manual installation:

  1. Install Node.js (version specified in .nvmrc)

  2. Enable Corepack and install pnpm

    corepack enable
    corepack prepare pnpm@latest --activate
  3. Install Azure Functions Core Tools

    See Azure Functions Core Tools documentation

  4. Clone and setup the repository

    git clone https://github.com/shellicar/reference-enterprise.git
    cd reference-enterprise
    pnpm install
    pnpm build

Development

Once setup is complete, you can start developing:

# Start the API
pnpm --filter api dev

# Start the web application
pnpm --filter webapp dev

# Build all packages
pnpm build

# Run tests
pnpm test

Architecture Decisions

This structure provides:

  • Clear separation between user-facing and internal services
  • Shared code through common packages
  • Scalable architecture that can grow with application complexity
  • Consistent development patterns across all applications
  • Flexible deployment options for different application types

Architecture Approach

This repository follows Vertical Slice Architecture - organising code by feature rather than technical layers. Each feature contains everything it needs (API endpoints, business logic, data access, validation) in one cohesive slice.

Why Vertical Slices?

Benefits:

  • High cohesion - Feature logic stays together
  • Team independence - Developers can work on different features without conflicts
  • Easy to understand - Business logic is contained and traceable
  • Better pull requests - Code changes are colocated, making reviews easier to follow
  • Deployment flexibility - Features can be developed and tested independently

Trade-offs:

  • Some code duplication - Accept duplication when it keeps features independent
  • Consistency overhead - Requires discipline to maintain standards across slices
  • Cross-cutting changes - Security or infrastructure updates touch multiple slices

Database Considerations

Using document databases (Cosmos DB NoSQL, MongoDB) aligns well with vertical slices:

  • Features can model data as standalone documents or nested within parent entities
  • Less coupling through shared database schemas
  • Natural fit for feature-based data modelling

Team Approach

This architecture works best with teams that:

  • Communicate effectively and coordinate when needed
  • Recognize when duplication becomes problematic and refactor accordingly
  • Balance feature independence with shared concerns
  • Understand that no architecture is perfect - there are always trade-offs

This enterprise reference provides a solid foundation for Azure application workloads with clear architectural boundaries and room for growth as applications mature.

This README was created with the assistance of GitHub Copilot.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages