eru123/aibase

Maintainers

Details

github.com/eru123/aibase

Source

Issues

Fund package maintenance!
eru123
paypal.me/ja1030

Installs: 2

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

Language:TypeScript

Type:project

pkg:composer/eru123/aibase

dev-main 2026-02-23 11:44 UTC

This package is auto-updated.

Last update: 2026-02-23 19:58:35 UTC


README

AI Base is a production-minded starter template for building internal platforms and SaaS control panels with a PHP 8.2+ API and a React + Vite + TypeScript frontend.

It gives you a strong foundation out of the box:

  • Authentication + session management (login, refresh, logout, profile).
  • Admin onboarding + invitation flows.
  • System settings modules (security, SMTP, company).
  • Email template management and send tooling.
  • Audit logging and error logging primitives.
  • A reusable Tailwind + Radix component system.

Why this template exists

Most teams lose time rebuilding the same platform concerns (auth, settings, logs, admin UX) before shipping domain features. AI Base is designed to remove that friction while keeping architecture clean, explicit, and extensible.

Tech Stack

  • Frontend: React 18, TypeScript, Vite, Tailwind CSS, Radix UI, React Query, React Hook Form + Zod
  • Backend: PHP 8.2+, PSR-4 service/controller/model structure
  • Database: MySQL + Phinx migrations
  • Tooling: ESLint, TypeScript checks, Composer, pnpm

Starter Quick Start

1) Create project

composer create-project eru123/aibase my-app -s dev
cd my-app

This automatically installs Composer and pnpm dependencies, and creates your .env file.

Already cloned? Just run composer install — it also triggers pnpm install automatically.

2) Configure environment

Update .env as needed (database + app URLs + optional branding values).

3) Create database and run migrations

mysql -u root -p -e "CREATE DATABASE aibase;"
pnpm db:migrate

4) Start development server

pnpm dev

pnpm dev starts both the Vite frontend and the PHP backend server.

5) Open the app

Validation Commands

Run these before opening a PR:

pnpm lint
pnpm type-check
pnpm build

If backend logic changes, also run relevant PHP checks (for example, migration command sanity checks and endpoint smoke tests).

Project Structure

src/                # React pages, layouts, hooks, shared UI components
api/Controllers/    # HTTP endpoint orchestration
api/Services/       # Business logic and cross-cutting concerns
api/Models/         # Data persistence and query logic
db/migrations/      # Database schema history
docs/               # Setup, architecture, deployment, API docs

Template Customization Checklist

When adapting this starter for your own product, do at least the following:

  1. Update branding vars in .env (VITE_APP_NAME, company labels, etc.).
  2. Review user roles/permissions in backend services and UI route gating.
  3. Replace sample email template content with your product messaging.
  4. Configure SMTP settings via the System Settings admin panel.
  5. Add domain modules in src/pages + api/Controllers|Services|Models using current architecture boundaries.

Documentation Index

License

Proprietary (see composer.json).