Getting Started with Pramnos Framework¶
Welcome to the Pramnos Framework! This guide will help you set up a new project from scratch using our command-line tools.
Installation¶
The recommended way to start a new project is to use the Pramnos Application. This provides a one-line setup experience that automatically handles the directory structure and framework installation.
- From your projects root directory, run:
Alternatively, if you prefer to manage the process manually or add the framework to an existing project:
- Create your project directory:
- Install the framework:
- Run the initialization command:
The init command will guide you through the setup with smart defaults:
- Application Name: Defaults to the folder name (my-app).
- Namespace: Automatically converted to CamelCase (MyApp).
- Database: Suggested name (my_app_db) and user (my_app_user).
- Docker: Optional but highly recommended containerized setup.
Using Docker¶
If you enabled Docker during initialization, first start your environment:
Note: Ensure Docker and Docker Compose are installed on your host machine.
Helper Scripts¶
./dockerbash: Enter the application container's shell../dockertest: Run your PHPUnit tests inside the Docker environment.
Project Structure¶
A typical Pramnos project following initialization looks like this:
app/: Configuration and Migrations.config/settings.php: Main environment configuration — reads.env, holds no credentials.config/testsettings.php: The same, pointed atAPP_DB_TEST_NAME.
.env: this machine's values — credentials, database name,APP_DEBUG. Not committed..env.example: the committed list of every key, secrets blank. Copy it to.env.src/: Your application logic (Controllers, Models, Views).www/: Public entry point (containsindex.phpand assets).var/: Logs, cache and migration state — machine-local, ignored by git.tests/: Unit and Integration tests.
The Full Setup Guide explains the configuration, the daemons
container and what init puts in .gitignore.
To run your tests, use the following command:
The ./dockertest command runs PHPUnit inside the Docker container (PHP 8.5), ensuring all dependencies and environmental requirements are met. It automatically handles container startup and composer installation if needed.
Creating Entities¶
Once your project is initialized, use the create:* commands to scaffold new components.
The project's CLI is <cli>.php at the project root (myapp.php for the namespace MyApp);
with Docker, ./<cli> runs it inside the container: