eru123 / aibase
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
Requires
- phpmailer/phpmailer: ^7.0
- vlucas/phpdotenv: ^5.6
- zordius/lightncandy: ^1.2
Requires (Dev)
- robmorgan/phinx: ^0.13
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 triggerspnpm installautomatically.
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
- Frontend:
http://localhost:5173 - API base: http://localhost:8000/api
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:
- Update branding vars in
.env(VITE_APP_NAME, company labels, etc.). - Review user roles/permissions in backend services and UI route gating.
- Replace sample email template content with your product messaging.
- Configure SMTP settings via the System Settings admin panel.
- Add domain modules in
src/pages+api/Controllers|Services|Modelsusing current architecture boundaries.
Documentation Index
- Getting Started
- API Reference
- Deployment Guide
- Contributing Guide
- Caching Notes
- Email Service
- Implementation Scope
License
Proprietary (see composer.json).