Initial commit: add .gitignore and README
Some checks failed
DBIS Monorepo CI / Build (push) Has been cancelled
DBIS Monorepo CI / Lint (push) Has been cancelled
DBIS Monorepo CI / Type Check (push) Has been cancelled
DBIS Monorepo CI / Test (push) Has been cancelled

This commit is contained in:
defiQUG
2026-02-09 21:51:45 -08:00
commit f32bcd596f
14 changed files with 506 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
{
"name": "@dbis/api-client",
"version": "1.0.0",
"description": "API client for DBIS services",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"scripts": {
"build": "tsc",
"test": "vitest",
"lint": "eslint src",
"type-check": "tsc --noEmit",
"clean": "rm -rf dist"
},
"dependencies": {
"@workspace/api-client": "workspace:*",
"@dbis/shared-types": "workspace:*"
},
"devDependencies": {
"typescript": "^5.5.4",
"vitest": "^1.2.0"
},
"files": [
"dist"
],
"publishConfig": {
"access": "restricted"
}
}

View File

@@ -0,0 +1,17 @@
/**
* @dbis/api-client
* API client for DBIS services
*/
import { createApiClient } from '@workspace/api-client';
import type { DBISConfig } from '@dbis/shared-types';
export function createDBISClient(config: DBISConfig) {
return createApiClient({
baseURL: config.apiUrl,
headers: {
'X-API-Key': config.apiKey,
},
});
}

View File

@@ -0,0 +1,28 @@
{
"name": "@dbis/shared-auth",
"version": "1.0.0",
"description": "Shared authentication utilities for DBIS projects",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"scripts": {
"build": "tsc",
"test": "vitest",
"lint": "eslint src",
"type-check": "tsc --noEmit",
"clean": "rm -rf dist"
},
"dependencies": {
"@workspace/shared-auth": "workspace:*"
},
"devDependencies": {
"typescript": "^5.5.4",
"vitest": "^1.2.0"
},
"files": [
"dist"
],
"publishConfig": {
"access": "restricted"
}
}

View File

@@ -0,0 +1,19 @@
/**
* @dbis/shared-auth
* Shared authentication utilities for DBIS projects
*/
// Re-export workspace shared auth
export * from '@workspace/shared-auth';
// DBIS-specific auth utilities
export function hasDBISRole(user: { roles: string[] }, role: string): boolean {
return user.roles.includes(role);
}
export function requireDBISRole(user: { roles: string[] }, role: string): void {
if (!hasDBISRole(user, role)) {
throw new Error(`User does not have required role: ${role}`);
}
}

View File

@@ -0,0 +1,28 @@
{
"name": "@dbis/shared-types",
"version": "1.0.0",
"description": "Shared TypeScript types for DBIS projects",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"scripts": {
"build": "tsc",
"test": "vitest",
"lint": "eslint src",
"type-check": "tsc --noEmit",
"clean": "rm -rf dist"
},
"dependencies": {
"@workspace/shared-types": "workspace:*"
},
"devDependencies": {
"typescript": "^5.5.4",
"vitest": "^1.2.0"
},
"files": [
"dist"
],
"publishConfig": {
"access": "restricted"
}
}

View File

@@ -0,0 +1,31 @@
/**
* @dbis/shared-types
* Shared TypeScript types for DBIS projects
*/
// Re-export workspace shared types
export * from '@workspace/shared-types';
// DBIS-specific types
export interface DBISConfig {
apiUrl: string;
apiKey: string;
environment: 'development' | 'staging' | 'production';
}
export interface DBISUser {
id: string;
email: string;
name: string;
roles: string[];
}
export interface DBISProject {
id: string;
name: string;
description: string;
status: 'active' | 'inactive' | 'archived';
createdAt: Date;
updatedAt: Date;
}

View File

@@ -0,0 +1,28 @@
{
"name": "@dbis/shared-utils",
"version": "1.0.0",
"description": "Shared utility functions for DBIS projects",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"scripts": {
"build": "tsc",
"test": "vitest",
"lint": "eslint src",
"type-check": "tsc --noEmit",
"clean": "rm -rf dist"
},
"dependencies": {
"@workspace/shared-utils": "workspace:*"
},
"devDependencies": {
"typescript": "^5.5.4",
"vitest": "^1.2.0"
},
"files": [
"dist"
],
"publishConfig": {
"access": "restricted"
}
}

View File

@@ -0,0 +1,17 @@
/**
* @dbis/shared-utils
* Shared utility functions for DBIS projects
*/
// Re-export workspace shared utils
export * from '@workspace/shared-utils';
// DBIS-specific utilities
export function formatDBISDate(date: Date): string {
return date.toISOString().split('T')[0];
}
export function validateDBISEmail(email: string): boolean {
return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email) && email.endsWith('@dbis.example.com');
}