Skip to content

Latest commit

Β 

History

57 Commits

Folders and files

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

Repository files navigation

πŸ₯‹ Ronin - AI Agent Master Controller

Ronin is a comprehensive AI agent master controller that unifies multiple LLM providers and automatically switches between them based on project needs and token availability. Available as both a modern web application and a native Windows desktop application.

Name: From the Japanese term for exiled samurai - a skilled warrior that masters many disciplines.

🌟 Features

Core Features

  • πŸ€– Multi-LLM Management - Switch between free LLMs automatically when tokens run out
  • πŸ“Š Project Management - Create and manage AI-assisted projects
  • βš”οΈ Ranking System - Kyokushin belt-style ranking (kyu/dan) based on completed projects
  • πŸ§ͺ Automated Testing - Test project completion and correctness automatically
  • πŸ” User Authentication - Secure JWT-based authentication
  • πŸ’° Free Token Management - Track and optimize LLM token usage

Deployment Options

  • 🌐 Web Application - Access from any browser (responsive design)
  • πŸ–₯️ Windows Desktop App - Native desktop experience with installer
  • ☁️ Cloud Hosting - Deployed on Heroku with auto-scaling

πŸš€ Quick Start

Fastest Way (Windows)

# One-click setup (installs everything)
setup.bat

# Start all services
npm run dev

# Open in browser: http://localhost:5173

See QUICKSTART_WINDOWS.md for step-by-step guide.

Manual Setup

# Install dependencies
npm run setup

# Start development environment
npm run dev

# Or run individual services
npm run dev:backend    # Backend API
npm run dev:web        # Web app
npm run dev:desktop    # Desktop app

πŸ“‹ Table of Contents

πŸ“ Project Structure

ronin/
β”œβ”€β”€ backend/              # Java/Spring Boot REST API
β”‚   β”œβ”€β”€ src/main/         # Source code
β”‚   β”œβ”€β”€ src/test/         # Unit tests
β”‚   β”œβ”€β”€ pom.xml           # Maven configuration
β”‚   └── README.md
β”‚
β”œβ”€β”€ frontend/             # React/TypeScript web application
β”‚   β”œβ”€β”€ src/              # React components and pages
β”‚   β”œβ”€β”€ vite.config.ts    # Vite configuration
β”‚   β”œβ”€β”€ package.json      # npm dependencies
β”‚   └── README.md
β”‚
β”œβ”€β”€ desktop/              # Electron Windows desktop application
β”‚   β”œβ”€β”€ electron/         # Main process code
β”‚   β”œβ”€β”€ build/            # App assets and icons
β”‚   β”œβ”€β”€ installers/       # NSIS installer config
β”‚   β”œβ”€β”€ package.json      # Electron configuration
β”‚   └── README.md
β”‚
β”œβ”€β”€ vscode-extension/     # VS Code extension for Ronin
β”‚   β”œβ”€β”€ src/              # Extension source code
β”‚   β”œβ”€β”€ package.json      # Extension manifest and scripts
β”‚   └── README.md
β”‚
β”œβ”€β”€ test-runner/          # Automated test execution
β”‚   └── README.md
β”‚
β”œβ”€β”€ MULTI_PLATFORM.md     # Architecture overview (WEB + DESKTOP)
β”œβ”€β”€ DEVELOPMENT.md        # Development workflow guide
β”œβ”€β”€ QUICKSTART_WINDOWS.md # Windows quick start
β”œβ”€β”€ ARCHITECTURE.md       # System architecture diagrams
└── DESKTOP_BUILD_CHECKLIST.md # Release checklist

πŸ—οΈ Technology Stack

Backend

  • Framework: Spring Boot 3.x
  • Language: Java 11+
  • Database: MySQL / PostgreSQL
  • Build: Maven
  • Authentication: JWT
  • ORM: Hibernate/JPA

Frontend (Web + Desktop)

  • Framework: React 19
  • Language: TypeScript
  • Build: Vite
  • Styling: Tailwind CSS
  • Testing: Vitest + React Testing Library
  • Router: React Router v7

Desktop

  • Framework: Electron 33
  • Packaging: electron-builder
  • Installer: NSIS (Windows)
  • IPC: Electron IPC bridge

DevOps

  • Web Hosting: Heroku
  • Container: Docker
  • CI/CD: GitHub Actions (ready to integrate)
  • Database Migrations: Flyway

πŸ“¦ Installation

Prerequisites

Setup Steps

  1. Clone Repository

    git clone https://github.com/your-org/ronin.git
    cd ronin
  2. Run Setup Script

    # Windows
    setup.bat
    
    # macOS/Linux
    npm run setup
  3. Start Development

    npm run dev
  4. Access Applications

See DEVELOPMENT.md for detailed setup.

πŸ’» Development

Development Commands

# Start all services together
npm run dev

# Start individual services
npm run dev:backend     # Java/Spring Boot only
npm run dev:web         # React dev server only
npm run dev:desktop     # Electron desktop app

# Build all components
npm run build

# Run all tests
npm run test

# Create desktop installers
npm run desktop:dist

File Structure by Component

Backend:

backend/src/main/java/com/ronin/
β”œβ”€β”€ auth/              # Authentication logic
β”œβ”€β”€ code/              # Code generation
β”œβ”€β”€ common/            # Shared utilities
β”œβ”€β”€ config/            # Spring configuration
β”œβ”€β”€ llm/               # LLM provider integration
β”œβ”€β”€ projects/          # Project management
β”œβ”€β”€ ranking/           # Ranking system (kyu/dan)
β”œβ”€β”€ tests/             # Test execution
└── users/             # User management

Frontend:

