Skip to content

Harveyhase68/scoriet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

59 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Scoriet

Enterprise Code Generator with Intelligent Templating

Laravel React TypeScript Inertia.js License: MIT

Live Demo β€’ Work in Progress β€’ πŸ“‹ Installation β€’ Documentation β€’ Contributing


πŸš€ About Scoriet

Scoriet is a modern enterprise code generator that revolutionizes development workflows through intelligent templating and automation. Built as a complete rewrite of the original WinDev application, it now leverages cutting-edge web technologies to provide a seamless, browser-based development experience.

✨ Key Features

  • πŸ—„οΈ Advanced SQL Parser - Parse MySQL schemas with intelligent relationship detection
  • 🎯 Template Engine - Powerful client-side template execution with JavaScript integration
  • πŸ–₯️ Modern MDI Interface - Professional dock-based UI with floating panels
  • πŸ”’ Enterprise Security - Laravel Passport OAuth2 with Password Grant authentication
  • πŸ‘€ User Management - Complete registration, login, and profile management system
  • πŸ” JWT Token Authentication - Secure API access with Bearer tokens
  • ⚑ Real-time Generation - Instant code generation without server processing
  • πŸ”§ Flexible Templates - Stack multiple templates for complex application scaffolding

πŸ—οΈ Architecture

Frontend Stack:

  • React 19 with TypeScript
  • RC Dock for MDI interface
  • Tailwind CSS 4.0 for styling
  • Ant Design Icons
  • Vite for lightning-fast builds

Backend Stack:

  • Laravel 12 with PHP 8.2+
  • Inertia.js for seamless SPA experience
  • Laravel Passport for API security
  • Multi-database support (MySQL, PostgreSQL, SQLite, SQL Server)

Template System:

  • Client-side JavaScript execution
  • Flexible placeholder system ({projectname}, {tablename})
  • Advanced loop constructs ({for %}{endfor})
  • Stackable template composition

πŸ“‹ Requirements

  • PHP β‰₯ 8.2 with extensions: mbstring, xml, bcmath, pdo, tokenizer
  • Composer β‰₯ 2.0
  • Node.js β‰₯ 18.0 & npm β‰₯ 9.0
  • Database: MySQL 8.0+ / PostgreSQL 13+ / SQLite 3.8+ / SQL Server 2019+
  • Memory: 512MB RAM minimum (2GB+ recommended)

πŸš€ Getting Started

πŸ“‹ For detailed Windows installation instructions, see INSTALLATION.md

⚑ Quick Start

1️⃣ Clone & Install

# Clone the repository
git clone https://github.com/harveyhase68/scoriet.git
cd scoriet

# Install dependencies
composer install
npm install

2️⃣ Environment Setup

# Copy environment file
cp .env.example .env

# Generate application key
php artisan key:generate

# Configure your database in .env
# Edit the following variables:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=scoriet
DB_USERNAME=your_username
DB_PASSWORD=your_password

3️⃣ Database Setup

# Create database (MySQL example)
mysql -u root -p -e "CREATE DATABASE scoriet CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;"

# Run migrations
php artisan migrate

# (Optional) Seed sample data
php artisan db:seed

4️⃣ Authentication Setup

# Install Laravel Passport for API authentication
php artisan passport:install

# Create OAuth clients for authentication
php artisan passport:client --password --name="Scoriet Password Grant Client"
php artisan passport:client --personal --name="Scoriet Personal Access Client"

# Update .env with the Password Grant Client credentials
# VITE_PASSPORT_CLIENT_ID=your-password-grant-client-id
# VITE_PASSPORT_CLIENT_SECRET=your-password-grant-client-secret

πŸ› οΈ Development

Start Development Server

# πŸš€ All-in-one development server (recommended)
# Runs Laravel server + queue worker + Vite dev server
composer run dev

# πŸ”₯ With Server-Side Rendering
composer run dev:ssr

# βš™οΈ Manual start (for debugging)
php artisan serve --host=10.0.0.8 --port=8000  # Backend
php artisan queue:listen --tries=1              # Queue worker
npm run dev                                       # Frontend

Access Points

πŸ” Authentication System

Scoriet includes a complete authentication system with OAuth2 Password Grant:

Registration & Login

  • Registration: Create new user accounts with email verification
  • Login: Secure OAuth2 authentication with JWT tokens
  • Profile Management: Update user details and change passwords
  • Token Management: Automatic token refresh and secure storage

API Authentication

# Example: Login via OAuth2 Password Grant
curl -X POST http://10.0.0.8:8000/api/oauth/token \
  -H "Content-Type: application/json" \
  -d '{
    "grant_type": "password",
    "client_id": "your-client-id",
    "client_secret": "your-client-secret", 
    "username": "user@example.com",
    "password": "userpassword"
  }'

# Example: Access protected routes
curl -X GET http://10.0.0.8:8000/api/user \
  -H "Authorization: Bearer your-access-token"

Available Authentication Endpoints

  • POST /api/auth/register - User registration
  • POST /api/oauth/token - OAuth2 token exchange
  • GET /api/user - Get authenticated user
  • PUT /api/profile/update - Update user profile
  • PUT /api/profile/password - Change password
  • POST /api/auth/forgot-password - Password reset request
  • POST /api/auth/reset-password - Password reset confirmation

Development Features

  • ⚑ Hot Reload - Instant UI updates
  • πŸ” Debug Toolbar - Laravel Debugbar (when enabled)
  • πŸ“ Logging - Real-time logs with php artisan pail
  • 🎨 Live Styling - Tailwind CSS with JIT compilation

πŸ§ͺ Testing

# Run all tests with Pest PHP
composer run test

# Alternative command
php artisan test

# Run specific test suites
php artisan test --testsuite=Feature
php artisan test --testsuite=Unit

# Run tests with coverage
php artisan test --coverage

# Run tests in parallel (faster)
php artisan test --parallel

Test Structure

  • Feature Tests: tests/Feature/ - End-to-end functionality
  • Unit Tests: tests/Unit/ - Individual component testing
  • Browser Tests: Coming soon with Laravel Dusk

πŸš€ Production Deployment

Build Assets

# Build for production
npm run build

# Build with Server-Side Rendering
npm run build:ssr

# Optimize Laravel
php artisan optimize
php artisan config:cache
php artisan route:cache
php artisan view:cache

Production Checklist

  • Set APP_ENV=production in .env
  • Set APP_DEBUG=false in .env
  • Configure production database
  • Set up proper APP_URL
  • Configure mail settings
  • Set up SSL certificate
  • Configure proper file permissions
  • Set up backup strategy
  • Configure monitoring (logs, errors)

Server Requirements

# Web server configuration
# Point document root to /public
# Enable mod_rewrite (Apache) or try_files (Nginx)

# File permissions
chmod -R 755 storage bootstrap/cache
chown -R www-data:www-data storage bootstrap/cache

🎯 Code Quality & Development Tools

Frontend Quality Tools

# 🎨 Code formatting with Prettier
npm run format        # Format all files
npm run format:check  # Check formatting without changes

# πŸ” Linting with ESLint
npm run lint          # Lint and auto-fix issues

# πŸ“ TypeScript validation
npm run types         # Type checking without compilation

Backend Quality Tools

# 🎨 PHP Code formatting with Laravel Pint
./vendor/bin/pint

# πŸ” Static analysis with PHPStan (if configured)
./vendor/bin/phpstan analyse

# πŸ“‹ Code style checking
php artisan pint --test

Git Hooks & CI/CD

# Pre-commit hooks (recommended setup)
npm install --save-dev husky lint-staged
npx husky init

# Add to package.json:
# "lint-staged": {
#   "*.{js,jsx,ts,tsx}": ["eslint --fix", "prettier --write"],
#   "*.php": ["./vendor/bin/pint"]
# }

πŸ”§ Troubleshooting

Common Issues & Solutions

Permission Errors

# Fix Laravel permissions
chmod -R 755 storage bootstrap/cache
chown -R www-data:www-data storage bootstrap/cache  # Linux/Mac

# Windows (run as Administrator)
icacls storage /grant Users:F /T
icacls bootstrap/cache /grant Users:F /T

Dependency Issues

# Clear and reinstall Node dependencies
rm -rf node_modules package-lock.json
npm install

# Clear and reinstall Composer dependencies
rm -rf vendor composer.lock
composer install

# Regenerate autoload files
composer dump-autoload

Laravel Cache Issues

# Clear all Laravel caches
php artisan optimize:clear
php artisan cache:clear
php artisan config:clear
php artisan route:clear
php artisan view:clear

Database Issues

# Reset database
php artisan migrate:fresh --seed

# Check database connection
php artisan tinker
# In tinker: DB::connection()->getPdo();

Vite/Asset Issues

# Clear Vite cache
rm -rf node_modules/.vite
npm run dev

# Rebuild assets
npm run build

Getting Help


πŸ“š Documentation

Project Structure

scoriet/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ Http/Controllers/     # Laravel controllers
β”‚   β”œβ”€β”€ Models/              # Eloquent models
β”‚   └── Services/            # Business logic (SQL Parser, etc.)
β”œβ”€β”€ resources/
β”‚   β”œβ”€β”€ js/
β”‚   β”‚   β”œβ”€β”€ Components/      # React components
β”‚   β”‚   β”œβ”€β”€ pages/          # Inertia.js pages
β”‚   β”‚   └── types/          # TypeScript definitions
β”‚   └── css/                # Stylesheets
β”œβ”€β”€ routes/                 # Laravel routes
β”œβ”€β”€ tests/                 # Test files
└── database/              # Migrations, seeders, factories

Key Technologies

API Reference

Coming soon - comprehensive API documentation with examples.

🀝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

Development Workflow

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes
  4. Run tests: composer run test
  5. Run quality checks: npm run lint && npm run types
  6. Commit changes: git commit -m 'Add amazing feature'
  7. Push to branch: git push origin feature/amazing-feature
  8. Create a Pull Request

Code Style

  • PHP: Follow PSR-12 standards, use Laravel Pint
  • JavaScript/TypeScript: Use ESLint + Prettier configuration
  • Commits: Use conventional commit format

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • Built with the assistance of Claude, ChatGPT, Gemini, and Builder.io AI
  • Inspired by the original WinDev implementation
  • Thanks to the Laravel and React communities

⭐ Star this project if you find it helpful!

Made with ❀️ for the developer community

About

Scoriet - A Laravel, React, Javascript Code Generator with Templates

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published