Skip to content

πŸ”₯ Standardized type definitions, script parsing, and integrated SDK libraries for the Angus application.

License

Notifications You must be signed in to change notification settings

xcancloud/AngusSpecs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

AngusSpecs

English | δΈ­ζ–‡

Angus is a modular and type-safe application development kit. This project is a collection of its core components, providing the foundational pillars for building complex applications.

License

πŸ— Core Libraries

This repository is a Monorepo containing the following independently published packages:

Package Version Description
@angus/types npm version Core Type Definitions. Provides unified type contracts and data structure definitions for the entire Angus ecosystem.
@angus/parser npm version Configuration/Protocol Parser. Parses and validates configuration files or communication protocols, converting data into type-safe JavaScript objects.
@angus/sdk npm version Chained Invocation Client. Provides a fluent API for chained calls, enabling convenient and efficient interaction with the server.

πŸš€ Installation

You can install all or specific packages as needed:

# Install the full core suite
npm install @angus/types @angus/parser @angus/sdk

# Or install only the parts you need
npm install @angus/types @angus/sdk

πŸ’‘ What is it?

  • Separation of Concerns: Each package has a single, clear responsibility and can be used independently or seamlessly together.
  • Type Safety: Built upon @angus/types, it provides full TypeScript support and type constraints throughout the development lifecycle.
  • Developer Experience: The chained call design of @angus/sdk makes code more intuitive; @angus/parser ensures the safety of external configuration input.

πŸ“– Quick Start

The following example demonstrates how these packages work together:

// 1. Import packages (In a real project, typically import from their respective modules)
import { User, ConfigSchema } from '@angus/types';
import { ConfigParser } from '@angus/parser';
import { AngusAPIClient } from '@angus/sdk';

// 2. Use the Parser to parse and validate external configuration
const rawConfig = { apiEndpoint: 'https://api.example.com', timeout: 5000 };
const config = ConfigParser.parse(rawConfig, ConfigSchema); // Returns a safe object conforming to the ConfigSchema type

// 3. Initialize the chained call SDK client
const client = new AngusAPIClient().configure(config);

// 4. Enjoy full type hints and the chained call experience
//    The `User` type here comes from `@angus/types`, ensuring type safety
const userList: User[] = await client
    .resource('users')
    .filter({ active: true })
    .select(['id', 'name', 'email'])
    .get();

πŸ“„ License

This project is open source under the MIT License.

About

πŸ”₯ Standardized type definitions, script parsing, and integrated SDK libraries for the Angus application.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •