{"id":20710434,"url":"https://github.com/mobiletelesystems/botview","last_synced_at":"2025-06-27T10:08:19.324Z","repository":{"id":91738033,"uuid":"582607478","full_name":"MobileTeleSystems/botview","owner":"MobileTeleSystems","description":"Prerender of static sites for the visibility of search bots. SSR alternative.","archived":false,"fork":false,"pushed_at":"2025-03-22T23:40:34.000Z","size":973,"stargazers_count":18,"open_issues_count":2,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-23T06:51:23.107Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MobileTeleSystems.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-12-27T10:52:43.000Z","updated_at":"2025-04-19T11:10:13.000Z","dependencies_parsed_at":"2023-12-02T19:28:10.590Z","dependency_job_id":"4401cfa4-90d1-4e05-9c73-3c9cc5748bf5","html_url":"https://github.com/MobileTeleSystems/botview","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MobileTeleSystems/botview","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MobileTeleSystems%2Fbotview","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MobileTeleSystems%2Fbotview/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MobileTeleSystems%2Fbotview/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MobileTeleSystems%2Fbotview/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MobileTeleSystems","download_url":"https://codeload.github.com/MobileTeleSystems/botview/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MobileTeleSystems%2Fbotview/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262235783,"owners_count":23279567,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-17T02:11:57.849Z","updated_at":"2025-06-27T10:08:19.296Z","avatar_url":"https://github.com/MobileTeleSystems.png","language":"TypeScript","readme":"# Microservice for prerendering web pages.\n\nWeb pages that are rendered on the browser side and made without SSR are not seen by bots. Because bots can't render pages. This microservice allows all bots to see the already rendered page.\n\nFeatures:\n- Allows bots to see content on web pages without SSR\n- Works on any framework, ex: JQuery, Angular 1, StencilJS and others\n- Works on any technologies, ex: WebComponents, Microfrontends, Dynamic Content and others\n- Fast speed and low memory usage, inside only web engine without heavy browser\n- The prerender can work not only for bots but also for all clients if the application supports rerendering\n- Includes exporter of metrics for Prometheus\n\n## Try\n\nTo try the microservice features, run the container with the command:\n\n```sh\ndocker run -it --rm -p 3000:3000 mtsrus/botview\n```\n\nNow you can open the browser and check the work with the command:\n\n```sh\nhttp://localhost:3000/render/https://labeg.ru/\n```\n\nThe fully rendered page should display, including all content..\n\n## Use\n\nTo start the microservice in production, use the command:\n\n```sh\ndocker run -d --restart always -p 3000:3000 mtsrus/botview\n```\n\n## Return status code\n\nAdd the following element to your html and specify the required response status code:\n\n```html\n\u003cmeta name=\"prerender-status\" content=\"301\" /\u003e\n```\n\nThe server will return a response with the specified status code.\n\n## Container parameters\n\n- `-e BOTVIEW_BASIC_AUTHS=\"https%3A%2F%2Ftb.mts.ru%2F\"` - an array of endpoints with basic authorization parameters, default empty.\n    Has format encodeURIComponent(\"url\"):encodeURIComponent(\"login\"):encodeURIComponent(\"password\"). Use comma as separator.\n\n- `-e BOTVIEW_NAV_TIMEOUT=30000` - [This setting will change the default maximum navigation time](https://pptr.dev/api/puppeteer.page.setdefaultnavigationtimeout),\n    default 30000.\n\n- `-e BOTVIEW_DEFAULT_TIMEOUT=15000` - [This setting will change the default timeout](https://pptr.dev/api/puppeteer.page.setdefaulttimeout),\n    default 15000.\n\n- `-e BOTVIEW_WAIT_UNTIL=networkidle0` - [When to consider waiting succeeds. Given an array of event strings, waiting is considered to be successful after all events have been fired](https://pptr.dev/api/puppeteer.waitforoptions),\n    default networkidle0.\n\n## Metrics Prometheus\n\nThe microservice has built-in Prometheus monitoring and is located on the endpoint `/metrics`.\n\nBlock this endpoint on the proxy if you do not need to provide access to metrics from outside your network.\n\n## Proxy server setup\n\nIn order to catch bots and send them to the prerendering microservice, you need to configure a proxy server.\n\nExample config for Nginx:\n\n```sh\nlocation / {\n\n    set $prerender 0;\n\n    # all popular bots\n    if ($http_user_agent ~* \"googlebot|facebookexternalhit|twitterbot|telegrambot|yahoo|bingbot|baiduspider|yandex|yeti|yodaobot|gigabot|ia_archiver|developers\\.google\\.com\") {\n        set $prerender 1;\n    }\n\n    # bot with escape fragments\n    if ($args ~ \"_escaped_fragment_\") {\n        set $prerender 1;\n    }\n\n    # prerender microservice\n    if ($http_user_agent ~ \"Prerender\") {\n        set $prerender 0;\n    }\n\n    # static files\n    if ($uri ~ \\.[a-zA-Z0-9]+$) {\n        set $prerender 0;\n    }\n\n    if ($prerender = 1) {\n        rewrite (.*) /render/$scheme://$host$1?prerender break;\n        proxy_pass http://localhost:3000;\n    }\n\n    if ($prerender = 0) {\n        proxy_pass http://localhost:80;\n    }\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmobiletelesystems%2Fbotview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmobiletelesystems%2Fbotview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmobiletelesystems%2Fbotview/lists"}