From 0643d8173a180d07949567a6349afaf2ca1225b8 Mon Sep 17 00:00:00 2001 From: Vlad Date: Mon, 21 Apr 2025 01:26:42 +0300 Subject: [PATCH 01/36] =?UTF-8?q?feat:=20=D0=BE=D0=B1=D0=BD=D0=BE=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D0=B8=D0=B5=20API=20=D0=B4=D0=BB=D1=8F=20?= =?UTF-8?q?=D0=BF=D0=BE=D0=B8=D1=81=D0=BA=D0=B0=20=D0=B0=D0=B2=D1=82=D0=BE?= =?UTF-8?q?=D0=BC=D0=BE=D0=B1=D0=B8=D0=BB=D1=8F=20=D0=BF=D0=BE=20VIN=20-?= =?UTF-8?q?=20=D0=B8=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5=D0=BD=20=D0=BC=D0=B0?= =?UTF-8?q?=D1=80=D1=88=D1=80=D1=83=D1=82=20=D0=BD=D0=B0=20/v2/search,=20?= =?UTF-8?q?=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=D1=8B=20=D0=BD?= =?UTF-8?q?=D0=BE=D0=B2=D1=8B=D0=B5=20=D0=BF=D0=B0=D1=80=D0=B0=D0=BC=D0=B5?= =?UTF-8?q?=D1=82=D1=80=D1=8B=20=D0=B8=20=D1=83=D0=BB=D1=83=D1=87=D1=88?= =?UTF-8?q?=D0=B5=D0=BD=D1=8B=20=D0=BE=D0=BF=D0=B8=D1=81=D0=B0=D0=BD=D0=B8?= =?UTF-8?q?=D1=8F=20=D0=BE=D1=82=D0=B2=D0=B5=D1=82=D0=BE=D0=B2=20=D0=B4?= =?UTF-8?q?=D0=BB=D1=8F=20=D0=B1=D0=BE=D0=BB=D0=B5=D0=B5=20=D0=B8=D0=BD?= =?UTF-8?q?=D1=84=D0=BE=D1=80=D0=BC=D0=B0=D1=82=D0=B8=D0=B2=D0=BD=D0=BE?= =?UTF-8?q?=D0=B3=D0=BE=20=D0=B2=D0=B7=D0=B0=D0=B8=D0=BC=D0=BE=D0=B4=D0=B5?= =?UTF-8?q?=D0=B9=D1=81=D1=82=D0=B2=D0=B8=D1=8F=20=D1=81=20=D0=BF=D0=BE?= =?UTF-8?q?=D0=BB=D1=8C=D0=B7=D0=BE=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D0=B5?= =?UTF-8?q?=D0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/swagger.yaml | 134 +++++++++++++++++++++++------------------------ 1 file changed, 65 insertions(+), 69 deletions(-) diff --git a/api/swagger.yaml b/api/swagger.yaml index 74b7c49..f138e0f 100644 --- a/api/swagger.yaml +++ b/api/swagger.yaml @@ -77,10 +77,10 @@ paths: type: string description: Error description - /decode: + /v2/search: post: - summary: Decode VIN - description: Decode VIN number to get vehicle information + summary: Search vehicle by VIN (v2) + description: Search for vehicle information with full history records parameters: - name: access_code in: query @@ -101,83 +101,79 @@ paths: example: "1HGCM82633A123456" responses: '200': - description: Successful decoding + description: Successful search content: application/json: schema: type: object properties: - make: - type: string - description: Vehicle make - model: - type: string - description: Vehicle model - year: - type: integer - description: Manufacturing year - '400': - description: Invalid VIN or access code - content: - application/json: - schema: - type: object - properties: - error: - type: string - description: Error description - - /detail/{vin}: - get: - summary: Get detailed information - description: Get detailed information about a vehicle by VIN - parameters: - - name: vin - in: path - required: true - schema: - type: string - description: Vehicle Identification Number - - name: access_code - in: query - required: true - schema: - type: string - description: API access code for authentication - responses: - '200': - description: Successful information retrieval - content: - application/json: - schema: - type: object - properties: - vin: - type: string - description: VIN number - make: - type: string - description: Vehicle make - model: - type: string - description: Vehicle model - year: - type: integer - description: Manufacturing year - history: + found: + type: boolean + description: Whether the vehicle was found + details: + type: object + description: Vehicle details + properties: + make: + type: string + description: Vehicle manufacturer + model: + type: string + description: Vehicle model + year: + type: integer + description: Manufacturing year + body: + type: string + description: Vehicle body type + engine: + type: string + description: Engine model + cylinders: + type: string + description: Number of engine cylinders + drive: + type: string + description: Drive type (FWD/RWD/AWD) + records: type: array + description: Vehicle history records items: type: object properties: - date: + odometer: + type: integer + description: Odometer reading in miles + odometer_status: + type: string + description: Odometer status (ACTUAL, EXEMPT, NOT ACTUAL) + title: + type: string + description: Title status (CLEAR, SALVAGE, REBUILT) + damage1: + type: string + description: Primary damage type + damage2: + type: string + description: Secondary damage type + add_to_db: type: string format: date - description: Event date - event: + description: Date added to database + RD_Status: type: string - description: Event description - '404': - description: Vehicle not found + description: Vehicle status + Sale_Location: + type: string + description: Sale location + Repear_Cost: + type: number + description: Repair cost in USD + Photo_Count: + type: integer + description: Number of available photos + '400': + description: Invalid VIN or access code content: application/json: schema: @@ -275,4 +271,4 @@ paths: properties: error: type: string - description: Error description \ No newline at end of file + description: Error description \ No newline at end of file From 3175dbc0fe7611e12de0b5ca46227ef2ddbebf33 Mon Sep 17 00:00:00 2001 From: Vlad Date: Fri, 2 May 2025 10:59:52 +0300 Subject: [PATCH 02/36] =?UTF-8?q?feat:=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=BD=D0=BE=D0=B2=D0=BE=D0=B3?= =?UTF-8?q?=D0=BE=20=D0=BC=D0=B0=D1=80=D1=88=D1=80=D1=83=D1=82=D0=B0=20/v2?= =?UTF-8?q?/reqphoto=20=D0=B4=D0=BB=D1=8F=20=D0=BF=D0=BE=D0=BB=D1=83=D1=87?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D1=8F=20=D1=84=D0=BE=D1=82=D0=BE=D0=B3=D1=80?= =?UTF-8?q?=D0=B0=D1=84=D0=B8=D0=B9=20=D0=B0=D0=B2=D1=82=D0=BE=D0=BC=D0=BE?= =?UTF-8?q?=D0=B1=D0=B8=D0=BB=D1=8F=20=D0=BF=D0=BE=20VIN=20-=20=D0=BE?= =?UTF-8?q?=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB=D0=B5=D0=BD=D1=8B=20=D0=B7=D0=B0?= =?UTF-8?q?=D0=BF=D1=80=D0=BE=D1=81=D1=8B=20=D0=B2=20app.py=20=D0=B8=20?= =?UTF-8?q?=D0=B4=D0=BE=D0=BA=D1=83=D0=BC=D0=B5=D0=BD=D1=82=D0=B0=D1=86?= =?UTF-8?q?=D0=B8=D1=8F=20Swagger=20=D0=B4=D0=BB=D1=8F=20=D1=83=D0=BB?= =?UTF-8?q?=D1=83=D1=87=D1=88=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=B2=D0=B7=D0=B0?= =?UTF-8?q?=D0=B8=D0=BC=D0=BE=D0=B4=D0=B5=D0=B9=D1=81=D1=82=D0=B2=D0=B8?= =?UTF-8?q?=D1=8F=20=D1=81=20API?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/swagger.yaml | 60 +++++++++++++++++++++++++++++++++++++++++ app.py | 13 +++++---- templates/database.html | 4 +-- 3 files changed, 67 insertions(+), 10 deletions(-) diff --git a/api/swagger.yaml b/api/swagger.yaml index f138e0f..e4345ce 100644 --- a/api/swagger.yaml +++ b/api/swagger.yaml @@ -183,6 +183,66 @@ paths: type: string description: Error description + /v2/reqphoto: + post: + summary: Get vehicle photos + description: Get photos of the vehicle by VIN + parameters: + - name: access_code + in: query + required: true + schema: + type: string + description: API access code for authentication + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + vin: + type: string + description: Vehicle Identification Number + example: "1HGCM82633A123456" + responses: + '200': + description: Successful photo retrieval + content: + application/json: + schema: + type: object + properties: + found: + type: boolean + description: Whether photos were found + photos: + type: array + description: List of photo information + items: + type: object + properties: + url: + type: string + description: URL of the photo + type: + type: string + description: Type of photo (FRONT, REAR, SIDE, INTERIOR, etc.) + date: + type: string + format: date + description: Date when photo was taken + '400': + description: Invalid VIN or access code + content: + application/json: + schema: + type: object + properties: + error: + type: string + description: Error description + /restfact: get: summary: Check account balance diff --git a/app.py b/app.py index a786cb2..2dbbca1 100644 --- a/app.py +++ b/app.py @@ -701,7 +701,7 @@ def api_reqimage(): app.logger.debug(json.dumps(ret)) return response - cur.execute('select count(*) from salvagedb.salvage_images where vin = :p1 and fnd = 1' , {'p1':vin.upper()}) + cur.execute('select count(*) from salvagedb.salvage_images where vin = :p1 and fn = 1' , {'p1':vin.upper()}) res = cur.fetchone() img_count = int(res[0]) if img_count<1: @@ -715,19 +715,17 @@ def api_reqimage(): app.logger.debug(json.dumps(ret)) return response else: - #req_id = uuid.uuid4().hex - #cur.execute('select rownum,ipath from salvagedb.salvage_images where vin = :p1 and fnd = 1',{'p1':vin.upper()}) - cur.execute("""select GenImages('{}','{}') uid from dual""".format(access_code, vin.upper())) + cur.execute("""select GenImages('{}','{}') as ui from dual""".format(access_code, vin.upper())) res = cur.fetchall() - req_id = res[0] - cur.execute("""select fake_name from salvage_images_req where req_id = '{}}'""".format(req_id)) + req_id = res[0][0] + cur.execute('select fake_name from salvage_images_req where req_id = :p1', {'p1':req_id}) res = cur.fetchall() images = [] nm = 0 for it in res: images.append({ 'num':nm, - 'url':'https://salimages.salvagedb/{}/{}'.format(req_id, it) + 'url':'https://salimages.salvagedb/{}/{}'.format(req_id, it[0]) }) nm = nm + 1 ret = {'status': 'Image_found', 'Images':images} @@ -736,6 +734,7 @@ def api_reqimage(): status=200, mimetype='application/json' ) + return response diff --git a/templates/database.html b/templates/database.html index b099b79..a6a2cd2 100644 --- a/templates/database.html +++ b/templates/database.html @@ -14,11 +14,10 @@

-
+
- @@ -28,7 +27,6 @@ {% for row in pg %} - From a46f2f19fd0f6919cdb80bf6cee0d41afd668759 Mon Sep 17 00:00:00 2001 From: Vlad Date: Fri, 2 May 2025 12:12:28 +0300 Subject: [PATCH 03/36] feat: add package.json and .gitignore for Bootstrap 5 migration - Add package.json with Bootstrap 5 and Popper.js dependencies - Add .gitignore to exclude node_modules and Python cache files --- .gitignore | 6 ++++-- package.json | 9 +++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 package.json diff --git a/.gitignore b/.gitignore index 1bbb861..75c0564 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ -__pycache__ -logs \ No newline at end of file +__pycache__/ +*.pyc +logs +node_modules/ \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..0a48340 --- /dev/null +++ b/package.json @@ -0,0 +1,9 @@ +{ + "name": "salvagedb-web", + "version": "1.0.0", + "description": "SalvageDB Web Application", + "dependencies": { + "bootstrap": "^5.3.2", + "@popperjs/core": "^2.11.8" + } +} \ No newline at end of file From d30d0e94847cbfa385cfcb5047e9374de2aca899 Mon Sep 17 00:00:00 2001 From: Vlad Date: Fri, 2 May 2025 12:12:48 +0300 Subject: [PATCH 04/36] feat: update head.html for Bootstrap 5 - Add Bootstrap 5 CDN links - Remove old Bootstrap 2 files - Update navigation markup for Bootstrap 5 --- templates/head.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/templates/head.html b/templates/head.html index 7e7e1a3..cdfe18d 100644 --- a/templates/head.html +++ b/templates/head.html @@ -15,7 +15,7 @@ - Vehicle history check. Check your car VIN. For FREE! + {% block title %}{% endblock %} - {{ site }} @@ -45,6 +45,7 @@ + +{% block scripts %}{% endblock %} From d63a3276c7126013797a63b740ceb99885d972b3 Mon Sep 17 00:00:00 2001 From: Vlad Date: Fri, 2 May 2025 12:14:33 +0300 Subject: [PATCH 05/36] feat: update navigation to Bootstrap 5 - Replace old navbar classes with Bootstrap 5 - Add responsive navbar-toggler - Update navigation markup structure --- templates/head.html | 43 ++++++++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/templates/head.html b/templates/head.html index cdfe18d..73ad62d 100644 --- a/templates/head.html +++ b/templates/head.html @@ -73,25 +73,30 @@ {% block head %}{% endblock %} -
# VIN Make Model
{{ row[0] }} {{ row[1] }} {{ row[2] }} {{ row[3] }}
+
+
- - - - + + + + {% for row in pg %} - + @@ -37,16 +36,21 @@
VINMakeModelYearVINMakeModelYear
{{ row[1] }}{{ row[1] }} {{ row[2] }} {{ row[3] }} {{ row[4] }}
-

-
- -
+ +
-
-
+
{% endblock %} From 06e93f2d052dd96ed76f5b66fd4d9ef76ec806a5 Mon Sep 17 00:00:00 2001 From: Vlad Date: Fri, 2 May 2025 12:18:38 +0300 Subject: [PATCH 09/36] feat: update index.html to Bootstrap 5 - Modernize search form with card component - Add responsive input group - Update hero section styling --- templates/index.html | 61 ++++++++++++++++++++++++-------------------- 1 file changed, 34 insertions(+), 27 deletions(-) diff --git a/templates/index.html b/templates/index.html index 7486c33..8bae676 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,47 +1,54 @@ {% extends "head.html" %} {% block content %} -
-
-

Buying a Used Car? Check it!

-
-

Salvagedb.com provides +

+
+

Buying a Used Car? Check it!

+

+ Salvagedb.com provides information about salvage or junk vehicles; damage from hail, flood or fire; mileage discrepancies or odometer rollback; and gray market vehicles. We do not claim that the car got in our databank has salvage title, but the fact that it has been damaged for sure. Our site helps people avoid buying a damaged vehicle in the past.

-

-
-
-
-
+
-

Over {{ cnt }} salvage vehicles added.

-
-
- -
-
+

Over {{ cnt }} salvage vehicles added.

