Outils pour utilisateurs

Outils du site


ujusum:1-implantation:1-repository

Repository Initial Complet

Objectif

Ce document décrit le premier livrable logiciel réellement exécutable.

À l'issue de cette étape, un développeur doit pouvoir exécuter :

git clone rental-platform
 
cd rental-platform
 
docker compose up -d
 
pnpm install
 
pnpm dev

et obtenir :

  • Frontend accessible
  • Backend accessible
  • Swagger accessible
  • PostgreSQL accessible
  • Redis accessible
  • Mailhog accessible
  • MinIO accessible

Architecture du repository

rental-platform/

├── apps/
│
│   ├── frontend/
│   └── backend/
│
├── packages/
│
│   ├── sdk/
│   ├── ui/
│   ├── shared/
│   └── eslint-config/
│
├── deployment/
│
│   ├── docker/
│   ├── kubernetes/
│   └── helm/
│
├── docs/
│
├── scripts/
│
├── .github/
│
├── docker-compose.yml
│
├── pnpm-workspace.yaml
│
├── turbo.json
│
└── package.json

Gestionnaire de monorepo

Choix retenu

Turborepo
+
PNPM

package.json racine

{
  "name": "rental-platform",
  "private": true,
  "packageManager": "pnpm@10",
 
  "scripts": {
 
    "dev": "turbo run dev",
 
    "build": "turbo run build",
 
    "lint": "turbo run lint",
 
    "test": "turbo run test"
  }
}

Frontend

Stack

NextJS 15

React 19

TypeScript

Tailwind

TanStack Query

React Hook Form

Zod

shadcn/ui

Structure

apps/frontend

├── src
│
├── app
│
├── components
│
├── features
│
├── generated
│
├── hooks
│
├── providers
│
├── styles
│
└── types

Route de validation

http://localhost:3000

Affichage :

Rental Platform

Frontend OK

Backend

Stack

NestJS

Prisma

PostgreSQL

Redis

Swagger

Passport

JWT

Structure

apps/backend

├── src
│
├── modules
│
├── core
│
├── infrastructure
│
├── shared
│
├── prisma
│
└── test

Endpoint de validation

GET /health

Réponse :

{
  "status": "UP"
}

Swagger

URL

http://localhost:8080/docs

Configuration

const config =
  new DocumentBuilder()
    .setTitle("Rental Platform API")
    .setVersion("1.0.0")
    .addBearerAuth()
    .build();

Prisma

Structure

apps/backend/prisma

├── schema.prisma

├── migrations

├── seed.ts

Première migration

pnpm prisma migrate dev

PostgreSQL

Version

PostgreSQL 16

Base

rental_platform

Utilisateur

rental_admin

Redis

Utilisations

  • Cache
  • Sessions
  • Queue
  • Rate Limiting

URL

redis://localhost:6379

Mailhog

Objectif

Capturer les emails en local.


URL

http://localhost:8025

MinIO

Objectif

Simulation S3 locale.


URL

http://localhost:9001

Docker Compose

Services

frontend

backend

postgres

redis

mailhog

minio

Ports

Service Port
Frontend 3000
Backend 8080
PostgreSQL 5432
Redis 6379
Mailhog 8025
MinIO Console 9001

Variables d'environnement

Backend

DATABASE_URL=

REDIS_URL=

JWT_SECRET=

JWT_REFRESH_SECRET=

SMTP_HOST=

SMTP_PORT=

S3_ENDPOINT=

S3_ACCESS_KEY=

S3_SECRET_KEY=

Frontend

NEXT_PUBLIC_API_URL=

NEXT_PUBLIC_APP_NAME=

GitHub Actions

Pipeline Frontend

Install

↓

Lint

↓

TypeCheck

↓

Tests

↓

Build

Pipeline Backend

Install

↓

Lint

↓

Tests

↓

Build

↓

Prisma Validate

Qualité

ESLint

typescript-eslint

Formatage

Prettier

Hooks Git

Husky

Commit Convention

feat:

fix:

refactor:

test:

docs:

Sécurité

Dépendances

npm audit

snyk

dependabot

Secrets

Aucun secret dans Git.

Utilisation :

.env

.env.local

.env.production

Sprint Bootstrap

Jour 1

  • Création Monorepo
  • Configuration PNPM
  • Configuration Turborepo

Jour 2

  • Création Frontend
  • Création Backend
  • Docker Compose

Jour 3

  • PostgreSQL
  • Prisma
  • Redis

Jour 4

  • Swagger
  • Health Check
  • CI GitHub

Jour 5

  • Documentation
  • Validation environnement

Définition de terminé

Le bootstrap est terminé lorsque :

  • Frontend démarre
  • Backend démarre
  • Prisma migre
  • Swagger fonctionne
  • Redis fonctionne
  • Mailhog fonctionne
  • MinIO fonctionne
  • Pipeline GitHub passe
  • Docker Compose démarre sans erreur

Livrables Sprint Bootstrap

  • Repository Git
  • Monorepo
  • NextJS
  • NestJS
  • Prisma
  • PostgreSQL
  • Redis
  • Docker Compose
  • GitHub Actions
  • Swagger
  • Documentation de démarrage

Sprint suivant

Une fois ce socle validé, le premier sprint métier recommandé est :

Sprint 1

Module Authentification

  • Register
  • Login
  • JWT
  • Refresh Token
  • RBAC
  • User Profile
  • Swagger
  • Tests

À la fin du Sprint 1, les développeurs disposeront d'une plateforme sécurisée sur laquelle construire tous les autres modules métiers.

ujusum/1-implantation/1-repository.txt · Dernière modification : 2026/06/06 03:10 de 91.170.108.99

DokuWiki Appliance - Powered by TurnKey Linux