Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@
},
"ignorePatterns": ["dist", "node_modules", "*.js", "api-docs"]
}
}
105 changes: 105 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,86 @@
# Rust / Cargo
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
debug/
target/
**/*.rs.bk
*.pdb

# Bun & Node.js
node_modules/
.bun/
bun.lockb
package-lock.json
yarn.lock
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*

# Build output
dist/
build/
out/
.output/
*.tsbuildinfo

# API documentation
api-docs/

# TypeScript cache
.temp/
.cache/

# IDE and editors
.idea/
.vscode/
*.swp
*.swo
*~
.project
.classpath
.settings/
*.sublime-workspace
*.sublime-project

# OS specific files
.DS_Store
Thumbs.db
ehthumbs.db
Desktop.ini
$RECYCLE.BIN/

# Environment variables
.env
.env.local
.env.development.local
.env.test.local
.env.production.local

# Debug files
.debug/
debug.log

# Testing
coverage/
.nyc_output/

# Logs
logs/
*.log

# Rust output (if any Rust components)
target/
*.rs.bk
Cargo.lock

# Remove Cargo.lock from gitignore if creating an executable
# Cargo.lock

# These are backup files generated by rustfmt
**/*.rs.bk


# Bun & Node.js
node_modules/
.bun/
Expand Down Expand Up @@ -84,3 +160,32 @@ screenshots/

# Temporary screenshot script
screenshot.cjs
#tests/containers/*
#!tests/containers/Dockerfile
#!tests/containers/mkosi.default
# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb

# RustRover
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
# MSVC Windows builds of rustc generate these
*.pdb

# flyctl reference directory
/flyctl/

# Test containers
tests/containers/*
!tests/containers/Dockerfile
!tests/containers/mkosi.default
=======
=======
# Miscellaneous
.tmp/
.turbo/
.vercel/
.next/
72 changes: 72 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Build & Run Commands

```bash
``` bash
# Build
cargo build

Expand Down Expand Up @@ -37,6 +38,43 @@ cargo run -- instances create my-instance --provider vyos --region nyc --cpu 2 -
# Create volume
cargo run -- volumes create my-volume --size 10 --region nyc

# Create network
cargo run -- networks create my-network --cidr 192.168.1.0/24

# Build optimized release version
cargo build --release

# Check for compilation errors without building
cargo check

# Run tests
cargo test

# Run specific test
cargo test test_name

# Run specific test with output
cargo test test_name -- --nocapture

# Format code
cargo fmt

# Lint code
cargo clippy
```

## CLI Examples

```bash
# List instances
cargo run -- instances list

# Create instance
cargo run -- instances create my-instance --provider vyos --region nyc --cpu 2 --memory 4 --disk 80

# Create volume
cargo run -- volumes create my-volume --size 10 --region nyc

# Create network
cargo run -- networks create my-network --cidr 192.168.1.0/24
```
Expand All @@ -61,6 +99,24 @@ cargo run -- networks create my-network --cidr 192.168.1.0/24

- **Provider APIs**: VyOS and Proxmox providers should implement common traits

- **Formatting**: Use `cargo fmt` to format code according to Rust standard style

- **Linting**: Run `cargo clippy` for static analysis

- **Naming**:

- Use snake_case for variables, functions, and modules

- Use PascalCase for structs, enums, and traits

- **Error Handling**: Use `AppResult<T>` for functions that can fail

- **State Management**: Follow the App/AppMode pattern for managing application state

- **UI Components**: Use Ratatui components (List, Table, Paragraph) with consistent styling

- **Provider APIs**: VyOS and Proxmox providers should implement common traits

- **Imports**: Group imports by crate, with std first, then external, then internal
- **Document**: Use three slashes (`///`) for public API documentation
- **Async**: Use tokio runtime with futures for async operations
Expand All @@ -77,3 +133,19 @@ cargo run -- networks create my-network --cidr 192.168.1.0/24
The app is organized following a typical TUI pattern with app state, event handling, and UI rendering modules. Follow existing patterns when adding new functionality.

Future work includes integrating with actual VyOS and Proxmox APIs and adding E2E encryption for public cloud integration.
- **src/app.rs**: Core application state and data models
- **src/event.rs**: Event handling for TUI (keyboard, mouse, resize)
- **src/handler.rs**: Keyboard event processing
- **src/tui.rs**: Terminal setup and management
- **src/ui.rs**: UI rendering and layout components
- **src/main.rs**: CLI command processing using Clap

Future work includes integrating with actual VyOS and Proxmox APIs and adding E2E encryption for public cloud integration.

- **Imports**: Group imports by crate, with std first, then external, then internal
- **Document**: Use three slashes (`///`) for public API documentation
- **Async**: Use tokio runtime with futures for async operations

## Project Structure

The app is organized following a typical TUI pattern with app state, event handling, and UI rendering modules. Follow existing patterns when adding new functionality.
Loading
Loading