Skip to content

Commit 9251dde

Browse files
committed
add docs, req, deployments configurations, and develop structure of src
1 parent 147585d commit 9251dde

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+1740
-1383
lines changed

.dockerignore

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
### Python template
2+
3+
deploy/
4+
.idea/
5+
.vscode/
6+
.git/
7+
# Byte-compiled / optimized / DLL files
8+
__pycache__/
9+
*.py[cod]
10+
*$py.class
11+
12+
# C extensions
13+
*.so
14+
15+
# Distribution / packaging
16+
.Python
17+
build/
18+
develop-eggs/
19+
dist/
20+
downloads/
21+
eggs/
22+
.eggs/
23+
lib/
24+
lib64/
25+
parts/
26+
sdist/
27+
var/
28+
wheels/
29+
share/python-wheels/
30+
*.egg-info/
31+
.installed.cfg
32+
*.egg
33+
MANIFEST
34+
35+
# PyInstaller
36+
# Usually these files are written by a python script from a template
37+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
38+
*.manifest
39+
*.spec
40+
41+
# Installer logs
42+
pip-log.txt
43+
pip-delete-this-directory.txt
44+
45+
# Unit test / coverage reports
46+
htmlcov/
47+
.tox/
48+
.nox/
49+
.coverage
50+
.coverage.*
51+
.cache
52+
nosetests.xml
53+
coverage.xml
54+
*.cover
55+
*.py,cover
56+
.hypothesis/
57+
.pytest_cache/
58+
cover/
59+
60+
# Translations
61+
*.mo
62+
*.pot
63+
64+
# Django stuff:
65+
*.log
66+
local_settings.py
67+
db.sqlite3
68+
db.sqlite3-journal
69+
70+
# Flask stuff:
71+
instance/
72+
.webassets-cache
73+
74+
# Scrapy stuff:
75+
.scrapy
76+
77+
# Sphinx documentation
78+
docs/_build/
79+
80+
# PyBuilder
81+
.pybuilder/
82+
target/
83+
84+
# Jupyter Notebook
85+
.ipynb_checkpoints
86+
87+
# IPython
88+
profile_default/
89+
ipython_config.py
90+
91+
# pyenv
92+
# For a library or package, you might want to ignore these files since the code is
93+
# intended to run in multiple environments; otherwise, check them in:
94+
# .python-version
95+
96+
# pipenv
97+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
98+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
99+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
100+
# install all needed dependencies.
101+
#Pipfile.lock
102+
103+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
104+
__pypackages__/
105+
106+
# Celery stuff
107+
celerybeat-schedule
108+
celerybeat.pid
109+
110+
# SageMath parsed files
111+
*.sage.py
112+
113+
# Environments
114+
.env
115+
.venv
116+
env/
117+
venv/
118+
ENV/
119+
env.bak/
120+
venv.bak/
121+
122+
# Spyder project settings
123+
.spyderproject
124+
.spyproject
125+
126+
# Rope project settings
127+
.ropeproject
128+
129+
# mkdocs documentation
130+
/site
131+
132+
# mypy
133+
.mypy_cache/
134+
.dmypy.json
135+
dmypy.json
136+
137+
# Pyre type checker
138+
.pyre/
139+
140+
# pytype static type analyzer
141+
.pytype/
142+
143+
# Cython debug symbols
144+
cython_debug/

.env-example

Lines changed: 64 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
#!/bin/bash
2-
31
########################################
42
# ENVIRONMENT
53
########################################
6-
ENV=dev
4+
ENV=dev # dev | prod | staging
75
DEBUG=true
6+
LOG_LEVEL=INFO # DEBUG | INFO | WARNING | ERROR
87

98
########################################
10-
# APPLICATION
9+
# APPLICATION CONFIG
1110
########################################
1211
APP_NAME="Marketplace API"
1312
APP_VERSION="1.0.0"
@@ -16,50 +15,56 @@ API_V1_PREFIX=/api/v1
1615
SERVER_HOST=0.0.0.0
1716
SERVER_PORT=8000
1817
RELOAD=true
19-
LOG_LEVEL=INFO
2018

2119
########################################
22-
# CORS
20+
# CORS SETTINGS
2321
########################################
22+
# Example: ["http://localhost:3000", "https://yourapp.com"]
2423
CORS_ORIGINS=["*"]
2524

2625
########################################
27-
# JWT
26+
# JWT SETTINGS
2827
########################################
29-
SECRET_KEY=CHANGE_ME
28+
SECRET_KEY=your-secret-key # pragma: allowlist secret
3029
JWT_ALGORITHM=HS256
31-
JWT_ACCESS_TOKEN_EXPIRE_MINUTES=11520
30+
JWT_ACCESS_TOKEN_EXPIRE_MINUTES=11520 # 8 days
3231
JWT_REFRESH_TOKEN_EXPIRES_DAYS=7
3332
PASSWORD_RESET_TOKEN_EXPIRE_MINUTES=15
3433

3534
########################################
36-
# DATABASE
35+
# DATABASE CONFIG
3736
########################################
38-
DB_ENGINE=postgres
39-
DB_NAME=your_db
40-
DB_HOST=localhost
41-
DB_PORT=5432
42-
DB_USER=postgres
43-
DB_PASSWORD=CHANGE_ME
37+
# dev: sqlite | prod: postgres
38+
DB_ENGINE=sqlite
39+
40+
# For SQLite
41+
DB_NAME=database
42+
43+
# For PostgreSQL (prod)
44+
DB_HOST=
45+
DB_PORT=
46+
DB_USER=
47+
DB_PASSWORD=
4448

