Skip to content

SH1W4/kronos-sync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

413 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

KRONØS SYNC

KRONØS SYNC

Enterprise-Grade Tattoo Studio Management Platform
Built with Next.js 15, Prisma, NextAuth, and cutting-edge UX design.


🎯 Vision

KRONØS SYNC is a professional-first SaaS platform designed exclusively for tattoo studios, artists, and administrators. Unlike traditional booking systems, we've architected a sovereign ecosystem where:

  • Professionals (Artists & Admins) have full access to the management dashboard
  • Clients interact through frictionless, guest-first experiences (Kiosk, Marketplace, Forms)
  • Data sovereignty ensures each studio owns its client base without polluting the global user registry

πŸ—οΈ Architecture Philosophy

The Professional Gate

KRONØS implements a strict invite-only authentication system for professional access:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    AUTHENTICATION FLOW                       β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                              β”‚
β”‚  πŸ‘€ New User Attempts Login                                 β”‚
β”‚         β”‚                                                    β”‚
β”‚         β”œβ”€β–Ί Has Invite Code? ──► YES ──► Create as ARTIST   β”‚
β”‚         β”‚                                                    β”‚
β”‚         └─► No Invite Code? ──► REJECT ──► Error Message    β”‚
β”‚                                                              β”‚
β”‚  🎨 Existing Artist/Admin ──► Direct Access ──► Dashboard   β”‚
β”‚                                                              β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Key Benefits:

  • βœ… Zero spam or unauthorized access
  • βœ… Clean, focused user base (only team members)
  • βœ… Traceable onboarding (who invited whom)
  • βœ… Automatic role assignment based on invite type

Client Flow: Guest-First Experience

