@@ -39,11 +39,58 @@ using
39
39
------
40
40
41
41
open the terminal and type
42
- - ``flask-starter-project --name=your-project-name ``
43
- - this will build a basic project with inbuilt auth and admin interface for you
42
+ - ``flask-starter-project create your-project-name ``
43
+ - If you want to create a new project with inbuilt auth and admin interface for you use ``create ``
44
+ - If you want to add the flask-starter to your existing project use ``add ``
44
45
- cd `your-project-name `
45
46
- create the virtualenv and Install the requirements which is there in `your-project-name `
46
47
- run `python3 server.py `
48
+ - You can use `flask-starter-project create testapp --mode prod ` if you want
49
+ a production ready app
50
+
51
+ Project Structure
52
+ ---------------
53
+
54
+ The generated project follows a clean and organized structure:
55
+
56
+ .. code ::
57
+
58
+ your-project-name/
59
+ ├── app/
60
+ │ ├── __init__.py # App initialization and configuration
61
+ │ ├── models.py # Database models
62
+ │ ├── views.py # Route handlers and views
63
+ │ ├── forms.py # Form definitions and validation
64
+ │ ├── extension.py # Flask extensions (SQLAlchemy, LoginManager, etc.)
65
+ │ ├── libs/ # Custom business logic and utilities
66
+ │ └── templates/ # Jinja2 templates
67
+ │ ├── layout.html # Base template
68
+ │ ├── home.html # Home page
69
+ │ ├── login.html # Login page
70
+ │ ├── register.html # Registration page
71
+ │ └── profile.html # User profile page
72
+ ├── tests/ # Test directory
73
+ │ ├── __init__.py
74
+ │ ├── conftest.py # Test configuration and fixtures
75
+ │ └── test_views.py # View tests
76
+ ├── requirements.txt # Project dependencies
77
+ ├── pyproject.toml # Project configuration and metadata
78
+ └── server.py # Application entry point
79
+
80
+ Key Components:
81
+ - **app/ **: Main application package
82
+ - **models.py **: Defines database models (User, etc.)
83
+ - **views.py **: Contains route handlers and view logic
84
+ - **forms.py **: Defines form classes and validation logic
85
+ - **extension.py **: Initializes Flask extensions
86
+ - **templates/ **: HTML templates with Jinja2
87
+ - **tests/ **: Test suite with pytest
88
+ - **server.py **: Application entry point with development server
89
+ - **pyproject.toml **: Project configuration including:
90
+ - Dependencies and development tools
91
+ - Code formatting settings (black, isort)
92
+ - Linting configuration (flake8)
93
+ - Test configuration (pytest)
47
94
48
95
Project Structure
49
96
---------------
0 commit comments