+
+ VIN position diagram +
+
+
+ + {% endblock %} From a7ca86d39db308a6c0a1ee3d566afb9ce1971ff8 Mon Sep 17 00:00:00 2001 From: Vlad Date: Fri, 2 May 2025 12:26:57 +0300 Subject: [PATCH 12/36] feat: update details.html to Bootstrap 5 - Add card components for vehicle details and search - Update table styling - Improve responsive layout --- templates/details.html | 122 +++++++++++++++++++++++------------------ 1 file changed, 68 insertions(+), 54 deletions(-) diff --git a/templates/details.html b/templates/details.html index dd48417..d7397a0 100644 --- a/templates/details.html +++ b/templates/details.html @@ -1,11 +1,11 @@ {% extends "head.html" %} {% block content %} -
-
-

Buying a Used Car? Check it!

-
-

Salvagedb.com provides +

+
+

Buying a Used Car? Check it!

+

+ Salvagedb.com provides information about salvage or junk vehicles; damage from hail, flood or fire; mileage discrepancies or odometer rollback; and gray market vehicles. We do not claim that the car got in our databank has salvage title, but the fact that it has been damaged for sure. Our site helps people avoid buying a damaged vehicle @@ -13,59 +13,73 @@

-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Make{{det[0][1]}}
Model{{det[0][2]}}
Year{{det[0][3]}}
Body Style{{det[0][4]}}
Engine{{det[0][5]}}
Cylinders{{det[0][6]}}
Drive{{det[0][7]}}
+
+
+
+
+

