mirror of
https://github.com/s-frick/effigenix.git
synced 2026-03-28 10:09:35 +01:00
| .. | ||
| apps/cli | ||
| packages | ||
| .eslintrc.js | ||
| .gitignore | ||
| .gitkeep | ||
| .prettierrc | ||
| openapi.json | ||
| package.json | ||
| pnpm-lock.yaml | ||
| pnpm-workspace.yaml | ||
| README.md | ||
| tsconfig.base.json | ||
Effigenix Frontend
TypeScript monorepo containing Terminal User Interface (TUI) and shared packages for the Effigenix ERP system.
Structure
frontend/
├── apps/
│ └── cli/ # Terminal UI (Ink)
│
└── packages/ # Shared packages (reusable for WebUI)
├── api-client/ # HTTP client for Backend API
├── types/ # TypeScript types (generated from OpenAPI)
├── validation/ # Zod schemas
└── config/ # Shared configuration
Prerequisites
- Node.js 20+
- pnpm 9+
- Backend running at http://localhost:8080
Getting Started
Install Dependencies
pnpm install
Development
# Run TUI in dev mode
pnpm run dev
# Run tests
pnpm test
# Type check
pnpm run typecheck
# Lint code
pnpm run lint
# Format code
pnpm run format
Build
# Build all packages
pnpm run build
Package Development
Adding a New Package
cd packages
mkdir my-package
cd my-package
pnpm init
Then update package.json:
- Set name to
@effigenix/my-package - Add
"main": "./dist/index.js" - Add
"types": "./dist/index.d.ts" - Add build script:
"build": "tsup src/index.ts"
Using Packages
{
"dependencies": {
"@effigenix/types": "workspace:*",
"@effigenix/api-client": "workspace:*"
}
}
Type Generation
Types are automatically generated from the backend OpenAPI spec:
# Start backend first
cd ../backend
mvn spring-boot:run
# Generate types
cd ../frontend/packages/types
pnpm run generate:types
Technology Stack
- TypeScript - Type-safe JavaScript
- React - UI library (Ink for terminal)
- pnpm - Fast, efficient package manager
- Zod - Runtime validation + type inference
- Axios - HTTP client with interceptors
- tsup - Zero-config TypeScript bundler
- vitest - Fast unit testing
Monorepo Commands
# Install dependencies in root
pnpm install
# Run command in specific package
pnpm run --filter @effigenix/cli dev
# Run command in all packages
pnpm run --recursive build
# Add dependency to specific package
pnpm add axios --filter @effigenix/api-client
Scripts
pnpm run build- Build all packagespnpm run dev- Run CLI TUI in dev modepnpm test- Run all testspnpm run typecheck- Type check all packagespnpm run lint- Lint all codepnpm run format- Format all code
Documentation
See individual package READMEs for detailed documentation: