https://github.com/soufian-khennousse/tool2go
Rental system focusing on validation, error handling, and clean service architecture.
https://github.com/soufian-khennousse/tool2go
booking-system clean-architecture cli-tool console-application csharp design-patterns dotnet object-oriented-programming validation xml-serialization
Last synced: 28 days ago
JSON representation
Rental system focusing on validation, error handling, and clean service architecture.
- Host: GitHub
- URL: https://github.com/soufian-khennousse/tool2go
- Owner: soufian-khennousse
- Created: 2025-11-16T14:39:54.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2025-11-16T14:56:53.000Z (7 months ago)
- Last Synced: 2025-11-16T16:13:44.988Z (7 months ago)
- Topics: booking-system, clean-architecture, cli-tool, console-application, csharp, design-patterns, dotnet, object-oriented-programming, validation, xml-serialization
- Language: C#
- Homepage:
- Size: 245 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# π Tool2Go β A Modular Tool Rental System (C#/.NET 8)
**Enterprise-style CLI application with XML persistence, booking logic, validation rules, and a clean service-oriented architecture.**
Tool2Go is a fully functional **tool rental management system** developed in **C#/.NET 8**, focusing on clean architecture, robust input handling, domain-driven design, and real-world business logic.
It simulates the full lifecycle of renting professional tools β including customers, bookings, categories, availability logic, validation, and cost calculations.
This project demonstrates:
- π§© **Deep understanding of domain modeling**
- π οΈ **Clean service-layer architecture**
- π¦ **XML-based persistence** (serialization/deserialization)
- π§Ή **Input parsing, validation & error handling**
- π **Complex booking workflows with date validation**
- π **Debugging & edge-case handling** (temporary reservations, availability checks, etc.)
- β»οΈ **Extendable design for future UI or DB upgrades**
---
## π§± Architecture Overview
The system follows a **layered architecture** designed for maintainability:
```text
Program.cs (Entry point / Menu control)
βββ Services
β βββ CustomerService
β βββ BookingService
β βββ ToolService
β βββ CategoryService
βββ Models
β βββ Customer
β βββ Booking / BookingPos
β βββ ToolType / ToolInstance
β βββ ToolCategory
βββ Persistence
βββ XML Serialization (Utils)
```
### π Highlights
- **Services contain all business logic** β no logic in `Program.cs`
- **Models contain only state + simple calculations**
- **Centralized InputHelper** ensures all input is validated & abortable
- **XMLSerializer abstraction** allows future upgrade to JSON/SQL
---
## π§© Key Features
### β Smart Booking Workflow
The booking system guides the user step-by-step:
1. Select customer
2. Enter start & end date
3. System checks availability for each tool type
4. User can book multiple tools at once
5. Age restrictions enforced (21+ for insured tools)
6. Temporary reservations prevent double-booking in same session
7. Full summary screen before saving
---
### β Temporary Reservations (Advanced Feature)
To prevent inconsistent availability:
- tools selected during the booking session are **temporarily reserved**
- ensures correct availability calculation
- prevents multi-adding the same tool type incorrectly
---
### β Robust Input Handling (Industrial-grade)
Every input uses the **InputHelper**, providing:
- Centralized parsing
- Abort options at any point
- Retry on invalid input
- βPress Enter to keep previous valueβ when editing
- Consistency across all services
This simulates real enterprise CLI tooling where input reliability is critical.
---
### β Cancelable Operations
All user-facing actions support:
- Cancel before saving
- Confirmation before deletion
- Clear error prompts
- Retry loops without throwing exceptions
---
### β XML Persistence
All data is stored using XML serialization:
- Tools
- Tool instances
- Categories
- Customers
- Bookings
- Nested booking positions
Ensured through:
- a consistent schema
- safe loading
- future-proof structure for migrations