seo-dev-env 0.1.1__tar.gz → 0.1.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. {seo_dev_env-0.1.1 → seo_dev_env-0.1.3}/PKG-INFO +2 -2
  2. {seo_dev_env-0.1.1 → seo_dev_env-0.1.3}/seo/cli.py +1 -1
  3. {seo_dev_env-0.1.1 → seo_dev_env-0.1.3}/seo/generators.py +26 -19
  4. seo_dev_env-0.1.3/seo/templates/debutant/README.md +44 -0
  5. seo_dev_env-0.1.3/seo/templates/debutant/requirements.txt +2 -0
  6. {seo_dev_env-0.1.1/seo/templates/debutant → seo_dev_env-0.1.3/seo/templates/debutant/static}/style.css +12 -3
  7. seo_dev_env-0.1.3/seo/templates/debutant/templates/a_propos.html +49 -0
  8. {seo_dev_env-0.1.1/seo/templates/debutant → seo_dev_env-0.1.3/seo/templates/debutant/templates}/index.html +7 -6
  9. seo_dev_env-0.1.3/seo/templates/intermediaire/README.md +107 -0
  10. seo_dev_env-0.1.3/seo/templates/intermediaire/app/static/css/style.css +170 -0
  11. seo_dev_env-0.1.3/seo/templates/intermediaire/app/templates/base.html +32 -0
  12. seo_dev_env-0.1.3/seo/templates/intermediaire/app/templates/index.html +53 -0
  13. seo_dev_env-0.1.3/seo/templates/pro/README.md +206 -0
  14. {seo_dev_env-0.1.1 → seo_dev_env-0.1.3}/seo/utils.py +32 -24
  15. {seo_dev_env-0.1.1 → seo_dev_env-0.1.3}/seo_dev_env.egg-info/PKG-INFO +2 -2
  16. {seo_dev_env-0.1.1 → seo_dev_env-0.1.3}/seo_dev_env.egg-info/SOURCES.txt +10 -2
  17. {seo_dev_env-0.1.1 → seo_dev_env-0.1.3}/setup.py +14 -14
  18. {seo_dev_env-0.1.1 → seo_dev_env-0.1.3}/LICENSE.ls +0 -0
  19. {seo_dev_env-0.1.1 → seo_dev_env-0.1.3}/README.md +0 -0
  20. {seo_dev_env-0.1.1 → seo_dev_env-0.1.3}/seo/__init__.py +0 -0
  21. {seo_dev_env-0.1.1 → seo_dev_env-0.1.3}/seo/commandes.py +0 -0
  22. {seo_dev_env-0.1.1 → seo_dev_env-0.1.3}/seo/templates/debutant/app.py +0 -0
  23. {seo_dev_env-0.1.1 → seo_dev_env-0.1.3}/seo/templates/intermediaire/app/__init__.py +0 -0
  24. {seo_dev_env-0.1.1 → seo_dev_env-0.1.3}/seo/templates/intermediaire/app/core/__init__.py +0 -0
  25. {seo_dev_env-0.1.1 → seo_dev_env-0.1.3}/seo/templates/intermediaire/app/core/config.py +0 -0
  26. {seo_dev_env-0.1.1 → seo_dev_env-0.1.3}/seo/templates/intermediaire/app/models.py +0 -0
  27. {seo_dev_env-0.1.1 → seo_dev_env-0.1.3}/seo/templates/intermediaire/app/routes.py +0 -0
  28. {seo_dev_env-0.1.1 → seo_dev_env-0.1.3}/seo/templates/intermediaire/app/taches/__init__.py +0 -0
  29. {seo_dev_env-0.1.1 → seo_dev_env-0.1.3}/seo/templates/intermediaire/app/taches/models.py +0 -0
  30. {seo_dev_env-0.1.1 → seo_dev_env-0.1.3}/seo/templates/intermediaire/app/taches/routes.py +0 -0
  31. {seo_dev_env-0.1.1 → seo_dev_env-0.1.3}/seo/templates/intermediaire/app/utilisateurs/__init__.py +0 -0
  32. {seo_dev_env-0.1.1 → seo_dev_env-0.1.3}/seo/templates/intermediaire/app/utilisateurs/models.py +0 -0
  33. {seo_dev_env-0.1.1 → seo_dev_env-0.1.3}/seo/templates/intermediaire/app/utilisateurs/routes.py +0 -0
  34. {seo_dev_env-0.1.1 → seo_dev_env-0.1.3}/seo/templates/intermediaire/config.py +0 -0
  35. {seo_dev_env-0.1.1 → seo_dev_env-0.1.3}/seo/templates/intermediaire/docker-compose.yml +0 -0
  36. {seo_dev_env-0.1.1 → seo_dev_env-0.1.3}/seo/templates/intermediaire/run.py +0 -0
  37. {seo_dev_env-0.1.1 → seo_dev_env-0.1.3}/seo/templates/pro/Dockerfile +0 -0
  38. {seo_dev_env-0.1.1 → seo_dev_env-0.1.3}/seo/templates/pro/app/__init__.py +0 -0
  39. {seo_dev_env-0.1.1 → seo_dev_env-0.1.3}/seo/templates/pro/app/api/__init__.py +0 -0
  40. {seo_dev_env-0.1.1 → seo_dev_env-0.1.3}/seo/templates/pro/app/api/v1/__init__.py +0 -0
  41. {seo_dev_env-0.1.1 → seo_dev_env-0.1.3}/seo/templates/pro/app/api/v1/endpoints.py +0 -0
  42. {seo_dev_env-0.1.1 → seo_dev_env-0.1.3}/seo/templates/pro/app/core/config.py +0 -0
  43. {seo_dev_env-0.1.1 → seo_dev_env-0.1.3}/seo/templates/pro/app/core/security.py +0 -0
  44. {seo_dev_env-0.1.1 → seo_dev_env-0.1.3}/seo/templates/pro/app/db/base.py +0 -0
  45. {seo_dev_env-0.1.1 → seo_dev_env-0.1.3}/seo/templates/pro/app/db/models.py +0 -0
  46. {seo_dev_env-0.1.1 → seo_dev_env-0.1.3}/seo/templates/pro/docker-compose.yml +0 -0
  47. {seo_dev_env-0.1.1 → seo_dev_env-0.1.3}/seo_dev_env.egg-info/dependency_links.txt +0 -0
  48. {seo_dev_env-0.1.1 → seo_dev_env-0.1.3}/seo_dev_env.egg-info/entry_points.txt +0 -0
  49. {seo_dev_env-0.1.1 → seo_dev_env-0.1.3}/seo_dev_env.egg-info/requires.txt +0 -0
  50. {seo_dev_env-0.1.1 → seo_dev_env-0.1.3}/seo_dev_env.egg-info/top_level.txt +0 -0
  51. {seo_dev_env-0.1.1 → seo_dev_env-0.1.3}/setup.cfg +0 -0
@@ -1,8 +1,8 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: seo-dev-env
3
- Version: 0.1.1
3
+ Version: 0.1.3
4
4
  Summary: Générateur d'environnements de développement pour tous niveaux
5
- Home-page: https://github.com/https://github.com/elkast/seo-dev-env
5
+ Home-page: https://github.com/elkast/seo-dev-env
6
6
  Author: Votre Nom
7
7
  Author-email: orsinimelchisedek@gmail.com
8
8
  Classifier: Programming Language :: Python :: 3
@@ -147,7 +147,7 @@ def afficher_prochaines_etapes(nom_projet: str, type_projet: str, docker: bool =
147
147
  print(f"\n Prochaines étapes:\n")
148
148
  print(f" 1. cd {nom_projet}")
149
149
  if docker:
150
- print(" 2. docker-compose up --build")
150
+ print(" 2. docker compose up --build")
151
151
  else:
152
152
  if type_projet == "apprentissage":
153
153
  print(" 2. python app.py")
@@ -98,21 +98,28 @@ class IntermediaireWebGenerator(EnvironnementGenerator):
98
98
  class ProWebGenerator(EnvironnementGenerator):
99
99
  """Générateur pro - Applications professionnelles"""
100
100
 
101
- def __init__(self, chemin):
102
- super().__init__('pro', 'web', chemin)
103
- self.packages = [
104
- 'flask',
105
- 'flask-restx',
106
- 'flask-cors',
107
- 'flask-sqlalchemy',
108
- 'flask-migrate',
109
- 'flask-jwt-extended',
110
- 'python-dotenv',
111
- 'gunicorn',
112
- 'psycopg2-binary'
113
- ]
114
-
115
- def _post_creation(self):
101
+ def __init__(self, chemin):
102
+ super().__init__('pro', 'web', chemin)
103
+ self.packages = [
104
+ 'flask',
105
+ 'flask-restx',
106
+ 'flask-cors',
107
+ 'flask-sqlalchemy',
108
+ 'flask-migrate',
109
+ 'flask-jwt-extended',
110
+ 'python-dotenv',
111
+ 'gunicorn',
112
+ 'psycopg2-binary'
113
+ ]
114
+
115
+ def _creer_structure(self):
116
+ # Création du fichier requirements
117
+ creer_fichier(
118
+ self.chemin_projet / 'requirements.txt',
119
+ "\n".join(self.packages)
120
+ )
121
+
122
+ def _post_creation(self):
116
123
  # Initialiser un dépôt Git
117
124
  try:
118
125
  subprocess.run(['git', 'init', str(self.chemin_projet)], check=True)
@@ -154,10 +161,10 @@ def creer_environnement(niveau, type_app='web', chemin='.'):
154
161
  print("flask db migrate")
155
162
  print("flask db upgrade")
156
163
  print("flask run")
157
- else:
158
- print("\n🚀 Pour démarrer avec Docker:")
159
- print(f"cd {chemin}")
160
- print("docker-compose up --build")
164
+ else:
165
+ print("\n🚀 Pour démarrer avec Docker:")
166
+ print(f"cd {chemin}")
167
+ print("docker compose up --build")
161
168
 
162
169
  # Alias pour une utilisation plus simple
163
170
  creer_projet = creer_environnement
@@ -0,0 +1,44 @@
1
+ # Mon Projet Flask
2
+
3
+ Projet généré avec **SEO Dev Env** - Niveau Apprentissage
4
+
5
+ ## 🚀 Démarrage
6
+
7
+ 1. Installer les dépendances :
8
+ ```bash
9
+ pip install -r requirements.txt
10
+ ```
11
+
12
+ 2. Lancer l'application :
13
+ ```bash
14
+ python app.py
15
+ ```
16
+
17
+ 3. Ouvrir votre navigateur à : http://localhost:5000
18
+
19
+ ## 📁 Structure du projet
20
+
21
+ ```
22
+ mon_projet/
23
+ ├── app.py # Application Flask principale
24
+ ├── templates/ # Fichiers HTML (Jinja2)
25
+ │ ├── index.html
26
+ │ └── a_propos.html
27
+ ├── static/ # Fichiers CSS, JS, Images
28
+ │ └── style.css
29
+ ├── requirements.txt # Dépendances Python
30
+ └── README.md # Ce fichier
31
+ ```
32
+
33
+ ## 📚 Prochaines étapes
34
+
35
+ - [ ] Personnaliser les templates HTML
36
+ - [ ] Modifier les styles CSS
37
+ - [ ] Ajouter de nouvelles routes dans app.py
38
+ - [ ] Apprendre Flask avec la [documentation officielle](https://flask.palletsprojects.com/)
39
+
40
+ ## 💡 Conseils
41
+
42
+ - Utilisez `debug=True` uniquement en développement
43
+ - Changez la SECRET_KEY dans app.py
44
+ - Consultez la documentation Flask pour aller plus loin
@@ -0,0 +1,2 @@
1
+ flask>=3.0.0
2
+ python-dotenv>=1.0.0
@@ -1,4 +1,4 @@
1
- * {
1
+ * {
2
2
  margin: 0;
3
3
  padding: 0;
4
4
  box-sizing: border-box;
@@ -32,6 +32,7 @@ nav .container {
32
32
 
33
33
  nav h1 {
34
34
  color: #667eea;
35
+ font-size: 1.5rem;
35
36
  }
36
37
 
37
38
  nav ul {
@@ -53,6 +54,7 @@ nav a:hover {
53
54
 
54
55
  main {
55
56
  margin-top: 3rem;
57
+ margin-bottom: 3rem;
56
58
  padding: 2rem;
57
59
  background: white;
58
60
  border-radius: 10px;
@@ -85,26 +87,33 @@ h2 {
85
87
  margin: 0.5rem 0;
86
88
  }
87
89
 
90
+ .card p {
91
+ margin-bottom: 0.5rem;
92
+ }
93
+
88
94
  code {
89
95
  background: #e7eaf6;
90
96
  padding: 2px 6px;
91
97
  border-radius: 3px;
92
98
  font-family: "Courier New", monospace;
93
99
  color: #667eea;
100
+ font-size: 0.9em;
94
101
  }
95
102
 
96
103
  footer {
97
104
  text-align: center;
98
105
  padding: 2rem;
99
106
  color: white;
100
- margin-top: 3rem;
107
+ margin-top: auto;
101
108
  }
102
109
 
103
110
  a {
104
111
  color: #667eea;
105
112
  text-decoration: none;
113
+ transition: all 0.3s;
106
114
  }
107
115
 
108
116
  a:hover {
109
117
  text-decoration: underline;
110
- }
118
+ color: #764ba2;
119
+ }
@@ -0,0 +1,49 @@
1
+ <!DOCTYPE html>
2
+ <html lang="fr">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>{{ titre }} - Mon Projet Flask</title>
7
+ <link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
8
+ </head>
9
+ <body>
10
+ <nav>
11
+ <div class="container">
12
+ <h1>🚀 Mon Projet Flask</h1>
13
+ <ul>
14
+ <li><a href="/">Accueil</a></li>
15
+ <li><a href="/a-propos">À propos</a></li>
16
+ </ul>
17
+ </div>
18
+ </nav>
19
+
20
+ <main class="container">
21
+ <h2>À propos de ce projet</h2>
22
+ <p>Cette application Flask a été créée avec <strong>SEO Dev Env</strong>, un générateur de projets Flask pour développeurs francophones.</p>
23
+
24
+ <div class="card">
25
+ <h3>🎯 Objectif</h3>
26
+ <p>SEO Dev Env vous permet de démarrer rapidement avec Flask en générant une structure de projet adaptée à votre niveau :</p>
27
+ <ul>
28
+ <li><strong>Apprentissage</strong> : Structure simple pour débuter</li>
29
+ <li><strong>Application Web</strong> : Architecture MVC complète</li>
30
+ <li><strong>API Professionnelle</strong> : Production-ready avec Docker</li>
31
+ <li><strong>Startup SaaS</strong> : Scalable et modulaire</li>
32
+ </ul>
33
+ </div>
34
+
35
+ <div class="card">
36
+ <h3>💻 Technologies utilisées</h3>
37
+ <ul>
38
+ <li>Flask - Framework web Python</li>
39
+ <li>Jinja2 - Moteur de templates</li>
40
+ <li>Python 3.13 - Langage de programmation</li>
41
+ </ul>
42
+ </div>
43
+ </main>
44
+
45
+ <footer>
46
+ <p>Créé avec ❤️ en utilisant Flask</p>
47
+ </footer>
48
+ </body>
49
+ </html>
@@ -1,4 +1,4 @@
1
- <!DOCTYPE html>
1
+ <!DOCTYPE html>
2
2
  <html lang="fr">
3
3
  <head>
4
4
  <meta charset="UTF-8">
@@ -9,7 +9,7 @@
9
9
  <body>
10
10
  <nav>
11
11
  <div class="container">
12
- <h1> Mon Projet Flask</h1>
12
+ <h1>🚀 Mon Projet Flask</h1>
13
13
  <ul>
14
14
  <li><a href="/">Accueil</a></li>
15
15
  <li><a href="/a-propos">À propos</a></li>
@@ -22,7 +22,7 @@
22
22
  <p>Cette application a été générée avec <strong>SEO Dev Env</strong>.</p>
23
23
 
24
24
  <div class="card">
25
- <h3> Prochaines étapes</h3>
25
+ <h3>📝 Prochaines étapes</h3>
26
26
  <ul>
27
27
  <li>Personnalisez ce template dans <code>templates/index.html</code></li>
28
28
  <li>Modifiez le style dans <code>static/style.css</code></li>
@@ -31,16 +31,17 @@
31
31
  </div>
32
32
 
33
33
  <div class="card">
34
- <h3> Ressources utiles</h3>
34
+ <h3>📚 Ressources utiles</h3>
35
35
  <ul>
36
36
  <li><a href="https://flask.palletsprojects.com/" target="_blank">Documentation Flask</a></li>
37
37
  <li><a href="https://jinja.palletsprojects.com/" target="_blank">Documentation Jinja2</a></li>
38
+ <li><a href="https://www.python.org/dev/peps/pep-0008/" target="_blank">PEP 8 - Guide de style Python</a></li>
38
39
  </ul>
39
40
  </div>
40
41
  </main>
41
42
 
42
43
  <footer>
43
- <p>Créé avec en utilisant Flask</p>
44
+ <p>Créé avec ❤️ en utilisant Flask</p>
44
45
  </footer>
45
46
  </body>
46
- </html>
47
+ </html>
@@ -0,0 +1,107 @@
1
+ # Mon Application Web
2
+
3
+ Application web MVC générée avec **SEO Dev Env**
4
+
5
+ ## 🏗️ Structure du Projet
6
+
7
+ ```
8
+ mon_app/
9
+ ├── run.py # Point d'entrée
10
+ ├── config.py # Configuration
11
+ ├── app/
12
+ │ ├── __init__.py # Factory pattern
13
+ │ ├── models.py # Modèles partagés
14
+ │ ├── routes.py # Routes principales
15
+ │ ├── static/ # CSS, JS, Images
16
+ │ │ └── css/
17
+ │ │ └── style.css
18
+ │ ├── templates/ # Templates Jinja2
19
+ │ │ ├── base.html
20
+ │ │ └── index.html
21
+ │ ├── utilisateurs/ # Module utilisateurs
22
+ │ │ ├── models.py
23
+ │ │ └── routes.py
24
+ │ └── taches/ # Module tâches
25
+ │ ├── models.py
26
+ │ └── routes.py
27
+ └── requirements.txt
28
+ ```
29
+
30
+ ## 🚀 Démarrage
31
+
32
+ ### Sans Docker
33
+
34
+ 1. **Créer un environnement virtuel** :
35
+ ```bash
36
+ python -m venv venv
37
+ ```
38
+
39
+ 2. **Activer l'environnement** :
40
+ ```bash
41
+ # Windows
42
+ venv\Scripts\activate
43
+
44
+ # Linux/Mac
45
+ source venv/bin/activate
46
+ ```
47
+
48
+ 3. **Installer les dépendances** :
49
+ ```bash
50
+ pip install -r requirements.txt
51
+ ```
52
+
53
+ 4. **Initialiser la base de données** :
54
+ ```bash
55
+ flask db init
56
+ flask db migrate -m "Initial migration"
57
+ flask db upgrade
58
+ ```
59
+
60
+ 5. **Lancer l'application** :
61
+ ```bash
62
+ python run.py
63
+ ```
64
+
65
+ ### Avec Docker
66
+
67
+ ```bash
68
+ docker compose up --build
69
+ ```
70
+
71
+ > **Note** : Utilisez `docker compose` (sans tiret) avec Docker Desktop moderne
72
+
73
+ ## 📚 Commandes Utiles
74
+
75
+ ```bash
76
+ # Base de données
77
+ flask db init # Initialiser les migrations
78
+ flask db migrate -m "msg" # Créer une migration
79
+ flask db upgrade # Appliquer les migrations
80
+ flask db downgrade # Revenir en arrière
81
+
82
+ # Lancement
83
+ python run.py # Mode développement
84
+ gunicorn run:app # Mode production
85
+ ```
86
+
87
+ ## 🔧 Configuration
88
+
89
+ Modifier `config.py` pour ajuster :
90
+ - DATABASE_URL
91
+ - SECRET_KEY
92
+ - DEBUG mode
93
+ - Autres paramètres
94
+
95
+ ## 📖 Documentation
96
+
97
+ - [Flask Documentation](https://flask.palletsprojects.com/)
98
+ - [SQLAlchemy ORM](https://docs.sqlalchemy.org/)
99
+ - [Flask-Migrate](https://flask-migrate.readthedocs.io/)
100
+
101
+ ## 💡 Bonnes Pratiques
102
+
103
+ - ✅ Utilisez des migrations pour la base de données
104
+ - ✅ Organisez le code par features (modules)
105
+ - ✅ Gardez les modèles, routes et services séparés
106
+ - ✅ Utilisez des variables d'environnement pour les secrets
107
+ - ✅ Testez votre code avant de déployer
@@ -0,0 +1,170 @@
1
+ * {
2
+ margin: 0;
3
+ padding: 0;
4
+ box-sizing: border-box;
5
+ }
6
+
7
+ :root {
8
+ --primary: #667eea;
9
+ --primary-dark: #764ba2;
10
+ --text: #333;
11
+ --bg-light: #f7f9fc;
12
+ --shadow: 0 10px 30px rgba(0,0,0,0.1);
13
+ }
14
+
15
+ body {
16
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
17
+ line-height: 1.6;
18
+ color: var(--text);
19
+ background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
20
+ min-height: 100vh;
21
+ display: flex;
22
+ flex-direction: column;
23
+ }
24
+
25
+ .container {
26
+ max-width: 1200px;
27
+ margin: 0 auto;
28
+ padding: 0 20px;
29
+ width: 100%;
30
+ }
31
+
32
+ /* Navigation */
33
+ .navbar {
34
+ background: rgba(255, 255, 255, 0.95);
35
+ padding: 1rem 0;
36
+ box-shadow: var(--shadow);
37
+ position: sticky;
38
+ top: 0;
39
+ z-index: 100;
40
+ }
41
+
42
+ .navbar .container {
43
+ display: flex;
44
+ justify-content: space-between;
45
+ align-items: center;
46
+ }
47
+
48
+ .navbar h1 a {
49
+ color: var(--primary);
50
+ text-decoration: none;
51
+ font-size: 1.5rem;
52
+ }
53
+
54
+ .nav-menu {
55
+ display: flex;
56
+ list-style: none;
57
+ gap: 2rem;
58
+ }
59
+
60
+ .nav-menu a {
61
+ color: var(--text);
62
+ text-decoration: none;
63
+ font-weight: 500;
64
+ transition: color 0.3s;
65
+ }
66
+
67
+ .nav-menu a:hover {
68
+ color: var(--primary);
69
+ }
70
+
71
+ /* Main Content */
72
+ main {
73
+ flex: 1;
74
+ margin: 3rem auto;
75
+ padding: 2rem;
76
+ background: white;
77
+ border-radius: 10px;
78
+ box-shadow: var(--shadow);
79
+ }
80
+
81
+ .hero {
82
+ text-align: center;
83
+ padding: 2rem 0;
84
+ margin-bottom: 3rem;
85
+ border-bottom: 2px solid var(--bg-light);
86
+ }
87
+
88
+ .hero h2 {
89
+ color: var(--primary);
90
+ font-size: 2.5rem;
91
+ margin-bottom: 0.5rem;
92
+ }
93
+
94
+ .hero p {
95
+ color: #666;
96
+ font-size: 1.2rem;
97
+ }
98
+
99
+ /* Features Grid */
100
+ .features {
101
+ display: grid;
102
+ grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
103
+ gap: 2rem;
104
+ margin: 2rem 0;
105
+ }
106
+
107
+ /* Cards */
108
+ .card {
109
+ background: var(--bg-light);
110
+ padding: 1.5rem;
111
+ border-radius: 8px;
112
+ border-left: 4px solid var(--primary);
113
+ transition: transform 0.3s, box-shadow 0.3s;
114
+ }
115
+
116
+ .card:hover {
117
+ transform: translateY(-5px);
118
+ box-shadow: 0 5px 20px rgba(102, 126, 234, 0.2);
119
+ }
120
+
121
+ .card h3 {
122
+ margin-bottom: 1rem;
123
+ color: var(--text);
124
+ }
125
+
126
+ .card ul, .card ol {
127
+ margin-left: 1.5rem;
128
+ }
129
+
130
+ .card li {
131
+ margin: 0.5rem 0;
132
+ }
133
+
134
+ code {
135
+ background: #e7eaf6;
136
+ padding: 2px 6px;
137
+ border-radius: 3px;
138
+ font-family: "Courier New", monospace;
139
+ color: var(--primary);
140
+ font-size: 0.9em;
141
+ }
142
+
143
+ /* Footer */
144
+ footer {
145
+ text-align: center;
146
+ padding: 2rem;
147
+ color: white;
148
+ background: rgba(0,0,0,0.1);
149
+ margin-top: auto;
150
+ }
151
+
152
+ /* Responsive */
153
+ @media (max-width: 768px) {
154
+ .navbar .container {
155
+ flex-direction: column;
156
+ gap: 1rem;
157
+ }
158
+
159
+ .nav-menu {
160
+ gap: 1rem;
161
+ }
162
+
163
+ .hero h2 {
164
+ font-size: 2rem;
165
+ }
166
+
167
+ .features {
168
+ grid-template-columns: 1fr;
169
+ }
170
+ }
@@ -0,0 +1,32 @@
1
+ <!DOCTYPE html>
2
+ <html lang="fr">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>{% block title %}Mon Application{% endblock %}</title>
7
+ <link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
8
+ {% block extra_css %}{% endblock %}
9
+ </head>
10
+ <body>
11
+ <nav class="navbar">
12
+ <div class="container">
13
+ <h1><a href="/">🚀 Mon Application</a></h1>
14
+ <ul class="nav-menu">
15
+ <li><a href="/">Accueil</a></li>
16
+ <li><a href="/utilisateurs">Utilisateurs</a></li>
17
+ <li><a href="/taches">Tâches</a></li>
18
+ </ul>
19
+ </div>
20
+ </nav>
21
+
22
+ <main class="container">
23
+ {% block content %}{% endblock %}
24
+ </main>
25
+
26
+ <footer>
27
+ <p>&copy; 2026 Mon Application - Propulsé par Flask</p>
28
+ </footer>
29
+
30
+ {% block extra_js %}{% endblock %}
31
+ </body>
32
+ </html>
@@ -0,0 +1,53 @@
1
+ {% extends "base.html" %}
2
+
3
+ {% block title %}Accueil - Mon Application{% endblock %}
4
+
5
+ {% block content %}
6
+ <div class="hero">
7
+ <h2>Bienvenue dans votre Application Web</h2>
8
+ <p>Structure MVC complète générée avec SEO Dev Env</p>
9
+ </div>
10
+
11
+ <div class="features">
12
+ <div class="card">
13
+ <h3>📦 Architecture Modulaire</h3>
14
+ <p>Organisation par features (utilisateurs, tâches, etc.)</p>
15
+ <ul>
16
+ <li>Modèles séparés</li>
17
+ <li>Routes organisées</li>
18
+ <li>Services métier</li>
19
+ </ul>
20
+ </div>
21
+
22
+ <div class="card">
23
+ <h3>🗄️ Base de Données</h3>
24
+ <p>SQLAlchemy intégré avec migrations</p>
25
+ <ul>
26
+ <li>PostgreSQL / MySQL / SQLite</li>
27
+ <li>Flask-Migrate pour les migrations</li>
28
+ <li>ORM puissant</li>
29
+ </ul>
30
+ </div>
31
+
32
+ <div class="card">
33
+ <h3>🔐 Authentification</h3>
34
+ <p>Gestion des utilisateurs intégrée</p>
35
+ <ul>
36
+ <li>Flask-Login</li>
37
+ <li>Hashage sécurisé</li>
38
+ <li>Sessions</li>
39
+ </ul>
40
+ </div>
41
+ </div>
42
+
43
+ <div class="card">
44
+ <h3>📝 Prochaines étapes</h3>
45
+ <ol>
46
+ <li>Initialiser la base de données : <code>flask db init</code></li>
47
+ <li>Créer les migrations : <code>flask db migrate</code></li>
48
+ <li>Appliquer les migrations : <code>flask db upgrade</code></li>
49
+ <li>Personnaliser les modèles dans <code>app/*/models.py</code></li>
50
+ <li>Ajouter des routes dans <code>app/*/routes.py</code></li>
51
+ </ol>
52
+ </div>
53
+ {% endblock %}
@@ -0,0 +1,206 @@
1
+ # API Professionnelle
2
+
3
+ API REST production-ready générée avec **SEO Dev Env**
4
+
5
+ ## 🏗️ Architecture
6
+
7
+ ```
8
+ mon_api/
9
+ ├── app/
10
+ │ ├── __init__.py
11
+ │ ├── api/
12
+ │ │ ├── __init__.py
13
+ │ │ └── v1/
14
+ │ │ ├── __init__.py
15
+ │ │ └── endpoints.py
16
+ │ ├── core/
17
+ │ │ ├── config.py
18
+ │ │ └── security.py
19
+ │ └── db/
20
+ │ ├── base.py
21
+ │ └── models.py
22
+ ├── Dockerfile
23
+ ├── docker-compose.yml
24
+ └── requirements.txt
25
+ ```
26
+
27
+ ## 🚀 Démarrage Rapide
28
+
29
+ ### Avec Docker (Recommandé)
30
+
31
+ ```bash
32
+ # Démarrer tous les services
33
+ docker compose up --build
34
+
35
+ # En arrière-plan
36
+ docker compose up -d
37
+
38
+ # Voir les logs
39
+ docker compose logs -f
40
+
41
+ # Arrêter
42
+ docker compose down
43
+ ```
44
+
45
+ > **Note** : Utilisez `docker compose` (sans tiret) avec Docker Desktop moderne
46
+
47
+ ### Sans Docker
48
+
49
+ 1. **Créer un environnement virtuel** :
50
+ ```bash
51
+ python -m venv venv
52
+ source venv/bin/activate # Linux/Mac
53
+ venv\Scripts\activate # Windows
54
+ ```
55
+
56
+ 2. **Installer les dépendances** :
57
+ ```bash
58
+ pip install -r requirements.txt
59
+ ```
60
+
61
+ 3. **Configurer les variables d'environnement** :
62
+ ```bash
63
+ cp .env.example .env
64
+ # Éditer .env avec vos paramètres
65
+ ```
66
+
67
+ 4. **Lancer l'application** :
68
+ ```bash
69
+ # Développement
70
+ python run.py
71
+
72
+ # Production
73
+ gunicorn --bind 0.0.0.0:5000 --workers 4 run:app
74
+ ```
75
+
76
+ ## 📡 Endpoints API
77
+
78
+ ### Documentation Interactive
79
+
80
+ - **Swagger UI** : http://localhost:5000/api/docs
81
+ - **ReDoc** : http://localhost:5000/api/redoc
82
+
83
+ ### Endpoints Principaux
84
+
85
+ ```
86
+ GET /api/v1/health # Health check
87
+ GET /api/v1/items # Liste des items
88
+ POST /api/v1/items # Créer un item
89
+ GET /api/v1/items/{id} # Détails d'un item
90
+ PUT /api/v1/items/{id} # Mettre à jour un item
91
+ DELETE /api/v1/items/{id} # Supprimer un item
92
+ ```
93
+
94
+ ## 🔐 Authentification
95
+
96
+ L'API utilise JWT (JSON Web Tokens) pour l'authentification.
97
+
98
+ ```bash
99
+ # Obtenir un token
100
+ POST /api/v1/auth/login
101
+ {
102
+ "username": "user",
103
+ "password": "password"
104
+ }
105
+
106
+ # Utiliser le token
107
+ Authorization: Bearer <votre-token>
108
+ ```
109
+
110
+ ## 🗄️ Base de Données
111
+
112
+ ### Migrations
113
+
114
+ ```bash
115
+ # Initialiser
116
+ flask db init
117
+
118
+ # Créer une migration
119
+ flask db migrate -m "Description"
120
+
121
+ # Appliquer
122
+ flask db upgrade
123
+ ```
124
+
125
+ ### Connexions Supportées
126
+
127
+ - PostgreSQL (Recommandé pour production)
128
+ - MySQL
129
+ - SQLite (Développement uniquement)
130
+
131
+ ## 🧪 Tests
132
+
133
+ ```bash
134
+ # Lancer tous les tests
135
+ pytest
136
+
137
+ # Avec couverture
138
+ pytest --cov=app tests/
139
+
140
+ # Tests spécifiques
141
+ pytest tests/test_api.py
142
+ ```
143
+
144
+ ## 📊 Monitoring
145
+
146
+ ### Logs
147
+
148
+ ```bash
149
+ # Voir les logs Docker
150
+ docker compose logs -f web
151
+
152
+ # Logs de l'application
153
+ tail -f logs/app.log
154
+ ```
155
+
156
+ ### Métriques
157
+
158
+ - Health check : `/api/v1/health`
159
+ - Prometheus : `/metrics` (si configuré)
160
+
161
+ ## 🚢 Déploiement
162
+
163
+ ### Variables d'Environnement
164
+
165
+ ```env
166
+ FLASK_ENV=production
167
+ SECRET_KEY=votre-cle-secrete-tres-longue
168
+ DATABASE_URL=postgresql://user:pass@host:5432/db
169
+ JWT_SECRET_KEY=votre-cle-jwt
170
+ ```
171
+
172
+ ### Production Checklist
173
+
174
+ - [ ] Changer toutes les clés secrètes
175
+ - [ ] Configurer une vraie base de données
176
+ - [ ] Activer HTTPS
177
+ - [ ] Configurer les CORS correctement
178
+ - [ ] Mettre en place le monitoring
179
+ - [ ] Configurer les backups de BDD
180
+ - [ ] Tester la charge
181
+
182
+ ## 🛡️ Sécurité
183
+
184
+ - ✅ CORS configuré
185
+ - ✅ JWT pour l'authentification
186
+ - ✅ Validation des données (Marshmallow/Pydantic)
187
+ - ✅ Protection CSRF
188
+ - ✅ Rate limiting (à configurer)
189
+ - ✅ HTTPS recommandé en production
190
+
191
+ ## 📚 Documentation
192
+
193
+ - [Flask-RESTX](https://flask-restx.readthedocs.io/)
194
+ - [Flask-JWT-Extended](https://flask-jwt-extended.readthedocs.io/)
195
+ - [SQLAlchemy](https://docs.sqlalchemy.org/)
196
+ - [Docker Compose](https://docs.docker.com/compose/)
197
+
198
+ ## 🤝 Contribution
199
+
200
+ 1. Créer une branche feature
201
+ 2. Ajouter des tests
202
+ 3. Créer une Pull Request
203
+
204
+ ## 📄 Licence
205
+
206
+ MIT
@@ -1,24 +1,32 @@
1
- import os
2
- from pathlib import Path
3
-
4
- def creer_fichier(chemin, contenu):
5
- """Crée un fichier avec le contenu spécifié"""
6
- chemin = Path(chemin)
7
- chemin.parent.mkdir(parents=True, exist_ok=True)
8
- with open(chemin, 'w', encoding='utf-8') as f:
9
- f.write(contenu)
10
-
11
- def copier_dossier(source, destination):
12
- """Copie récursivement un dossier"""
13
- source = Path(source)
14
- destination = Path(destination)
15
-
16
- destination.mkdir(parents=True, exist_ok=True)
17
-
18
- for item in source.iterdir():
19
- dest_item = destination / item.name
20
- if item.is_dir():
21
- copier_dossier(item, dest_item)
22
- else:
23
- with open(item, 'r', encoding='utf-8') as src_file:
24
- creer_fichier(dest_item, src_file.read())
1
+ import os
2
+ import shutil
3
+ from pathlib import Path
4
+
5
+ def creer_fichier(chemin, contenu):
6
+ """Crée un fichier avec le contenu spécifié"""
7
+ chemin = Path(chemin)
8
+ chemin.parent.mkdir(parents=True, exist_ok=True)
9
+ with open(chemin, 'w', encoding='utf-8') as f:
10
+ f.write(contenu)
11
+
12
+ def copier_dossier(source, destination):
13
+ """Copie récursivement un dossier"""
14
+ source = Path(source)
15
+ destination = Path(destination)
16
+
17
+ destination.mkdir(parents=True, exist_ok=True)
18
+
19
+ for item in source.iterdir():
20
+ # Skip .gitignore and other hidden files that might have encoding issues
21
+ if item.name.startswith('.'):
22
+ continue
23
+
24
+ dest_item = destination / item.name
25
+ if item.is_dir():
26
+ copier_dossier(item, dest_item)
27
+ else:
28
+ # Use shutil.copy2 to preserve metadata and handle binary files
29
+ try:
30
+ shutil.copy2(item, dest_item)
31
+ except Exception as e:
32
+ print(f"⚠️ Erreur lors de la copie de {item.name}: {e}")
@@ -1,8 +1,8 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: seo-dev-env
3
- Version: 0.1.1
3
+ Version: 0.1.3
4
4
  Summary: Générateur d'environnements de développement pour tous niveaux
5
- Home-page: https://github.com/https://github.com/elkast/seo-dev-env
5
+ Home-page: https://github.com/elkast/seo-dev-env
6
6
  Author: Votre Nom
7
7
  Author-email: orsinimelchisedek@gmail.com
8
8
  Classifier: Programming Language :: Python :: 3
@@ -6,9 +6,13 @@ seo/cli.py
6
6
  seo/commandes.py
7
7
  seo/generators.py
8
8
  seo/utils.py
9
+ seo/templates/debutant/README.md
9
10
  seo/templates/debutant/app.py
10
- seo/templates/debutant/index.html
11
- seo/templates/debutant/style.css
11
+ seo/templates/debutant/requirements.txt
12
+ seo/templates/debutant/static/style.css
13
+ seo/templates/debutant/templates/a_propos.html
14
+ seo/templates/debutant/templates/index.html
15
+ seo/templates/intermediaire/README.md
12
16
  seo/templates/intermediaire/config.py
13
17
  seo/templates/intermediaire/docker-compose.yml
14
18
  seo/templates/intermediaire/run.py
@@ -17,13 +21,17 @@ seo/templates/intermediaire/app/models.py
17
21
  seo/templates/intermediaire/app/routes.py
18
22
  seo/templates/intermediaire/app/core/__init__.py
19
23
  seo/templates/intermediaire/app/core/config.py
24
+ seo/templates/intermediaire/app/static/css/style.css
20
25
  seo/templates/intermediaire/app/taches/__init__.py
21
26
  seo/templates/intermediaire/app/taches/models.py
22
27
  seo/templates/intermediaire/app/taches/routes.py
28
+ seo/templates/intermediaire/app/templates/base.html
29
+ seo/templates/intermediaire/app/templates/index.html
23
30
  seo/templates/intermediaire/app/utilisateurs/__init__.py
24
31
  seo/templates/intermediaire/app/utilisateurs/models.py
25
32
  seo/templates/intermediaire/app/utilisateurs/routes.py
26
33
  seo/templates/pro/Dockerfile
34
+ seo/templates/pro/README.md
27
35
  seo/templates/pro/docker-compose.yml
28
36
  seo/templates/pro/app/__init__.py
29
37
  seo/templates/pro/app/api/__init__.py
@@ -3,20 +3,20 @@ from setuptools import setup, find_packages
3
3
  with open("README.md", "r", encoding="utf-8") as fh:
4
4
  long_description = fh.read()
5
5
 
6
- setup(
7
- name="seo-dev-env",
8
- version="0.1.1",
9
- author="Votre Nom",
10
- author_email="orsinimelchisedek@gmail.com",
11
- description="Générateur d'environnements de développement pour tous niveaux",
12
- long_description=long_description,
13
- long_description_content_type="text/markdown",
14
- url="https://github.com/https://github.com/elkast/seo-dev-env",
15
- packages=find_packages(),
16
- include_package_data=True,
17
- package_data={
18
- "seo": ["templates/*", "templates/**/*"]
19
- },
6
+ setup(
7
+ name="seo-dev-env",
8
+ version="0.1.3",
9
+ author="Votre Nom",
10
+ author_email="orsinimelchisedek@gmail.com",
11
+ description="Générateur d'environnements de développement pour tous niveaux",
12
+ long_description=long_description,
13
+ long_description_content_type="text/markdown",
14
+ url="https://github.com/elkast/seo-dev-env",
15
+ packages=find_packages(),
16
+ include_package_data=True,
17
+ package_data={
18
+ "seo": ["templates/**/*"]
19
+ },
20
20
  classifiers=[
21
21
  "Programming Language :: Python :: 3",
22
22
  "License :: OSI Approved :: MIT License",
File without changes
File without changes
File without changes
File without changes