Clients never need to create an account to interact with the studio:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                      CLIENT JOURNEY                          β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                              β”‚
β”‚  πŸ“± Kiosk Check-In                                          β”‚
β”‚     └─► Fill form (Name, Phone, Instagram)                  β”‚
β”‚     └─► Select barrier (Price, Pain, Style)                 β”‚
β”‚     └─► Enter Artist PIN                                    β”‚
β”‚     └─► Receive 10% OFF Coupon                              β”‚
β”‚     └─► Saved as KioskEntry (Studio's DB)                   β”‚
β”‚                                                              β”‚
β”‚  πŸ›οΈ Marketplace Shopping                                    β”‚
β”‚     └─► Browse products                                     β”‚
β”‚     └─► Add to cart                                         β”‚
β”‚     └─► Checkout (Guest or Logged)                          β”‚
β”‚     └─► Order saved to Studio's DB                          β”‚
β”‚                                                              β”‚
β”‚  πŸ“‹ Anamnesis Form                                          β”‚
β”‚     └─► Fill medical/tattoo questionnaire                   β”‚
β”‚     └─► Linked to booking via QR code                       β”‚
β”‚     └─► Stored in Booking context                           β”‚
β”‚                                                              β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Data Storage Strategy:

  • KioskEntry β†’ Lead generation, first-time visitors
  • Booking.client β†’ Confirmed appointments
  • Order.client β†’ Marketplace purchases
  • Anamnesis β†’ Medical/consent forms

All client data is scoped to the workspace, ensuring studios maintain full ownership and LGPD compliance.


πŸš€ Core Features

Professional Dashboard

Studio Management

Kiosk Experience

Kiosk Interface

Marketplace

Marketplace

Scheduling System

Agenda


1. Professional Dashboard

  • πŸ“Š Real-time studio metrics (revenue, bookings, settlements)
  • 🎨 Artist portfolio management
  • πŸ“… Integrated Google Calendar sync
  • πŸ’° Financial settlement tracking with AI validation
  • πŸ‘₯ Team management with invite system

2. Kiosk Experience

  • 🎯 Lead capture with gamified "INK PASS" system
  • πŸ“± WhatsApp integration for instant communication
  • 🎁 Automatic coupon generation (10% off first tattoo)
  • πŸ” Artist PIN validation for fraud prevention
  • πŸ“Š Real-time sync progress visualization

3. Marketplace

  • πŸ›’ Product catalog (flash tattoos, merchandise)
  • πŸ’³ Integrated payment processing
  • πŸ“¦ Order management with artist commission tracking
  • 🎨 Artist-specific product listings

4. Financial System & Mathematical Split

  • πŸ’Έ Unified Settlement Flow (tattoos + marketplace)
  • πŸ“Š Dynamic Commission Rate:
    • Resident Artists: 30% baseline commission for the studio, dynamically dropping to 20% once the artist accumulates R$ 10.000,00 in monthly earnings.
    • Guest/Associated Artists: Locked at 30% fixed commission rate, matching the initial resident rate.
  • πŸ€– AI-Powered Receipt Validation (Vision Agent simulation)
  • 🏦 PIX Integration for instant payment tracking and settlement approvals

5. Booking & Stretcher Management (Studio Capacity)

  • πŸ“… Multi-Artist Studio Timeline: Slot-based calendar layout checking workspace bounds (max capacity $\le 3$ active stretchers).
  • πŸ›οΈ Physical Stretcher Selection (macaId 1-20): Artists can manually choose a physical stretcher when creating appointments via createBooking with synchronous conflict detection.
  • πŸ”„ Intelligent Auto-Allocation Fallback: Seamless automatic slot selection for clients, finding the first available physical stretcher sequence.
  • πŸ“‹ Integrated Anamnesis Forms linked to booking context via dynamic QR codes.

6. Gamification: Soul Sync Engine

  • πŸ… Liquid Chrome / Metallic Achievements: 3D high-fidelity metallic badges representing real milestones (FIRST_INK, HIGH_ROLLER, PERFECT_WEEK, LEGENDARY_ARTIST).
  • πŸ“ˆ RPG Progression Engine: Core square-root level progression model: $$Level = \lfloor\sqrt{XP/100}\rfloor + 1$$
  • πŸ† Dynamic Custom Ranks (e.g., Iniciado da Tinta, TecelΓ£o do Tempo, TitΓ£ do Kronos) with dedicated badge designs in /public/assets/gamification/badges.

πŸ› οΈ Tech Stack

Frontend

  • Next.js 15 (App Router, Server Components)
  • TypeScript (Strict mode)
  • Tailwind CSS (Custom design system)
  • Framer Motion (Animations)
  • Lucide Icons (UI icons)

Backend & Authentication

  • Prisma ORM (PostgreSQL)
  • Clerk Authentication (SSO-first entry gate)
    • Anti-friction onboarding gate collecting and normalizing artist details without Brazilian carrier SMS barriers.
    • Synchronous custom auth sync to prevent phantom administrative entries.
  • Server Actions (Type-safe API)
  • Resend (Email delivery)

Testing & Quality Assurance

  • Vitest (Unit testing engine)
  • 55 automated unit tests protecting:
    • Financial splits, product markups, and coupon deduction mathematics.
    • Gamification XP scaling, level boundaries, and achievements.
    • Dynamic macaId input integrity and validations on bookingSchema (Zod).

πŸ§ͺ Testing and Quality Gates

The core business logic is heavily audited and guarded by Vitest. To run the full test suite in isolation:

# Run unit tests
npx vitest run --root .

All 55 core operations will be checked, including edge-case limits, decimal divisions, and validation schemas.


πŸ“¦ Installation

Prerequisites

  • Node.js 18+
  • PostgreSQL database
  • Clerk Account (for auth)
  • Resend API key (for emails)

Setup

  1. Clone the repository

    git clone https://github.com/SH1W4/kronos-sync.git
    cd kronos-sync/kronos
  2. Install dependencies

    npm install
  3. Configure environment variables

    cp .env.example .env

    Required variables:

    DATABASE_URL="postgresql://..."
    NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY="pk_..."
    CLERK_SECRET_KEY="sk_..."
    
    # Email (Resend)
    RESEND_API_KEY="re_..."
    RESEND_FROM_EMAIL="KRONOS SYNC <acesso@yourdomain.com>"
  4. Initialize database

    npx prisma generate
    npx prisma db push
  5. Run development server

    npm run dev
  6. Access the application

    • App: http://localhost:3000
    • Kiosk: http://localhost:3000/kiosk

🚧 Operational Roadmap

Phase 1: Foundation & Sovereignty (Q1-Q2 2025) β€” Done βœ…

  • Professional Gate: Invitation-only Clerk SSO onboarding bypass.
  • Kiosk Lead Capture System: Gamified "INK PASS" lead entry & coupon generator.
  • Gamification Core (Soul Sync): Square-root progression engine.
  • Liquid Chrome Achievement Assets: Metallic 3D achievements integrated.

Phase 2: Capacity & Financial Control (Q3-Q4 2025) β€” Done βœ…

  • Studio Capacity Management: Physical stretcher allocation (macaId 1-20) and calendar booking conflict checks.
  • Dynamic Commission Split: Automated resident commission scaling (30% $\rightarrow$ 20% over R$ 10k) and guest fixed 30% rate.
  • Vitest Quality Gate: 55 automated unit tests protecting formulas.
  • AI Vision Simulation: Dynamic settlement validation OCR logic.

Phase 3: Integration & Expansion (Q1-Q2 2026) β€” Active πŸš€

  • Omnichannel WhatsApp CRM: Trigger automated notifications, coupons, and check-in confirmation dynamically.
  • Sovereign Wallet & Real PIX Split: Instant PIX payout integrations.
  • Extended BI Dashboard: Operational analytics, heatmaps of studio capacity, and artist rankings.

πŸ“„ License

This project is proprietary software. All rights reserved.


πŸ‘₯ Team

Built by Symbeon Labs

For inquiries: Contact


πŸ™ Acknowledgments

  • Design inspiration: Arrival (2016), Cyberpunk 2077
  • UI/UX: Vercel, Linear, Stripe
  • Community: Next.js, Prisma, Tailwind CSS

KRONØS SYNC - Where Art Meets Technology

Deploy with Vercel

About

KAIROS OS: Sovereign gamification and studio sync suite for elite tattoo artists.

Topics

Resources

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors