You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
source venv/bin/activate # On Windows use `venv\Scripts\activate`
121
115
```
122
116
123
-
4. **Install the dependencies:**
117
+
3. **Install the dependencies:**
124
118
125
119
```bash
126
120
pip install -r requirements.txt
127
121
```
128
122
129
-
5. **Create an `.env` file and set the environment variables:**
123
+
### Configuration
124
+
125
+
1. **Create an `.env` file:**
130
126
131
-
Create a file named `.env`in the `app` directory of the project and add the following variables:
127
+
Place the file in the root directory and add the following as default:
132
128
133
-
```properties
134
-
SECRET_KEY=your_secret_key
135
-
MAP_API_KEY=your_map_api_key
136
-
DATABASE_NAME="lafs.db"
129
+
```python
130
+
# Database Path
131
+
DATABASE_NAME='data/lafs.db'
132
+
133
+
# Database Connection Pool
134
+
POOL_SIZE=15
135
+
MAX_OVERFLOW=5
136
+
POOL_TIMEOUT=30
137
+
POOL_RECYCLE=1800
138
+
ECHO=False
139
+
140
+
# Database Retry Settings
141
+
MAX_RETRIES=3
142
+
BASE_DELAY=1
143
+
MAX_DELAY=10
144
+
145
+
# Flask Secret Key
146
+
SECRET_KEY='your_flask_secret_key'
147
+
148
+
# Google Maps API Key
149
+
MAP_API_KEY='your_map_api_key'
137
150
```
138
151
139
-
Replace `your_secret_key` (see #6 below) and `your_map_api_key` (see # 7 below) with your actual secret key and API key.
152
+
2. **Database**
140
153
141
-
6. **Notes on Flask Secret Keys:**
154
+
```python
155
+
# Database Path
156
+
DATABASE_NAME='data/lafs.db'# Path to SQLite database file
142
157
143
-
TODO
158
+
# Database Connection Pool
159
+
POOL_SIZE=15 # Max number of persistent connections
160
+
MAX_OVERFLOW=5 # Max number of connections above POOL_SIZE
161
+
POOL_TIMEOUT=30 # Seconds to wait for available connection
162
+
POOL_RECYCLE=1800 # Seconds before connection is recycled
163
+
ECHO=False # Enable SQLAlchemy engine logging
144
164
145
-
7. **Notes on Google Maps API Keys:**
165
+
# Database Retry Settings
166
+
MAX_RETRIES=3 # Max retry attempts for failed operations
167
+
BASE_DELAY=1 # Initial delay between retries in seconds
168
+
MAX_DELAY=10 # Max delay between retries in seconds
169
+
```
146
170
147
-
For the embedded map to work, you need to set up your own API Key. Before you can create one, you will need to create a Google Cloud project, for which you need a Google Cloud account.
171
+
3. **Flask Secret Key**
172
+
173
+
```python
174
+
# Flask Secret Key
175
+
SECRET_KEY='your_flask_secret_key'
176
+
```
177
+
178
+
4. **Google Maps API Key**
179
+
180
+
```python
181
+
# Google Maps API Key
182
+
MAP_API_KEY='your_map_api_key'
183
+
```
184
+
185
+
An API Key is needed for the embedded map to work. Before you can create one, you will need to create a Google Cloud project, for which you need a Google Cloud account.
148
186
149
187
* [Set up a Google Cloud account](https://cloud.google.com)
150
188
* [Set up your Google Cloud project](https://developers.google.com/maps/documentation/javascript/cloud-setup)
151
189
* [Using API Keys](https://developers.google.com/maps/documentation/javascript/get-api-key)
152
190
153
-
### Configuration
154
-
155
-
* TBD
156
-
157
191
### Usage
158
192
159
-
1. **Go into the app directory and run the command:**
193
+
1. **Go into the `app` directory and run the command:**
160
194
161
195
```bash
162
196
flask run
@@ -200,7 +234,8 @@ Improvements and new features development are ongoing.
200
234
201
235
## Screenshots
202
236
203
-
_Image created using [Portfoliofy](https://github.com/ggeerraarrdd/portfoliofy)._
237
+

238
+
_(Image created using [Portfoliofy](https://github.com/ggeerraarrdd/portfoliofy).)_
204
239
205
240

206
241

0 commit comments