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 insrc/templates/, ORM insrc/orm/, static files insrc/public/ - Zero runtime dependencies in every language
Philosophy • Installation • Project Structure • Choosing a Language • Environment
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:
| Language | Scaffold | Run |
|---|---|---|
| Python | tina4 init python my-app | tina4 serve |
| Node.js | tina4 init nodejs my-app | tina4 serve |
| PHP | tina4 init php my-app | tina4 serve |
| Ruby | tina4 init ruby my-app | tina4 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:
# DatabaseTINA4_DATABASE_URL=sqlite://app.db# ServerPORT=7145TINA4_DEBUG=true# AuthenticationTINA4_SECRET=your-secret-keySee 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.