Skip to content

Latest commit

Β 

History

162 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Krafti Vibe Banner

Krafti Vibe

Go Version Fiber Version PostgreSQL License

Multi-Tenant SaaS Platform for Artisan Service Businesses Features β€’ Quick Start β€’ Architecture β€’ Documentation β€’ Contributing

Krafti Vibe is a complete backend platform purpose-built for artisan service businesses - from solo craftspeople to large service organizations. Built with Go and Fiber, it delivers enterprise-grade multi-tenancy, intelligent booking management, and comprehensive business operations in a single platform.

🎯 What Makes Krafti Vibe Different

The Niche: Traditional booking platforms fall short for artisan businesses. They either oversimplify (missing critical features like materials tracking, project milestones, custom pricing) or over-complicate (enterprise tools that cost too much and do too much). Krafti Vibe fills this gap perfectly.

Built For:

  • πŸ”¨ Home services (plumbers, electricians, cleaners)
  • βœ‚οΈ Beauty & wellness (salons, spas, personal trainers)
  • 🎨 Creative services (photographers, designers, decorators)
  • πŸ”§ Repair & maintenance (appliance repair, handymen, locksmiths)
  • πŸ’† Health & fitness (massage therapists, yoga instructors, physiotherapists)

✨ Core Features

🏒 Multi-Tenancy

  • Complete Isolation: Row-level security ensures tenant data never leaks
  • Flexible Models: Support solo artisans, small teams, or large organizations
  • White-Label Ready: Custom domains and branding per tenant
  • Tiered Plans: Free, Pro, Enterprise with usage-based billing

πŸ“… Intelligent Booking System

  • Real-time availability with conflict detection
  • Recurring appointments (daily/weekly/monthly)
  • Service packages & add-ons with dynamic pricing
  • Deposit handling & payment holds
  • Before/after photo documentation
  • Customer notes & artisan instructions

πŸ’³ Payment Processing

  • Multiple gateways (Stripe, PayPal)
  • Automated commission splits
  • Refund management with policies
  • Professional invoice generation
  • Subscription billing
  • Revenue analytics & reporting

πŸ’¬ Communication Hub

  • In-app messaging between customers & artisans
  • Multi-channel notifications (email, SMS, push)
  • Template engine with dynamic variables
  • Delivery tracking & read receipts
  • Granular notification preferences

⭐ Reviews & Reputation

  • Multi-dimensional ratings (quality, professionalism, timeliness, value)
  • Photo reviews with before/after comparisons
  • Artisan response system
  • Review moderation & flagging
  • Community helpful voting

πŸ“Š Business Intelligence

  • Real-time dashboards & KPIs
  • Custom report generation (PDF, Excel, CSV)
  • Revenue tracking & forecasting
  • Customer lifetime value analytics
  • Artisan performance metrics
  • Usage patterns & trends

🎁 Marketing Tools

  • Discount codes (percentage & fixed)
  • Usage limits & redemption tracking
  • Date-restricted campaigns
  • Service/artisan-specific promotions
  • Campaign performance analytics

πŸ—‚οΈ Project Management

  • Multi-phase project tracking
  • Milestone-based payments
  • Task assignments & dependencies
  • Progress monitoring
  • Client collaboration tools
  • Document management

πŸš€ Quick Start

Prerequisites

  • Go 1.24+
  • PostgreSQL 15+
  • Redis 7+

Installation

# Clone repository
git clone https://github.com/affulk000/Krafti_Vibe.git
cd Krafti_Vibe

# Install dependencies
go mod download

# Set up environment
cp .env.example .env
# Edit .env with your configuration

# Run with hot reload
air

# Or standard run
go run cmd/api/main.go

Docker Setup

docker-compose up -d

Server runs at http://localhost:8080

πŸ‘¨β€πŸ’» Development

Git Hooks

This project uses git hooks to maintain code quality. Install them with:

bash scripts/setup-hooks.sh

Hooks included:

  • pre-commit: Runs formatting, linting, go vet, and secret detection on staged files
  • commit-msg: Enforces conventional commit message format
  • pre-push: Runs full test suite with race detector before pushing

To bypass hooks (not recommended):

git commit --no-verify
git push --no-verify

Conventional Commits

We follow Conventional Commits for clear version history:

feat(auth): add JWT refresh token endpoint
fix(booking): resolve race condition in availability check
docs: update API documentation
test(user): add repository integration tests
chore: update dependencies

Valid types: feat, fix, docs, style, refactor, test, chore, perf, ci, build

CI/CD

GitHub Actions workflows run automatically:

  • Pull Requests: Full validation (formatting, linting, tests, security scan, Docker build)
  • Main Branch: Build and push Docker images to GitHub Container Registry
  • Releases: Multi-platform binaries and Docker images for tagged versions

Local Development Commands

# Run all checks (format, vet, lint, test)
make check

# Run tests with coverage report
make test-coverage

# Run security scan
make security

# Full CI simulation
make ci

# Generate Swagger documentation
make swagger

# Install development tools
make install-tools

Contributing

See CONTRIBUTING.md for detailed contribution guidelines including:

  • Development setup
  • Git workflow
  • Coding standards
  • Testing requirements
  • Pull request process

πŸ—οΈ Architecture

Built with clean architecture principles:

API Layer (Fiber)
    ↓
Service Layer (Business Logic)
    ↓
Repository Layer (Data Access)
    ↓
Database (PostgreSQL + Redis)

Key Technologies:

  • Framework: Fiber v2 (high-performance web framework)
  • Database: PostgreSQL with Row-Level Security
  • Cache: Redis for sessions & hot data
  • Auth: Zitadel integration with JWT
  • ORM: GORM with type-safe operations
  • Logging: Structured logging with Zap

πŸ“¦ Project Structure

Krafti_Vibe/
β”œβ”€β”€ cmd/api/              # Application entry point
β”œβ”€β”€ internal/
β”‚   β”œβ”€β”€ domain/models/    # Business entities
β”‚   β”œβ”€β”€ repository/       # Data access (13 repos, 200+ methods)
β”‚   β”œβ”€β”€ service/          # Business logic (24 services)
β”‚   β”œβ”€β”€ middleware/       # Auth, logging, rate limiting
β”‚   └── router/           # Route definitions
β”œβ”€β”€ scripts/              # Utilities & helpers
└── docs/                 # Documentation

πŸ“Έ API in Action

Artisan Management Endpoint

Live API response showing artisan profile retrieval with complete business information:

Artisan API Endpoint Test

πŸ“š Documentation

General

API Documentation

πŸ”’ Security

  • JWT authentication with refresh tokens
  • Role-based access control (RBAC)
  • PostgreSQL Row-Level Security
  • Input validation & sanitization
  • SQL injection protection
  • XSS prevention
  • CORS configuration
  • Rate limiting per tenant
  • Secure headers

πŸ“ˆ Current Status

Component Status
Domain Models βœ… 100% Complete (20+ models)
Repository Layer βœ… 100% Complete (200+ methods)
Service Layer βœ… 100% Complete (24 services)
Middleware βœ… 100% Complete
API Handlers βœ… 100% Complete
Authentication βœ… 100% Complete
Testing 🚧 In Progress

Overall: ~100% complete (core backend done, API layer in progress)

πŸ›£οΈ Roadmap

Next Up

  • Complete REST API handlers
  • API documentation (OpenAPI/Swagger)
  • Database migrations
  • Comprehensive testing

Future

  • WebSocket real-time updates
  • Background job processing
  • Email & SMS integrations
  • Calendar sync (Google, iCal)
  • Mobile app APIs
  • GraphQL endpoint (optional)
  • AI-powered scheduling
  • Fraud detection
  • Multi-language support

πŸ’» Development

# Run tests
go test ./...

# Run with coverage
go test -cover ./...

# Build for production
make build

# Run linter
golangci-lint run

🀝 Contributing

Contributions welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Write tests for new features
  4. Submit a pull request

See CONTRIBUTING.md for details.

πŸ“„ License

MIT License - see LICENSE file for details.

πŸ™ Acknowledgments

Built with:

  • Fiber - Express-inspired web framework
  • GORM - Feature-rich ORM
  • Zitadel - Identity & access management

Made with ❀️ for artisan businesses worldwide

Version: 1.0.0 | Last Updated: December 2024

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages