Tina4

Understanding Tina4 - Quick Reference#

🔥 Hot Tips

  • Tina4 is The Intelligent Native Application 4ramework: one package, zero config, convention over configuration
  • Same API across Python, Node.js, PHP, and Ruby: learn one, know all four
  • Routes in src/routes/, templates in src/templates/, ORM in src/orm/, static files in src/public/
  • Zero runtime dependencies in every language

PhilosophyInstallationProject StructureChoosing a LanguageEnvironment


Philosophy#

Tina4 follows the AI framework philosophy. One package. One folder structure. Zero configuration files beyond a .env. You write your code, drop it in the right folder, and Tina4 discovers it.


Installation#

Choose your language:

LanguageScaffoldRun
Pythontina4 init python my-apptina4 serve
Node.jstina4 init nodejs my-apptina4 serve
PHPtina4 init php my-apptina4 serve
Rubytina4 init ruby my-apptina4 serve

Project Structure#

Every Tina4 project follows the same layout regardless of language:

project/  .env                  # Environment configuration  src/    routes/             # API endpoints and page routes    templates/          # Frond/Twig templates    orm/                # Database models    services/           # Background services    migrations/         # Database migrations  src/public/           # Static assets (CSS, JS, images)

Choosing a Language#

All four languages share the same conventions:

  • Python - Best for data science, ML integration, rapid prototyping
  • Node.js - Best for real-time apps, async I/O, one language across browser and server
  • PHP - Best for broad hosting reach, JIT-compiled speed, mature library set
  • Ruby - Best for developer happiness, clean syntax, rapid development

See Chapter 3: Choosing Your Language for a detailed comparison.


Environment Variables#

All configuration lives in a single .env file:

bash
# DatabaseTINA4_DATABASE_URL=sqlite://app.db# ServerPORT=7145TINA4_DEBUG=true# AuthenticationTINA4_SECRET=your-secret-key

See Chapter 4: Environment Variables for the full reference.


📕 Download the book#

Understanding Tina4 (PDF): full reference, printable, with clickable table of contents and PDF outline. Regenerated with every release.