Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dce22c0ced | ||
|
|
ce95ae33b6 | ||
|
|
5e446df042 | ||
|
|
826ee83ca5 | ||
|
|
fef8a941b3 |
@@ -13,7 +13,7 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
token: ${{ secrets.RELEASE_TOKEN }}
|
token: ${{ secrets.REGISTRY_TOKEN }}
|
||||||
persist-credentials: true
|
persist-credentials: true
|
||||||
|
|
||||||
- name: Create next tag from config/version.yaml
|
- name: Create next tag from config/version.yaml
|
||||||
|
|||||||
99
README.md
99
README.md
@@ -1,26 +1,103 @@
|
|||||||
# Coltura
|
# Coltura
|
||||||
|
|
||||||
CRM/ERP - Symfony 8 + API Platform 4 + Nuxt 4
|
CRM/ERP — Symfony 8 (API Platform 4) + Nuxt 4
|
||||||
|
|
||||||
|
## Stack
|
||||||
|
|
||||||
|
- **Backend** : PHP 8.4, Symfony 8, API Platform 4, Doctrine ORM, PostgreSQL 16
|
||||||
|
- **Frontend** : Nuxt 4 (SPA), Vue 3, Pinia, Tailwind CSS, @malio/layer-ui
|
||||||
|
- **Auth** : JWT HTTP-only cookie (Lexik)
|
||||||
|
- **Infra** : Docker Compose (dev + prod multi-stage)
|
||||||
|
- **CI/CD** : Gitea Actions (auto-tag + build Docker)
|
||||||
|
|
||||||
## Quick Start
|
## Quick Start
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
make start # Start Docker containers
|
make start # Demarrer les containers Docker
|
||||||
make install # Install dependencies, run migrations, build frontend
|
make install # Composer, migrations, fixtures, build Nuxt
|
||||||
```
|
```
|
||||||
|
|
||||||
Dev frontend: `make dev-nuxt` (hot reload on port 3003)
|
Dev frontend (hot reload) :
|
||||||
|
|
||||||
|
```bash
|
||||||
|
make dev-nuxt # Port 3003
|
||||||
|
```
|
||||||
|
|
||||||
## Ports
|
## Ports
|
||||||
|
|
||||||
| Service | Port |
|
| Service | Port |
|
||||||
|----------|------|
|
|------------|------|
|
||||||
| API | 8083 |
|
| API (Nginx)| 8083 |
|
||||||
| Frontend | 3003 |
|
| Frontend | 3003 |
|
||||||
| PostgreSQL | 5436 |
|
| PostgreSQL | 5436 |
|
||||||
|
|
||||||
|
## Commandes
|
||||||
|
|
||||||
|
| Commande | Description |
|
||||||
|
|----------|-------------|
|
||||||
|
| `make start` | Demarrer les containers |
|
||||||
|
| `make stop` | Arreter les containers |
|
||||||
|
| `make restart` | Redemarrer les containers |
|
||||||
|
| `make install` | Install complet |
|
||||||
|
| `make reset` | Tout supprimer et reinstaller |
|
||||||
|
| `make dev-nuxt` | Serveur dev Nuxt (hot reload) |
|
||||||
|
| `make shell` | Shell dans le container PHP |
|
||||||
|
| `make cache-clear` | Vider le cache Symfony |
|
||||||
|
| `make migration-migrate` | Lancer les migrations |
|
||||||
|
| `make fixtures` | Charger les fixtures |
|
||||||
|
| `make db-reset` | Reset BDD + migrations + fixtures |
|
||||||
|
| `make test` | PHPUnit |
|
||||||
|
| `make php-cs-fixer-allow-risky` | Fix code style PHP |
|
||||||
|
| `make logs-dev` | Tail logs Symfony |
|
||||||
|
|
||||||
|
## Structure
|
||||||
|
|
||||||
|
```
|
||||||
|
src/ # Backend Symfony
|
||||||
|
Entity/ # Entites Doctrine
|
||||||
|
ApiResource/ # Ressources API Platform
|
||||||
|
State/ # Providers & Processors
|
||||||
|
Repository/ # Repositories Doctrine
|
||||||
|
DataFixtures/ # Fixtures
|
||||||
|
config/ # Config Symfony
|
||||||
|
migrations/ # Migrations Doctrine
|
||||||
|
frontend/ # App Nuxt 4
|
||||||
|
pages/ # Pages Vue
|
||||||
|
layouts/ # Layouts
|
||||||
|
components/ # Composants
|
||||||
|
composables/ # Composables (useApi, useAppVersion)
|
||||||
|
stores/ # Stores Pinia (auth, ui)
|
||||||
|
services/ # Services API + DTOs
|
||||||
|
i18n/ # Traductions
|
||||||
|
infra/
|
||||||
|
dev/ # Docker dev (Dockerfile, nginx, php.ini, xdebug)
|
||||||
|
prod/ # Docker prod (multi-stage, nginx, php-prod.ini)
|
||||||
|
.gitea/workflows/ # CI Gitea (auto-tag, build Docker)
|
||||||
|
```
|
||||||
|
|
||||||
|
## CI/CD
|
||||||
|
|
||||||
|
- **Auto Tag** : push sur `develop` → bump `config/version.yaml` → tag `vX.Y.Z`
|
||||||
|
- **Build Docker** : push tag `v*` → build image multi-stage → push Gitea Registry
|
||||||
|
|
||||||
|
Secrets requis dans Gitea :
|
||||||
|
- `RELEASE_TOKEN` — PAT avec droits `write:repository`
|
||||||
|
- `REGISTRY_TOKEN` — token pour le registry Docker
|
||||||
|
|
||||||
## Credentials (dev)
|
## Credentials (dev)
|
||||||
|
|
||||||
- admin / admin (ROLE_ADMIN)
|
| Username | Password | Role |
|
||||||
- alice / alice (ROLE_USER)
|
|----------|----------|------|
|
||||||
- bob / bob (ROLE_USER)
|
| admin | admin | ROLE_ADMIN |
|
||||||
|
| alice | alice | ROLE_USER |
|
||||||
|
| bob | bob | ROLE_USER |
|
||||||
|
|
||||||
|
## Conventions
|
||||||
|
|
||||||
|
### Commits
|
||||||
|
|
||||||
|
```
|
||||||
|
<type>(<scope optionnel>) : <message>
|
||||||
|
```
|
||||||
|
|
||||||
|
Types : `build`, `chore`, `ci`, `docs`, `feat`, `fix`, `perf`, `refactor`, `revert`, `style`, `test`
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
parameters:
|
parameters:
|
||||||
app.version: '0.1.0'
|
app.version: '0.1.3'
|
||||||
|
|||||||
Reference in New Issue
Block a user