Compare commits
8
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ee940e25b7 | ||
|
|
10a5cb1fed | ||
|
|
bd2139b3aa | ||
|
|
7d97de3086 | ||
|
|
1e9803a4a7 | ||
|
|
74c56b900e | ||
|
|
4caec0a104 | ||
|
|
bfafbb955b |
@@ -0,0 +1,4 @@
|
|||||||
|
# Configuration du Frontend en développement local
|
||||||
|
|
||||||
|
# URL de l'API backend (doit correspondre au backend lancé localement)
|
||||||
|
API_URL=http://localhost:3000/api
|
||||||
@@ -52,3 +52,4 @@ Xcf/**
|
|||||||
# Release notes
|
# Release notes
|
||||||
CHANGELOG.md
|
CHANGELOG.md
|
||||||
Ressources/
|
Ressources/
|
||||||
|
.env
|
||||||
|
|||||||
@@ -0,0 +1,62 @@
|
|||||||
|
# 🎨 Guide de développement Frontend
|
||||||
|
|
||||||
|
## Prérequis
|
||||||
|
- Docker et Docker Compose installés
|
||||||
|
- Le backend doit être démarré (voir README-DEV du backend)
|
||||||
|
|
||||||
|
## 🏃♂️ Démarrage rapide
|
||||||
|
|
||||||
|
### 1. Cloner le projet
|
||||||
|
```bash
|
||||||
|
git clone <url-du-depot-frontend>
|
||||||
|
cd ptitspas-frontend
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2. Configuration
|
||||||
|
```bash
|
||||||
|
# Copier le fichier d'exemple
|
||||||
|
cp .env.example .env
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3. Lancer le frontend
|
||||||
|
```bash
|
||||||
|
# Démarrer le frontend (le backend doit être déjà lancé)
|
||||||
|
docker compose -f docker-compose.dev.yml up -d
|
||||||
|
|
||||||
|
# Voir les logs
|
||||||
|
docker compose -f docker-compose.dev.yml logs -f
|
||||||
|
```
|
||||||
|
|
||||||
|
## 🌐 Accès
|
||||||
|
|
||||||
|
- **Frontend** : http://localhost:8000
|
||||||
|
|
||||||
|
## 📋 Workflow de développement complet
|
||||||
|
|
||||||
|
1. **Démarrer le backend** (dans le dépôt backend) :
|
||||||
|
```bash
|
||||||
|
docker compose -f docker-compose.dev.yml up -d
|
||||||
|
```
|
||||||
|
|
||||||
|
2. **Démarrer le frontend** (dans ce dépôt) :
|
||||||
|
```bash
|
||||||
|
docker compose -f docker-compose.dev.yml up -d
|
||||||
|
```
|
||||||
|
|
||||||
|
3. **Accéder aux services** :
|
||||||
|
- Frontend : http://localhost:8000
|
||||||
|
- Backend API : http://localhost:3000/api
|
||||||
|
- PgAdmin : http://localhost:8080
|
||||||
|
|
||||||
|
## 🛠️ Commandes utiles
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Arrêter le frontend
|
||||||
|
docker compose -f docker-compose.dev.yml down
|
||||||
|
|
||||||
|
# Rebuild après modification
|
||||||
|
docker compose -f docker-compose.dev.yml up --build
|
||||||
|
|
||||||
|
# Voir l'état
|
||||||
|
docker compose -f docker-compose.dev.yml ps
|
||||||
|
```
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
# Docker Compose pour développement local du Frontend
|
||||||
|
# Usage: docker compose -f docker-compose.dev.yml up -d
|
||||||
|
|
||||||
|
services:
|
||||||
|
# Frontend Flutter
|
||||||
|
frontend:
|
||||||
|
build:
|
||||||
|
context: ./frontend
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
container_name: ptitspas-frontend-dev
|
||||||
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
API_URL: ${API_URL:-http://localhost:3000/api}
|
||||||
|
ports:
|
||||||
|
- "8000:80"
|
||||||
|
networks:
|
||||||
|
- ptitspas_dev
|
||||||
|
|
||||||
|
networks:
|
||||||
|
ptitspas_dev:
|
||||||
|
driver: bridge
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
# Stage builder
|
||||||
|
FROM ghcr.io/cirruslabs/flutter:3.19.0 AS builder
|
||||||
|
WORKDIR /app
|
||||||
|
COPY pubspec.* ./
|
||||||
|
RUN flutter pub get
|
||||||
|
COPY . .
|
||||||
|
RUN flutter build web --release
|
||||||
|
|
||||||
|
# Stage production
|
||||||
|
FROM nginx:alpine
|
||||||
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||||
|
COPY --from=builder /app/build/web /usr/share/nginx/html
|
||||||
|
|
||||||
|
EXPOSE 80
|
||||||
|
|
||||||
|
CMD ["nginx", "-g", "daemon off;"]
|
||||||
@@ -1,10 +1,11 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:go_router/go_router.dart';
|
|
||||||
import 'package:p_tits_pas/models/am_user_registration_data.dart';
|
import 'package:p_tits_pas/models/am_user_registration_data.dart';
|
||||||
import 'package:p_tits_pas/screens/auth/am/am_register_step1_sceen.dart';
|
import 'package:p_tits_pas/screens/auth/am/am_register_step1_sceen.dart';
|
||||||
import 'package:p_tits_pas/screens/auth/am/am_register_step2_sceen.dart';
|
import 'package:p_tits_pas/screens/auth/am/am_register_step2_sceen.dart';
|
||||||
import 'package:p_tits_pas/screens/auth/am/am_register_step3_sceen.dart';
|
import 'package:p_tits_pas/screens/auth/am/am_register_step3_sceen.dart';
|
||||||
import 'package:p_tits_pas/screens/auth/am/am_register_step4_sceen.dart';
|
import 'package:p_tits_pas/screens/auth/am/am_register_step4_sceen.dart';
|
||||||
|
import 'package:p_tits_pas/screens/legal/legal_page.dart';
|
||||||
|
import 'package:p_tits_pas/screens/legal/privacy_page.dart';
|
||||||
import '../screens/auth/login_screen.dart';
|
import '../screens/auth/login_screen.dart';
|
||||||
import '../screens/auth/register_choice_screen.dart';
|
import '../screens/auth/register_choice_screen.dart';
|
||||||
import '../screens/auth/parent/parent_register_step1_screen.dart';
|
import '../screens/auth/parent/parent_register_step1_screen.dart';
|
||||||
@@ -18,6 +19,8 @@ import '../models/parent_user_registration_data.dart';
|
|||||||
class AppRouter {
|
class AppRouter {
|
||||||
static const String login = '/login';
|
static const String login = '/login';
|
||||||
static const String registerChoice = '/register-choice';
|
static const String registerChoice = '/register-choice';
|
||||||
|
static const String legal = '/legal';
|
||||||
|
static const String privacy = '/privacy';
|
||||||
static const String parentRegisterStep1 = '/parent-register/step1';
|
static const String parentRegisterStep1 = '/parent-register/step1';
|
||||||
static const String parentRegisterStep2 = '/parent-register/step2';
|
static const String parentRegisterStep2 = '/parent-register/step2';
|
||||||
static const String parentRegisterStep3 = '/parent-register/step3';
|
static const String parentRegisterStep3 = '/parent-register/step3';
|
||||||
@@ -48,8 +51,12 @@ class AppRouter {
|
|||||||
screen = const RegisterChoiceScreen();
|
screen = const RegisterChoiceScreen();
|
||||||
slideTransition = true;
|
slideTransition = true;
|
||||||
break;
|
break;
|
||||||
case parentRegisterStep1:
|
case legal:
|
||||||
screen = const ParentRegisterStep1Screen();
|
screen = const LegalPage();
|
||||||
|
slideTransition = true;
|
||||||
|
break;
|
||||||
|
case privacy:
|
||||||
|
screen = const PrivacyPage();
|
||||||
slideTransition = true;
|
slideTransition = true;
|
||||||
break;
|
break;
|
||||||
case parentRegisterStep2:
|
case parentRegisterStep2:
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import 'package:http/http.dart' as http;
|
|||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
|
||||||
class BugReportService {
|
class BugReportService {
|
||||||
static const String _apiUrl = 'https://api.supernounou.local/bug-reports';
|
static const String _apiUrl = 'https://ynov.ptits-pas.fr/api/bug-reports';
|
||||||
|
|
||||||
static Future<void> sendReport(String description) async {
|
static Future<void> sendReport(String description) async {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_name ynov.ptits-pas.fr;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
root /usr/share/nginx/html;
|
||||||
|
index index.html;
|
||||||
|
try_files $uri $uri/ /index.html;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Gestion des erreurs
|
||||||
|
error_page 404 /index.html;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user