frontend/src/
β”œβ”€β”€ pages/
β”‚   β”œβ”€β”€ Dashboard.tsx   # Project overview
β”‚   β”œβ”€β”€ Login.tsx       # User login
β”‚   β”œβ”€β”€ Signup.tsx      # User registration
β”‚   └── ...
β”œβ”€β”€ components/
β”‚   β”œβ”€β”€ Header.tsx      # Navigation
β”‚   β”œβ”€β”€ Sidebar.tsx     # Side menu
β”‚   β”œβ”€β”€ ProjectCard.tsx # Project display
β”‚   └── ...
β”œβ”€β”€ api.ts             # HTTP client
└── main.tsx           # Entry point

Desktop:

desktop/
β”œβ”€β”€ electron/
β”‚   β”œβ”€β”€ main.ts        # Main process
β”‚   β”œβ”€β”€ window.ts      # Window management
β”‚   β”œβ”€β”€ preload.ts     # IPC bridge
β”‚   └── utils.ts       # Utilities
└── build/             # App icons and assets

Making Changes

  1. Backend Changes β†’ Auto-reload via Spring Boot Dev Tools
  2. Frontend Changes β†’ Hot reload via Vite
  3. Desktop Changes β†’ Manually reload Electron (Ctrl+R)

See DEVELOPMENT.md for workflow details.

πŸ—οΈ Building

Build All Components

npm run build

This creates:

  • backend/target/backend-0.0.1-SNAPSHOT.jar
  • frontend/dist/ (static files)
  • desktop/dist/ (Electron app)

Build Desktop Application

cd desktop

# Create Windows installers
npm run dist:win

# Create only portable executable
npm run dist:portable

Output Files:

  • desktop/dist/Ronin-{version}-Setup.exe - Full installer
  • desktop/dist/Ronin-{version}.exe - Portable version

See DESKTOP_BUILD_CHECKLIST.md for release checklist.

πŸš€ Deployment

Web Application (Heroku)

# Deploy to Heroku
git push heroku main

# View logs
heroku logs --tail

See HEROKU_DEPLOYMENT.md for detailed setup.

Desktop Application

  1. Build installers: npm run desktop:dist
  2. Upload to GitHub Releases or distribution server
  3. Users download Ronin-{version}-Setup.exe
  4. Run installer or portable exe

πŸ“Š Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚    Web Browser / Desktop App         β”‚
β”‚    (React + Tailwind CSS)            β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                   β”‚
        HTTP/REST  β”‚
                   β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Backend API (Spring Boot)          β”‚
β”‚   β€’ Authentication                   β”‚
β”‚   β€’ Project Management               β”‚
β”‚   β€’ LLM Integration                  β”‚
β”‚   β€’ Test Execution                   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                   β”‚
        SQL        β”‚
                   β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Database (MySQL / PostgreSQL)      β”‚
β”‚   β€’ Users & Ranks                    β”‚
β”‚   β€’ Projects & Tests                 β”‚
β”‚   β€’ LLM Usage Tracking               β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

See ARCHITECTURE.md for detailed system architecture.

πŸ§ͺ Testing

Run All Tests

npm run test

Test by Component

npm run test:backend    # Maven/JUnit tests
npm run test:web        # Vitest/React tests
npm run test:desktop    # Electron build test

πŸ”’ Security

  • JWT token-based authentication
  • Password hashing with bcrypt
  • SQL injection protection via parameterized queries
  • CORS properly configured
  • Input validation on frontend and backend
  • Secure IPC in desktop app

πŸ“š Documentation

🀝 Contributing

  1. Create a feature branch: git checkout -b feature/my-feature
  2. Make changes and test: npm run test
  3. Commit changes: git commit -m "Add feature"
  4. Push to branch: git push origin feature/my-feature
  5. Create a Pull Request

πŸ› Troubleshooting

Backend Issues

  • Check Java is installed: java -version
  • Check Maven: mvn -version
  • View logs: backend/target/spring.log

Frontend Issues

  • Clear cache: cd frontend && rm -rf node_modules dist && npm install
  • Check Node.js: node -v
  • Try: npm run build

Desktop Issues

  • Ensure backend is running: npm run dev:backend
  • Check port 5173 is free
  • Clear desktop cache: cd desktop && rm -rf dist node_modules && npm install

See DEVELOPMENT.md troubleshooting section for more.

🎯 Roadmap

Current Version (v1.0.0)

  • βœ… Multi-LLM support with auto-switching
  • βœ… Project management
  • βœ… Automated testing
  • βœ… Web application
  • βœ… Windows desktop application
  • βœ… Ranking system (kyu/dan)

Planned Features

  • Auto-update mechanism for desktop app
  • Offline functionality
  • System tray integration
  • Desktop notifications
  • Advanced analytics
  • Mobile application
  • Code signing for releases
  • macOS and Linux desktop versions

πŸ“ž Support

πŸ“„ License

MIT License - See LICENSE file for details

πŸ‘₯ Team

  • Backend Lead: [Name]
  • Frontend Lead: [Name]
  • Desktop/DevOps: [Name]
  • QA Lead: [Name]

πŸ™ Acknowledgments

  • Spring Boot community
  • React community
  • Electron community
  • Tailwind CSS team
  • All contributors

Quick Reference

Command Purpose
npm run setup Install all dependencies
npm run dev Start all services
npm run build Build all components
npm run test Run all tests
npm run desktop:dist Create Windows installers

Ready to get started? See QUICKSTART_WINDOWS.md or DEVELOPMENT.md.


Made with βš”οΈ by Ronin Development Team

About

Build AI-backed projects - The ultimate truth society

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages