Initial commit: Configuration du projet P'titsPas
51
.gitignore
vendored
Normal file
@ -0,0 +1,51 @@
|
||||
# Dependencies
|
||||
node_modules/
|
||||
.pub-cache/
|
||||
.dart_tool/
|
||||
.packages
|
||||
build/
|
||||
dist/
|
||||
|
||||
# Environment variables
|
||||
.env
|
||||
.env.local
|
||||
.env.*.local
|
||||
|
||||
# IDE
|
||||
.idea/
|
||||
.vscode/
|
||||
*.swp
|
||||
*.swo
|
||||
|
||||
# OS
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
|
||||
# Logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# Database
|
||||
*.sqlite
|
||||
*.sqlite3
|
||||
|
||||
# Flutter
|
||||
.flutter-plugins
|
||||
.flutter-plugins-dependencies
|
||||
.pub-cache/
|
||||
.pub/
|
||||
/build/
|
||||
|
||||
# Coverage
|
||||
coverage/
|
||||
*.lcov
|
||||
|
||||
# Temporary files
|
||||
*.tmp
|
||||
*.temp
|
||||
.cache/
|
||||
|
||||
# Release notes
|
||||
CHANGELOG.md
|
||||
BIN
Archives/ChatGPT Image 25 avr. 2025, 16_45_30.png
Normal file
|
After Width: | Height: | Size: 2.3 MiB |
BIN
Archives/Cinq Styles de _P'titsPas_.png
Normal file
|
After Width: | Height: | Size: 1.7 MiB |
BIN
Archives/P'tisPas_logo.png
Normal file
|
After Width: | Height: | Size: 2.2 MiB |
BIN
Archives/P'titsPas et pierres colorées.png
Normal file
|
After Width: | Height: | Size: 2.3 MiB |
BIN
Archives/Pas à Pas en Couleurs tordu.png
Normal file
|
After Width: | Height: | Size: 1.4 MiB |
BIN
Archives/Pas à Pas en Pastel encre.png
Normal file
|
After Width: | Height: | Size: 2.5 MiB |
BIN
Archives/Taches_encres_01.png
Normal file
|
After Width: | Height: | Size: 1.8 MiB |
BIN
Archives/Taches_encres_02.png
Normal file
|
After Width: | Height: | Size: 1.7 MiB |
BIN
Archives/Taches_encres_03.png
Normal file
|
After Width: | Height: | Size: 1.9 MiB |
BIN
Archives/logo.png
Normal file
|
After Width: | Height: | Size: 1.4 MiB |
BIN
Archives/logo02.png
Normal file
|
After Width: | Height: | Size: 662 KiB |
BIN
Archives/logo03.png
Normal file
|
After Width: | Height: | Size: 1.4 MiB |
BIN
Archives/logo04.png
Normal file
|
After Width: | Height: | Size: 1.4 MiB |
BIN
Archives/pierres.png
Normal file
|
After Width: | Height: | Size: 164 KiB |
BIN
Archives/propositions.png
Normal file
|
After Width: | Height: | Size: 1.2 MiB |
BIN
P'tisPas_logo_trans.png
Normal file
|
After Width: | Height: | Size: 1.2 MiB |
BIN
P'titsPas_icone.png
Normal file
|
After Width: | Height: | Size: 157 KiB |
135
README.md
Normal file
@ -0,0 +1,135 @@
|
||||
# P'titsPas
|
||||
|
||||
Plateforme de gestion de la garde d'enfants pour les collectivités locales.
|
||||
|
||||
## Workflow de développement
|
||||
|
||||
Le projet suit un workflow simple :
|
||||
- `develop` : branche principale de développement
|
||||
- `main` : branche des versions stables
|
||||
|
||||
### Processus de release
|
||||
1. Développement sur la branche `develop`
|
||||
2. Tests et validation
|
||||
3. Merge vers `main` avec tag de version
|
||||
4. Mise à jour du CHANGELOG.md
|
||||
|
||||
## Charte graphique
|
||||
|
||||
- **Nom** : P'titsPas
|
||||
- **Couleurs principales** :
|
||||
- Bleu : #2B6CB0 (inspiré du logo)
|
||||
- Blanc : #FFFFFF
|
||||
- Gris clair : #F7FAFC
|
||||
- **Typographie** :
|
||||
- Titres : Google Fonts "Comfortaa"
|
||||
- Corps : Google Fonts "Roboto"
|
||||
|
||||
## Prérequis
|
||||
|
||||
### Backend
|
||||
- Node.js (version 18 ou supérieure)
|
||||
- PostgreSQL (version 15 ou supérieure)
|
||||
- npm (version 9 ou supérieure)
|
||||
|
||||
### Frontend
|
||||
- Flutter SDK (version 3.0 ou supérieure)
|
||||
- Dart SDK (version 3.0 ou supérieure)
|
||||
- Chrome (pour le développement web)
|
||||
|
||||
## Installation
|
||||
|
||||
1. Cloner le dépôt :
|
||||
```bash
|
||||
git clone [URL_DU_REPO]
|
||||
cd ptitspas
|
||||
git checkout develop
|
||||
```
|
||||
|
||||
2. Installer le backend :
|
||||
```bash
|
||||
cd backend
|
||||
npm install
|
||||
```
|
||||
|
||||
3. Installer le frontend :
|
||||
```bash
|
||||
cd ../frontend
|
||||
flutter pub get
|
||||
```
|
||||
|
||||
4. Configurer la base de données :
|
||||
```bash
|
||||
# Créer la base de données
|
||||
createdb ptitspas
|
||||
|
||||
# Configurer les variables d'environnement
|
||||
cp .env.example .env
|
||||
# Éditer le fichier .env avec vos paramètres de base de données
|
||||
```
|
||||
|
||||
## Démarrage
|
||||
|
||||
1. Démarrer le backend :
|
||||
```bash
|
||||
cd backend
|
||||
npm run dev
|
||||
```
|
||||
|
||||
2. Démarrer le frontend :
|
||||
```bash
|
||||
cd frontend
|
||||
flutter run -d chrome
|
||||
```
|
||||
|
||||
## Accès aux services
|
||||
|
||||
- Frontend : http://localhost:8080
|
||||
- Backend API : http://localhost:3000
|
||||
- Base de données PostgreSQL : localhost:5432
|
||||
|
||||
## Structure du projet
|
||||
|
||||
```
|
||||
ptitspas/
|
||||
├── backend/ # API Node.js/Express
|
||||
│ ├── src/ # Code source
|
||||
│ ├── prisma/ # Configuration de la base de données
|
||||
│ └── tests/ # Tests
|
||||
├── frontend/ # Application Flutter
|
||||
│ ├── lib/ # Code source
|
||||
│ ├── assets/ # Images, polices, etc.
|
||||
│ └── test/ # Tests
|
||||
├── CHANGELOG.md # Historique des versions
|
||||
└── README.md # Documentation
|
||||
```
|
||||
|
||||
## Développement
|
||||
|
||||
### Backend
|
||||
- Langage : TypeScript
|
||||
- Framework : Express
|
||||
- Base de données : PostgreSQL avec Prisma
|
||||
- API : REST avec OpenAPI 3
|
||||
|
||||
### Frontend
|
||||
- Framework : Flutter
|
||||
- État : Provider
|
||||
- Navigation : Go Router
|
||||
- UI : Material Design avec thème personnalisé
|
||||
|
||||
## Tests
|
||||
|
||||
```bash
|
||||
# Backend
|
||||
cd backend
|
||||
npm test
|
||||
|
||||
# Frontend
|
||||
cd frontend
|
||||
flutter test
|
||||
```
|
||||
|
||||
## Licence
|
||||
|
||||
Propriétaire - Tous droits réservés
|
||||
BIN
Xcf/P'tisPas_logo_trans.xcf
Normal file
BIN
Xcf/P'titsPas et pierres colorées.xcf
Normal file
BIN
Xcf/P'titsPas_icone.xcf
Normal file
BIN
Xcf/P'titsPas_logo.xcf
Normal file
37
backend/package.json
Normal file
@ -0,0 +1,37 @@
|
||||
{
|
||||
"name": "supernounou-backend",
|
||||
"version": "1.0.0",
|
||||
"description": "Backend API pour SuperNounou",
|
||||
"main": "src/index.ts",
|
||||
"scripts": {
|
||||
"dev": "nodemon src/index.ts",
|
||||
"build": "tsc",
|
||||
"start": "node dist/index.js",
|
||||
"test": "jest"
|
||||
},
|
||||
"dependencies": {
|
||||
"@prisma/client": "^5.0.0",
|
||||
"express": "^4.18.2",
|
||||
"jsonwebtoken": "^9.0.0",
|
||||
"bcrypt": "^5.1.0",
|
||||
"cors": "^2.8.5",
|
||||
"dotenv": "^16.0.3",
|
||||
"helmet": "^7.0.0",
|
||||
"morgan": "^1.10.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/express": "^4.17.17",
|
||||
"@types/node": "^18.15.11",
|
||||
"@types/bcrypt": "^5.0.0",
|
||||
"@types/cors": "^2.8.13",
|
||||
"@types/jsonwebtoken": "^9.0.1",
|
||||
"@types/morgan": "^1.9.4",
|
||||
"nodemon": "^2.0.22",
|
||||
"ts-node": "^10.9.1",
|
||||
"typescript": "^5.0.4",
|
||||
"prisma": "^5.0.0",
|
||||
"jest": "^29.5.0",
|
||||
"@types/jest": "^29.5.0",
|
||||
"ts-jest": "^29.1.0"
|
||||
}
|
||||
}
|
||||
31
backend/src/index.ts
Normal file
@ -0,0 +1,31 @@
|
||||
import express from 'express';
|
||||
import cors from 'cors';
|
||||
import helmet from 'helmet';
|
||||
import morgan from 'morgan';
|
||||
import { PrismaClient } from '@prisma/client';
|
||||
|
||||
const app = express();
|
||||
const prisma = new PrismaClient();
|
||||
|
||||
// Middleware
|
||||
app.use(cors());
|
||||
app.use(helmet());
|
||||
app.use(morgan('dev'));
|
||||
app.use(express.json());
|
||||
|
||||
// Routes de base
|
||||
app.get('/', (req, res) => {
|
||||
res.json({ message: 'Bienvenue sur l\'API SuperNounou' });
|
||||
});
|
||||
|
||||
// Gestion des erreurs
|
||||
app.use((err: Error, req: express.Request, res: express.Response, next: express.NextFunction) => {
|
||||
console.error(err.stack);
|
||||
res.status(500).json({ message: 'Une erreur est survenue' });
|
||||
});
|
||||
|
||||
const PORT = process.env.PORT || 3000;
|
||||
|
||||
app.listen(PORT, () => {
|
||||
console.log(`Serveur démarré sur le port ${PORT}`);
|
||||
});
|
||||
28
backend/tsconfig.json
Normal file
@ -0,0 +1,28 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es2018",
|
||||
"module": "commonjs",
|
||||
"lib": ["es2018", "esnext.asynciterable"],
|
||||
"skipLibCheck": true,
|
||||
"sourceMap": true,
|
||||
"outDir": "./dist",
|
||||
"moduleResolution": "node",
|
||||
"removeComments": true,
|
||||
"noImplicitAny": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"noImplicitThis": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"noImplicitReturns": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"esModuleInterop": true,
|
||||
"emitDecoratorMetadata": true,
|
||||
"experimentalDecorators": true,
|
||||
"resolveJsonModule": true,
|
||||
"baseUrl": "."
|
||||
},
|
||||
"exclude": ["node_modules"],
|
||||
"include": ["./src/**/*.ts"]
|
||||
}
|
||||
65
frontend/lib/main.dart
Normal file
@ -0,0 +1,65 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'theme/app_theme.dart';
|
||||
|
||||
void main() {
|
||||
runApp(const MyApp());
|
||||
}
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
const MyApp({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp.router(
|
||||
title: 'P\'titsPas',
|
||||
theme: AppTheme.lightTheme,
|
||||
routerConfig: GoRouter(
|
||||
initialLocation: '/',
|
||||
routes: [
|
||||
GoRoute(
|
||||
path: '/',
|
||||
builder: (context, state) => const HomePage(),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class HomePage extends StatelessWidget {
|
||||
const HomePage({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text('P\'titsPas'),
|
||||
),
|
||||
body: Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Image.asset(
|
||||
'assets/images/logo.png',
|
||||
width: 200,
|
||||
height: 200,
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
Text(
|
||||
'Bienvenue sur P\'titsPas',
|
||||
style: Theme.of(context).textTheme.displayMedium,
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
Text(
|
||||
'La plateforme de gestion de la garde d\'enfants',
|
||||
style: Theme.of(context).textTheme.bodyLarge,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
74
frontend/lib/theme/app_theme.dart
Normal file
@ -0,0 +1,74 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
|
||||
class AppTheme {
|
||||
static const Color primaryColor = Color(0xFF2B6CB0);
|
||||
static const Color secondaryColor = Color(0xFFF7FAFC);
|
||||
static const Color backgroundColor = Colors.white;
|
||||
static const Color textColor = Color(0xFF2D3748);
|
||||
|
||||
static ThemeData get lightTheme {
|
||||
return ThemeData(
|
||||
useMaterial3: true,
|
||||
colorScheme: ColorScheme.light(
|
||||
primary: primaryColor,
|
||||
secondary: secondaryColor,
|
||||
background: backgroundColor,
|
||||
),
|
||||
textTheme: TextTheme(
|
||||
displayLarge: GoogleFonts.comfortaa(
|
||||
fontSize: 32,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: textColor,
|
||||
),
|
||||
displayMedium: GoogleFonts.comfortaa(
|
||||
fontSize: 24,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: textColor,
|
||||
),
|
||||
bodyLarge: GoogleFonts.roboto(
|
||||
fontSize: 16,
|
||||
color: textColor,
|
||||
),
|
||||
bodyMedium: GoogleFonts.roboto(
|
||||
fontSize: 14,
|
||||
color: textColor,
|
||||
),
|
||||
),
|
||||
appBarTheme: AppBarTheme(
|
||||
backgroundColor: primaryColor,
|
||||
foregroundColor: Colors.white,
|
||||
elevation: 0,
|
||||
titleTextStyle: GoogleFonts.comfortaa(
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
elevatedButtonTheme: ElevatedButtonThemeData(
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: primaryColor,
|
||||
foregroundColor: Colors.white,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 12),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
),
|
||||
),
|
||||
inputDecorationTheme: InputDecorationTheme(
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
borderSide: BorderSide(color: primaryColor.withOpacity(0.5)),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
borderSide: BorderSide(color: primaryColor.withOpacity(0.3)),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
borderSide: BorderSide(color: primaryColor),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
44
frontend/pubspec.yaml
Normal file
@ -0,0 +1,44 @@
|
||||
name: supernounou
|
||||
description: Application de gestion de garde d'enfants pour les collectivités locales.
|
||||
publish_to: 'none'
|
||||
version: 1.0.0+1
|
||||
|
||||
environment:
|
||||
sdk: '>=3.0.0 <4.0.0'
|
||||
|
||||
dependencies:
|
||||
flutter:
|
||||
sdk: flutter
|
||||
cupertino_icons: ^1.0.2
|
||||
# Gestion d'état
|
||||
provider: ^6.0.5
|
||||
# Navigation
|
||||
go_router: ^10.0.0
|
||||
# API
|
||||
dio: ^5.0.0
|
||||
# Local storage
|
||||
shared_preferences: ^2.2.0
|
||||
# UI
|
||||
flutter_svg: ^2.0.0
|
||||
google_fonts: ^5.0.0
|
||||
# Formulaires
|
||||
form_validator: ^1.1.0
|
||||
# Dates
|
||||
intl: ^0.18.0
|
||||
# Images
|
||||
image_picker: ^1.0.0
|
||||
# PDF
|
||||
pdf: ^3.10.0
|
||||
printing: ^5.11.0
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
sdk: flutter
|
||||
flutter_lints: ^2.0.0
|
||||
build_runner: ^2.4.0
|
||||
|
||||
flutter:
|
||||
uses-material-design: true
|
||||
assets:
|
||||
- assets/images/
|
||||
- assets/icons/
|
||||