Vehicle Details

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Make{{det[0][1]}}
Model{{det[0][2]}}
Year{{det[0][3]}}
Body Style{{det[0][4]}}
Engine{{det[0][5]}}
Cylinders{{det[0][6]}}
Drive{{det[0][7]}}
+
+
-
-

Search salvage history?

- - -
+ + {% endblock %} \ No newline at end of file From a8a17d2cdbdf402e0b0f5220843760797bb43c86 Mon Sep 17 00:00:00 2001 From: Vlad Date: Fri, 2 May 2025 12:32:45 +0300 Subject: [PATCH 13/36] refactor: update templates to Bootstrap 5 - index.html: Updated container to container-lg, improved search form structure, added modern spacing and alignment classes, enhanced form input and button styling - database.html: Updated table classes for better responsiveness, added table-hover and align-middle classes, improved pagination styling, added table-light class for header - search.html: Completely restructured layout, added card components for details and history, improved table responsiveness, enhanced mobile view with proper column sizing, added alert component for not found state - privacy.html: Completely restructured layout, added modern typography classes, improved readability with proper spacing, enhanced navigation with proper heading hierarchy, added card component for better content organization --- templates/database.html | 4 +- templates/index.html | 48 +++--- templates/privacy.html | 367 +++++++++------------------------------- templates/search.html | 156 +++++++++-------- 4 files changed, 193 insertions(+), 382 deletions(-) diff --git a/templates/database.html b/templates/database.html index d6ae324..e36a9cf 100644 --- a/templates/database.html +++ b/templates/database.html @@ -14,8 +14,8 @@
- - +
+ diff --git a/templates/index.html b/templates/index.html index 5a73b88..afb0551 100644 --- a/templates/index.html +++ b/templates/index.html @@ -13,33 +13,31 @@

-
-
-
- -
-
-

ENTER VIN OF YOUR CAR

-
-
-
- - -
+
+
+ +
+
+

ENTER VIN OF YOUR CAR

+
+
+
+ +
- -
+
+
diff --git a/templates/privacy.html b/templates/privacy.html index 30ebe5e..8e4043a 100644 --- a/templates/privacy.html +++ b/templates/privacy.html @@ -1,290 +1,87 @@ -{% raw %} - - - - - Privacy Policy of www.salvagedb.com - - - +{% extends "head.html" %} - - - - - - - - -
-
-
-
VIN Make
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Make{{det[0][1]}}
Model{{det[0][2]}}
Year{{det[0][3]}}
Body Style{{det[0][4]}}
Engine{{det[0][5]}}
Cylinders{{det[0][6]}}
Drive{{det[0][7]}}
+
+
+
+
+

Vehicle Details

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Make{{det[0][1]}}
Model{{det[0][2]}}
Year{{det[0][3]}}
Body Style{{det[0][4]}}
Engine{{det[0][5]}}
Cylinders{{det[0][6]}}
Drive{{det[0][7]}}
+
+
- {% if his %} -
- - - - - - - - - - - - - {% for it in his%} - - - - - - - - - {% endfor %} - -
VINTitleOdometerOdometer StatusPrimary DamageSecondary Damage
{{it[1]}}{{it[2]}}{{it[3]}}{{it[4]}}{{it[5]}}{{it[6]}}
+
+ {% if his %} +
+
+

Salvage History

+
+
+
+ + + + + + + + + + + + + {% for it in his%} + + + + + + + + + {% endfor %} + +
VINTitleOdometerOdometer StatusPrimary DamageSecondary Damage
{{it[1]}}{{it[2]}}{{it[3]}}{{it[4]}}{{it[5]}}{{it[6]}}
+
+
+
+ {% else %} +
+

Salvage history not found.

+
+ {% endif %}
- {% else %} -
-

Salvage history not found.

-
- {% endif %}
{% endblock %} From 914f7d96fcf32e9acd19c516621f5e5c0d0c8934 Mon Sep 17 00:00:00 2001 From: Vlad Date: Fri, 2 May 2025 12:42:41 +0300 Subject: [PATCH 14/36] fix: add page titles for all templates - Added descriptive titles for all pages - index.html: Buying a Used Car? Check it! - database.html: Salvage Vehicles Database - search.html: Vehicle History Check - privacy.html: Privacy Policy - decodevin.html: Decode VIN Number - details.html: Vehicle Details --- templates/database.html | 2 ++ templates/decodevin.html | 2 ++ templates/details.html | 2 ++ templates/index.html | 2 ++ templates/privacy.html | 2 ++ templates/search.html | 2 ++ 6 files changed, 12 insertions(+) diff --git a/templates/database.html b/templates/database.html index e36a9cf..1bd1470 100644 --- a/templates/database.html +++ b/templates/database.html @@ -1,5 +1,7 @@ {% extends "head.html" %} +{% block title %}Salvage Vehicles Database{% endblock %} + {% block content %}
diff --git a/templates/decodevin.html b/templates/decodevin.html index a93f622..0d92bd6 100644 --- a/templates/decodevin.html +++ b/templates/decodevin.html @@ -1,5 +1,7 @@ {% extends "head.html" %} +{% block title %}Decode VIN Number{% endblock %} + {% block content %}
diff --git a/templates/details.html b/templates/details.html index d7397a0..5789185 100644 --- a/templates/details.html +++ b/templates/details.html @@ -1,5 +1,7 @@ {% extends "head.html" %} +{% block title %}Vehicle Details{% endblock %} + {% block content %}
diff --git a/templates/index.html b/templates/index.html index afb0551..1cafccd 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,5 +1,7 @@ {% extends "head.html" %} +{% block title %}Buying a Used Car? Check it!{% endblock %} + {% block content %}
diff --git a/templates/privacy.html b/templates/privacy.html index 8e4043a..2353f41 100644 --- a/templates/privacy.html +++ b/templates/privacy.html @@ -1,5 +1,7 @@ {% extends "head.html" %} +{% block title %}Privacy Policy{% endblock %} + {% block content %}
diff --git a/templates/search.html b/templates/search.html index 8942e25..2e082bf 100644 --- a/templates/search.html +++ b/templates/search.html @@ -1,5 +1,7 @@ {% extends "head.html" %} +{% block title %}Vehicle History Check{% endblock %} + {% block content %}
From ce82c169348e35d2e6526136e2df6f659d83e97f Mon Sep 17 00:00:00 2001 From: Vlad Date: Fri, 2 May 2025 12:44:36 +0300 Subject: [PATCH 15/36] =?UTF-8?q?fix:=20=D0=BE=D0=B3=D1=80=D0=B0=D0=BD?= =?UTF-8?q?=D0=B8=D1=87=D0=B8=D1=82=D1=8C=20=D1=88=D0=B8=D1=80=D0=B8=D0=BD?= =?UTF-8?q?=D1=83=20=D0=BC=D0=B5=D0=BD=D1=8E=20=D0=BA=D0=B0=D0=BA=20=D1=83?= =?UTF-8?q?=20=D0=BE=D1=81=D1=82=D0=B0=D0=BB=D1=8C=D0=BD=D0=BE=D0=B3=D0=BE?= =?UTF-8?q?=20=D0=BA=D0=BE=D0=BD=D1=82=D0=B5=D0=BD=D1=82=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/head.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/head.html b/templates/head.html index 5717d70..6346bfe 100644 --- a/templates/head.html +++ b/templates/head.html @@ -74,7 +74,7 @@
From 4c640798a947da577cfd99e7e95171a9a1d0e321 Mon Sep 17 00:00:00 2001 From: Vlad Date: Tue, 6 May 2025 22:51:48 +0300 Subject: [PATCH 28/36] =?UTF-8?q?=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B0=20=D1=81=D1=82=D1=80=D0=B0=D0=BD=D0=B8=D1=86=D0=B0?= =?UTF-8?q?=20=D0=BE=D0=B3=D1=80=D0=B0=D0=BD=D0=B8=D1=87=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D1=8F=20=D1=87=D0=B0=D1=81=D1=82=D0=BE=D1=82=D1=8B=20=D0=B7?= =?UTF-8?q?=D0=B0=D0=BF=D1=80=D0=BE=D1=81=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Создан шаблон rate_limit.html для отображения предупреждения о превышении лимита запросов - обавлен эндпоинт /limit для отображения страницы с ограничением - еализована проверка частоты запросов с лимитом 10 запросов в час - обавлена обработка превышения лимита для веб и API запросов --- templates/rate_limit.html | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 templates/rate_limit.html diff --git a/templates/rate_limit.html b/templates/rate_limit.html new file mode 100644 index 0000000..d2b949a --- /dev/null +++ b/templates/rate_limit.html @@ -0,0 +1,23 @@ +{% extends "head.html" %} + +{% block title %}Rate Limit Exceeded{% endblock %} + +{% block content %} +
+
+
+ +

Rate Limit Exceeded

+

+ We've noticed that you're using our service very frequently. Such frequent checks are typically associated with business usage, which contradicts our principles of providing free vehicle history checks for individual users. +

+

+ Please try again later or contact us if you need a business solution. +

+ +
+
+
+{% endblock %} \ No newline at end of file From 273eec27267246ef4bb3dfa5350e235c3a3f9082 Mon Sep 17 00:00:00 2001 From: Vlad Date: Wed, 7 May 2025 00:29:50 +0300 Subject: [PATCH 29/36] =?UTF-8?q?=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=20=D1=8D=D0=BD=D0=B4=D0=BF=D0=BE=D0=B8=D0=BD=D1=82=20/ra?= =?UTF-8?q?te=20=D0=B4=D0=BB=D1=8F=20=D0=BE=D1=82=D0=BE=D0=B1=D1=80=D0=B0?= =?UTF-8?q?=D0=B6=D0=B5=D0=BD=D0=B8=D1=8F=20=D1=81=D1=82=D1=80=D0=B0=D0=BD?= =?UTF-8?q?=D0=B8=D1=86=D1=8B=20=D1=81=20=D0=BE=D0=B3=D1=80=D0=B0=D0=BD?= =?UTF-8?q?=D0=B8=D1=87=D0=B5=D0=BD=D0=B8=D0=B5=D0=BC=20=D1=87=D0=B0=D1=81?= =?UTF-8?q?=D1=82=D0=BE=D1=82=D1=8B=20=D0=B7=D0=B0=D0=BF=D1=80=D0=BE=D1=81?= =?UTF-8?q?=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app.py b/app.py index 9e51878..cf9aee8 100644 --- a/app.py +++ b/app.py @@ -769,6 +769,14 @@ def ads_txt(): def logo(): return send_file(app_path+"/static/favicon.ico") +@app.route('/rate') +def rate_limit(): + try: + return render_template('rate_limit.html', site=site) + except: + app.logger.error(traceback.format_exc()) + return 'bad request!', 500 + def get_ip(req) -> str: if 'X-Forwarded-For' in req.headers: From 00764d9f2b56765a85150e0715e0e41ad5eb0c14 Mon Sep 17 00:00:00 2001 From: Vlad Date: Wed, 7 May 2025 01:03:20 +0300 Subject: [PATCH 30/36] =?UTF-8?q?=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B0=20=D1=81=D1=82=D1=80=D0=B0=D0=BD=D0=B8=D1=86=D0=B0?= =?UTF-8?q?=20=D0=B4=D0=BB=D1=8F=20=D0=BF=D0=BE=D0=B6=D0=B5=D1=80=D1=82?= =?UTF-8?q?=D0=B2=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Создан новый шаблон donate.html с информацией о пожертвованиях - обавлены QR-коды для криптовалютных кошельков (Bitcoin и TonCoin) - обавлен эндпоинт /donate в app.py - обавлен пункт меню 'Support Us' в навигацию - есь контент страницы на английском языке - даптивный дизайн с использованием Bootstrap --- app.py | 6 +++- templates/donate.html | 67 +++++++++++++++++++++++++++++++++++++++++++ templates/head.html | 27 +++++++++++++---- 3 files changed, 94 insertions(+), 6 deletions(-) create mode 100644 templates/donate.html diff --git a/app.py b/app.py index cf9aee8..17a920a 100644 --- a/app.py +++ b/app.py @@ -769,7 +769,7 @@ def ads_txt(): def logo(): return send_file(app_path+"/static/favicon.ico") -@app.route('/rate') +@app.route('/limit') def rate_limit(): try: return render_template('rate_limit.html', site=site) @@ -777,6 +777,10 @@ def rate_limit(): app.logger.error(traceback.format_exc()) return 'bad request!', 500 +@app.route('/donate') +def donate(): + return render_template('donate.html') + def get_ip(req) -> str: if 'X-Forwarded-For' in req.headers: diff --git a/templates/donate.html b/templates/donate.html new file mode 100644 index 0000000..0a0c636 --- /dev/null +++ b/templates/donate.html @@ -0,0 +1,67 @@ +{% extends "head.html" %} + +{% block content %} +
+
+
+
+
+