4549
########################################
46-
# BROKER (redis | rabbitmq)
50+
# MESSAGE BROKER
4751
########################################
48-
BROKER=redis
52+
# Options: redis | rabbitmq
53+
BROKER=rabbitmq
4954

5055
########################################
51-
# REDIS
56+
# REDIS (if using redis as broker or cache)
5257
########################################
53-
REDIS_HOST=localhost
54-
REDIS_PORT=6379
55-
REDIS_DB=0
58+
# REDIS_HOST=localhost
59+
# REDIS_PORT=6379
60+
# REDIS_DB=0
5661

5762
########################################
58-
# RABBITMQ
63+
# RABBITMQ (for Celery workers)
5964
########################################
6065
RABBITMQ_USER=guest
6166
RABBITMQ_PASSWORD=guest
62-
RABBITMQ_HOST=localhost
67+
RABBITMQ_HOST=rabbitmq
6368
RABBITMQ_PORT=5672
6469
RABBITMQ_VHOST=/
6570

@@ -69,6 +74,40 @@ RABBITMQ_VHOST=/
6974
EMAIL_FROM=admin@example.com
7075
SMTP_HOST=smtp.gmail.com
7176
SMTP_PORT=587
72-
SMTP_USER=your_smtp_login
77+
SMTP_USER=example@gmail.com
7378
SMTP_PASSWORD=your_smtp_password
7479
SMTP_TLS=true
80+
81+
########################################
82+
# GOOGLE OAUTH
83+
########################################
84+
GOOGLE_CLIENT_ID=None
85+
GOOGLE_CLIENT_SECRET=None # pragma: allowlist secret
86+
87+
########################################
88+
# SENTRY MONITORING
89+
########################################
90+
SENTRY_DSN=<dsn>
91+
SENTRY_TRACES_SAMPLE_RATE=1.0
92+
SENTRY_PROFILES_SAMPLE_RATE=1.0
93+
94+
########################################
95+
# PROMETHEUS MONITORING
96+
########################################
97+
PROMETHEUS_ENABLED=true
98+
PROMETHEUS_PATH=/metrics
99+
PROMETHEUS_METRICS_KEY=prometheus_metrics_key
100+
101+
########################################
102+
# STRIPE PAYMENTS
103+
########################################
104+
STRIPE_SECRET_KEY=stripe_secret_key # pragma: allowlist secret
105+
STRIPE_WEBHOOK_SECRET=stripe_webhook_secret # pragma: allowlist secret
106+
STRIPE_API_VERSION=2024-11-08
107+
STRIPE_SUCCESS_URL=https://yourapp.com/success
108+
STRIPE_CANCEL_URL=https://yourapp.com/cancel
109+
110+
########################################
111+
# DOCKER INTERNAL LINKS
112+
########################################
113+
DOCKER_NETWORK=marketplace_network

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ repos:
1717
- id: black
1818

1919
- repo: https://github.com/astral-sh/ruff-pre-commit
20-
rev: v0.14.8
20+
rev: v0.14.9
2121
hooks:
2222
- id: ruff
2323
args: ["--fix"]

.secrets.baseline

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,10 @@
9090
{
9191
"path": "detect_secrets.filters.allowlist.is_line_allowlisted"
9292
},
93+
{
94+
"path": "detect_secrets.filters.common.is_baseline_file",
95+
"filename": ".secrets.baseline"
96+
},
9397
{
9498
"path": "detect_secrets.filters.common.is_ignored_due_to_verification_policies",
9599
"min_level": 2
@@ -124,26 +128,19 @@
124128
],
125129
"results": {
126130
".env-example": [
127-
{
128-
"type": "Secret Keyword",
129-
"filename": ".env-example",
130-
"hashed_secret": "7205a0abf00d1daec13c63ece029057c974795a9",
131-
"is_verified": false,
132-
"line_number": 29
133-
},
134131
{
135132
"type": "Secret Keyword",
136133
"filename": ".env-example",
137134
"hashed_secret": "35675e68f4b5af7b995d9205ad0fc43842f16450",
138135
"is_verified": false,
139-
"line_number": 61
136+
"line_number": 66
140137
},
141138
{
142139
"type": "Secret Keyword",
143140
"filename": ".env-example",
144141
"hashed_secret": "67ad5f84459e066f594b87d66533bc28f66a0a34",
145142
"is_verified": false,
146-
"line_number": 73
143+
"line_number": 78
147144
}
148145
],
149146
".github\\workflows\\ci.yml": [
@@ -161,7 +158,7 @@
161158
"filename": "README.md",
162159
"hashed_secret": "9d4e1e23bd5b727046a9e3b4b7db57bd8d6ee684",
163160
"is_verified": false,
164-
"line_number": 198
161+
"line_number": 146
165162
}
166163
],
167164
"alembic.ini": [
@@ -228,5 +225,5 @@
228225
}
229226
]
230227
},
231-
"generated_at": "2025-12-11T09:14:04Z"
228+
"generated_at": "2025-12-12T18:18:13Z"
232229
}

0 commit comments

Comments
 (0)