|
11 | 11 |
|
12 | 12 | PSFS is a lightweight PHP framework for MVC/API applications (Twig + Propel + Symfony components). |
13 | 13 |
|
14 | | -## 5-minute setup |
| 14 | +## Quick Install (Copy/Paste) |
15 | 15 |
|
16 | | -Prerequisites: |
| 16 | +Requirements: |
| 17 | +- `bash` |
| 18 | +- `docker compose` or `php + composer` |
17 | 19 |
|
18 | | -- Docker + Docker Compose |
19 | | -- Git |
| 20 | +Using `curl`: |
20 | 21 |
|
21 | | -<!-- validated --> |
22 | 22 | ```bash |
23 | | -docker compose up -d |
24 | | -docker compose ps |
25 | | -docker exec core-php-1 php -v |
26 | | -docker exec core-php-1 composer install --no-interaction --prefer-dist |
| 23 | +curl -fsSL https://raw.githubusercontent.com/psfs/core/master/install.sh | bash |
27 | 24 | ``` |
28 | 25 |
|
29 | | -If your PHP container name is not `core-php-1`: |
| 26 | +Using `wget`: |
30 | 27 |
|
31 | | -<!-- validated --> |
32 | 28 | ```bash |
33 | | -docker compose ps |
34 | | -docker ps --format '{{.Names}}' |
| 29 | +wget -qO- https://raw.githubusercontent.com/psfs/core/master/install.sh | bash |
35 | 30 | ``` |
36 | 31 |
|
37 | | -## Daily command map |
| 32 | +The installer downloads and runs the official PSFS project generator. |
38 | 33 |
|
39 | | -<!-- example-only --> |
40 | | -```bash |
41 | | -# Run key tests |
42 | | -docker exec core-php-1 php vendor/bin/phpunit --no-coverage --filter '/(AuthApiTest|RequestResponseSecurityContractTest)/' |
| 34 | +## Create a Project |
43 | 35 |
|
44 | | -# List PSFS CLI commands |
45 | | -docker exec core-php-1 php src/bin/psfs list |
| 36 | +Interactive: |
46 | 37 |
|
47 | | -# Security local pre-check (act) |
48 | | -act push --container-architecture linux/amd64 |
| 38 | +```bash |
| 39 | +./scripts/create-psfs-project.sh |
49 | 40 | ``` |
50 | 41 |
|
51 | | -## Choose your path |
52 | | - |
53 | | -### Onboarding path |
| 42 | +Non-interactive: |
54 | 43 |
|
55 | | -1. Read [Operations Playbook](./doc/OPERATIONS.md) |
56 | | -2. Read [DTO Validation Engine](./doc/DTO_VALIDATION.md) |
57 | | -3. Execute the "First day" flow |
58 | | -4. Use troubleshooting matrix when blocked |
59 | | - |
60 | | -### Core contributor path |
| 44 | +```bash |
| 45 | +./scripts/create-psfs-project.sh \ |
| 46 | + --non-interactive \ |
| 47 | + --name my-psfs-app \ |
| 48 | + --path /tmp/my-psfs-app \ |
| 49 | + --runtime docker \ |
| 50 | + --package acme/my-psfs-app \ |
| 51 | + --description "My PSFS app" \ |
| 52 | + --author "Your Name" |
| 53 | +``` |
61 | 54 |
|
62 | | -1. Read [Operations Playbook](./doc/OPERATIONS.md) |
63 | | -2. Read [DTO Validation Engine](./doc/DTO_VALIDATION.md) |
64 | | -3. Read [Propel Workflow](./doc/PROPEL_WORKFLOW.md) |
65 | | -4. Run key tests and validate changes in Docker |
| 55 | +Remote install with flags: |
66 | 56 |
|
67 | | -## Propel models and migrations |
| 57 | +```bash |
| 58 | +curl -fsSL https://raw.githubusercontent.com/psfs/core/master/install.sh | bash -s -- \ |
| 59 | + --non-interactive \ |
| 60 | + --name my-psfs-app \ |
| 61 | + --runtime docker \ |
| 62 | + --package acme/my-psfs-app |
| 63 | +``` |
68 | 64 |
|
69 | | -For operational Propel flow (schema, model generation context, migration execution, rollback, failure modes), see: |
| 65 | +## What the Generator Does |
70 | 66 |
|
71 | | -- [Propel Workflow](./doc/PROPEL_WORKFLOW.md) |
| 67 | +- Detects `local` runtime (`php` + `composer`) and `docker` runtime (`docker compose`). |
| 68 | +- If both are available in interactive mode, prompts for runtime selection. |
| 69 | +- Generates PSFS base structure (`config`, `html`, `modules`, `cache`, `logs`, `locale`). |
| 70 | +- Generates initial `composer.json`. |
| 71 | +- For Docker runtime, generates `docker-compose.yml`, `docker/php.ini`, and `.env.example`. |
| 72 | +- Does not auto-run dependency install or container startup. |
72 | 73 |
|
73 | | -## Documentation index |
| 74 | +## Documentation |
74 | 75 |
|
75 | 76 | - [Operations Playbook](./doc/OPERATIONS.md) |
76 | 77 | - [DTO Validation Engine](./doc/DTO_VALIDATION.md) |
77 | 78 | - [Propel Workflow](./doc/PROPEL_WORKFLOW.md) |
| 79 | +- [Core Contracts](./doc/CONTRACTS.md) |
78 | 80 |
|
79 | | -## Rules |
| 81 | +## Notes |
80 | 82 |
|
81 | | -- Run project commands inside Docker containers. |
82 | | -- Keep command blocks explicitly tagged as `validated` or `example-only`. |
| 83 | +- Runtime baseline for this repository is Docker Compose with PHP 8.3. |
| 84 | +- For project internals and contributor workflows, use the docs listed above. |
0 commit comments