Support SalvageDB

+ +
+

+ For 15 years, we have been providing free access to vehicle history information, + helping people make informed decisions when purchasing used vehicles. +

+

+ Our database contains information about damaged, salvaged, and rebuilt + vehicles, helping to avoid purchasing a car with hidden issues. +

+
+ +
+

Support Our Project

+

+ Your support helps us continue providing quality service and developing + our database. We accept donations in cryptocurrency. +

+
+ +
+
+
+
+

Bitcoin

+ Bitcoin QR Code +

Wallet Address:

+ 16uL5x6qx8yF7k4uxyQVfz5N7yLE9F3iCZ +
+
+
+ +
+
+
+

TonCoin

+ TonCoin QR Code +

Wallet Address:

+ UQDi0mgMaDqXORp7UzV6n7E5WFC0yre0on63BSO2tIa7umFe +
+
+
+
+ +
+

+ Thank you for your support! Every donation helps us improve our service + and provide better information to our users. +

+
+
+
+
+
+
+{% endblock %} \ No newline at end of file diff --git a/templates/head.html b/templates/head.html index cb34059..3b7ea64 100644 --- a/templates/head.html +++ b/templates/head.html @@ -16,12 +16,12 @@ {% block title %}{% endblock %} - {{ site }} - + + + - - - + @@ -65,6 +65,20 @@ }); + + {% block head %}{% endblock %} @@ -90,6 +104,9 @@ + From c805a22d55ae4a93c3781359a1d9ba7f203f794d Mon Sep 17 00:00:00 2001 From: Vlad Date: Wed, 7 May 2025 01:16:31 +0300 Subject: [PATCH 31/36] =?UTF-8?q?=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5=D0=BD?= =?UTF-8?q?=D0=BE=20=D0=BD=D0=B0=D0=B7=D0=B2=D0=B0=D0=BD=D0=B8=D0=B5=20?= =?UTF-8?q?=D0=BF=D1=83=D0=BD=D0=BA=D1=82=D0=B0=20=D0=BC=D0=B5=D0=BD=D1=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - аменено название 'Salvage vehicles' на 'Vehicle History' - овое название лучше отражает суть сервиса и понятнее для пользователей --- templates/head.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/head.html b/templates/head.html index 3b7ea64..9bc358f 100644 --- a/templates/head.html +++ b/templates/head.html @@ -99,7 +99,7 @@ Home
@@ -98,6 +91,13 @@
+ + +
{% else %}