{"id":15061787,"url":"https://github.com/devstackq/bazar","last_synced_at":"2026-02-04T15:08:03.475Z","repository":{"id":41953996,"uuid":"470253711","full_name":"devstackq/bazar","owner":"devstackq","description":"service to sale car","archived":false,"fork":false,"pushed_at":"2022-05-18T20:06:00.000Z","size":6221,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-27T08:42:27.308Z","etag":null,"topics":["docker","gin-gonic","golang","postgres"],"latest_commit_sha":null,"homepage":"https://baz-ar.herokuapp.com/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devstackq.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-03-15T16:57:09.000Z","updated_at":"2022-05-16T06:00:50.000Z","dependencies_parsed_at":"2022-08-12T00:30:59.066Z","dependency_job_id":null,"html_url":"https://github.com/devstackq/bazar","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/devstackq/bazar","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devstackq%2Fbazar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devstackq%2Fbazar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devstackq%2Fbazar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devstackq%2Fbazar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devstackq","download_url":"https://codeload.github.com/devstackq/bazar/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devstackq%2Fbazar/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29088535,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-04T03:31:03.593Z","status":"ssl_error","status_checked_at":"2026-02-04T03:29:50.742Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","gin-gonic","golang","postgres"],"created_at":"2024-09-24T23:25:06.213Z","updated_at":"2026-02-04T15:08:03.454Z","avatar_url":"https://github.com/devstackq.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"bazar-platform\n\nGolang/Postgres\n\n\u003c!-- heroku pg:psql  postgresql-rigid-87766  --app bazarx-app   \u003c  ./build/sql/create_tables.sql --\u003e\n\nзапуск БД  и приложения в докере\ndocker-compose up\n\nswagger run\nswag init -g ./server/server.go -d ./internal/ --parseInternal --output ./docs\n\nФункциональность bazar-platform:\n\nurl : http://localhost:6969\n-------------------------------\n\nАдмин панель(опционалка)in further:\n\n/v1/any/:id :GET return 1 item\n/v1/any :GET - return listItems\n\nВначале добавить, по убыванию:\nРоли, Страну, Город, Юзера,  Бренд, Модель и .т.д\n\nСоздание ролей(админ, продавец, покупатель, тд)\n\u003c!-- header:token(admin) --\u003e\n/v1/role : POST\nRequest : {name : \"saler\"}; Response{Status, Message}\n|| insert into bazar_roles(name) values('saler');\n\n\nСтрана - Грузия, Оаэ, Россия...\n header[access_token]\n/v1/country : POST; {\"name\" : \"\"};  Response{Status, Message}\n\nГород - Тбилииси, Дубай, Москоу\n header[access_token]\n/v1/city/:country_id : POST; {\"name\" : \"\"}; Response{Status, Message}\n\nБренд  - Tesla, Toyota...\n header[access_token]\n/v1/brand : POST; {\"name\" : \"\"}; Response{Status, Message}\n\nМодель - Model X3, S;  Supra, Camry...\n header[access_token]\n/v1/model/:brand_id : POST; {\"name\" : \"\"}; Response{Status, Message}\n\nКатегории - Легковые, Мотоциклы, Яхты...\n header[access_token]\n/v1/category : POST; {\"name\" : \"\"}; Response{Status, Message}\n\nСостояние - Новые, БУ, Битые\n header[access_token]\n/v1/state : POST; {\"name\" : \"\"}; Response{Status, Message}\n\nТопливо - Дизель, Бензин, Электричество\n header[access_token]\n/v1/fuel : POST; {\"name\" : \"\"}; Response{Status, Message}\n\nТрансмиссия - Акпп, Мкпп, Гибрид\n header[access_token]\n/v1/transmission : POST; {\"name\" : \"\"}; Response{Status, Message}\n\nПривод - Передний, Задний, Полный\n header[access_token]\n/v1/drive_unit : POST; {\"name\" : \"\"}; Response{Status, Message}\n\nТип кузова -  Седан, купе, кабриолет..\n header[access_token]\n/v1/body_type : POST; {\"name\" : \"\"}; Response{Status, Message}\n\nЦвет - красный, белый...\n header[access_token]\n/v1/color : POST; {\"name\" : \"\"}; Response{Status, Message}\n------------------------------\n\nСоздание юзера(продавец)\n\n/v1/auth/signup : POST\nRequest: \n\n{\n\t\"email\": \"user@mail.kz\",\n\t\"username\":\"saler\",\n\t\"phone\":87471370784,\n\t\"first_name\":\"Glize\",\n\t\"last_name\":\"Union\",\n\t\"password\":\"123user\",\n    \"company\" : \"dillerX\",\n\n    fetch(/v1/country) return list(countries)\n    \"country\": {\n        \"id\" : int\n        \"city\" : {\n            fetch(/v1/city/:countryID)  return list(cities)\n            id: int\n        }\n    }\n    fetch(/v1/role)   return list(roles)\n    \"role\" {\n        \"id : int\n    }\n}\n\nResponse {statusCode, Message, Set Header[access_token, refresh_token]}\n------------------------------\n\nВход в систему\n/v1/auth/signin : POST\nRequest: \n{\n\t string username\n\t string password\n}\n\nResponse {statusCode, Message, Header[access_token, refresh_token]}\n------------------------------\n\nОбновление access токена, при  статусе 401\n/v1/auth/refresh -\u003e POST\nRequest(Header[refresh_token]) \nResponse {statusCode, Message, Header[access_token, refresh_token]}\n------------------------------\n(Если refresh токен недействителен, то redirect на  signin)\n------------------------------\n\nВыход из системы\n/v1/auth/logout\nRequest(Header[access_token])\nResponse {statusCode, Message, Remove access/refresh token}\n------------------------------\n\nПрофиль\nRequest : header[access_token]\n/v1/profile : GET\n/v1/machine/user?page_num=1 GET\n\nResponse:  {\n    UserInfo\n    ListCreatedCarsByUserID\n}\n\n------------------------------\n\nСоздание машины \nПрежде чем добавить машины: -\u003e добавить  в БД, админские crud(cateogry,model, brand, etc)\n\n/v1/machine : POST\nRequest:\n header[access_token]\nПолучить список полей с данными для :    transmision, brand, category, etc -\u003e fetch(v1/transmission, v1/category, etc...)\n1.1\n{\n    \"title\": \"Sale the best car, because i need money\",\n    \"description\": \"this car bla bla...\",\n    \"year\": 2009,\n    \"price\": 29500.1,\n    \"odometer\": 3000,\n    \"horse_power\": 200,\n    \"volume\": 3.5,\n    \"transmission\": {\n        \"id\": 1\n    },\n    \"body_type\": {\n        \"id\": 1\n    },\n    \"color\": {\n        \"id\": 1\n    },\n    \"category\": {\n        \"id\": 1\n    },\n    \"brand\": {\n        \"id\": 1,\n        \"model\": {\n            \"id\": 1\n        }\n    },\n    \"state\": {\n        \"id\": 1\n    },\n    \"country\": {\n        \"id\": 1,\n           \"city\": {\n             \"id\": 1\n        }\n    },\n\n    \"fuel\": {\n        \"id\": 1\n    },\n    \"drive_unit\": {\n        \"id\": 1\n    }\n}\n\nResponse {Status, lastCarID}\n\nasync, await\n1.2\nZатем выгрузка фото на файловый сервер\n/v1/machine/upload/lastCarID\nRequest {key : MultipartFile}\nResonse : {Status, Message}\n------------------------------\n\nГлавная:\n\nВернет список машин, по дате добавления\nпагинация по query-param; page_num; по умолчанию = 1 ( выдает по  9 машин)\n/v1/machine?page_num=2 : GET\nResponse{\n    []Machine{...}\n}\n------------------------------\n\nПагинация \n/v1/machine?page_num\nlimit = default 9\nможет с фильтром/сортировкой - работать\n------------------------------\n\nКарточка машины (Вернет машину по его ID)\n/v1/machine/:id : GET\nResponse{\n    Machine{...}\n}\n------------------------------\n\nФильтрация, по категории, состоянию,  бренду, модели\n\n/v1/machine/filter query-param : [\"category\", \"state\", \"brand\", \"model\"] id\nResponse : {\n    []Machine{...}\n}\n\nФильтрация по цене - /v1/machine/filter query-param [priceTo/proceFrom] float\n------------------------------\n\nПоиск по title или description\n/v1/machine/search/:POST query-param key_word\nResponse : {\n    []Machine{...}\n}\n------------------------------\n\nСортировка, (может включать поля фильтрации)\n/v1/machine/filter query-param : [\"category\", \"state\", \"brand\", \"model\", priceFrom, priceTo] +  \nsort_created_at/sort_price/sort_year/sort_odometer - asc/desc\n------------------------------","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevstackq%2Fbazar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevstackq%2Fbazar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevstackq%2Fbazar/lists"}