mirror of
https://github.com/samiyev/puaros.git
synced 2025-12-27 23:06:54 +05:00
chore: initialize repository
Add README and LICENSE files
This commit is contained in:
21
LICENSE
Normal file
21
LICENSE
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2025 Fozilbek Samiyev
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
141
README.md
Normal file
141
README.md
Normal file
@@ -0,0 +1,141 @@
|
|||||||
|
# Puaros
|
||||||
|
|
||||||
|
A TypeScript monorepo for Puaros project.
|
||||||
|
|
||||||
|
## Prerequisites
|
||||||
|
|
||||||
|
- Node.js 22.18.0 (use `nvm use` to automatically switch to the correct version)
|
||||||
|
- pnpm (package manager)
|
||||||
|
|
||||||
|
## Getting Started
|
||||||
|
|
||||||
|
### Installation
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Install dependencies
|
||||||
|
pnpm install
|
||||||
|
```
|
||||||
|
|
||||||
|
### Development
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Build all packages
|
||||||
|
pnpm build:all
|
||||||
|
|
||||||
|
# Clean all build outputs
|
||||||
|
pnpm clean:all
|
||||||
|
|
||||||
|
# Run CLI in development mode
|
||||||
|
pnpm dev:cli
|
||||||
|
```
|
||||||
|
|
||||||
|
### Testing
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Run all tests across packages
|
||||||
|
pnpm test
|
||||||
|
|
||||||
|
# Run tests with coverage (80% threshold required)
|
||||||
|
cd packages/core && pnpm test:coverage
|
||||||
|
|
||||||
|
# Run tests with UI
|
||||||
|
cd packages/core && pnpm test:ui
|
||||||
|
|
||||||
|
# Run tests once (no watch mode)
|
||||||
|
cd packages/core && pnpm test:run
|
||||||
|
```
|
||||||
|
|
||||||
|
The project uses Vitest for testing with coverage thresholds set to 80% for all metrics (lines, functions, branches, statements).
|
||||||
|
|
||||||
|
### Code Quality
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Format all code (IMPORTANT: uses 4-space indentation)
|
||||||
|
pnpm format
|
||||||
|
|
||||||
|
# Lint and auto-fix
|
||||||
|
pnpm lint
|
||||||
|
|
||||||
|
# Check linting without fixing
|
||||||
|
pnpm eslint "packages/**/*.ts"
|
||||||
|
```
|
||||||
|
|
||||||
|
## Project Structure
|
||||||
|
|
||||||
|
```
|
||||||
|
puaros/
|
||||||
|
├── packages/
|
||||||
|
│ └── core/ # @puaros/core - Core business logic
|
||||||
|
│ ├── src/ # Source files
|
||||||
|
│ ├── dist/ # Build output (generated)
|
||||||
|
│ └── package.json
|
||||||
|
├── pnpm-workspace.yaml # Workspace configuration
|
||||||
|
├── tsconfig.base.json # Shared TypeScript config
|
||||||
|
├── eslint.config.mjs # ESLint configuration
|
||||||
|
├── .prettierrc # Prettier configuration
|
||||||
|
├── LINTING.md # Code style guidelines
|
||||||
|
├── CLAUDE.md # AI assistant guidance
|
||||||
|
└── CHANGELOG.md # Project changelog
|
||||||
|
```
|
||||||
|
|
||||||
|
## Code Style
|
||||||
|
|
||||||
|
This project follows strict TypeScript and code quality standards:
|
||||||
|
|
||||||
|
- **Indentation:** 4 spaces (enforced by Prettier)
|
||||||
|
- **Line Length:** 100 characters maximum
|
||||||
|
- **Quotes:** Single quotes
|
||||||
|
- **Semicolons:** Always required
|
||||||
|
- **TypeScript:** Strict type checking enabled
|
||||||
|
|
||||||
|
### Key Rules
|
||||||
|
|
||||||
|
- No `any` type without explicit reasoning
|
||||||
|
- Explicit function return types required
|
||||||
|
- No floating promises - always await or handle
|
||||||
|
- Use `const` for non-reassigned variables
|
||||||
|
- Always use `===` instead of `==`
|
||||||
|
- Curly braces required for all control structures
|
||||||
|
- No `console.log` (use `console.warn`/`console.error` or proper logger)
|
||||||
|
|
||||||
|
See [LINTING.md](./LINTING.md) for detailed code style guidelines.
|
||||||
|
|
||||||
|
## Monorepo Structure
|
||||||
|
|
||||||
|
This project uses pnpm workspaces for managing multiple packages:
|
||||||
|
|
||||||
|
- **Packages** are located in `packages/*`
|
||||||
|
- All packages share TypeScript configuration via `tsconfig.base.json`
|
||||||
|
- Dependencies are hoisted and shared when possible
|
||||||
|
|
||||||
|
### Adding a New Package
|
||||||
|
|
||||||
|
1. Create `packages/your-package/` directory
|
||||||
|
2. Add `package.json` with name `@puaros/your-package`
|
||||||
|
3. Create `tsconfig.json` extending `../../tsconfig.base.json`
|
||||||
|
4. The package will be auto-discovered via workspace configuration
|
||||||
|
|
||||||
|
## Dependencies
|
||||||
|
|
||||||
|
Core package uses:
|
||||||
|
|
||||||
|
- `simple-git` - Git operations
|
||||||
|
- `tree-sitter`, `tree-sitter-javascript`, `tree-sitter-typescript` - Code parsing
|
||||||
|
- `uuid` - UUID generation
|
||||||
|
|
||||||
|
Development tools:
|
||||||
|
|
||||||
|
- Vitest - Testing framework
|
||||||
|
- ESLint + TypeScript ESLint - Strict type checking and linting
|
||||||
|
- Prettier - Code formatting
|
||||||
|
|
||||||
|
## Contributing
|
||||||
|
|
||||||
|
1. Ensure Node.js version matches `.nvmrc` (22.18.0)
|
||||||
|
2. Run `pnpm format` before committing to ensure consistent formatting
|
||||||
|
3. All tests must pass with 80% coverage
|
||||||
|
4. Fix all ESLint warnings - they indicate real type safety issues
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
MIT - Copyright (c) Fozilbek Samiyev
|
||||||
Reference in New Issue
Block a user