openvibers/openvibe.domains Commits
OpenVibe.Domains v1: name it, price it, run it. One box prices a name across every ending with 1/3/5-year totals and renewal traps flagged, a page per ending with every registrar, a page per domain with its public record; open JSON API; stateless over OpenVibe.Host's price catalog and OpenVibe.Tools' domain history
Changes
nnew file mode 100644@@@ -0,0 +1,16 @@++# OpenVibe.Domains — environment (production: /etc/openvibe/domains.env). Names only; never commit values.++++NODE_ENV=production++PORT=5070++HOST=127.0.0.1++BASE_URL=https://openvibe.domains++TRUST_PROXY=2++++# The two public services this front reads. Both fall back to the internal origin in the pinned++# openvibe-contracts manifest; Tools has https://openvibe.tools if its manifest ever loses one.++# OV_HOST_INTERNAL_URL=http://127.0.0.1:4910++# OV_TOOLS_INTERNAL_URL=http://127.0.0.1:4001++++# The shared per-IP budget for /api/v1 and /search, and the data clients' timeout.++# DOMAINS_RATE_LIMIT_PER_MIN=120++# DOMAINS_UPSTREAM_TIMEOUT_MS=8000nnew file mode 100644@@@ -0,0 +1,17 @@++name: ci++on:++ push:++ branches: [main]++ pull_request:++jobs:++ # install, node --check and npm test: the shared test job (Track Q).++ test:++ uses: OpenVibers/OpenVibe.Shared/.github/workflows/test.yml@423fe519b5fe9594cc81b670e5ba5cb9f21f6176++ with:++ syntax-dirs: server test++ # OpenVibe.Domains has no database, no Valkey and no event stream: npm test is the whole suite.++ # No contracts-service yet: openvibe-contracts v0.225.0 has no manifests/services/domains.json.++ test: npm test++ # Secret scan (gitleaks) and dependency audit, shared by every OpenVibers repo (Track Q).++ security:++ uses: OpenVibers/OpenVibe.Shared/.github/workflows/security.yml@423fe519b5fe9594cc81b670e5ba5cb9f21f6176nnew file mode 100644@@@ -0,0 +1,12 @@++node_modules/++data/++dist/++.env++.env.*++!.env.example++*.log++*.pem++*.key++.npm-cache/++.npm-logs/++!server/data/nnew file mode 100644@@@ -0,0 +1,28 @@++# Changelog++++What changed in OpenVibe.Domains, newest first.++++## 0.1.0 — 2026-10-28++++The service skeleton: a stateless read-only front over OpenVibe.Host's price catalog and OpenVibe.Tools' public++domain history.++++- **Name parsing** (`server/names.js`): a label and an optional ending from what a person types — a bare label with++ spaces or underscores, a full name, a URL with a scheme, path or port, an IDN (`münchen.de`) — normalized to ASCII++ for the Host call and kept in Unicode for display. 1–63 character labels, no edge hyphens, 253 characters total.++- **Pricing** (`server/pricing.js`): every registrar row gains `y1`, `y3`, `y5` and the renewal trap++ (`renew ≥ 2 × register` and `renew − register ≥ 5`), rounded to cents. USD rows are compared and sorted by `y3`;++ other currencies are kept after them and flagged `currency_other`.++- **Data clients** (`server/data/host.js`, `server/data/tools.js`): injectable `fetchImpl`, 8-second timeouts, a++ 2,000-entry in-process cache (catalog 10 minutes, ending 10, name check 2, domain history 10), a failure is null++ and one short log line.++- **Pages** (`server/http/pages.js`): `/` (the popular first catalog page and the Tools lists), `/search?q=`++ (registry status and prices, `noindex`), `/tld/:tld`, `/.dev` 301, `/d/:domain` (public history plus its ending's++ prices), and a 404. The views are plain placeholders on the shared Frame for the main session to replace.++- **API** (`server/http/api.js`): `GET /api/v1/search?q=`, `/tlds`, `/tlds/:tld`, `/domains/:domain`; CORS-open,++ public for five minutes, 400 problem+json for a bad name, 404 for an unknown ending, and a 120/min per-IP limit++ shared with `/search`.++- **Plumbing:** helmet with Help's CSP, health, truthful readiness (Host and Tools are optional checks, so a failure++ is `degraded`, not 503), release.json and the release collector, `/shared`, robots.txt, sitemap.xml (every ending++ in the catalog pages), llms.txt, loopback-only metrics and graceful stop.++- **Repo:** deploy files (systemd, nginx), CI, README, STATUS, SECURITY, LICENSE, .env.example and four test files.nnew file mode 100644@@@ -0,0 +1,661 @@++ GNU AFFERO GENERAL PUBLIC LICENSE++ Version 3, 19 November 2007++++ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>++ Everyone is permitted to copy and distribute verbatim copies++ of this license document, but changing it is not allowed.++++ Preamble++++ The GNU Affero General Public License is a free, copyleft license for++software and other kinds of works, specifically designed to ensure++cooperation with the community in the case of network server software.++++ The licenses for most software and other practical works are designed++to take away your freedom to share and change the works. By contrast,++our General Public Licenses are intended to guarantee your freedom to++share and change all versions of a program--to make sure it remains free++software for all its users.++++ When we speak of free software, we are referring to freedom, not++price. Our General Public Licenses are designed to make sure that you++have the freedom to distribute copies of free software (and charge for++them if you wish), that you receive source code or can get it if you++want it, that you can change the software or use pieces of it in new++free programs, and that you know you can do these things.++++ Developers that use our General Public Licenses protect your rights++with two steps: (1) assert copyright on the software, and (2) offer++you this License which gives you legal permission to copy, distribute++and/or modify the software.++++ A secondary benefit of defending all users' freedom is that++improvements made in alternate versions of the program, if they++receive widespread use, become available for other developers to++incorporate. Many developers of free software are heartened and++encouraged by the resulting cooperation. However, in the case of++software used on network servers, this result may fail to come about.++The GNU General Public License permits making a modified version and++letting the public access it on a server without ever releasing its++source code to the public.++++ The GNU Affero General Public License is designed specifically to++ensure that, in such cases, the modified source code becomes available++to the community. It requires the operator of a network server to++provide the source code of the modified version running there to the++users of that server. Therefore, public use of a modified version, on++a publicly accessible server, gives the public access to the source++code of the modified version.++++ An older license, called the Affero General Public License and++published by Affero, was designed to accomplish similar goals. This is++a different license, not a version of the Affero GPL, but Affero has++released a new version of the Affero GPL which permits relicensing under++this license.++++ The precise terms and conditions for copying, distribution and++modification follow.++++ TERMS AND CONDITIONS++++ 0. Definitions.++++ "This License" refers to version 3 of the GNU Affero General Public License.++++ "Copyright" also means copyright-like laws that apply to other kinds of++works, such as semiconductor masks.++++ "The Program" refers to any copyrightable work licensed under this++License. Each licensee is addressed as "you". "Licensees" and++"recipients" may be individuals or organizations.++++ To "modify" a work means to copy from or adapt all or part of the work++in a fashion requiring copyright permission, other than the making of an++exact copy. The resulting work is called a "modified version" of the++earlier work or a work "based on" the earlier work.++++ A "covered work" means either the unmodified Program or a work based++on the Program.++++ To "propagate" a work means to do anything with it that, without++permission, would make you directly or secondarily liable for++infringement under applicable copyright law, except executing it on a++computer or modifying a private copy. Propagation includes copying,++distribution (with or without modification), making available to the++public, and in some countries other activities as well.++++ To "convey" a work means any kind of propagation that enables other++parties to make or receive copies. Mere interaction with a user through++a computer network, with no transfer of a copy, is not conveying.++++ An interactive user interface displays "Appropriate Legal Notices"++to the extent that it includes a convenient and prominently visible++feature that (1) displays an appropriate copyright notice, and (2)++tells the user that there is no warranty for the work (except to the++extent that warranties are provided), that licensees may convey the++work under this License, and how to view a copy of this License. If++the interface presents a list of user commands or options, such as a++menu, a prominent item in the list meets this criterion.++++ 1. Source Code.++++ The "source code" for a work means the preferred form of the work++for making modifications to it. "Object code" means any non-source++form of a work.++++ A "Standard Interface" means an interface that either is an official++standard defined by a recognized standards body, or, in the case of++interfaces specified for a particular programming language, one that++is widely used among developers working in that language.++++ The "System Libraries" of an executable work include anything, other++than the work as a whole, that (a) is included in the normal form of++packaging a Major Component, but which is not part of that Major++Component, and (b) serves only to enable use of the work with that++Major Component, or to implement a Standard Interface for which an++implementation is available to the public in source code form. A++"Major Component", in this context, means a major essential component++(kernel, window system, and so on) of the specific operating system++(if any) on which the executable work runs, or a compiler used to++produce the work, or an object code interpreter used to run it.++++ The "Corresponding Source" for a work in object code form means all++the source code needed to generate, install, and (for an executable++work) run the object code and to modify the work, including scripts to++control those activities. However, it does not include the work's++System Libraries, or general-purpose tools or generally available free++programs which are used unmodified in performing those activities but++which are not part of the work. For example, Corresponding Source++includes interface definition files associated with source files for++the work, and the source code for shared libraries and dynamically++linked subprograms that the work is specifically designed to require,++such as by intimate data communication or control flow between those++subprograms and other parts of the work.++++ The Corresponding Source need not include anything that users++can regenerate automatically from other parts of the Corresponding++Source.++++ The Corresponding Source for a work in source code form is that++same work.++++ 2. Basic Permissions.++++ All rights granted under this License are granted for the term of++copyright on the Program, and are irrevocable provided the stated++conditions are met. This License explicitly affirms your unlimited++permission to run the unmodified Program. The output from running a++covered work is covered by this License only if the output, given its++content, constitutes a covered work. This License acknowledges your++rights of fair use or other equivalent, as provided by copyright law.++++ You may make, run and propagate covered works that you do not++convey, without conditions so long as your license otherwise remains++in force. You may convey covered works to others for the sole purpose++of having them make modifications exclusively for you, or provide you++with facilities for running those works, provided that you comply with++the terms of this License in conveying all material for which you do++not control copyright. Those thus making or running the covered works++for you must do so exclusively on your behalf, under your direction++and control, on terms that prohibit them from making any copies of++your copyrighted material outside their relationship with you.++++ Conveying under any other circumstances is permitted solely under++the conditions stated below. Sublicensing is not allowed; section 10++makes it unnecessary.++++ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.++++ No covered work shall be deemed part of an effective technological++measure under any applicable law fulfilling obligations under article++11 of the WIPO copyright treaty adopted on 20 December 1996, or++similar laws prohibiting or restricting circumvention of such++measures.++++ When you convey a covered work, you waive any legal power to forbid++circumvention of technological measures to the extent such circumvention++is effected by exercising rights under this License with respect to++the covered work, and you disclaim any intention to limit operation or++modification of the work as a means of enforcing, against the work's++users, your or third parties' legal rights to forbid circumvention of++technological measures.++++ 4. Conveying Verbatim Copies.++++ You may convey verbatim copies of the Program's source code as you++receive it, in any medium, provided that you conspicuously and++appropriately publish on each copy an appropriate copyright notice;++keep intact all notices stating that this License and any++non-permissive terms added in accord with section 7 apply to the code;++keep intact all notices of the absence of any warranty; and give all++recipients a copy of this License along with the Program.++++ You may charge any price or no price for each copy that you convey,++and you may offer support or warranty protection for a fee.++++ 5. Conveying Modified Source Versions.++++ You may convey a work based on the Program, or the modifications to++produce it from the Program, in the form of source code under the++terms of section 4, provided that you also meet all of these conditions:++++ a) The work must carry prominent notices stating that you modified++ it, and giving a relevant date.++++ b) The work must carry prominent notices stating that it is++ released under this License and any conditions added under section++ 7. This requirement modifies the requirement in section 4 to++ "keep intact all notices".++++ c) You must license the entire work, as a whole, under this++ License to anyone who comes into possession of a copy. This++ License will therefore apply, along with any applicable section 7++ additional terms, to the whole of the work, and all its parts,++ regardless of how they are packaged. This License gives no++ permission to license the work in any other way, but it does not++ invalidate such permission if you have separately received it.++++ d) If the work has interactive user interfaces, each must display++ Appropriate Legal Notices; however, if the Program has interactive++ interfaces that do not display Appropriate Legal Notices, your++ work need not make them do so.++++ A compilation of a covered work with other separate and independent++works, which are not by their nature extensions of the covered work,++and which are not combined with it such as to form a larger program,++in or on a volume of a storage or distribution medium, is called an++"aggregate" if the compilation and its resulting copyright are not++used to limit the access or legal rights of the compilation's users++beyond what the individual works permit. Inclusion of a covered work++in an aggregate does not cause this License to apply to the other++parts of the aggregate.++++ 6. Conveying Non-Source Forms.++++ You may convey a covered work in object code form under the terms++of sections 4 and 5, provided that you also convey the++machine-readable Corresponding Source under the terms of this License,++in one of these ways:++++ a) Convey the object code in, or embodied in, a physical product++ (including a physical distribution medium), accompanied by the++ Corresponding Source fixed on a durable physical medium++ customarily used for software interchange.++++ b) Convey the object code in, or embodied in, a physical product++ (including a physical distribution medium), accompanied by a++ written offer, valid for at least three years and valid for as++ long as you offer spare parts or customer support for that product++ model, to give anyone who possesses the object code either (1) a++ copy of the Corresponding Source for all the software in the++ product that is covered by this License, on a durable physical++ medium customarily used for software interchange, for a price no++ more than your reasonable cost of physically performing this++ conveying of source, or (2) access to copy the++ Corresponding Source from a network server at no charge.++++ c) Convey individual copies of the object code with a copy of the++ written offer to provide the Corresponding Source. This++ alternative is allowed only occasionally and noncommercially, and++ only if you received the object code with such an offer, in accord++ with subsection 6b.++++ d) Convey the object code by offering access from a designated++ place (gratis or for a charge), and offer equivalent access to the++ Corresponding Source in the same way through the same place at no++ further charge. You need not require recipients to copy the++ Corresponding Source along with the object code. If the place to++ copy the object code is a network server, the Corresponding Source++ may be on a different server (operated by you or a third party)++ that supports equivalent copying facilities, provided you maintain++ clear directions next to the object code saying where to find the++ Corresponding Source. Regardless of what server hosts the++ Corresponding Source, you remain obligated to ensure that it is++ available for as long as needed to satisfy these requirements.++++ e) Convey the object code using peer-to-peer transmission, provided++ you inform other peers where the object code and Corresponding++ Source of the work are being offered to the general public at no++ charge under subsection 6d.++++ A separable portion of the object code, whose source code is excluded++from the Corresponding Source as a System Library, need not be++included in conveying the object code work.++++ A "User Product" is either (1) a "consumer product", which means any++tangible personal property which is normally used for personal, family,++or household purposes, or (2) anything designed or sold for incorporation++into a dwelling. In determining whether a product is a consumer product,++doubtful cases shall be resolved in favor of coverage. For a particular++product received by a particular user, "normally used" refers to a++typical or common use of that class of product, regardless of the status++of the particular user or of the way in which the particular user++actually uses, or expects or is expected to use, the product. A product++is a consumer product regardless of whether the product has substantial++commercial, industrial or non-consumer uses, unless such uses represent++the only significant mode of use of the product.++++ "Installation Information" for a User Product means any methods,++procedures, authorization keys, or other information required to install++and execute modified versions of a covered work in that User Product from++a modified version of its Corresponding Source. The information must++suffice to ensure that the continued functioning of the modified object++code is in no case prevented or interfered with solely because++modification has been made.++++ If you convey an object code work under this section in, or with, or++specifically for use in, a User Product, and the conveying occurs as++part of a transaction in which the right of possession and use of the++User Product is transferred to the recipient in perpetuity or for a++fixed term (regardless of how the transaction is characterized), the++Corresponding Source conveyed under this section must be accompanied++by the Installation Information. But this requirement does not apply++if neither you nor any third party retains the ability to install++modified object code on the User Product (for example, the work has++been installed in ROM).++++ The requirement to provide Installation Information does not include a++requirement to continue to provide support service, warranty, or updates++for a work that has been modified or installed by the recipient, or for++the User Product in which it has been modified or installed. Access to a++network may be denied when the modification itself materially and++adversely affects the operation of the network or violates the rules and++protocols for communication across the network.++++ Corresponding Source conveyed, and Installation Information provided,++in accord with this section must be in a format that is publicly++documented (and with an implementation available to the public in++source code form), and must require no special password or key for++unpacking, reading or copying.++++ 7. Additional Terms.++++ "Additional permissions" are terms that supplement the terms of this++License by making exceptions from one or more of its conditions.++Additional permissions that are applicable to the entire Program shall++be treated as though they were included in this License, to the extent++that they are valid under applicable law. If additional permissions++apply only to part of the Program, that part may be used separately++under those permissions, but the entire Program remains governed by++this License without regard to the additional permissions.++++ When you convey a copy of a covered work, you may at your option++remove any additional permissions from that copy, or from any part of++it. (Additional permissions may be written to require their own++removal in certain cases when you modify the work.) You may place++additional permissions on material, added by you to a covered work,++for which you have or can give appropriate copyright permission.++++ Notwithstanding any other provision of this License, for material you++add to a covered work, you may (if authorized by the copyright holders of++that material) supplement the terms of this License with terms:++++ a) Disclaiming warranty or limiting liability differently from the++ terms of sections 15 and 16 of this License; or++++ b) Requiring preservation of specified reasonable legal notices or++ author attributions in that material or in the Appropriate Legal++ Notices displayed by works containing it; or++++ c) Prohibiting misrepresentation of the origin of that material, or++ requiring that modified versions of such material be marked in++ reasonable ways as different from the original version; or++++ d) Limiting the use for publicity purposes of names of licensors or++ authors of the material; or++++ e) Declining to grant rights under trademark law for use of some++ trade names, trademarks, or service marks; or++++ f) Requiring indemnification of licensors and authors of that++ material by anyone who conveys the material (or modified versions of++ it) with contractual assumptions of liability to the recipient, for++ any liability that these contractual assumptions directly impose on++ those licensors and authors.++++ All other non-permissive additional terms are considered "further++restrictions" within the meaning of section 10. If the Program as you++received it, or any part of it, contains a notice stating that it is++governed by this License along with a term that is a further++restriction, you may remove that term. If a license document contains++a further restriction but permits relicensing or conveying under this++License, you may add to a covered work material governed by the terms++of that license document, provided that the further restriction does++not survive such relicensing or conveying.++++ If you add terms to a covered work in accord with this section, you++must place, in the relevant source files, a statement of the++additional terms that apply to those files, or a notice indicating++where to find the applicable terms.++++ Additional terms, permissive or non-permissive, may be stated in the++form of a separately written license, or stated as exceptions;++the above requirements apply either way.++++ 8. Termination.++++ You may not propagate or modify a covered work except as expressly++provided under this License. Any attempt otherwise to propagate or++modify it is void, and will automatically terminate your rights under++this License (including any patent licenses granted under the third++paragraph of section 11).++++ However, if you cease all violation of this License, then your++license from a particular copyright holder is reinstated (a)++provisionally, unless and until the copyright holder explicitly and++finally terminates your license, and (b) permanently, if the copyright++holder fails to notify you of the violation by some reasonable means++prior to 60 days after the cessation.++++ Moreover, your license from a particular copyright holder is++reinstated permanently if the copyright holder notifies you of the++violation by some reasonable means, this is the first time you have++received notice of violation of this License (for any work) from that++copyright holder, and you cure the violation prior to 30 days after++your receipt of the notice.++++ Termination of your rights under this section does not terminate the++licenses of parties who have received copies or rights from you under++this License. If your rights have been terminated and not permanently++reinstated, you do not qualify to receive new licenses for the same++material under section 10.++++ 9. Acceptance Not Required for Having Copies.++++ You are not required to accept this License in order to receive or++run a copy of the Program. Ancillary propagation of a covered work++occurring solely as a consequence of using peer-to-peer transmission++to receive a copy likewise does not require acceptance. However,++nothing other than this License grants you permission to propagate or++modify any covered work. These actions infringe copyright if you do++not accept this License. Therefore, by modifying or propagating a++covered work, you indicate your acceptance of this License to do so.++++ 10. Automatic Licensing of Downstream Recipients.++++ Each time you convey a covered work, the recipient automatically++receives a license from the original licensors, to run, modify and++propagate that work, subject to this License. You are not responsible++for enforcing compliance by third parties with this License.++++ An "entity transaction" is a transaction transferring control of an++organization, or substantially all assets of one, or subdividing an++organization, or merging organizations. If propagation of a covered++work results from an entity transaction, each party to that++transaction who receives a copy of the work also receives whatever++licenses to the work the party's predecessor in interest had or could++give under the previous paragraph, plus a right to possession of the++Corresponding Source of the work from the predecessor in interest, if++the predecessor has it or can get it with reasonable efforts.++++ You may not impose any further restrictions on the exercise of the++rights granted or affirmed under this License. For example, you may++not impose a license fee, royalty, or other charge for exercise of++rights granted under this License, and you may not initiate litigation++(including a cross-claim or counterclaim in a lawsuit) alleging that++any patent claim is infringed by making, using, selling, offering for++sale, or importing the Program or any portion of it.++++ 11. Patents.++++ A "contributor" is a copyright holder who authorizes use under this++License of the Program or a work on which the Program is based. The++work thus licensed is called the contributor's "contributor version".++++ A contributor's "essential patent claims" are all patent claims++owned or controlled by the contributor, whether already acquired or++hereafter acquired, that would be infringed by some manner, permitted++by this License, of making, using, or selling its contributor version,++but do not include claims that would be infringed only as a++consequence of further modification of the contributor version. For++purposes of this definition, "control" includes the right to grant++patent sublicenses in a manner consistent with the requirements of++this License.++++ Each contributor grants you a non-exclusive, worldwide, royalty-free++patent license under the contributor's essential patent claims, to++make, use, sell, offer for sale, import and otherwise run, modify and++propagate the contents of its contributor version.++++ In the following three paragraphs, a "patent license" is any express++agreement or commitment, however denominated, not to enforce a patent++(such as an express permission to practice a patent or covenant not to++sue for patent infringement). To "grant" such a patent license to a++party means to make such an agreement or commitment not to enforce a++patent against the party.++++ If you convey a covered work, knowingly relying on a patent license,++and the Corresponding Source of the work is not available for anyone++to copy, free of charge and under the terms of this License, through a++publicly available network server or other readily accessible means,++then you must either (1) cause the Corresponding Source to be so++available, or (2) arrange to deprive yourself of the benefit of the++patent license for this particular work, or (3) arrange, in a manner++consistent with the requirements of this License, to extend the patent++license to downstream recipients. "Knowingly relying" means you have++actual knowledge that, but for the patent license, your conveying the++covered work in a country, or your recipient's use of the covered work++in a country, would infringe one or more identifiable patents in that++country that you have reason to believe are valid.++++ If, pursuant to or in connection with a single transaction or++arrangement, you convey, or propagate by procuring conveyance of, a++covered work, and grant a patent license to some of the parties++receiving the covered work authorizing them to use, propagate, modify++or convey a specific copy of the covered work, then the patent license++you grant is automatically extended to all recipients of the covered++work and works based on it.++++ A patent license is "discriminatory" if it does not include within++the scope of its coverage, prohibits the exercise of, or is++conditioned on the non-exercise of one or more of the rights that are++specifically granted under this License. You may not convey a covered++work if you are a party to an arrangement with a third party that is++in the business of distributing software, under which you make payment++to the third party based on the extent of your activity of conveying++the work, and under which the third party grants, to any of the++parties who would receive the covered work from you, a discriminatory++patent license (a) in connection with copies of the covered work++conveyed by you (or copies made from those copies), or (b) primarily++for and in connection with specific products or compilations that++contain the covered work, unless you entered into that arrangement,++or that patent license was granted, prior to 28 March 2007.++++ Nothing in this License shall be construed as excluding or limiting++any implied license or other defenses to infringement that may++otherwise be available to you under applicable patent law.++++ 12. No Surrender of Others' Freedom.++++ If conditions are imposed on you (whether by court order, agreement or++otherwise) that contradict the conditions of this License, they do not++excuse you from the conditions of this License. If you cannot convey a++covered work so as to satisfy simultaneously your obligations under this++License and any other pertinent obligations, then as a consequence you may++not convey it at all. For example, if you agree to terms that obligate you++to collect a royalty for further conveying from those to whom you convey++the Program, the only way you could satisfy both those terms and this++License would be to refrain entirely from conveying the Program.++++ 13. Remote Network Interaction; Use with the GNU General Public License.++++ Notwithstanding any other provision of this License, if you modify the++Program, your modified version must prominently offer all users++interacting with it remotely through a computer network (if your version++supports such interaction) an opportunity to receive the Corresponding++Source of your version by providing access to the Corresponding Source++from a network server at no charge, through some standard or customary++means of facilitating copying of software. This Corresponding Source++shall include the Corresponding Source for any work covered by version 3++of the GNU General Public License that is incorporated pursuant to the++following paragraph.++++ Notwithstanding any other provision of this License, you have++permission to link or combine any covered work with a work licensed++under version 3 of the GNU General Public License into a single++combined work, and to convey the resulting work. The terms of this++License will continue to apply to the part which is the covered work,++but the work with which it is combined will remain governed by version++3 of the GNU General Public License.++++ 14. Revised Versions of this License.++++ The Free Software Foundation may publish revised and/or new versions of++the GNU Affero General Public License from time to time. Such new versions++will be similar in spirit to the present version, but may differ in detail to++address new problems or concerns.++++ Each version is given a distinguishing version number. If the++Program specifies that a certain numbered version of the GNU Affero General++Public License "or any later version" applies to it, you have the++option of following the terms and conditions either of that numbered++version or of any later version published by the Free Software++Foundation. If the Program does not specify a version number of the++GNU Affero General Public License, you may choose any version ever published++by the Free Software Foundation.++++ If the Program specifies that a proxy can decide which future++versions of the GNU Affero General Public License can be used, that proxy's++public statement of acceptance of a version permanently authorizes you++to choose that version for the Program.++++ Later license versions may give you additional or different++permissions. However, no additional obligations are imposed on any++author or copyright holder as a result of your choosing to follow a++later version.++++ 15. Disclaimer of Warranty.++++ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY++APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT++HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY++OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,++THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR++PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM++IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF++ALL NECESSARY SERVICING, REPAIR OR CORRECTION.++++ 16. Limitation of Liability.++++ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING++WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS++THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY++GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE++USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF++DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD++PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),++EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF++SUCH DAMAGES.++++ 17. Interpretation of Sections 15 and 16.++++ If the disclaimer of warranty and limitation of liability provided++above cannot be given local legal effect according to their terms,++reviewing courts shall apply local law that most closely approximates++an absolute waiver of all civil liability in connection with the++Program, unless a warranty or assumption of liability accompanies a++copy of the Program in return for a fee.++++ END OF TERMS AND CONDITIONS++++ How to Apply These Terms to Your New Programs++++ If you develop a new program, and you want it to be of the greatest++possible use to the public, the best way to achieve this is to make it++free software which everyone can redistribute and change under these terms.++++ To do so, attach the following notices to the program. It is safest++to attach them to the start of each source file to most effectively++state the exclusion of warranty; and each file should have at least++the "copyright" line and a pointer to where the full notice is found.++++ <one line to give the program's name and a brief idea of what it does.>++ Copyright (C) <year> <name of author>++++ This program is free software: you can redistribute it and/or modify++ it under the terms of the GNU Affero General Public License as published++ by the Free Software Foundation, either version 3 of the License, or++ (at your option) any later version.++++ This program is distributed in the hope that it will be useful,++ but WITHOUT ANY WARRANTY; without even the implied warranty of++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the++ GNU Affero General Public License for more details.++++ You should have received a copy of the GNU Affero General Public License++ along with this program. If not, see <https://www.gnu.org/licenses/>.++++Also add information on how to contact you by electronic and paper mail.++++ If your software can interact with users remotely through a computer++network, you should also make sure that it provides a way for users to++get its source. For example, if your program is a web application, its++interface could display a "Source" link that leads users to an archive++of the code. There are many ways you could offer source, and different++solutions will be better for different programs; see section 13 for the++specific requirements.++++ You should also get your employer (if you work as a programmer) or school,++if any, to sign a "copyright disclaimer" for the program, if necessary.++For more information on this, and how to apply and follow the GNU AGPL, see++<https://www.gnu.org/licenses/>.nnew file mode 100644@@@ -0,0 +1,125 @@++# OpenVibe.Domains++++> Name it, price it, run it.++++**Status:** v1 is the service skeleton (see [STATUS.json](STATUS.json)); the pages are plain placeholders.++**Domain:** `openvibe.domains` · **Port:** 5070 · **Service id:** `domains` · **Env prefix:** `DOMAINS`++**License:** AGPL-3.0-only (same as every OpenVibe service).++++OpenVibe.Domains is a stateless read-only front over two OpenVibe services. For a name it shows the registry's++availability and every registrar's prices for that ending, with one-, three- and five-year totals; every ending has++its own page; every domain has a page with its public registration history.++++There is no database, no sign-in, no session and no event stream. Nothing is stored and nothing is written.++++## Pages (v1)++++| Route | What it shows |++|---|---|++| `/` | the first page of OpenVibe.Host's price catalog (popular endings), plus OpenVibe.Tools' public "most looked up" and "expiring soon" lists when it answers |++| `/search?q=` | registry status for the name, and every registrar's first-year, three-year and five-year totals, sorted by the three-year total; `noindex` because every query is a page |++| `/tld/:tld` | one ending (`.dev`, `co.uk`) with every registrar's prices, the five-year total and the renewal-trap mark |++| `/.<ending>` | 301 to `/tld/<ending>` (for example `/.dev` → `/tld/dev`) |++| `/d/:domain` | a full domain: its public history from OpenVibe.Tools and its ending's prices from OpenVibe.Host |++| anything else | the 404 page |++++All of it is server-rendered and readable without JavaScript. The shell is the OpenVibe Frame (`openvibe-shared/shell`):++theme loader, navbar mounted into `#navbar-mount`, the shared server-rendered footer, service id `domains`.++++## API++++Everything under `/api/v1`, read-only, CORS-open (`Access-Control-Allow-Origin: *`), cached publicly for five++minutes. A bad name is RFC 9457 `application/problem+json`; an ending the catalog does not know is 404.++++| Route | Answer |++|---|---|++| `GET /api/v1/search?q=` | `{ name, status, rows }` — `name` is `{ label, tld, ascii, display }`, `status` is the registry's answer, `rows` are the priced registrar rows |++| `GET /api/v1/tlds?q=&kind=&sort=&page=` | OpenVibe.Host's list as it answers it: `{ tlds, next_cursor }`. Sorts: `popular`, `tld`, `register`, `renew`, `five_year` |++| `GET /api/v1/tlds/:tld` | `{ tld }` with its prices priced like the page |++| `GET /api/v1/domains/:domain` | `{ name, history, prices }` — history from OpenVibe.Tools, prices for that domain's ending only |++++`/api/v1` and `/search` share a per-IP limit of 120 requests a minute (`express-rate-limit`).++++## What "priced" means++++OpenVibe.Host's check rows carry `register`, `renew`, `five_year`, `registrars`, `currency`, `checked_at`, `tld`,++`display` and `kind`. Each row gains:++++- `y1` — first year: `register`;++- `y3` — three years: `register + 2 × renew`;++- `y5` — five years: the catalog's `five_year` when it has one, else `register + 4 × renew`;++- `trap` — `renew ≥ 2 × register` **and** `renew − register ≥ 5`: the cheap-first-year renewal trap.++++A total that needs a missing price is `null`, never `NaN`. Money is rounded to cents. Only USD rows are compared and++sorted (by `y3`, rows without a `y3` last); other currencies are kept after them and flagged `currency_other: true`.++++## The data it reads++++| Source | Endpoint | Used for | Cache |++|---|---|---|---|++| OpenVibe.Host | `GET /api/v1/catalog/domains?sort=…&cursor=…` | the catalog's ending list and the sitemap | 10 minutes |++| OpenVibe.Host | `GET /api/v1/catalog/domains/:tld` | one ending's registrar prices and history | 10 minutes |++| OpenVibe.Host | `GET /api/v1/catalog/domains/check?name=` | a name's registry status and priced endings | 2 minutes |++| OpenVibe.Tools | `GET /api/v1/domains/` | the public most-looked-up and expiring-soon lists | 10 minutes |++| OpenVibe.Tools | `GET /api/v1/domains/:domain` | a domain's public snapshots and changes | 10 minutes |++++Both clients take an injectable `fetchImpl`, time out after 8 seconds, and keep a small in-process `Map` cache with a++2,000-entry cap (oldest insertion out). A failure is `null` and one short log line — never an exception in a page.++The upstream URLs come from `OV_HOST_INTERNAL_URL` / `OV_TOOLS_INTERNAL_URL`, or the internal origins in the pinned++OpenVibe.Contracts manifests, with `https://openvibe.tools` as the Tools fallback.++++OpenVibe.Tools keeps RDAP's public registration facts only (registrar, dates, status codes, name servers, DNSSEC) and++publishes a domain on its lists only after at least five lookups. This service adds no data of its own.++++## Configuration++++Copy [.env.example](.env.example) to the environment file (`/etc/openvibe/domains.env` in production):++++| Variable | Default | What |++|---|---|---|++| `NODE_ENV` | `development` | `production` selects the production base URL |++| `PORT` | `5070` | listen port |++| `HOST` | `127.0.0.1` | listen address |++| `BASE_URL` | `https://openvibe.domains` in production | public origin used for canonical URLs, the sitemap and llms.txt |++| `TRUST_PROXY` | `2` | how many proxies to trust (nginx and the CDN) |++| `OV_HOST_INTERNAL_URL` | the Host manifest's `internalOrigin` | OpenVibe.Host's internal API |++| `OV_TOOLS_INTERNAL_URL` | the Tools manifest's `internalOrigin` | OpenVibe.Tools' internal API |++| `DOMAINS_RATE_LIMIT_PER_MIN` | `120` | the shared `/api/v1` and `/search` per-IP budget |++| `DOMAINS_UPSTREAM_TIMEOUT_MS` | `8000` | the two data clients' timeout |++++## Run it++++```bash++npm install++npm test # every test/*.test.js, each in its own process, with stub upstreams++npm run dev # http://localhost:5070++npm start # production++```++++The tests need no database, no network and no running OpenVibe site. `node --check` every `.js` file is the other++gate.++++## Machine endpoints++++| Route | What |++|---|---|++| `/api/health` | `{ status: "ok", service: "openvibe-domains", version }` |++| `/api/ready` | truthful readiness (`openvibe-shared/ready`): `ready` while the process serves; a Host or Tools failure makes `status: "degraded"` and names it, never 503 |++| `/release.json`, `/release-metrics` | the release manifest and the tab collector (`openvibe-shared/release`) |++| `/metrics` | Prometheus text format, loopback only (`openvibe-shared/metrics`) |++| `/shared/*` | this service's own pinned OpenVibe Frame files |++| `/robots.txt` | allow everything, name the sitemap |++| `/sitemap.xml` | `/` and one `/tld/<ending>` per ending in every page of the Host catalog; `lastmod` from the release |++| `/llms.txt` | what the site is, its pages and its API |++++## Deploy++++- `deploy/systemd/openvibe-domains.service` — user `ubuntu`, `WorkingDirectory=/opt/openvibe.domains`,++ `EnvironmentFile=/etc/openvibe/domains.env`, port 5070.++- `deploy/nginx/openvibe.domains.conf` — TLS, `www` → apex 301, proxy to `127.0.0.1:5070`, security headers, GET-only++ `/api/v1`, loopback-only metrics.++- CI: `.github/workflows/ci.yml` runs the shared syntax/contracts/security jobs; there is no database service.++++## License++++AGPL-3.0-only. See [LICENSE](LICENSE).nnew file mode 100644@@@ -0,0 +1,20 @@++# Security policy++++OpenVibe is run in the open, and we want to hear about security problems before anyone else does.++++## Reporting a vulnerability++++Email **[email protected]** with "security" in the subject. Please include what you found, where (URL,++repository, file), how to reproduce it, and what an attacker could do with it. Do not open a public GitHub issue for++a vulnerability, and do not test against other people's accounts, data or streams.++++We reply within 7 days, keep you updated while we fix it, and credit you when the fix ships if you would like.++++## Scope++++Every OpenVibe service and site (openvibe.domains and the other openvibe.* domains) and every repository under++github.com/OpenVibers.++++## Supported versions++++Only the current `main` branch, which is what runs in production, receives fixes.nnew file mode 100644@@@ -0,0 +1,56 @@++{++ "repository": "OpenVibers/OpenVibe.Domains",++ "version": "0.1.0",++ "stage": "product",++ "code": true,++ "wave": "v1",++ "plan": "OpenVibe.Domains v1: a stateless read-only front over OpenVibe.Host's domain price catalog and OpenVibe.Tools' public domain history — name checks, one page per ending, one page per domain, a JSON API, and the service skeleton (deploy, discovery, readiness, tests)",++ "runtime": "node 22, express 4",++ "port": "5070",++ "domain": "openvibe.domains",++ "contracts": "openvibe-contracts v0.225.0",++ "sdk": "openvibe-sdk v0.70.0",++ "shared": "openvibe-shared v4.29.0",++ "packages": [++ "openvibe-contracts v0.225.0",++ "openvibe-sdk v0.70.0",++ "openvibe-shared v4.29.0"++ ],++ "summary": "OpenVibe.Domains is a stateless front: no database, no sign-in, no events. It reads OpenVibe.Host's internal catalog (GET /api/v1/catalog/domains, /domains/check?name=, /domains/:tld) and OpenVibe.Tools' public history (GET /api/v1/domains, /domains/:domain) through small in-process caches, prices every registrar row into one-, three- and five-year totals with the cheap-first-year renewal trap, and serves server-rendered pages (home, name search, one ending, one domain) plus a read-only JSON API. It has the service plumbing the other OpenVibe sites have: helmet/CSP, health and truthful readiness (degraded, never 503, when either upstream is down), release.json and /release-metrics, /shared, robots/sitemap/llms, a per-IP limit on /api/v1 and /search, graceful stop, deploy files and tests.",++ "works": [++ "Name parsing (server/names.js): URLs, ports, a leading www., spaces and underscores in the label, IDNs via url.domainToASCII, co.uk endings, 1-63 character labels and the 253-character limit; display keeps Unicode",++ "Pricing (server/pricing.js): y1 = register, y3 = register + 2 renew, y5 = five_year or register + 4 renew, the renewal trap, cents rounding, USD rows compared and sorted by y3 with non-USD rows flagged and kept after them",++ "Two cached data clients (server/data/): injectable fetchImpl, 8 s timeouts, a 2,000-entry expiry Map, 10/10/2/10-minute TTLs, a failure is null and one short log line",++ "Pages (server/http/pages.js, server/views/index.js): / with the popular catalog and Tools lists, /search?q= (noindex), /tld/:tld, /.dev 301, /d/:domain and a 404; plain placeholder views on the shared Frame with the service id domains",++ "Read-only JSON API at /api/v1: search, tlds, one tld, one domain; CORS-open; 400 problem+json for a bad name and 404 for an unknown ending; 120/min per IP shared with /search",++ "Service plumbing: helmet with Help's CSP, /api/health, /api/ready (Host and Tools optional, so a failure is degraded not 503), release.json and /release-metrics, /shared, /robots.txt, /sitemap.xml (every catalog ending, lastmod from the release), /llms.txt, /metrics on loopback, graceful stop",++ "Deploy files: systemd unit on /opt/openvibe.domains, nginx vhost with www -> apex, TLS, security headers, GET-only /api/v1 and loopback-only /metrics",++ "Tests: names, pricing, the data clients' cache/expiry/failure/timeout, and the booted app's pages, redirects, API shapes, CORS, discovery and degraded readiness"++ ],++ "notYet": [++ "The pages are plain placeholders (server/views/index.js) written for v1's plumbing; the main session replaces server/views/ with the real design",++ "No service manifest in openvibe-contracts yet: no domains.* capability is registered and no other service calls this one",++ "No database, no sign-in, no sessions, no event subscriptions and no stored data (v1 is deliberately stateless)",++ "No registrar links or affiliate handling: prices are shown with the registrar's name, not linked out yet",++ "Only /api/v1 and /search are rate limited; the HTML pages are served to everyone"++ ],++ "capabilitiesRegistered": false,++ "serviceManifestRegistered": false,++ "deployed": false,++ "placeholderInSites": true,++ "features": [++ "name parsing",++ "registry availability check",++ "three- and five-year price totals",++ "renewal trap",++ "one page per ending",++ "one page per domain with public history",++ "read-only JSON API",++ "cached upstream clients",++ "truthful readiness",++ "discovery",++ "deploy files"++ ],++ "deployment": "Not deployed yet. Reference unit deploy/systemd/openvibe-domains.service (127.0.0.1:5070, /opt/openvibe.domains, /etc/openvibe/domains.env, user ubuntu) and vhost deploy/nginx/openvibe.domains.conf (openvibe.domains and www, certs under /etc/letsencrypt/live/openvibe.domains/).",++ "updated": "2026-10-28"++}nnew file mode 100644@@@ -0,0 +1,109 @@++## ═══════════════════════════════════════════════════════════════++## openvibe.domains — Nginx configuration (REFERENCE)++##++## Deployed to /etc/nginx/sites-available/openvibe.domains.conf (ov-vhost-install) — keep them in sync and reload++## nginx after changing it. The Node app (port 5070, systemd unit openvibe-domains) renders every page and serves++## the read-only API; nginx terminates TLS, redirects www → apex, rate-limits the API, and compresses text.++##++## No proxy_cache: the app sets its own public Cache-Control per response. Never log request bodies here.++## ═══════════════════════════════════════════════════════════════++++limit_req_zone $binary_remote_addr zone=domains_api:10m rate=5r/s;++limit_req_zone $binary_remote_addr zone=domains_search:10m rate=2r/s;++++server {++ listen 80;++ listen [::]:80;++ server_name openvibe.domains www.openvibe.domains;++++ location /.well-known/acme-challenge/ { root /var/www/certbot; }++ location / { return 301 https://openvibe.domains$request_uri; }++}++++server {++ listen 443 ssl;++ listen [::]:443 ssl;++ http2 on;++ server_name www.openvibe.domains;++++ ssl_certificate /etc/letsencrypt/live/openvibe.domains/fullchain.pem;++ ssl_certificate_key /etc/letsencrypt/live/openvibe.domains/privkey.pem;++ ssl_protocols TLSv1.2 TLSv1.3;++++ return 301 https://openvibe.domains$request_uri;++}++++server {++ listen 443 ssl;++ listen [::]:443 ssl;++ http2 on;++ server_name openvibe.domains;++++ ssl_certificate /etc/letsencrypt/live/openvibe.domains/fullchain.pem;++ ssl_certificate_key /etc/letsencrypt/live/openvibe.domains/privkey.pem;++ ssl_protocols TLSv1.2 TLSv1.3;++++ access_log /var/log/nginx/openvibe.domains.access.log;++ error_log /var/log/nginx/openvibe.domains.error.log;++++ # Everything here is a GET; leave room for headers, not for a body.++ client_max_body_size 32k;++++ add_header X-Content-Type-Options nosniff always;++ add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;++++ gzip on;++ gzip_proxied any;++ gzip_vary on;++ gzip_comp_level 5;++ gzip_min_length 1024;++ gzip_types text/css application/javascript text/javascript application/json application/problem+json image/svg+xml text/plain application/xml;++++ proxy_http_version 1.1;++ proxy_set_header Host $host;++ proxy_set_header X-Real-IP $remote_addr;++ proxy_set_header X-Forwarded-For $remote_addr;++ proxy_set_header CF-Connecting-IP $remote_addr;++ proxy_set_header X-Forwarded-Proto $scheme;++++ # ── The read-only API: GET (and HEAD) only ─────────────++ # A POST, PUT, PATCH or DELETE to /api/v1 never reaches the app. The app itself has no write route.++ location /api/v1 {++ limit_except GET { deny all; }++ limit_req zone=domains_api burst=20 nodelay;++ limit_req_status 429;++ proxy_pass http://127.0.0.1:5070;++ }++++ # ── The API's liveness, readiness and release ──────────++ location /api/ {++ limit_req zone=domains_api burst=20 nodelay;++ limit_req_status 429;++ proxy_pass http://127.0.0.1:5070;++ }++++ # ── A name query shares the app's 120/min budget ───────++ location = /search {++ limit_req zone=domains_search burst=10 nodelay;++ limit_req_status 429;++ proxy_pass http://127.0.0.1:5070;++ }++++ # ── Prometheus metrics: host-local scrapers only (http://127.0.0.1:5070/metrics) ──++ location ~* ^/metrics(/|$) { return 404; }++++ # ── Pages, discovery, static assets, release.json ──────++ location / {++ proxy_pass http://127.0.0.1:5070;++ }++++ # A short ending URL (/.dev, /.co.uk) is a page with a 301 to /tld/<ending>, not a dotfile.++ # This regex location comes before the dotfile deny below; the first regex match wins.++ location ~* ^/\.[a-z0-9-]+(\.[a-z0-9-]+)*$ {++ proxy_pass http://127.0.0.1:5070;++ }++++ location ~ /\.(?!well-known) {++ deny all;++ }++}nnew file mode 100644@@@ -0,0 +1,30 @@++[Unit]++Description=OpenVibe.Domains — Name it, price it, run it.++# Host and Tools should be up first, but this front degrades honestly without them: the pages serve,++# say when an upstream did not answer, and /api/ready reports degraded (see server/observability.js).++After=network.target++Wants=openvibe-host.service openvibe-tools.service++++[Service]++Type=simple++User=ubuntu++Group=ubuntu++WorkingDirectory=/opt/openvibe.domains++EnvironmentFile=/etc/openvibe/domains.env++Environment=NODE_ENV=production++Environment=PORT=5070++Environment=PATH=/usr/local/bin:/usr/bin:/bin++ExecStart=/usr/bin/env node /opt/openvibe.domains/server/index.js++Restart=always++RestartSec=5++KillSignal=SIGTERM++# In-flight requests get the 10 s drain.++TimeoutStopSec=15++NoNewPrivileges=true++PrivateTmp=true++ProtectSystem=strict++ProtectHome=true++# Stateless: no database, no data directory, nothing to write.++++[Install]++WantedBy=multi-user.targetnnew file mode 100644@@@ -0,0 +1,1129 @@++{++ "name": "openvibe-domains",++ "version": "0.1.0",++ "lockfileVersion": 3,++ "requires": true,++ "packages": {++ "": {++ "name": "openvibe-domains",++ "version": "0.1.0",++ "license": "AGPL-3.0-only",++ "dependencies": {++ "dotenv": "^16.4.7",++ "express": "^4.21.2",++ "express-rate-limit": "^7.5.0",++ "helmet": "^8.1.0",++ "openvibe-contracts": "https://codeload.github.com/OpenVibers/OpenVibe.Contracts/tar.gz/refs/tags/v0.225.0",++ "openvibe-sdk": "https://codeload.github.com/OpenVibers/OpenVibe.SDK/tar.gz/refs/tags/v0.70.0",++ "openvibe-shared": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.29.1"++ },++ "engines": {++ "node": ">=22.0.0"++ }++ },++ "node_modules/accepts": {++ "version": "1.3.8",++ "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",++ "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==",++ "license": "MIT",++ "dependencies": {++ "mime-types": "~2.1.34",++ "negotiator": "0.6.3"++ },++ "engines": {++ "node": ">= 0.6"++ }++ },++ "node_modules/ajv": {++ "version": "8.20.0",++ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.20.0.tgz",++ "integrity": "sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==",++ "license": "MIT",++ "dependencies": {++ "fast-deep-equal": "^3.1.3",++ "fast-uri": "^3.0.1",++ "json-schema-traverse": "^1.0.0",++ "require-from-string": "^2.0.2"++ },++ "funding": {++ "type": "github",++ "url": "https://github.com/sponsors/epoberezkin"++ }++ },++ "node_modules/ajv-formats": {++ "version": "3.0.1",++ "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-3.0.1.tgz",++ "integrity": "sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==",++ "license": "MIT",++ "dependencies": {++ "ajv": "^8.0.0"++ },++ "peerDependencies": {++ "ajv": "^8.0.0"++ },++ "peerDependenciesMeta": {++ "ajv": {++ "optional": true++ }++ }++ },++ "node_modules/array-flatten": {++ "version": "1.1.1",++ "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",++ "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==",++ "license": "MIT"++ },++ "node_modules/body-parser": {++ "version": "1.20.9",++ "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.9.tgz",++ "integrity": "sha512-FISIQxV5u91Y9gvuFq3q/tA/qTqLJn3AhRcEvyozyhJTh5OBFFtv827AdHU7Rbyct4r+Ba1/99oFa1Y3yuFsdw==",++ "license": "MIT",++ "dependencies": {++ "bytes": "~3.1.2",++ "content-type": "~1.0.5",++ "debug": "2.6.9",++ "depd": "2.0.0",++ "destroy": "~1.2.0",++ "http-errors": "~2.0.1",++ "iconv-lite": "~0.4.24",++ "on-finished": "~2.4.1",++ "qs": "~6.16.0",++ "raw-body": "~2.5.3",++ "type-is": "~1.6.18",++ "unpipe": "~1.0.0"++ },++ "engines": {++ "node": ">= 0.8",++ "npm": "1.2.8000 || >= 1.4.16"++ }++ },++ "node_modules/buffer-equal-constant-time": {++ "version": "1.0.1",++ "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz",++ "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==",++ "license": "BSD-3-Clause"++ },++ "node_modules/bytes": {++ "version": "3.1.2",++ "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",++ "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",++ "license": "MIT",++ "engines": {++ "node": ">= 0.8"++ }++ },++ "node_modules/call-bind-apply-helpers": {++ "version": "1.0.2",++ "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz",++ "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==",++ "license": "MIT",++ "dependencies": {++ "es-errors": "^1.3.0",++ "function-bind": "^1.1.2"++ },++ "engines": {++ "node": ">= 0.4"++ }++ },++ "node_modules/call-bound": {++ "version": "1.0.4",++ "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz",++ "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==",++ "license": "MIT",++ "dependencies": {++ "call-bind-apply-helpers": "^1.0.2",++ "get-intrinsic": "^1.3.0"++ },++ "engines": {++ "node": ">= 0.4"++ },++ "funding": {++ "url": "https://github.com/sponsors/ljharb"++ }++ },++ "node_modules/content-disposition": {++ "version": "0.5.4",++ "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz",++ "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==",++ "license": "MIT",++ "dependencies": {++ "safe-buffer": "5.2.1"++ },++ "engines": {++ "node": ">= 0.6"++ }++ },++ "node_modules/content-type": {++ "version": "1.0.5",++ "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz",++ "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==",++ "license": "MIT",++ "engines": {++ "node": ">= 0.6"++ }++ },++ "node_modules/cookie": {++ "version": "0.7.2",++ "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz",++ "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==",++ "license": "MIT",++ "engines": {++ "node": ">= 0.6"++ }++ },++ "node_modules/cookie-signature": {++ "version": "1.0.7",++ "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.7.tgz",++ "integrity": "sha512-NXdYc3dLr47pBkpUCHtKSwIOQXLVn8dZEuywboCOJY/osA0wFSLlSawr3KN8qXJEyX66FcONTH8EIlVuK0yyFA==",++ "license": "MIT"++ },++ "node_modules/debug": {++ "version": "2.6.9",++ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",++ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",++ "license": "MIT",++ "dependencies": {++ "ms": "2.0.0"++ }++ },++ "node_modules/depd": {++ "version": "2.0.0",++ "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",++ "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==",++ "license": "MIT",++ "engines": {++ "node": ">= 0.8"++ }++ },++ "node_modules/destroy": {++ "version": "1.2.0",++ "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz",++ "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==",++ "license": "MIT",++ "engines": {++ "node": ">= 0.8",++ "npm": "1.2.8000 || >= 1.4.16"++ }++ },++ "node_modules/dotenv": {++ "version": "16.6.1",++ "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.6.1.tgz",++ "integrity": "sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow==",++ "license": "BSD-2-Clause",++ "engines": {++ "node": ">=12"++ },++ "funding": {++ "url": "https://dotenvx.com"++ }++ },++ "node_modules/dunder-proto": {++ "version": "1.0.1",++ "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",++ "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==",++ "license": "MIT",++ "dependencies": {++ "call-bind-apply-helpers": "^1.0.1",++ "es-errors": "^1.3.0",++ "gopd": "^1.2.0"++ },++ "engines": {++ "node": ">= 0.4"++ }++ },++ "node_modules/ecdsa-sig-formatter": {++ "version": "1.0.11",++ "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz",++ "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==",++ "license": "Apache-2.0",++ "dependencies": {++ "safe-buffer": "^5.0.1"++ }++ },++ "node_modules/ee-first": {++ "version": "1.1.1",++ "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",++ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==",++ "license": "MIT"++ },++ "node_modules/encodeurl": {++ "version": "2.0.0",++ "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz",++ "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==",++ "license": "MIT",++ "engines": {++ "node": ">= 0.8"++ }++ },++ "node_modules/es-define-property": {++ "version": "1.0.1",++ "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz",++ "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==",++ "license": "MIT",++ "engines": {++ "node": ">= 0.4"++ }++ },++ "node_modules/es-errors": {++ "version": "1.3.0",++ "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",++ "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",++ "license": "MIT",++ "engines": {++ "node": ">= 0.4"++ }++ },++ "node_modules/es-object-atoms": {++ "version": "1.1.2",++ "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.2.tgz",++ "integrity": "sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==",++ "license": "MIT",++ "dependencies": {++ "es-errors": "^1.3.0"++ },++ "engines": {++ "node": ">= 0.4"++ }++ },++ "node_modules/escape-html": {++ "version": "1.0.3",++ "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",++ "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==",++ "license": "MIT"++ },++ "node_modules/etag": {++ "version": "1.8.1",++ "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",++ "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==",++ "license": "MIT",++ "engines": {++ "node": ">= 0.6"++ }++ },++ "node_modules/express": {++ "version": "4.22.3",++ "resolved": "https://registry.npmjs.org/express/-/express-4.22.3.tgz",++ "integrity": "sha512-Bdcs4+3qlpVlx2NRn6fgX2Ue2/gGRaPeawebgclM0ERSCqDpA+owF1fdPwjJUTAJWMTuAaxjDf+hzb0/4eKvvw==",++ "license": "MIT",++ "dependencies": {++ "accepts": "~1.3.8",++ "array-flatten": "1.1.1",++ "body-parser": "~1.20.5",++ "content-disposition": "~0.5.4",++ "content-type": "~1.0.4",++ "cookie": "~0.7.1",++ "cookie-signature": "~1.0.6",++ "debug": "2.6.9",++ "depd": "2.0.0",++ "encodeurl": "~2.0.0",++ "escape-html": "~1.0.3",++ "etag": "~1.8.1",++ "finalhandler": "~1.3.1",++ "fresh": "~0.5.2",++ "http-errors": "~2.0.0",++ "merge-descriptors": "1.0.3",++ "methods": "~1.1.2",++ "on-finished": "~2.4.1",++ "parseurl": "~1.3.3",++ "path-to-regexp": "~0.1.13",++ "proxy-addr": "~2.0.7",++ "qs": "~6.16.0",++ "range-parser": "~1.2.1",++ "safe-buffer": "5.2.1",++ "send": "~0.19.0",++ "serve-static": "~1.16.2",++ "setprototypeof": "1.2.0",++ "statuses": "~2.0.1",++ "type-is": "~1.6.18",++ "utils-merge": "1.0.1",++ "vary": "~1.1.2"++ },++ "engines": {++ "node": ">= 0.10.0"++ },++ "funding": {++ "type": "opencollective",++ "url": "https://opencollective.com/express"++ }++ },++ "node_modules/express-rate-limit": {++ "version": "7.5.1",++ "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-7.5.1.tgz",++ "integrity": "sha512-7iN8iPMDzOMHPUYllBEsQdWVB6fPDMPqwjBaFrgr4Jgr/+okjvzAy+UHlYYL/Vs0OsOrMkwS6PJDkFlJwoxUnw==",++ "license": "MIT",++ "engines": {++ "node": ">= 16"++ },++ "funding": {++ "url": "https://github.com/sponsors/express-rate-limit"++ },++ "peerDependencies": {++ "express": ">= 4.11"++ }++ },++ "node_modules/fast-deep-equal": {++ "version": "3.1.3",++ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",++ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",++ "license": "MIT"++ },++ "node_modules/fast-uri": {++ "version": "3.1.9",++ "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.9.tgz",++ "integrity": "sha512-hS/0Wt3Ya043oKXs0sIxrMpKQITXhMLIrVAKKXi4gozGC9v7YRWVnXIZzjNPTO02M9BdxLCWqK1yRXgNziVyJQ==",++ "funding": [++ {++ "type": "github",++ "url": "https://github.com/sponsors/fastify"++ },++ {++ "type": "opencollective",++ "url": "https://opencollective.com/fastify"++ }++ ],++ "license": "BSD-3-Clause"++ },++ "node_modules/finalhandler": {++ "version": "1.3.2",++ "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.2.tgz",++ "integrity": "sha512-aA4RyPcd3badbdABGDuTXCMTtOneUCAYH/gxoYRTZlIJdF0YPWuGqiAsIrhNnnqdXGswYk6dGujem4w80UJFhg==",++ "license": "MIT",++ "dependencies": {++ "debug": "2.6.9",++ "encodeurl": "~2.0.0",++ "escape-html": "~1.0.3",++ "on-finished": "~2.4.1",++ "parseurl": "~1.3.3",++ "statuses": "~2.0.2",++ "unpipe": "~1.0.0"++ },++ "engines": {++ "node": ">= 0.8"++ }++ },++ "node_modules/forwarded": {++ "version": "0.2.0",++ "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",++ "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==",++ "license": "MIT",++ "engines": {++ "node": ">= 0.6"++ }++ },++ "node_modules/fresh": {++ "version": "0.5.2",++ "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",++ "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==",++ "license": "MIT",++ "engines": {++ "node": ">= 0.6"++ }++ },++ "node_modules/function-bind": {++ "version": "1.1.2",++ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",++ "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",++ "license": "MIT",++ "funding": {++ "url": "https://github.com/sponsors/ljharb"++ }++ },++ "node_modules/get-intrinsic": {++ "version": "1.3.0",++ "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz",++ "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==",++ "license": "MIT",++ "dependencies": {++ "call-bind-apply-helpers": "^1.0.2",++ "es-define-property": "^1.0.1",++ "es-errors": "^1.3.0",++ "es-object-atoms": "^1.1.1",++ "function-bind": "^1.1.2",++ "get-proto": "^1.0.1",++ "gopd": "^1.2.0",++ "has-symbols": "^1.1.0",++ "hasown": "^2.0.2",++ "math-intrinsics": "^1.1.0"++ },++ "engines": {++ "node": ">= 0.4"++ },++ "funding": {++ "url": "https://github.com/sponsors/ljharb"++ }++ },++ "node_modules/get-proto": {++ "version": "1.0.1",++ "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz",++ "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==",++ "license": "MIT",++ "dependencies": {++ "dunder-proto": "^1.0.1",++ "es-object-atoms": "^1.0.0"++ },++ "engines": {++ "node": ">= 0.4"++ }++ },++ "node_modules/gopd": {++ "version": "1.2.0",++ "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz",++ "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==",++ "license": "MIT",++ "engines": {++ "node": ">= 0.4"++ },++ "funding": {++ "url": "https://github.com/sponsors/ljharb"++ }++ },++ "node_modules/has-symbols": {++ "version": "1.1.0",++ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz",++ "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==",++ "license": "MIT",++ "engines": {++ "node": ">= 0.4"++ },++ "funding": {++ "url": "https://github.com/sponsors/ljharb"++ }++ },++ "node_modules/hasown": {++ "version": "2.0.4",++ "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz",++ "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==",++ "license": "MIT",++ "dependencies": {++ "function-bind": "^1.1.2"++ },++ "engines": {++ "node": ">= 0.4"++ }++ },++ "node_modules/helmet": {++ "version": "8.3.0",++ "resolved": "https://registry.npmjs.org/helmet/-/helmet-8.3.0.tgz",++ "integrity": "sha512-Qgpiaws3Sm30Av8Eah6sjMCZZwjlBu+E68rhpCWBshY1lb09HtLwj5GviX0OyQIn+ulUS0iX0AxN5n3tLZzz1w==",++ "license": "MIT",++ "engines": {++ "node": ">=18.0.0"++ },++ "funding": {++ "url": "https://github.com/sponsors/EvanHahn"++ }++ },++ "node_modules/http-errors": {++ "version": "2.0.1",++ "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz",++ "integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==",++ "license": "MIT",++ "dependencies": {++ "depd": "~2.0.0",++ "inherits": "~2.0.4",++ "setprototypeof": "~1.2.0",++ "statuses": "~2.0.2",++ "toidentifier": "~1.0.1"++ },++ "engines": {++ "node": ">= 0.8"++ },++ "funding": {++ "type": "opencollective",++ "url": "https://opencollective.com/express"++ }++ },++ "node_modules/iconv-lite": {++ "version": "0.4.24",++ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",++ "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",++ "license": "MIT",++ "dependencies": {++ "safer-buffer": ">= 2.1.2 < 3"++ },++ "engines": {++ "node": ">=0.10.0"++ }++ },++ "node_modules/inherits": {++ "version": "2.0.4",++ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",++ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",++ "license": "ISC"++ },++ "node_modules/ipaddr.js": {++ "version": "1.9.1",++ "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",++ "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==",++ "license": "MIT",++ "engines": {++ "node": ">= 0.10"++ }++ },++ "node_modules/json-schema-traverse": {++ "version": "1.0.0",++ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",++ "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",++ "license": "MIT"++ },++ "node_modules/jsonwebtoken": {++ "version": "9.0.3",++ "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.3.tgz",++ "integrity": "sha512-MT/xP0CrubFRNLNKvxJ2BYfy53Zkm++5bX9dtuPbqAeQpTVe0MQTFhao8+Cp//EmJp244xt6Drw/GVEGCUj40g==",++ "license": "MIT",++ "dependencies": {++ "jws": "^4.0.1",++ "lodash.includes": "^4.3.0",++ "lodash.isboolean": "^3.0.3",++ "lodash.isinteger": "^4.0.4",++ "lodash.isnumber": "^3.0.3",++ "lodash.isplainobject": "^4.0.6",++ "lodash.isstring": "^4.0.1",++ "lodash.once": "^4.0.0",++ "ms": "^2.1.1",++ "semver": "^7.5.4"++ },++ "engines": {++ "node": ">=12",++ "npm": ">=6"++ }++ },++ "node_modules/jsonwebtoken/node_modules/ms": {++ "version": "2.1.3",++ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",++ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",++ "license": "MIT"++ },++ "node_modules/jwa": {++ "version": "2.0.1",++ "resolved": "https://registry.npmjs.org/jwa/-/jwa-2.0.1.tgz",++ "integrity": "sha512-hRF04fqJIP8Abbkq5NKGN0Bbr3JxlQ+qhZufXVr0DvujKy93ZCbXZMHDL4EOtodSbCWxOqR8MS1tXA5hwqCXDg==",++ "license": "MIT",++ "dependencies": {++ "buffer-equal-constant-time": "^1.0.1",++ "ecdsa-sig-formatter": "1.0.11",++ "safe-buffer": "^5.0.1"++ }++ },++ "node_modules/jws": {++ "version": "4.0.1",++ "resolved": "https://registry.npmjs.org/jws/-/jws-4.0.1.tgz",++ "integrity": "sha512-EKI/M/yqPncGUUh44xz0PxSidXFr/+r0pA70+gIYhjv+et7yxM+s29Y+VGDkovRofQem0fs7Uvf4+YmAdyRduA==",++ "license": "MIT",++ "dependencies": {++ "jwa": "^2.0.1",++ "safe-buffer": "^5.0.1"++ }++ },++ "node_modules/lodash.includes": {++ "version": "4.3.0",++ "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz",++ "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==",++ "license": "MIT"++ },++ "node_modules/lodash.isboolean": {++ "version": "3.0.3",++ "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz",++ "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==",++ "license": "MIT"++ },++ "node_modules/lodash.isinteger": {++ "version": "4.0.4",++ "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz",++ "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==",++ "license": "MIT"++ },++ "node_modules/lodash.isnumber": {++ "version": "3.0.3",++ "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz",++ "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==",++ "license": "MIT"++ },++ "node_modules/lodash.isplainobject": {++ "version": "4.0.6",++ "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz",++ "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==",++ "license": "MIT"++ },++ "node_modules/lodash.isstring": {++ "version": "4.0.1",++ "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz",++ "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==",++ "license": "MIT"++ },++ "node_modules/lodash.once": {++ "version": "4.1.1",++ "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz",++ "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==",++ "license": "MIT"++ },++ "node_modules/math-intrinsics": {++ "version": "1.1.0",++ "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz",++ "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==",++ "license": "MIT",++ "engines": {++ "node": ">= 0.4"++ }++ },++ "node_modules/media-typer": {++ "version": "0.3.0",++ "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",++ "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==",++ "license": "MIT",++ "engines": {++ "node": ">= 0.6"++ }++ },++ "node_modules/merge-descriptors": {++ "version": "1.0.3",++ "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz",++ "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==",++ "license": "MIT",++ "funding": {++ "url": "https://github.com/sponsors/sindresorhus"++ }++ },++ "node_modules/methods": {++ "version": "1.1.2",++ "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",++ "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==",++ "license": "MIT",++ "engines": {++ "node": ">= 0.6"++ }++ },++ "node_modules/mime": {++ "version": "1.6.0",++ "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",++ "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",++ "license": "MIT",++ "bin": {++ "mime": "cli.js"++ },++ "engines": {++ "node": ">=4"++ }++ },++ "node_modules/mime-db": {++ "version": "1.52.0",++ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",++ "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",++ "license": "MIT",++ "engines": {++ "node": ">= 0.6"++ }++ },++ "node_modules/mime-types": {++ "version": "2.1.35",++ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",++ "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",++ "license": "MIT",++ "dependencies": {++ "mime-db": "1.52.0"++ },++ "engines": {++ "node": ">= 0.6"++ }++ },++ "node_modules/ms": {++ "version": "2.0.0",++ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",++ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",++ "license": "MIT"++ },++ "node_modules/negotiator": {++ "version": "0.6.3",++ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",++ "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==",++ "license": "MIT",++ "engines": {++ "node": ">= 0.6"++ }++ },++ "node_modules/object-inspect": {++ "version": "1.13.4",++ "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz",++ "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==",++ "license": "MIT",++ "engines": {++ "node": ">= 0.4"++ },++ "funding": {++ "url": "https://github.com/sponsors/ljharb"++ }++ },++ "node_modules/on-finished": {++ "version": "2.4.2",++ "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.2.tgz",++ "integrity": "sha512-ATWUv387i+nLD49EiDoOft5scf32Vsdz3ktrQJG9bi7jRFmaXTssvyvj1EmeKVVgvesbqUtvQQvaS2TpTukAZQ==",++ "license": "MIT",++ "dependencies": {++ "ee-first": "1.1.1"++ },++ "engines": {++ "node": ">= 0.8"++ },++ "funding": {++ "type": "opencollective",++ "url": "https://opencollective.com/express"++ }++ },++ "node_modules/openvibe-contracts": {++ "version": "0.225.0",++ "resolved": "https://codeload.github.com/OpenVibers/OpenVibe.Contracts/tar.gz/refs/tags/v0.225.0",++ "integrity": "sha512-msLaRYa2Byyabnf/+L3aRPwkx8MI3zWbofFhwupq+RyBCdgbA4gLlkPsJu9nK/1UTCWdNdSTfWXW5pZY1/1zbQ==",++ "license": "AGPL-3.0-only",++ "dependencies": {++ "ajv": "^8.17.1",++ "ajv-formats": "^3.0.1"++ },++ "bin": {++ "openvibe-contracts-check": "bin/check-service.js"++ },++ "engines": {++ "node": ">=20"++ }++ },++ "node_modules/openvibe-sdk": {++ "version": "0.70.0",++ "resolved": "https://codeload.github.com/OpenVibers/OpenVibe.SDK/tar.gz/refs/tags/v0.70.0",++ "integrity": "sha512-iMNxlnRm0fmyj60nHiC/lKAaG3JAqiJgu42lShnkby4yF4dQJRG3G0trrqOoULZKBalrYHb/gjauRwNQYN/tog==",++ "license": "MIT",++ "bin": {++ "openvibe-download": "bin/openvibe-download.js"++ },++ "engines": {++ "node": ">=20"++ },++ "peerDependencies": {++ "@electric-sql/pglite": "^0.5.8",++ "iovalkey": "^0.4.0",++ "pg": "^8.23.0"++ },++ "peerDependenciesMeta": {++ "@electric-sql/pglite": {++ "optional": true++ },++ "iovalkey": {++ "optional": true++ },++ "pg": {++ "optional": true++ }++ }++ },++ "node_modules/openvibe-shared": {++ "version": "4.29.1",++ "resolved": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.29.1",++ "integrity": "sha512-wQVzLibhXmPJTJ3El5q8G6cAuykeP9P07sPPZnXsyiOc4OdA8/l4tKaQT/f97Dzjsc9WFUNzRAhnbl0W6nLixg==",++ "license": "MIT",++ "dependencies": {++ "jsonwebtoken": "^9.0.0"++ },++ "bin": {++ "openvibe-build-assets": "scripts/build-assets.js"++ }++ },++ "node_modules/parseurl": {++ "version": "1.3.3",++ "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",++ "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",++ "license": "MIT",++ "engines": {++ "node": ">= 0.8"++ }++ },++ "node_modules/path-to-regexp": {++ "version": "0.1.13",++ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.13.tgz",++ "integrity": "sha512-A/AGNMFN3c8bOlvV9RreMdrv7jsmF9XIfDeCd87+I8RNg6s78BhJxMu69NEMHBSJFxKidViTEdruRwEk/WIKqA==",++ "license": "MIT"++ },++ "node_modules/proxy-addr": {++ "version": "2.0.8",++ "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.8.tgz",++ "integrity": "sha512-5nnx0yGyVUcY6t9RnWcARWtwT9F1D8O9rt08htPvnd49W1IgZtmLkhu9WfMzQj1cFxjHIO6connUNVW5k7AVyQ==",++ "license": "MIT",++ "dependencies": {++ "forwarded": "0.2.0",++ "ipaddr.js": "1.9.1"++ },++ "engines": {++ "node": ">= 0.10"++ },++ "funding": {++ "type": "opencollective",++ "url": "https://opencollective.com/express"++ }++ },++ "node_modules/qs": {++ "version": "6.16.2",++ "resolved": "https://registry.npmjs.org/qs/-/qs-6.16.2.tgz",++ "integrity": "sha512-VYdnB5S7/0IeXzBacUtwNAaM6d7Y/PgYnNC7bJCI6meqA/OgnsQbZMtVW8Dt2D1PHgbHGtYmhSoEIgvt7xZ2ZA==",++ "license": "BSD-3-Clause",++ "dependencies": {++ "es-define-property": "^1.0.1",++ "side-channel": "^1.1.1"++ },++ "engines": {++ "node": ">=0.6"++ },++ "funding": {++ "url": "https://github.com/sponsors/ljharb"++ }++ },++ "node_modules/range-parser": {++ "version": "1.2.1",++ "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",++ "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==",++ "license": "MIT",++ "engines": {++ "node": ">= 0.6"++ }++ },++ "node_modules/raw-body": {++ "version": "2.5.3",++ "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.3.tgz",++ "integrity": "sha512-s4VSOf6yN0rvbRZGxs8Om5CWj6seneMwK3oDb4lWDH0UPhWcxwOWw5+qk24bxq87szX1ydrwylIOp2uG1ojUpA==",++ "license": "MIT",++ "dependencies": {++ "bytes": "~3.1.2",++ "http-errors": "~2.0.1",++ "iconv-lite": "~0.4.24",++ "unpipe": "~1.0.0"++ },++ "engines": {++ "node": ">= 0.8"++ }++ },++ "node_modules/require-from-string": {++ "version": "2.0.2",++ "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz",++ "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==",++ "license": "MIT",++ "engines": {++ "node": ">=0.10.0"++ }++ },++ "node_modules/safe-buffer": {++ "version": "5.2.1",++ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",++ "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",++ "funding": [++ {++ "type": "github",++ "url": "https://github.com/sponsors/feross"++ },++ {++ "type": "patreon",++ "url": "https://www.patreon.com/feross"++ },++ {++ "type": "consulting",++ "url": "https://feross.org/support"++ }++ ],++ "license": "MIT"++ },++ "node_modules/safer-buffer": {++ "version": "2.1.2",++ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",++ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",++ "license": "MIT"++ },++ "node_modules/semver": {++ "version": "7.8.5",++ "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz",++ "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==",++ "license": "ISC",++ "bin": {++ "semver": "bin/semver.js"++ },++ "engines": {++ "node": ">=10"++ }++ },++ "node_modules/send": {++ "version": "0.19.2",++ "resolved": "https://registry.npmjs.org/send/-/send-0.19.2.tgz",++ "integrity": "sha512-VMbMxbDeehAxpOtWJXlcUS5E8iXh6QmN+BkRX1GARS3wRaXEEgzCcB10gTQazO42tpNIya8xIyNx8fll1OFPrg==",++ "license": "MIT",++ "dependencies": {++ "debug": "2.6.9",++ "depd": "2.0.0",++ "destroy": "1.2.0",++ "encodeurl": "~2.0.0",++ "escape-html": "~1.0.3",++ "etag": "~1.8.1",++ "fresh": "~0.5.2",++ "http-errors": "~2.0.1",++ "mime": "1.6.0",++ "ms": "2.1.3",++ "on-finished": "~2.4.1",++ "range-parser": "~1.2.1",++ "statuses": "~2.0.2"++ },++ "engines": {++ "node": ">= 0.8.0"++ }++ },++ "node_modules/send/node_modules/ms": {++ "version": "2.1.3",++ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",++ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",++ "license": "MIT"++ },++ "node_modules/serve-static": {++ "version": "1.16.3",++ "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.3.tgz",++ "integrity": "sha512-x0RTqQel6g5SY7Lg6ZreMmsOzncHFU7nhnRWkKgWuMTu5NN0DR5oruckMqRvacAN9d5w6ARnRBXl9xhDCgfMeA==",++ "license": "MIT",++ "dependencies": {++ "encodeurl": "~2.0.0",++ "escape-html": "~1.0.3",++ "parseurl": "~1.3.3",++ "send": "~0.19.1"++ },++ "engines": {++ "node": ">= 0.8.0"++ }++ },++ "node_modules/setprototypeof": {++ "version": "1.2.0",++ "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",++ "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==",++ "license": "ISC"++ },++ "node_modules/side-channel": {++ "version": "1.1.1",++ "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.1.tgz",++ "integrity": "sha512-6x6dK6zJdpTzF4sQeNYxwtvBzf6Eg4GtlesS94HOvTudUeyK2WXAaIfmDgsyslYrRBeFIlsi54AYsFGUuhmvrQ==",++ "license": "MIT",++ "dependencies": {++ "es-errors": "^1.3.0",++ "object-inspect": "^1.13.4",++ "side-channel-list": "^1.0.1",++ "side-channel-map": "^1.0.1",++ "side-channel-weakmap": "^1.0.2"++ },++ "engines": {++ "node": ">= 0.4"++ },++ "funding": {++ "url": "https://github.com/sponsors/ljharb"++ }++ },++ "node_modules/side-channel-list": {++ "version": "1.0.1",++ "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.1.tgz",++ "integrity": "sha512-mjn/0bi/oUURjc5Xl7IaWi/OJJJumuoJFQJfDDyO46+hBWsfaVM65TBHq2eoZBhzl9EchxOijpkbRC8SVBQU0w==",++ "license": "MIT",++ "dependencies": {++ "es-errors": "^1.3.0",++ "object-inspect": "^1.13.4"++ },++ "engines": {++ "node": ">= 0.4"++ },++ "funding": {++ "url": "https://github.com/sponsors/ljharb"++ }++ },++ "node_modules/side-channel-map": {++ "version": "1.0.1",++ "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz",++ "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==",++ "license": "MIT",++ "dependencies": {++ "call-bound": "^1.0.2",++ "es-errors": "^1.3.0",++ "get-intrinsic": "^1.2.5",++ "object-inspect": "^1.13.3"++ },++ "engines": {++ "node": ">= 0.4"++ },++ "funding": {++ "url": "https://github.com/sponsors/ljharb"++ }++ },++ "node_modules/side-channel-weakmap": {++ "version": "1.0.2",++ "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz",++ "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==",++ "license": "MIT",++ "dependencies": {++ "call-bound": "^1.0.2",++ "es-errors": "^1.3.0",++ "get-intrinsic": "^1.2.5",++ "object-inspect": "^1.13.3",++ "side-channel-map": "^1.0.1"++ },++ "engines": {++ "node": ">= 0.4"++ },++ "funding": {++ "url": "https://github.com/sponsors/ljharb"++ }++ },++ "node_modules/statuses": {++ "version": "2.0.2",++ "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz",++ "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==",++ "license": "MIT",++ "engines": {++ "node": ">= 0.8"++ }++ },++ "node_modules/toidentifier": {++ "version": "1.0.1",++ "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",++ "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==",++ "license": "MIT",++ "engines": {++ "node": ">=0.6"++ }++ },++ "node_modules/type-is": {++ "version": "1.6.18",++ "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",++ "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",++ "license": "MIT",++ "dependencies": {++ "media-typer": "0.3.0",++ "mime-types": "~2.1.24"++ },++ "engines": {++ "node": ">= 0.6"++ }++ },++ "node_modules/unpipe": {++ "version": "1.0.0",++ "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",++ "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==",++ "license": "MIT",++ "engines": {++ "node": ">= 0.8"++ }++ },++ "node_modules/utils-merge": {++ "version": "1.0.1",++ "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",++ "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==",++ "license": "MIT",++ "engines": {++ "node": ">= 0.4.0"++ }++ },++ "node_modules/vary": {++ "version": "1.1.2",++ "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",++ "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==",++ "license": "MIT",++ "engines": {++ "node": ">= 0.8"++ }++ }++ }++}nnew file mode 100644@@@ -0,0 +1,29 @@++{++ "name": "openvibe-domains",++ "version": "0.1.0",++ "private": true,++ "description": "OpenVibe.Domains \u2014 name it, price it, run it.",++ "main": "server/index.js",++ "scripts": {++ "start": "node server/index.js",++ "dev": "NODE_ENV=development node server/index.js",++ "test": "node test/run.js"++ },++ "keywords": [++ "openvibe"++ ],++ "author": "OpenVibers",++ "license": "AGPL-3.0-only",++ "dependencies": {++ "dotenv": "^16.4.7",++ "express": "^4.21.2",++ "express-rate-limit": "^7.5.0",++ "helmet": "^8.1.0",++ "openvibe-contracts": "https://codeload.github.com/OpenVibers/OpenVibe.Contracts/tar.gz/refs/tags/v0.225.0",++ "openvibe-sdk": "https://codeload.github.com/OpenVibers/OpenVibe.SDK/tar.gz/refs/tags/v0.70.0",++ "openvibe-shared": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.29.1"++ },++ "engines": {++ "node": ">=22.0.0"++ }++}nnew file mode 100644@@@ -0,0 +1,130 @@++/* OpenVibe.Domains — the room's own pieces. Colours come from the theme (--bg-*, --text-*, --border) and the room's++ accent (.ov-room in openvibe-shared kit.css: --room-accent, --room-strong, --room-fill, --room-on), so every theme,++ light or dark, wears it. Phone first: tables become stacked rows under 700 px; nothing scrolls sideways. */++*, *::before, *::after { box-sizing: border-box; }++html, body { margin: 0; background: var(--bg-primary, #0a0f1c); color: var(--text-primary, #e6edf7); font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }++.skip { position: absolute; left: -9999px; }++.skip:focus { left: 12px; top: 12px; z-index: 99; padding: 8px 12px; border-radius: 10px; background: var(--bg-card, #0f1729); color: inherit; }++.dm { display: block; }++.dm-wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px 64px; }++.dm a { color: var(--room-strong); }++.dm h2 { margin: 0; font-size: 1.2rem; font-weight: 800; letter-spacing: -.01em; }++.dm h3 { margin: 22px 0 8px; font-size: 1rem; }++.dm section { margin-top: clamp(28px, 4vw, 44px); }++.dm section > h2 { margin-bottom: 12px; }++.dm section > .dm-head-row { margin-bottom: 4px; }++.dm-head-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }++.dm-more { display: inline-flex; align-items: center; gap: 2px; font-weight: 700; font-size: .9rem; text-decoration: none; }++.dm-more .ovk-i { width: 1em; height: 1em; }++.dm-fine { margin: 6px 0 14px; max-width: 780px; color: var(--text-muted, #7386a3); font-size: .88rem; line-height: 1.55; }++.dm-lede { margin: 8px 0 0; max-width: 680px; color: var(--text-secondary, #96a7c2); line-height: 1.55; }++.dm-kicker { margin: 0 0 4px; font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--room-strong); }++.dm-page-h { padding-top: clamp(20px, 4vw, 40px); }++.dm-page-h h1, .dm-hit h1 { margin: 0; font-size: clamp(1.9rem, 5vw, 3rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.06; overflow-wrap: anywhere; }++++/* The box that prices a name, on pages other than the home's hero. */++.dm-box { display: flex; align-items: center; max-width: 560px; margin-top: 18px; border-radius: 999px; background: var(--bg-card, #0f1729); border: 1.5px solid color-mix(in srgb, var(--room-accent) 40%, var(--border, #1f2d47)); }++.dm-box:focus-within { border-color: var(--room-accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--room-accent) 20%, transparent); }++.dm-box input { flex: 1; min-width: 0; height: 50px; padding: 0 8px 0 20px; border: 0; background: transparent; color: inherit; font: inherit; font-size: 1rem; outline: none; }++.dm-box input::-webkit-search-cancel-button { display: none; }++.dm-box button { flex: none; display: grid; place-items: center; width: 40px; height: 40px; margin-right: 5px; border: 0; border-radius: 50%; background: var(--room-fill); color: var(--room-on); cursor: pointer; }++.dm-box button:focus-visible { outline: 2px solid var(--room-accent); outline-offset: 3px; }++.dm-box .ovk-i { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }++.dm .ovk-i { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }++++/* The board: endings as tiles, three years first. */++.dm-board { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 44%), 1fr)); gap: 10px; }++.dm-tile { position: relative; display: grid; gap: 4px; min-height: 132px; padding: 16px; border-radius: 16px; background: linear-gradient(160deg, color-mix(in srgb, var(--room-accent) 9%, transparent), transparent 65%), var(--bg-card, #0f1729); border: 1px solid var(--border, #1f2d47); text-decoration: none; transition: border-color .18s, transform .18s; }++.dm a.dm-tile { color: var(--text-primary, #e6edf7); }++.dm-tile:hover, .dm-tile:focus-visible { border-color: var(--room-accent); transform: translateY(-2px); outline: none; }++.dm-tile-tld { font-size: 1.55rem; font-weight: 800; letter-spacing: -.02em; color: var(--room-strong); }++.dm-tile-y3 { display: flex; align-items: baseline; gap: 6px; }++.dm-tile-y3 b { font-size: 1.15rem; font-variant-numeric: tabular-nums; }++.dm-tile-y3 small, .dm-tile-y1, .dm-tile-n { font-size: .8rem; color: var(--text-muted, #7386a3); }++.dm-trap { display: inline-flex; align-items: center; width: fit-content; padding: 1px 8px; border-radius: 999px; font-style: normal; font-size: .74rem; font-weight: 800; color: var(--warning-text, #f59e0b); background: color-mix(in srgb, var(--warning, #f59e0b) 14%, transparent); }++.dm-best { display: inline-flex; width: fit-content; padding: 1px 8px; border-radius: 999px; font-style: normal; font-size: .74rem; font-weight: 800; color: var(--room-on); background: var(--room-fill); }++++/* Price tables: a row per ending or registrar; stacked on phones. */++.dm-table { display: grid; border: 1px solid var(--border, #1f2d47); border-radius: 16px; overflow: hidden; background: var(--bg-card, #0f1729); }++.dm-tr { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(4, minmax(0, 1fr)); gap: 12px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--border, #1f2d47); font-variant-numeric: tabular-nums; }++.dm-tr:first-child { border-top: 0; }++.dm-th { font-size: .72rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--text-muted, #7386a3); background: color-mix(in srgb, var(--room-accent) 5%, transparent); }++.dm-tr.is-best { background: color-mix(in srgb, var(--room-accent) 9%, transparent); }++.dm-name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-width: 0; font-weight: 700; }++.dm-name a { text-decoration: none; overflow-wrap: anywhere; }++.dm-name a:hover { text-decoration: underline; }++.dm-y3 { font-weight: 800; }++.dm-aff { flex-basis: 100%; font-size: .72rem; font-weight: 600; color: var(--text-muted, #7386a3); }++@media (max-width: 699px) {++ .dm-th { display: none; }++ .dm-tr { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; }++ .dm-name { grid-column: 1 / -1; font-size: 1.05rem; }++ .dm-tr > [data-l]::before { content: attr(data-l); display: block; font-size: .7rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted, #7386a3); }++}++++/* A name's answer: free or taken, with the public facts. */++.dm-q { margin-top: 12px; }++.dm-hit { margin-top: 26px; padding: clamp(18px, 3vw, 28px); border-radius: 20px; border: 1px solid var(--border, #1f2d47); background: var(--bg-card, #0f1729); }++.dm-hit.is-free { border-color: color-mix(in srgb, var(--success, #22c55e) 55%, var(--border, #1f2d47)); background: linear-gradient(140deg, color-mix(in srgb, var(--success, #22c55e) 12%, transparent), transparent 60%), var(--bg-card, #0f1729); }++.dm-page-h .dm-status { margin-top: 10px; }++.dm-page-h .dm-status.is-free .dm-pill { color: var(--success-text, #22c55e); background: color-mix(in srgb, var(--success, #22c55e) 16%, transparent); }++.dm-page-h .dm-status.is-taken .dm-pill { background: color-mix(in srgb, var(--text-muted, #7386a3) 22%, transparent); }++.dm-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0 0; color: var(--text-secondary, #96a7c2); }++.dm-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; border-radius: 999px; font-weight: 800; font-size: .85rem; }++.is-free .dm-pill { color: var(--success-text, #22c55e); background: color-mix(in srgb, var(--success, #22c55e) 16%, transparent); }++.is-taken .dm-pill { color: var(--text-primary, #e6edf7); background: color-mix(in srgb, var(--text-muted, #7386a3) 22%, transparent); }++.is-unknown .dm-pill { color: var(--warning-text, #f59e0b); background: color-mix(in srgb, var(--warning, #f59e0b) 14%, transparent); }++.dm-act { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }++.dm-btn { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; background: var(--room-fill); font-weight: 700; font-size: .92rem; text-decoration: none; }++.dm a.dm-btn { color: var(--room-on); }++.dm a.dm-btn.is-quiet { background: transparent; color: var(--room-strong); border: 1px solid color-mix(in srgb, var(--room-accent) 45%, var(--border, #1f2d47)); }++.dm-btn:focus-visible { outline: 2px solid var(--room-accent); outline-offset: 2px; }++++/* An ending's page. */++.dm-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin: 18px 0 0; }++.dm-facts > div { padding: 12px 14px; border-radius: 14px; background: var(--bg-card, #0f1729); border: 1px solid var(--border, #1f2d47); min-width: 0; }++.dm-facts dt { font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted, #7386a3); }++.dm-facts dd { margin: 4px 0 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; overflow-wrap: anywhere; }++.dm-facts dd b { font-size: 1.3rem; font-variant-numeric: tabular-nums; }++.dm-facts dd small { color: var(--text-muted, #7386a3); }++.dm-record dd { font-weight: 600; }++.dm-warn { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0 0; max-width: 760px; padding: 12px 14px; border-radius: 14px; color: var(--text-primary, #e6edf7); background: color-mix(in srgb, var(--warning, #f59e0b) 12%, transparent); border: 1px solid color-mix(in srgb, var(--warning, #f59e0b) 35%, transparent); line-height: 1.5; }++.dm-warn .ovk-i { width: 20px; height: 20px; flex: none; margin-top: 1px; color: var(--warning-text, #f59e0b); }++.dm-chart { margin: 12px 0 0; padding: 14px; border-radius: 16px; background: var(--bg-card, #0f1729); border: 1px solid var(--border, #1f2d47); }++.dm-chart svg { display: block; width: 100%; height: auto; }++.dm-line { fill: none; stroke-width: 2.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; stroke: var(--room-accent); }++.dm-line.s1 { stroke: var(--text-secondary, #96a7c2); } .dm-line.s2 { stroke: var(--warning, #f59e0b); } .dm-line.s3 { stroke: var(--success, #22c55e); }++.dm-chart figcaption { margin-top: 8px; font-size: .82rem; color: var(--text-muted, #7386a3); }++.dm-timeline { list-style: none; margin: 0; padding: 0 0 0 16px; border-left: 2px solid color-mix(in srgb, var(--room-accent) 40%, transparent); display: grid; gap: 12px; }++.dm-timeline li { position: relative; display: grid; gap: 2px; }++.dm-timeline li::before { content: ""; position: absolute; left: -22px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--room-accent); }++.dm-timeline time { font-size: .78rem; color: var(--text-muted, #7386a3); }++.dm-chips { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }++.dm-chips a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border, #1f2d47); color: var(--text-primary, #e6edf7); text-decoration: none; font-weight: 600; font-size: .9rem; }++++/* Scenes on the home: the renewal trap drawn, and a 3-year total added up (real catalog numbers). */++.dm-trap-fig { margin: 0; }++.dm-bars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-items: end; height: 190px; }++.dm-bar { position: relative; display: grid; grid-template-rows: 1fr auto auto; height: 100%; text-align: center; }++.dm-bar span { align-self: end; height: var(--h); border-radius: 12px 12px 4px 4px; background: color-mix(in srgb, var(--warning, #f59e0b) 70%, transparent); }++.dm-bar.is-first span { background: var(--room-accent); }++.dm-bar b { margin-top: 8px; font-size: 1.05rem; font-variant-numeric: tabular-nums; }++.dm-bar small { font-size: .76rem; color: var(--text-muted, #7386a3); }++.dm-trap-fig figcaption { margin-top: 14px; color: var(--text-secondary, #96a7c2); line-height: 1.5; }++.dm-fig-tld { font-weight: 800; color: var(--room-strong); }++html.ov-motion [data-ov-reveal] .dm-bar span { transform: scaleY(.02); transform-origin: bottom; transition: transform .9s cubic-bezier(.2, .8, .2, 1) .15s; }++html.ov-motion [data-ov-reveal].is-in .dm-bar span { transform: none; }++.dm-sum { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 14px; padding: 8px 0; }++.dm-sum > div { display: grid; gap: 4px; padding: 14px 16px; border-radius: 14px; background: color-mix(in srgb, var(--room-accent) 8%, var(--bg-secondary, #101828)); text-align: center; min-width: 110px; }++.dm-sum > div.is-total { background: var(--room-fill); color: var(--room-on); }++.dm-sum small { font-size: .74rem; opacity: .8; }++.dm-sum b { font-size: 1.35rem; font-variant-numeric: tabular-nums; }++.dm-sum i { font-style: normal; font-size: 1.4rem; font-weight: 800; color: var(--text-muted, #7386a3); }++@media (prefers-reduced-motion: reduce) { .dm-tile { transition: none; } html.ov-motion [data-ov-reveal] .dm-bar span { transform: none; transition: none; } }++html[data-ov-motion=reduced] .dm-bar span { transform: none !important; transition: none !important; }++++/* The API page. */++.dm-eps { display: grid; gap: 10px; margin: 12px 0 0; }++.dm-eps > div { padding: 12px 14px; border-radius: 14px; background: var(--bg-card, #0f1729); border: 1px solid var(--border, #1f2d47); }++.dm-eps dt code { font: 600 .92rem/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--room-strong); overflow-wrap: anywhere; }++.dm-eps dd { margin: 6px 0 0; color: var(--text-secondary, #96a7c2); line-height: 1.5; }nnew file mode 100644@@@ -0,0 +1,134 @@++'use strict';++++/**++ * OpenVibe.Domains — Express app factory.++ *++ * /, /search, /tld/:tld, /d/:domain the pages (http/pages.js)++ * /api/v1/* the read-only JSON API (http/api.js)++ * /api/health, /api/ready liveness and truthful readiness++ * /release.json, /release-metrics the release manifest (openvibe-shared/release)++ * /robots.txt, /sitemap.xml, /llms.txt crawl artifacts (http/discovery.js)++ * /shared/* this service's own pinned Frame files++ *++ * No database, no sign-in, no Events: every request reads two public OpenVibe services through++ * the cached clients in server/data/. The app factory takes them as options so tests can pass++ * stubs instead of the network.++ */++const path = require('path');++const express = require('express');++const helmet = require('helmet');++const rateLimit = require('express-rate-limit');++const contracts = require('openvibe-contracts');++const serve = require('openvibe-shared/serve');++const releaseLib = require('openvibe-shared/release');++const metricsLib = require('openvibe-shared/metrics');++++const configLib = require('./config');++const { createHost } = require('./data/host');++const { createTools } = require('./data/tools');++const { createApi } = require('./http/api');++const { createPageRoutes } = require('./http/pages');++const { createServiceReadiness } = require('./observability');++++const VERSION = require('../package.json').version;++++/**++ * opts: config, host, tools, fetchImpl, log, release++ * `host` and `tools` are the two data clients; a test passes objects with the same methods.++ */++function createApp(opts = {}) {++ const config = opts.config || configLib.load();++ const log = opts.log || console;++ const fetchImpl = opts.fetchImpl || globalThis.fetch;++ const host = opts.host || createHost({ baseUrl: config.hostUrl, fetchImpl, log, timeoutMs: config.timeoutMs });++ const tools = opts.tools || createTools({ baseUrl: config.toolsUrl, fetchImpl, log, timeoutMs: config.timeoutMs });++++ const release = opts.release || releaseLib.createRelease({ service: 'domains', root: path.join(__dirname, '..') });++ const ctx = { config, host, tools, log, release };++++ const app = express();++ app.disable('x-powered-by');++ app.set('trust proxy', config.trustProxy);++ app.locals.ctx = ctx;++++ // Golden-signal metrics on loopback, and the release manifest/collector. No telemetry sink:++ // Help's request telemetry writes to its database, and this service has none.++ const metrics = metricsLib.instrument(app, { service: 'domains', release: release.release });++ app.locals.metrics = metrics.registry;++ release.mount(app, { registry: metrics.registry });++++ app.get('/api/health', (_req, res) => res.json({ status: 'ok', service: 'openvibe-domains', version: VERSION }));++ const readiness = createServiceReadiness({ host, tools, release: release.release });++ app.get('/api/ready', readiness.handler);++++ app.use(contracts.http.middleware());++ app.use(helmet({++ contentSecurityPolicy: {++ directives: {++ defaultSrc: ["'self'"],++ // The OpenVibe Frame (theme-loader, navbar, footer) comes from the Network; the inline init is ours.++ scriptSrc: ["'self'", "'unsafe-inline'", 'https://openvibe.network', 'https://static.cloudflareinsights.com'],++ styleSrc: ["'self'", "'unsafe-inline'", 'https://openvibe.network', 'https://fonts.googleapis.com', 'https://cdnjs.cloudflare.com'],++ fontSrc: ["'self'", 'data:', 'https://fonts.gstatic.com', 'https://cdnjs.cloudflare.com'],++ imgSrc: ["'self'", 'data:', 'https://openvibe.network', 'https://openvibe.media'],++ connectSrc: ["'self'", 'https://openvibe.network', 'https://cloudflareinsights.com', 'https://openvibe.events'],++ frameSrc: ["'self'", 'https://openvibe.network'],++ frameAncestors: ["'none'"],++ objectSrc: ["'none'"],++ baseUri: ["'self'"],++ formAction: ["'self'", 'https://openvibe.network'],++ },++ },++ frameguard: { action: 'deny' },++ crossOriginEmbedderPolicy: false,++ crossOriginResourcePolicy: { policy: 'same-site' },++ referrerPolicy: { policy: 'strict-origin-when-cross-origin' },++ }));++++ // This service's own pinned copy of the Frame, and its stylesheet (content-hashed by the views: kept a year).++ app.use('/shared', serve.handler());++ app.use('/css', express.static(path.join(__dirname, '..', 'public', 'css'), { maxAge: '365d', immutable: true, fallthrough: false }));++ require('./views').setRelease(release.release);++++ // One per-IP budget for the API and for a name query (120/min). The pages themselves are not limited here.++ const limiter = rateLimit({++ windowMs: 60_000,++ limit: config.rateLimitPerMinute || 120,++ standardHeaders: true,++ legacyHeaders: false,++ handler: (req, res) => {++ res.set('Access-Control-Allow-Origin', '*').set('Cache-Control', 'no-store');++ return contracts.http.sendProblem(res, 429, 'rate_limited', {++ detail: 'too many requests from this address; retry shortly',++ ctx: req.ov,++ });++ },++ });++ app.use('/api/v1', limiter);++ app.use('/search', limiter);++++ // ── API ─────────────────────────────────────────────────++ app.use('/api/v1', createApi(ctx));++ app.use('/api', (req, res) => {++ res.set('Cache-Control', 'no-store');++ contracts.http.sendProblem(res, 404, 'route.not_found', { detail: 'No such API route.', ctx: req.ov });++ });++++ // ── Pages ───────────────────────────────────────────────++ app.use(createPageRoutes(ctx));++++ // eslint-disable-next-line no-unused-vars++ app.use((err, req, res, _next) => {++ // Never log request bodies.++ log.error('[OpenVibe.Domains]', err && err.message ? err.message.slice(0, 300) : err);++ if (res.headersSent) return;++ res.set('Cache-Control', 'no-store');++ if (err && err.type === 'entity.parse.failed') return contracts.http.sendProblem(res, 400, 'request.malformed_json', { ctx: req.ov });++ if (req.path.startsWith('/api/')) return contracts.http.sendProblem(res, 500, 'internal.error', { detail: 'Internal error', ctx: req.ov });++ return res.status(500).type('text/plain').send('Something went wrong on our side. Try again in a moment.');++ });++++ return { app, ctx };++}++++module.exports = { createApp };nnew file mode 100644@@@ -0,0 +1,42 @@++'use strict';++++/**++ * OpenVibe.Domains configuration. Every value comes from the environment (production:++ * /etc/openvibe/domains.env, see .env.example). load(env) is pure so tests can build a config++ * without touching process.env.++ */++require('dotenv').config();++++const hostManifest = require('openvibe-contracts/manifests/services/host.json');++const toolsManifest = require('openvibe-contracts/manifests/services/tools.json');++++const trim = (s) => String(s || '').replace(/\/+$/, '');++const int = (v, def) => (Number.isFinite(parseInt(v, 10)) ? parseInt(v, 10) : def);++++function load(env = process.env) {++ const nodeEnv = env.NODE_ENV || 'development';++ const isProduction = nodeEnv === 'production';++ const port = int(env.PORT, 5070);++ const baseUrl = trim(env.BASE_URL || (isProduction ? 'https://openvibe.domains' : `http://localhost:${port}`));++ const hostUrl = trim(env.OV_HOST_INTERNAL_URL || hostManifest.internalOrigin || 'http://127.0.0.1:4910');++ const toolsUrl = trim(env.OV_TOOLS_INTERNAL_URL || toolsManifest.internalOrigin || 'https://openvibe.tools');++++ return {++ service: 'domains',++ name: 'OpenVibe.Domains',++ port,++ host: env.HOST || '127.0.0.1',++ nodeEnv,++ isProduction,++ baseUrl,++ trustProxy: env.TRUST_PROXY != null ? Number(env.TRUST_PROXY) : 2,++ // The two OpenVibe services this front reads. Both are read-only, public data.++ hostUrl,++ toolsUrl,++ // Per-IP budget for /api/v1 and /search (express-rate-limit, one window).++ rateLimitPerMinute: Math.max(1, int(env.DOMAINS_RATE_LIMIT_PER_MIN, 120)),++ timeoutMs: Math.max(100, int(env.DOMAINS_UPSTREAM_TIMEOUT_MS, 8000)),++ };++}++++module.exports = { load };nnew file mode 100644@@@ -0,0 +1,67 @@++'use strict';++++/**++ * The small in-memory cache both data clients use: a Map with an expiry per entry and a hard cap,++ * oldest insertion out. A process restart loses it; nothing here is persisted.++ */++const MAX = 2000;++++function createCache({ max = MAX, now = () => Date.now() } = {}) {++ const entries = new Map();++ return {++ get(key) {++ const hit = entries.get(key);++ if (!hit) return undefined;++ if (hit.expires <= now()) {++ entries.delete(key);++ return undefined;++ }++ return hit.value;++ },++ set(key, value, ttlMs) {++ if (entries.has(key)) entries.delete(key);++ else if (entries.size >= max) {++ const oldest = entries.keys().next().value;++ if (oldest !== undefined) entries.delete(oldest);++ }++ entries.set(key, { value, expires: now() + Math.max(0, Number(ttlMs) || 0) });++ },++ get size() { return entries.size; },++ clear() { entries.clear(); },++ };++}++++/** GET a JSON document with an 8 s ceiling; throws on a non-2xx, a timeout or malformed JSON. */++async function fetchJson(fetchImpl, url, { timeoutMs = 8000 } = {}) {++ if (typeof fetchImpl !== 'function') throw new Error('fetch is not available');++ const controller = new AbortController();++ let timer;++ const timeout = new Promise((_, reject) => {++ timer = setTimeout(() => {++ try { controller.abort(); } catch { /* already gone */ }++ reject(new Error(`timed out after ${timeoutMs} ms`));++ }, timeoutMs);++ });++ try {++ const res = await Promise.race([++ Promise.resolve().then(() => fetchImpl(url, { signal: controller.signal, headers: { accept: 'application/json' } })),++ timeout,++ ]);++ if (!res || !res.ok) throw new Error(`HTTP ${res && res.status ? res.status : 'no response'}`);++ let body;++ if (typeof res.text === 'function') {++ const text = await res.text();++ if (text === undefined && typeof res.json === 'function') body = await res.json();++ else body = typeof text === 'string' ? (text ? JSON.parse(text) : null) : text;++ } else if (typeof res.json === 'function') {++ body = await res.json();++ } else {++ throw new Error('the response had no body');++ }++ return body;++ } finally {++ clearTimeout(timer);++ }++}++++module.exports = { createCache, fetchJson };nnew file mode 100644@@@ -0,0 +1,86 @@++'use strict';++++/**++ * OpenVibe.Host's price catalog (GET /api/v1/catalog/domains, .../check?name=, .../:tld).++ * Read-only, cached briefly in this process, and never allowed to throw into a page: a failure is++ * null and one short log line.++ */++const hostManifest = require('openvibe-contracts/manifests/services/host.json');++const { createCache, fetchJson } = require('./cache');++++const DEFAULT_BASE = String(hostManifest.internalOrigin || 'http://127.0.0.1:4910').replace(/\/+$/, '');++const CACHE_MS = {++ list: 10 * 60_000,++ tld: 10 * 60_000,++ check: 2 * 60_000,++};++++function createHost(opts = {}) {++ const baseUrl = String(opts.baseUrl || DEFAULT_BASE).replace(/\/+$/, '');++ const fetchImpl = opts.fetchImpl || globalThis.fetch;++ const timeoutMs = Number(opts.timeoutMs) > 0 ? Number(opts.timeoutMs) : 8000;++ const log = opts.log || console;++ const now = typeof opts.now === 'function' ? opts.now : () => Date.now();++ const cache = createCache({ now, max: opts.maxCacheEntries });++ const ttl = (name) => {++ const configured = opts.cacheMs && Number(opts.cacheMs[name]);++ return configured >= 0 ? configured : CACHE_MS[name];++ };++++ const fail = (what, err) => {++ try { log.warn(`[domains] Host ${what} failed: ${String((err && err.message) || err).slice(0, 180)}`); } catch { /* logging must not throw */ }++ };++++ async function read(key, ttlMs, url, what, { fresh = false } = {}) {++ if (!fresh) {++ const hit = cache.get(key);++ if (hit !== undefined) return hit;++ }++ try {++ const data = await fetchJson(fetchImpl, url, { timeoutMs });++ cache.set(key, data, ttlMs);++ return data;++ } catch (err) {++ fail(what, err);++ return null;++ }++ }++++ /** GET /api/v1/catalog/domains — the host list as it answers it: { tlds, next_cursor }. */++ async function tlds({ q, kind, sort, page, cursor, fresh = false } = {}) {++ const params = new URLSearchParams();++ if (q != null && q !== '') params.set('q', String(q));++ if (kind != null && kind !== '') params.set('kind', String(kind));++ if (sort != null && sort !== '') params.set('sort', String(sort));++ if (cursor != null && cursor !== '') {++ params.set('cursor', String(cursor));++ } else if (page != null && page !== '' && Number(page) !== 1) {++ const n = Number(page);++ // The host pages by 100 with an opaque cursor; a numeric page maps to its offset.++ params.set('cursor', Number.isSafeInteger(n) && n > 1 ? String((n - 1) * 100) : String(page));++ }++ const query = params.toString();++ return read(`list:${query}`, ttl('list'), `${baseUrl}/api/v1/catalog/domains${query ? `?${query}` : ''}`, 'list', { fresh });++ }++++ /** GET /api/v1/catalog/domains/:tld — one ending with every registrar's prices. */++ async function tld(value) {++ if (value == null || value === '') return null;++ const key = `tld:${String(value)}`;++ const body = await read(key, ttl('tld'), `${baseUrl}/api/v1/catalog/domains/${encodeURIComponent(String(value))}`, 'TLD');++ return body && body.tld ? body.tld : null;++ }++++ /** GET /api/v1/catalog/domains/check?name= — the registry answer and the popular endings' prices. */++ async function check(name) {++ if (name == null || name === '') return null;++ const params = new URLSearchParams({ name: String(name) });++ const key = `check:${String(name)}`;++ const body = await read(key, ttl('check'), `${baseUrl}/api/v1/catalog/domains/check?${params}`, 'check');++ return body && body.check ? body.check : null;++ }++++ return { tlds, tld, check };++}++++module.exports = { createHost, CACHE_MS, DEFAULT_BASE };nnew file mode 100644@@@ -0,0 +1,65 @@++'use strict';++++/**++ * OpenVibe.Tools' public domain history (GET /api/v1/domains and /api/v1/domains/:domain): the++ * snapshots of RDAP's public registration facts, what changed and how often a name was looked up.++ * Read-only, cached for ten minutes, and never allowed to throw into a page.++ */++const toolsManifest = require('openvibe-contracts/manifests/services/tools.json');++const { createCache, fetchJson } = require('./cache');++++const DEFAULT_BASE = String(toolsManifest.internalOrigin || 'https://openvibe.tools').replace(/\/+$/, '');++const CACHE_MS = { history: 10 * 60_000, lists: 10 * 60_000 };++++function createTools(opts = {}) {++ const baseUrl = String(opts.baseUrl || DEFAULT_BASE).replace(/\/+$/, '');++ const fetchImpl = opts.fetchImpl || globalThis.fetch;++ const timeoutMs = Number(opts.timeoutMs) > 0 ? Number(opts.timeoutMs) : 8000;++ const log = opts.log || console;++ const now = typeof opts.now === 'function' ? opts.now : () => Date.now();++ const cache = createCache({ now, max: opts.maxCacheEntries });++ const ttl = (name) => {++ const configured = opts.cacheMs && Number(opts.cacheMs[name]);++ return configured >= 0 ? configured : CACHE_MS[name];++ };++++ const fail = (what, err) => {++ try { log.warn(`[domains] Tools ${what} failed: ${String((err && err.message) || err).slice(0, 180)}`); } catch { /* logging must not throw */ }++ };++++ async function read(key, ttlMs, url, what, { fresh = false } = {}) {++ if (!fresh) {++ const hit = cache.get(key);++ if (hit !== undefined) return hit;++ }++ try {++ const data = await fetchJson(fetchImpl, url, { timeoutMs });++ cache.set(key, data, ttlMs);++ return data;++ } catch (err) {++ fail(what, err);++ return null;++ }++ }++++ /** GET /api/v1/domains/:domain — snapshots, changes, lookups and first_seen. */++ async function history(domain) {++ if (domain == null || domain === '') return null;++ const name = String(domain).trim().toLowerCase().replace(/\.$/, '');++ if (!name) return null;++ return read(`history:${name}`, ttl('history'), `${baseUrl}/api/v1/domains/${encodeURIComponent(name)}`, 'history');++ }++++ /** GET /api/v1/domains/ — the most looked up domains and those expiring within 60 days. */++ async function lists({ limit, fresh = false } = {}) {++ const params = new URLSearchParams();++ const n = Number(limit);++ if (Number.isFinite(n) && n > 0) params.set('limit', String(Math.min(100, Math.floor(n))));++ const query = params.toString();++ return read(`lists:${query}`, ttl('lists'), `${baseUrl}/api/v1/domains/${query ? `?${query}` : ''}`, 'lists', { fresh });++ }++++ return { history, lists };++}++++module.exports = { createTools, CACHE_MS, DEFAULT_BASE };nnew file mode 100644@@@ -0,0 +1,83 @@++'use strict';++++/**++ * /api/v1 — the read-only JSON face of OpenVibe.Domains.++ *++ * GET /search?q= one name: { name, status, rows }++ * GET /tlds?q=&kind=&sort=&page= OpenVibe.Host's list, as it answers it++ * GET /tlds/:tld one ending: { tld }, rows priced like the page++ * GET /domains/:domain { name, status, registrar, expires, history, prices }++ *++ * A bad name is 400 problem+json; an ending the catalog does not know is 404. Every GET is++ * CORS-open and cached publicly for five minutes. No route writes anything.++ */++const contracts = require('openvibe-contracts');++const { asyncRouter } = require('./router');++const { parseName, parseTld } = require('../names');++const { priceRows } = require('../pricing');++++const API_CACHE = 'public, max-age=300';++++function createApi(ctx) {++ const { host, tools } = ctx;++ const r = asyncRouter();++ // The clients never throw; a stand-in that does answers like an upstream failure.++ const safe = (fn) => Promise.resolve().then(fn).catch(() => null);++++ const problem = (req, res, status, code, detail) => {++ res.set('Cache-Control', 'no-store');++ return contracts.http.sendProblem(res, status, code, { detail, ctx: req.ov });++ };++++ r.use((req, res, next) => {++ if (req.method === 'GET' || req.method === 'HEAD') {++ res.set('Access-Control-Allow-Origin', '*');++ res.set('Cache-Control', API_CACHE);++ }++ next();++ });++++ r.get('/search', async (req, res) => {++ const q = typeof req.query.q === 'string' ? req.query.q.trim() : '';++ const name = q ? parseName(q) : null;++ if (!name) return problem(req, res, 400, 'domains.name.invalid', 'Type a domain name, such as sushi truck, example.com or münchen.de.');++ const check = await safe(() => host.check(name.ascii));++ const rows = check && Array.isArray(check.prices) ? priceRows(check.prices) : [];++ return res.json({ name, status: check ? check.status : 'unknown', rows });++ });++++ r.get('/tlds', async (req, res) => {++ const query = {};++ for (const key of ['q', 'kind', 'sort', 'page']) {++ if (typeof req.query[key] === 'string' && req.query[key] !== '') query[key] = req.query[key];++ }++ const list = await safe(() => host.tlds(query));++ if (!list) return problem(req, res, 502, 'domains.upstream.failed', 'OpenVibe.Host did not answer the price catalog.');++ return res.json(list);++ });++++ r.get('/tlds/:tld', async (req, res) => {++ const tld = parseTld(req.params.tld);++ if (!tld) return problem(req, res, 404, 'domains.tld.not_found', 'No such domain ending.');++ const detail = await safe(() => host.tld(tld));++ if (!detail) return problem(req, res, 404, 'domains.tld.not_found', `No registrar price is listed for .${tld}.`);++ return res.json({ tld: { ...detail, prices: priceRows(detail.prices) } });++ });++++ r.get('/domains/:domain', async (req, res) => {++ const name = parseName(req.params.domain);++ if (!name || !name.tld) return problem(req, res, 400, 'domains.name.invalid', 'Use a full domain name with an ending, such as example.com.');++ const [history, check] = await Promise.all([safe(() => tools.history(name.ascii)), safe(() => host.check(name.ascii))]);++ const rows = check && Array.isArray(check.prices) ? check.prices.filter((row) => row && row.tld === name.tld) : [];++ // status, registrar and expires sit at the top so a watch can follow one field (OpenVibe.Watch's value_path=status).++ return res.json({++ name, status: check ? check.status : 'unknown', registrar: check && check.registrar ? check.registrar : null,++ expires: check && check.expires ? check.expires : null, history, prices: priceRows(rows),++ });++ });++++ r.use((req, res) => problem(req, res, 404, 'route.not_found', 'No such API route.'));++ return r;++}++++module.exports = { createApi, API_CACHE };nnew file mode 100644@@@ -0,0 +1,115 @@++'use strict';++++/**++ * Crawl artifacts, built with openvibe-shared/seo: robots.txt (allow everything, name the sitemap),++ * sitemap.xml (the home page and one page per ending in every page of the Host catalog) and++ * llms.txt (what the site is, its pages and its API). The sitemap's lastmod is the release's++ * released_at, never the clock.++ */++const seo = require('openvibe-shared/seo');++const { asyncRouter } = require('./router');++++const SITE_NAME = 'OpenVibe.Domains';++const TEXT_CACHE = 'public, max-age=3600';++const MAX_PAGES = 60;++++function releaseDay(release) {++ try {++ const full = release && typeof release.full === 'function' ? release.full() : release;++ const m = String((full && full.released_at) || '').match(/^(\d{4}-\d{2}-\d{2})/);++ return m ? m[1] : null;++ } catch {++ return null;++ }++}++++/** Every ending the catalog lists, across its cursor pages; a failed page just ends the walk. */++async function everyEnding(host) {++ const seen = new Map();++ let page = 1;++ let cursor = null;++ let lastToken = null;++ for (let walked = 0; walked < MAX_PAGES; walked++) {++ const query = cursor ? { sort: 'popular', cursor }++ : (page > 1 ? { sort: 'popular', page } : { sort: 'popular' });++ let list = null;++ try { list = await host.tlds(query); } catch { break; }++ if (!list || !Array.isArray(list.tlds)) break;++ for (const t of list.tlds) {++ if (t && typeof t.tld === 'string' && t.tld && !seen.has(t.tld)) seen.set(t.tld, t);++ }++ if (!list.next_cursor) break;++ const token = String(list.next_cursor);++ if (token === lastToken) break;++ lastToken = token;++ // The host pages by 100 and answers an offset cursor. A stand-in may answer a page number;++ // both are read here, and anything else is passed straight back as a cursor.++ const next = Number(token);++ if (Number.isSafeInteger(next) && next > 0) {++ if (next <= MAX_PAGES) { page = next; cursor = null; }++ else if (next % 100 === 0) { page = next / 100 + 1; cursor = null; }++ else { cursor = token; page += 1; }++ } else {++ cursor = token;++ page += 1;++ }++ }++ return [...seen.values()];++}++++function createDiscoveryRoutes(ctx) {++ const { config, host, release } = ctx;++ const r = asyncRouter();++ const site = String(config.baseUrl).replace(/\/+$/, '');++ const abs = (path) => `${site}${path}`;++++ r.get('/robots.txt', (_req, res) => {++ res.type('text/plain').set('Cache-Control', TEXT_CACHE).send(seo.robotsTxt({++ sitemaps: [abs('/sitemap.xml')],++ allow: ['/'],++ disallow: [],++ }));++ });++++ r.get('/sitemap.xml', async (_req, res) => {++ const lastmod = releaseDay(release);++ const endings = await everyEnding(host);++ const urls = [++ { loc: abs('/'), ...(lastmod ? { lastmod } : {}), changefreq: 'daily', priority: 1.0 },++ ...endings.map((t) => ({ loc: abs(`/tld/${encodeURIComponent(t.tld)}`), ...(lastmod ? { lastmod } : {}), changefreq: 'weekly', priority: 0.8 })),++ ];++ res.type('application/xml').set('Cache-Control', TEXT_CACHE).send(seo.sitemapXml(urls));++ });++++ r.get('/llms.txt', (_req, res) => {++ res.type('text/plain').set('Cache-Control', TEXT_CACHE).send(seo.llmsTxt({++ name: SITE_NAME,++ summary: 'OpenVibe.Domains is a stateless front over OpenVibe.Host\'s price catalog and OpenVibe.Tools\' public domain history: for a name, whether it is registered and every registrar\'s one-, three- and five-year totals; for an ending, every registrar\'s prices; for a domain, its public registration facts over time.',++ details: 'There is no account, no database and no event stream. Every page is server-rendered and readable without JavaScript. USD is compared; other currencies are kept after it and marked. A renewal trap marks a cheap first year whose renewal is the real price.',++ sections: [++ { title: 'Pages', links: [++ { title: 'Every ending', url: abs('/'), note: 'the price catalog, popular endings first' },++ { title: 'Check a name', url: abs('/search?q=example.com'), note: 'registry status and registrar totals; noindex' },++ { title: 'One ending', url: abs('/tld/dev'), note: 'every registrar\'s first year, three years and five years' },++ { title: 'One domain', url: abs('/d/example.com'), note: 'public history from OpenVibe.Tools and its ending\'s prices' },++ ] },++ { title: 'API', links: [++ { title: 'Search a name (JSON)', url: abs('/api/v1/search?q=example.com') },++ { title: 'Every ending (JSON)', url: abs('/api/v1/tlds?sort=popular') },++ { title: 'One ending (JSON)', url: abs('/api/v1/tlds/dev') },++ { title: 'One domain (JSON)', url: abs('/api/v1/domains/example.com') },++ { title: 'Sitemap', url: abs('/sitemap.xml') },++ { title: 'Release metadata', url: abs('/release.json') },++ ] },++ { title: 'The data it reads', links: [++ { title: 'OpenVibe.Host domain prices', url: 'https://openvibe.host/catalog/domains', note: 'the catalog and the registry name check' },++ { title: 'OpenVibe.Tools domain history', url: 'https://openvibe.tools/network/whois', note: 'RDAP\'s public facts, kept over time' },++ ] },++ ],++ }));++ });++++ return r;++}++++module.exports = { createDiscoveryRoutes, everyEnding, releaseDay, SITE_NAME };nnew file mode 100644@@@ -0,0 +1,101 @@++'use strict';++++/**++ * Public pages:++ * / the endings and OpenVibe.Tools' public lists++ * /search?q= one name: registry status and every registrar's totals (noindex)++ * /tld/:tld one ending and every registrar's prices++ * /.:tld 301 to /tld/:tld++ * /d/:domain one domain's public history and its ending's prices++ *++ * Every page is server-rendered, complete without JavaScript and cached for a short public window++ * (five minutes, two for a name query). The views are placeholders; this file builds the model.++ */++const views = require('../views');++const { parseName, parseTld } = require('../names');++const { priceRows } = require('../pricing');++const { asyncRouter } = require('./router');++const { createDiscoveryRoutes } = require('./discovery');++++const PAGE_CACHE = 'public, max-age=300';++const QUERY_CACHE = 'public, max-age=120';++++function createPageRoutes(ctx) {++ const { config, host, tools } = ctx;++ const r = asyncRouter();++ const site = () => String(config.baseUrl).replace(/\/+$/, '');++ const abs = (path) => `${site()}${path}`;++ // The clients never throw; this keeps a misbehaving stand-in from turning a page into a 500.++ const safe = (fn) => Promise.resolve().then(fn).catch(() => null);++++ const send = (res, status, body, cache = PAGE_CACHE) => {++ res.status(status).set('Cache-Control', cache).type('html').send(body);++ };++ const notFound = (res) => send(res, 404, views.notFound());++++ r.get('/', async (_req, res) => {++ const [endings, lists] = await Promise.all([++ safe(() => host.tlds({ sort: 'popular' })),++ safe(() => tools.lists({ limit: 10 })),++ ]);++ send(res, 200, views.home({ endings, lists, canonical: abs('/') }));++ });++++ r.get('/search', async (req, res) => {++ const q = typeof req.query.q === 'string' ? req.query.q.trim() : '';++ const name = q ? parseName(q) : null;++ if (!name) return res.redirect(302, '/');++ const check = await safe(() => host.check(name.ascii));++ const rows = check && Array.isArray(check.prices) ? priceRows(check.prices) : [];++ return send(res, 200, views.search({++ name, check, rows,++ available: check ? check.status : 'unknown',++ canonical: abs('/search'),++ }), QUERY_CACHE);++ });++++ r.get('/tld/:tld', async (req, res) => {++ const tld = parseTld(req.params.tld);++ if (!tld) return notFound(res);++ const detail = await safe(() => host.tld(tld));++ if (!detail) return notFound(res);++ const priced = { ...detail, prices: priceRows(detail.prices) };++ return send(res, 200, views.tld({ tld: priced, canonical: abs(`/tld/${encodeURIComponent(tld)}`) }));++ });++++ r.get('/tld', async (_req, res) => {++ const endings = await host.tlds({ sort: 'renew' });++ send(res, 200, views.endings({ endings, canonical: abs('/tld') }));++ });++++ r.get('/developers', (_req, res) => send(res, 200, views.developers({ canonical: abs('/developers') })));++++ // A person who types "/.dev" gets the ending page. The ending is normalized in one 301.++ r.get(/^\/\.([^/]+)$/, (req, res) => {++ const tld = parseTld(req.params[0]);++ if (!tld) return notFound(res);++ res.set('Cache-Control', PAGE_CACHE);++ return res.redirect(301, `/tld/${encodeURIComponent(tld)}`);++ });++++ r.get('/d/:domain', async (req, res) => {++ const name = parseName(req.params.domain);++ if (!name || !name.tld) return notFound(res);++ const [history, check] = await Promise.all([++ safe(() => tools.history(name.ascii)),++ safe(() => host.check(name.ascii)),++ ]);++ const rows = check && Array.isArray(check.prices) ? check.prices.filter((row) => row && row.tld === name.tld) : [];++ return send(res, 200, views.domain({++ name, history, prices: priceRows(rows), status: check ? check.status : null, check,++ canonical: abs(`/d/${encodeURIComponent(name.ascii)}`),++ }), QUERY_CACHE);++ });++++ r.use(createDiscoveryRoutes(ctx));++++ r.use((_req, res) => notFound(res));++ return r;++}++++module.exports = { createPageRoutes, PAGE_CACHE, QUERY_CACHE };nnew file mode 100644@@@ -0,0 +1,23 @@++'use strict';++++/**++ * express.Router() whose get/post handlers may be async: a rejected promise goes to next(err)++ * instead of becoming an unhandled rejection. (The same helper OpenVibe.Help carries.)++ */++const express = require('express');++++function asyncRouter() {++ const r = express.Router();++ for (const method of ['get', 'post']) {++ const orig = r[method].bind(r);++ r[method] = (path, ...handlers) => orig(path, ...handlers.map((h) => (h.length === 4 ? h : (req, res, next) => {++ try {++ const out = h(req, res, next);++ if (out && typeof out.catch === 'function') out.catch(next);++ } catch (err) { next(err); }++ })));++ }++ return r;++}++++module.exports = { asyncRouter };nnew file mode 100644@@@ -0,0 +1,44 @@++'use strict';++++/**++ * OpenVibe.Domains — process entry. `node server/index.js` listens on PORT (5070) behind nginx++ * (deploy/). Stateless: nothing to close but the HTTP server.++ */++const { createApp } = require('./app');++const { gracefulStop } = require('openvibe-sdk/service');++++/**++ * The process stop (openvibe-sdk/service): stop taking connections, drain the requests in++ * flight, exit. Exported so a test can inject `exit` and `signals: false`.++ */++function createLifecycle({ server, ctx, exit, signals } = {}) {++ return gracefulStop({++ name: 'OpenVibe.Domains',++ server,++ deadlineExitCode: 0,++ exit,++ signals,++ deadlineMs: 10_000,++ close: [],++ });++}++++async function start() {++ const { app, ctx } = await createApp();++ const { config } = ctx;++ const server = app.listen(config.port, config.host, () => {++ console.log(`[OpenVibe.Domains] ${config.nodeEnv} on http://${config.host}:${config.port} → ${config.baseUrl} (host ${config.hostUrl}, tools ${config.toolsUrl})`);++ });++ server.keepAliveTimeout = 65_000;++ createLifecycle({ server, ctx });++ return { server, ctx };++}++++if (require.main === module) {++ start().catch((err) => {++ console.error('[OpenVibe.Domains] failed to start:', err);++ process.exit(1);++ });++}++++module.exports = { start, createLifecycle };nnew file mode 100644@@@ -0,0 +1,78 @@++'use strict';++++/**++ * Read a name the way a person types it. A name is a label and an optional ending: "sushi truck",++ * "SushiTruck.com", "https://www.sushitruck.co.uk/x" and "münchen.de" all have one.++ *++ * parseName(input) -> { label, tld, ascii, display } | null++ * label the first label, ASCII (punycode for IDNs), 1-63 characters of [a-z0-9-]++ * tld everything after the first dot ("co.uk" stays "co.uk"), or null++ * ascii the full name in ASCII (punycode when needed), or just the label when there is no tld++ * display the Unicode form for people++ *++ * parseTld(input) -> the ending without a leading dot (".Dev" -> "dev", "co.uk"), or null.++ */++const url = require('url');++++/** Components are 1-63 characters, lower-case ASCII letters, digits and hyphens, no edge hyphen. */++const LABEL_RE = /^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/;++++function validAscii(name) {++ if (!name || name.length > 253) return false;++ const parts = name.split('.');++ if (parts.length < 1 || parts.length > 127) return false;++ return parts.every((p) => p.length >= 1 && p.length <= 63 && LABEL_RE.test(p));++}++++/** Drop a scheme, credentials, path, query, fragment, port, a leading www. and a trailing root dot. */++function hostPart(input) {++ if (typeof input !== 'string') return '';++ let s = input.trim().toLowerCase();++ if (!s) return '';++ s = s.replace(/^[a-z][a-z0-9+.-]*:\/\//i, '');++ // A user:password@ is not part of a name; leave it to fail validation rather than guessing.++ s = s.split(/[/?#]/, 1)[0];++ s = s.replace(/:\d+$/, '');++ s = s.replace(/^www\./, '');++ s = s.replace(/\.+$/, '');++ return s;++}++++function toAscii(name) {++ try {++ return url.domainToASCII(name);++ } catch {++ return '';++ }++}++++function parseName(input) {++ const raw = hostPart(input);++ if (!raw) return null;++++ const dot = raw.indexOf('.');++ const labelRaw = (dot === -1 ? raw : raw.slice(0, dot)).replace(/[\s_]/g, '');++ const tldRaw = dot === -1 ? '' : raw.slice(dot + 1);++++ // Spaces and underscores are removed from the label only; an ending is validated as typed.++ if (!labelRaw) return null;++ const nameRaw = tldRaw ? `${labelRaw}.${tldRaw}` : labelRaw;++ const ascii = toAscii(nameRaw);++ if (!ascii || !validAscii(ascii)) return null;++++ const parts = ascii.split('.');++ const tld = parts.length > 1 ? parts.slice(1).join('.') : null;++ const display = url.domainToUnicode(ascii) || ascii;++ return { label: parts[0], tld, ascii, display };++}++++function parseTld(input) {++ if (typeof input !== 'string') return null;++ const s = hostPart(input).replace(/^\.+/, '');++ if (!s) return null;++ const ascii = toAscii(s);++ if (!ascii || !validAscii(ascii)) return null;++ return ascii;++}++++module.exports = { parseName, parseTld };nnew file mode 100644@@@ -0,0 +1,38 @@++'use strict';++++/**++ * Truthful readiness for GET /api/ready (openvibe-shared/ready). There is no database and no++ * session store: the only dependencies are the two public services this front reads.++ *++ * Both checks are optional. If OpenVibe.Host or OpenVibe.Tools does not answer, the process is++ * still serving (there is a page, even if it says the upstream failed), so the answer is 200 with++ * status "degraded" — never 503. A failed check is named in `degraded`.++ */++const { createReadiness } = require('openvibe-shared/ready');++++function createServiceReadiness({ host, tools, release = null }) {++ return createReadiness({++ service: 'domains',++ release,++ checks: [++ {++ name: 'host',++ required: false,++ check: async () => {++ const list = await host.tlds({ sort: 'popular', fresh: true });++ return list ? true : 'OpenVibe.Host did not answer';++ },++ },++ {++ name: 'tools',++ required: false,++ check: async () => {++ const lists = await tools.lists({ limit: 1, fresh: true });++ return lists ? true : 'OpenVibe.Tools did not answer';++ },++ },++ ],++ });++}++++module.exports = { createServiceReadiness };nnew file mode 100644@@@ -0,0 +1,58 @@++'use strict';++++/**++ * Price rows from OpenVibe.Host's catalog (register, renew, transfer, five_year, registrars,++ * currency, checked_at, tld, display, kind) into what a visitor compares:++ *++ * y1 first year = register++ * y3 three years = register + 2 * renew++ * y5 five years = the catalog's five_year when it has one,++ * else register + 4 * renew++ * trap renew >= 2 * register and renew - register >= 5: the cheap first year whose++ * renewal is the real price++ *++ * Only USD rows are compared; other currencies are kept after them and flagged++ * `currency_other: true`. Sorted by y3 ascending, rows without a y3 last, stable otherwise.++ * Every money value is rounded to cents.++ */++++const num = (v) => {++ if (v == null || v === '') return null;++ const n = Number(v);++ return Number.isFinite(n) ? n : null;++};++// A tiny half-cent nudge absorbs binary floating point (1.005 + 2 * 2.005 is 5.014999… in IEEE++// 754, but a registrar's decimal total is 5.015, and money rounds half up).++const cents = (n) => Math.round((n + 1e-9) * 100) / 100;++++function priceRows(rows) {++ const list = (Array.isArray(rows) ? rows : []).map((row, index) => {++ const r = row && typeof row === 'object' ? row : {};++ const register = num(r.register);++ const renew = num(r.renew);++ const fiveYear = num(r.five_year);++ const y1 = register == null ? null : cents(register);++ const y3 = register == null || renew == null ? null : cents(register + 2 * renew);++ const y5 = fiveYear != null ? cents(fiveYear)++ : (register == null || renew == null ? null : cents(register + 4 * renew));++ const trap = register != null && renew != null && renew >= 2 * register && renew - register >= 5;++ const out = { ...r, y1, y3, y5, trap, _index: index };++ // Only the rows that are not compared carry the flag; a USD row is the normal case.++ if (r.currency !== 'USD') out.currency_other = true;++ return out;++ });++++ list.sort((a, b) => {++ // USD first. Only USD rows are compared on y3; other currencies keep the host's order after them.++ if (a.currency_other !== b.currency_other) return a.currency_other ? 1 : -1;++ if (a.currency_other) return a._index - b._index;++ const ay = a.y3 == null ? Infinity : a.y3;++ const by = b.y3 == null ? Infinity : b.y3;++ if (ay !== by) return ay < by ? -1 : 1;++ return a._index - b._index;++ });++++ return list.map(({ _index, ...row }) => row);++}++++module.exports = { priceRows };nnew file mode 100644@@@ -0,0 +1,310 @@++'use strict';++/**++ * The Domains room's pages (plan 2026-10-28 §5.1). Server-rendered and whole without JavaScript; the Frame (navbar,++ * theme, footer) comes from openvibe-shared/shell, the room's front door from sc.room() and its accent from rooms.js.++ * server/http/pages.js builds each model from OpenVibe.Host's price catalog and OpenVibe.Tools' history; nothing here++ * invents a number: a price, a total or a date is shown only when the catalog has it, with where and when it came from.++ *++ * home({ endings, lists, canonical }) endings: the catalog's list ({ tlds: [...] }) or null++ * endings({ endings, canonical }) every ending, cheapest to keep first++ * search({ name, check, rows, available, canonical })++ * tld({ tld, canonical }) tld: the catalog's ending with priced registrar rows++ * domain({ name, history, prices, status, canonical })++ * notFound()++ */++const crypto = require('crypto');++const fs = require('fs');++const path = require('path');++const shell = require('openvibe-shared/shell');++const ovServe = require('openvibe-shared/serve');++const appIcon = require('openvibe-shared/app-icon');++const kit = require('openvibe-shared/kit');++const sc = require('openvibe-shared/showcase');++const rooms = require('openvibe-shared/rooms');++const { priceRows } = require('../pricing');++++const NAME = 'OpenVibe.Domains';++const NETWORK = 'https://openvibe.network';++const ROOM = rooms.get('domains');++const esc = kit.esc;++const PUBLIC = path.join(__dirname, '..', '..', 'public');++++const hashes = new Map();++function asset(rel) {++ if (!hashes.has(rel)) {++ let v = 'dev';++ try { v = crypto.createHash('sha256').update(fs.readFileSync(path.join(PUBLIC, rel))).digest('hex').slice(0, 10); } catch { /* missing in a test */ }++ hashes.set(rel, v);++ }++ return `/${rel}?v=${hashes.get(rel)}`;++}++++let RELEASE = 'dev';++function setRelease(id) { if (id) RELEASE = String(id); }++++// Money as people read it: $9.20, $1,240; a null is a dash (never 0).++const money = (n, cur = 'USD') => (n == null || !Number.isFinite(Number(n)) ? '—' : cur === 'USD'++ ? `$${Number(n).toLocaleString('en-US', { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`++ : `${Number(n).toLocaleString('en-US', { minimumFractionDigits: 2, maximumFractionDigits: 2 })} ${esc(cur)}`);++const day = (iso) => { const t = Date.parse(iso || ''); return Number.isFinite(t) ? new Date(t).toLocaleDateString('en-US', { month: 'short', day: 'numeric', year: 'numeric', timeZone: 'UTC' }) : ''; };++const dot = (tld) => `.${String(tld || '').replace(/^\./, '')}`;++const tldHref = (tld) => `/tld/${encodeURIComponent(String(tld).replace(/^\./, ''))}`;++const latest = (rows) => rows.map((r) => r.checked_at).filter(Boolean).sort().pop() || null;++++const NAV = [++ { label: 'Price a name', href: '/', icon: 'fa-magnifying-glass-dollar' },++ { label: 'Every ending', href: '/tld', icon: 'fa-list' },++ { label: 'API', href: '/developers', icon: 'fa-code', more: true },++];++++/** The page around a body: the shared shell with the room's stylesheets and behaviour. */++function layout({ title, description, canonical, robots = 'index, follow', body, active = '/', jsonLd = [] }) {++ const navbar = {++ service: 'domains',++ apiBase: NETWORK,++ links: NAV.map((l) => ({ ...l, active: l.href === active })),++ appBar: [{ label: 'Price', href: '/', icon: 'fa-magnifying-glass-dollar' }, { label: 'Endings', href: '/tld', icon: 'fa-list' }],++ search: { page: '/search', label: NAME },++ history: { type: 'page', title: title || NAME },++ };++ const footer = { service: 'domains', variant: 'full', mount: '#ov-footer', brandName: NAME };++ return shell.page({++ name: NAME,++ lang: 'en',++ title: title || `${NAME}: ${ROOM.line}`,++ titleSuffix: title ? ` · ${NAME}` : '',++ siteName: NAME,++ description: description || `${ROOM.line}. Every ending and registrar for a name, with what you will really pay over 1, 3 and 5 years.`,++ canonical,++ robots,++ jsonLd,++ home: '/',++ navLinks: NAV,++ navbar,++ footer,++ head: `${appIcon.headTags({ site: 'domains' })}++<link rel="stylesheet" href="${esc(ovServe.url('kit.css'))}">++<link rel="stylesheet" href="${esc(ovServe.url('room.css'))}">++<link rel="stylesheet" href="${esc(ovServe.url('showcase.css'))}">++<link rel="stylesheet" href="${asset('css/domains.css')}">++<script src="${esc(ovServe.url('kit-web.js'))}" defer></script>++<script src="${esc(ovServe.url('motion.js'))}" defer></script>++<meta name="ov-boost" content="domains@${esc(RELEASE)}">`,++ body: `<a class="skip" href="#main">Skip to content</a>++<div id="navbar-mount"></div>++<main id="main" class="dm ov-room" style="${rooms.style('domains')}">${body}</main>++<script>window.__OV_PAGE = ${JSON.stringify({ navbar, footer }).replace(/</g, '\\u003c')};++document.addEventListener('DOMContentLoaded', function () { try { if (window.OpenVibeFooter) OpenVibeFooter.init(window.__OV_PAGE.footer); } catch (e) { /* optional */ } });</script>`,++ });++}++++/** The box that prices a name (the home's is the room hero's; every other page has this one). */++const searchBox = (value = '') => `<form class="dm-box" role="search" method="get" action="/search"><label class="sc-sr" for="dm-q">A name to price</label>`++ + `<input id="dm-q" type="search" name="q" value="${esc(value)}" placeholder="Price a name, like sushitruck" autocomplete="off" spellcheck="false" enterkeyhint="search" maxlength="253">`++ + `<button type="submit" aria-label="Price it">${kit.icon('forward')}</button></form>`;++++/** One ending as a tile on the board: the ending, the first year, what three years really cost, a trap warning. */++function tile(r) {++ return `<li><a class="dm-tile${r.trap ? ' is-trap' : ''}" href="${tldHref(r.tld)}"><span class="dm-tile-tld">${esc(r.display || dot(r.tld))}</span>`++ + `<span class="dm-tile-y3"><b>${money(r.y3, r.currency)}</b><small>3 years</small></span>`++ + `<span class="dm-tile-y1">${money(r.y1, r.currency)} first year</span>`++ + `${r.trap ? `<span class="dm-trap">Renews at ${money(Number(r.renew), r.currency)}</span>` : r.registrars > 1 ? `<span class="dm-tile-n">${Number(r.registrars)} registrars</span>` : ''}</a></li>`;++}++++/** A renewal trap drawn: the first year beside each renewal, with the 3-year total (real numbers from the catalog). */++function trapPicture(r) {++ const max = Math.max(Number(r.register), Number(r.renew));++ const bar = (v, label, cls) => `<div class="dm-bar ${cls}"><span style="--h:${Math.max(6, Math.round((Number(v) / max) * 100))}%"></span><b>${money(v, r.currency)}</b><small>${label}</small></div>`;++ return `<figure class="dm-trap-fig" aria-label="${esc(`${r.display || dot(r.tld)}: ${money(r.y1)} the first year, then ${money(Number(r.renew))} a year`)}">`++ + `<div class="dm-bars">${bar(r.register, 'Year 1', 'is-first')}${bar(r.renew, 'Year 2', '')}${bar(r.renew, 'Year 3', '')}</div>`++ + `<figcaption><span class="dm-fig-tld">${esc(r.display || dot(r.tld))}</span> looks like ${money(r.y1, r.currency)}. Three years cost <b>${money(r.y3, r.currency)}</b>.</figcaption></figure>`;++}++++/** How a 3-year total is made, with one ending's real prices. */++function totalPicture(r) {++ return `<div class="dm-sum" aria-label="${esc(`How three years of ${r.display || dot(r.tld)} add up`)}">`++ + `<div><small>First year</small><b>${money(r.y1, r.currency)}</b></div><i aria-hidden="true">+</i>`++ + `<div><small>2 renewals</small><b>${money(2 * Number(r.renew), r.currency)}</b></div><i aria-hidden="true">=</i>`++ + `<div class="is-total"><small>${esc(r.display || dot(r.tld))} for 3 years</small><b>${money(r.y3, r.currency)}</b></div></div>`;++}++++function home({ endings, lists } = {}) {++ // The home's board shows the endings people mean (generic and country codes), not second-level ones like++ // augustow.pl or punycode endings, which are on /tld.++ const rows = priceRows((endings && endings.tlds) || []).filter((r) => !r.currency_other && r.y3 != null && !String(r.tld).includes('.') && !/^xn--/.test(String(r.tld)));++ const all = priceRows((endings && endings.tlds) || []);++ const registrars = rows.reduce((m, r) => Math.max(m, Number(r.registrars) || 0), 0);++ const checked = latest(rows);++ const popular = ['com', 'dev', 'ai', 'io', 'app', 'net', 'org', 'co'].map((t) => rows.find((r) => r.tld === t)).filter(Boolean).slice(0, 5);++ const trap = rows.filter((r) => r.trap).sort((a, b) => (Number(b.renew) / Number(b.register)) - (Number(a.renew) / Number(a.register)))[0];++ const com = rows.find((r) => r.tld === 'com') || rows[0];++ const board = rows.length ? `<section class="dm-board-sec" aria-labelledby="dm-board-h"><div class="dm-head-row"><h2 id="dm-board-h">Cheapest to keep</h2><a class="dm-more" href="/tld">Every ending${kit.icon('chevron')}</a></div>`++ + `<p class="dm-fine">Sorted by what three years really cost, not the first-year price.${checked ? ` Prices checked ${esc(day(checked))}.` : ''}</p>`++ + `<ul class="dm-board">${rows.slice(0, 12).map(tile).join('')}</ul></section>` : '';++ const looked = lists && Array.isArray(lists.most_looked_up) ? lists.most_looked_up.slice(0, 8) : [];++ const lookedHTML = looked.length ? `<section class="dm-looked" aria-labelledby="dm-looked-h"><h2 id="dm-looked-h">Looked up most</h2><ul class="dm-chips">${looked.map((d) => `<li><a href="/d/${encodeURIComponent(d.domain || d.name || '')}">${esc(d.domain || d.name || '')}</a></li>`).join('')}</ul></section>` : '';++ const body = sc.room({++ room: 'domains',++ hero: {++ title: ROOM.line,++ lede: 'Type a name. See every ending and every registrar, with what you will really pay over one, three and five years, and the renewal traps flagged.',++ search: { action: '/search', name: 'q', placeholder: 'Price a name, like sushitruck', label: 'A name to price', button: 'Price it', hints: ['sushitruck', 'mybrand.dev', 'cozy cafe', 'pixel.studio'] },++ chips: popular.map((r) => ({ label: r.display || dot(r.tld), href: tldHref(r.tld) })),++ },++ proof: [++ { value: all.length, label: all.length === 1 ? 'ending priced' : 'endings priced', asOf: checked ? day(checked) : null },++ { value: registrars, label: registrars === 1 ? 'registrar compared' : 'registrars compared' },++ ].filter((p) => p.value),++ html: board + lookedHTML,++ scenes: [++ trap ? { title: 'The renewal trap, in plain sight', text: `A cheap first year is how many endings are sold. ${trap.display || dot(trap.tld)} starts at ${money(trap.y1)} and renews at ${money(Number(trap.renew))}: every page here sorts by what you keep paying.`, html: trapPicture(trap), action: { href: tldHref(trap.tld), label: `See ${trap.display || dot(trap.tld)}` } } : null,++ com ? { title: 'One honest number: three years', text: 'The first year plus two renewals, from each registrar\'s own public price list, with the date it was read. Five years is on every page too.', html: totalPicture(com), action: { href: tldHref(com.tld), label: `Every registrar for ${com.display || dot(com.tld)}` } } : null,++ ].filter(Boolean),++ explore: { title: 'More on Domains', items: [++ { title: 'Every ending', text: 'All the endings OpenVibe prices, cheapest to keep first', href: '/tld', icon: 'ov:dns' },++ { title: 'Look up a domain', text: 'Its public record: registrar, dates and how they changed', href: '/d/openvibe.live', icon: 'ov:history' },++ { title: 'Hosting prices', text: 'Servers and plans compared on OpenVibe.Host', href: 'https://openvibe.host/catalog', icon: 'ov:host' },++ ] },++ dev: { title: 'For developers', lede: 'Every price and check is open JSON, readable from any site.', samples: [++ { label: 'Price a name', lang: 'bash', code: 'curl "https://openvibe.domains/api/v1/search?q=sushitruck"' },++ { label: 'One ending, every registrar', lang: 'bash', code: 'curl https://openvibe.domains/api/v1/tlds/dev' },++ ], links: [{ label: 'The API', href: '/developers' }, { label: 'llms.txt', href: '/llms.txt' }] },++ faq: { items: [++ ['Where do the prices come from?', 'From each registrar\'s own public price list, read by OpenVibe and dated on every page. Nothing is sponsored, and no registrar pays to be listed or to be first.'],++ ['Can I register a domain here?', 'Not yet: each price links to the registrar that offers it. Connecting your own registrar accounts to manage your domains in one place comes next.'],++ ['Why three years?', 'Many endings are cheap for one year and much dearer to keep. Three years (the first year and two renewals) is the number that tells you what a name will really cost.'],++ ['Is a name I search for kept?', 'Searches are not tied to you. A domain\'s public history is kept only after it has been looked up five times, and holds public registration facts only.'],++ ] },++ });++ return layout({ title: null, canonical: undefined, body: `<div class="dm-wrap">${body}</div>`, active: '/', jsonLd: [{ '@context': 'https://schema.org', '@type': 'WebSite', name: NAME, url: 'https://openvibe.domains/', potentialAction: { '@type': 'SearchAction', target: 'https://openvibe.domains/search?q={name}', 'query-input': 'required name=name' } }] });++}++++/** A table of priced rows: ending or registrar first, then the year totals, sorted by 3 years. */++function priceTable(rows, { by = 'ending', label = '', check = null } = {}) {++ if (!rows.length) return '';++ const best = rows.length > 1 ? rows.find((r) => !r.currency_other && r.y3 != null) : null;++ const head = by === 'ending' ? 'Ending' : 'Registrar';++ const cell = (r) => {++ if (by === 'ending') return check ? `<a href="/search?q=${encodeURIComponent(`${check}.${r.tld}`)}" title="${esc(`Check ${check}.${r.tld}`)}">${esc(r.display || dot(r.tld))}</a>` : `<a href="${tldHref(r.tld)}">${esc(r.display || dot(r.tld))}</a>`;++ const href = r.affiliate_url || r.homepage_url;++ return href ? `<a href="${esc(href)}" rel="noopener${r.affiliate_url ? ' sponsored' : ''}">${esc(r.registrar)}</a>${r.affiliate_url ? '<small class="dm-aff">Affiliate link</small>' : ''}` : esc(r.registrar || '');++ };++ return `<div class="dm-table" role="table" aria-label="${esc(label || 'Prices')}"><div class="dm-tr dm-th" role="row"><span role="columnheader">${head}</span><span role="columnheader">First year</span><span role="columnheader">Renews at</span><span role="columnheader">3 years</span><span role="columnheader">5 years</span></div>`++ + rows.map((r) => `<div class="dm-tr${r === best ? ' is-best' : ''}${r.trap ? ' is-trap' : ''}" role="row"><span role="cell" class="dm-name">${cell(r)}${r === best ? '<em class="dm-best">Cheapest over 3 years</em>' : ''}${r.trap ? '<em class="dm-trap">Renewal trap</em>' : ''}</span>`++ + `<span role="cell" data-l="First year">${money(r.y1, r.currency)}</span><span role="cell" data-l="Renews at">${money(r.renew == null ? null : Number(r.renew), r.currency)}</span>`++ + `<span role="cell" data-l="3 years" class="dm-y3">${money(r.y3, r.currency)}</span><span role="cell" data-l="5 years">${money(r.y5, r.currency)}</span></div>`).join('')++ + '</div>';++}++++const STATUS = {++ available: ['is-free', 'Available to register'],++ registered: ['is-taken', 'Registered'],++ reserved: ['is-taken', 'Reserved by the registry'],++};++++function search({ name, check, rows = [], available } = {}) {++ const full = check && check.display ? check.display : name ? (name.display || name.ascii) : '';++ const [cls, said] = STATUS[available] || ['is-unknown', 'The registry did not answer'];++ const facts = check && available === 'registered' ? [check.registrar ? `with ${esc(check.registrar)}` : '', check.expires ? `until ${esc(day(check.expires))}` : ''].filter(Boolean).join(' ') : '';++ const label = name ? name.label : '';++ const body = `<section class="dm-q">${searchBox(name ? (name.display || name.ascii) : '')}</section>++<header class="dm-hit ${cls}"><h1>${esc(full)}</h1><p class="dm-status"><span class="dm-pill">${said}</span>${facts ? ` <span>${facts}</span>` : ''}</p>++${available === 'registered' && check ? `<p class="dm-act"><a class="dm-btn" href="/d/${encodeURIComponent(check.name || name.ascii)}">Its public history</a> <a class="dm-btn is-quiet" href="https://openvibe.watch/watches/new?template=json&url=${encodeURIComponent(`https://openvibe.domains/api/v1/domains/${check.name || name.ascii}`)}&value_path=status&op=changed&name=${encodeURIComponent(`${check.name || name.ascii} comes free`)}">Tell me if it comes free</a></p>` : ''}</header>++${rows.length ? `<section aria-labelledby="dm-all-h"><div class="dm-head-row"><h2 id="dm-all-h">${esc(label)} in every ending</h2></div>++<p class="dm-fine">What each ending costs to register and keep, cheapest over three years first. Availability is checked for <b>${esc(full)}</b>; tap another ending to check it.${latest(rows) ? ` Prices checked ${esc(day(latest(rows)))}.` : ''}</p>++${priceTable(rows, { by: 'ending', label: `${label} in every ending`, check: name ? name.label : null })}</section>` : '<p class="dm-fine">No prices for this name\'s endings yet.</p>'}`;++ return layout({ title: `${full}: price and availability`, description: `${full}: whether it is free, and what every ending costs over 1, 3 and 5 years.`, robots: 'noindex, follow', body: `<div class="dm-wrap">${body}</div>`, active: '/' });++}++++function endings({ endings: list } = {}) {++ const rows = priceRows((list && list.tlds) || []);++ const body = `<header class="dm-page-h"><h1>Every ending</h1><p class="dm-lede">All the endings OpenVibe prices, cheapest to keep over three years first.${latest(rows) ? ` Prices checked ${esc(day(latest(rows)))}.` : ''}</p>${searchBox()}</header>++${rows.length ? priceTable(rows, { by: 'ending', label: 'Every ending' }) : kit.empty({ title: 'No prices yet', text: 'The price lists are being read. Try again in a few minutes.' })}`;++ return layout({ title: 'Every ending, cheapest to keep', description: 'Every domain ending OpenVibe prices, sorted by what three years really cost.', body: `<div class="dm-wrap">${body}</div>`, active: '/tld' });++}++++/** A small history chart: each registrar's first-year price over time, as steps (real changes only). */++function historyChart(history, currency) {++ const pts = (history || []).filter((h) => Number.isFinite(Date.parse(h.changed_at || h.at || '')) && h.register != null);++ if (pts.length < 2) return '';++ const xs = pts.map((h) => Date.parse(h.changed_at || h.at)); const ys = pts.map((h) => Number(h.register));++ const x0 = Math.min(...xs), x1 = Math.max(...xs, Date.now()), y0 = 0, y1v = Math.max(...ys) * 1.15;++ const X = (t) => 8 + ((t - x0) / Math.max(1, x1 - x0)) * 584, Y = (v) => 152 - ((v - y0) / Math.max(1, y1v - y0)) * 136;++ const by = new Map(); pts.forEach((h) => { const k = h.provider_name || h.registrar || 'Registrar'; if (!by.has(k)) by.set(k, []); by.get(k).push(h); });++ const lines = [...by.entries()].slice(0, 6).map(([k, hs], i) => {++ const s = hs.sort((a, b) => Date.parse(a.changed_at || a.at) - Date.parse(b.changed_at || b.at));++ let d = ''; s.forEach((h, j) => { const x = X(Date.parse(h.changed_at || h.at)), y = Y(Number(h.register)); d += j ? ` H${x.toFixed(1)} V${y.toFixed(1)}` : `M${x.toFixed(1)} ${y.toFixed(1)}`; });++ d += ` H${X(Date.now()).toFixed(1)}`;++ return `<path d="${d}" class="dm-line s${i}"><title>${esc(k)}</title></path>`;++ }).join('');++ return `<figure class="dm-chart"><svg viewBox="0 0 600 160" role="img" aria-label="First-year price over time">${lines}</svg><figcaption>First-year price over time${currency && currency !== 'USD' ? ` (${esc(currency)})` : ''}, each registrar a line.</figcaption></figure>`;++}++++function tld({ tld: t } = {}) {++ const rows = (t && t.prices) || [];++ const name = t ? (t.display || dot(t.tld)) : '';++ const best = rows.find((r) => !r.currency_other && r.y3 != null);++ const first = rows.filter((r) => r.y1 != null).sort((a, b) => a.y1 - b.y1)[0];++ const facts = [++ first ? ['Cheapest first year', money(first.y1, first.currency), first.registrar] : null,++ best ? ['Cheapest to keep 3 years', money(best.y3, best.currency), best.registrar] : null,++ best && best.y5 != null ? ['Five years from', money(best.y5, best.currency), best.registrar] : null,++ ].filter(Boolean);++ const traps = rows.filter((r) => r.trap);++ const chart = historyChart(t && t.history, t && t.currency);++ const body = `<header class="dm-page-h dm-tld-h"><p class="dm-kicker">${esc(t && t.kind ? `${t.kind} ending` : 'Ending')}</p><h1>${esc(name)}</h1>++${facts.length ? `<dl class="dm-facts">${facts.map(([l, v, who]) => `<div><dt>${esc(l)}</dt><dd><b>${v}</b>${who ? `<small>${esc(who)}</small>` : ''}</dd></div>`).join('')}</dl>` : ''}++${traps.length ? `<p class="dm-warn">${kit.icon('alert')}<span>${traps.length === 1 ? `${esc(traps[0].registrar)} sells the first year cheap and renews at ${money(Number(traps[0].renew), traps[0].currency)}.` : `${traps.length} registrars sell the first year cheap and renew much higher.`} The 3-year column is the one to read.</span></p>` : ''}++${searchBox()}</header>++<section aria-labelledby="dm-reg-h"><div class="dm-head-row"><h2 id="dm-reg-h">Every registrar</h2></div>++<p class="dm-fine">From each registrar's own public price list.${latest(rows) ? ` Checked ${esc(day(latest(rows)))}.` : ''} Affiliate links, where there are any, are marked and never change the order.</p>++${rows.length ? priceTable(rows, { by: 'registrar', label: `Registrars for ${name}` }) : '<p class="dm-fine">No registrar prices this ending yet.</p>'}</section>++<section aria-labelledby="dm-hist-h"><h2 id="dm-hist-h">Price history</h2>${chart || `<p class="dm-fine">No price changes recorded${rows.length && rows[0].first_seen_at ? ` since ${esc(day(rows.map((r) => r.first_seen_at).filter(Boolean).sort()[0]))}` : ''}. Every change from now on is kept here.</p>`}</section>`;++ return layout({ title: `${name} domain prices: every registrar, 1, 3 and 5 years`, description: `What ${name} costs at every registrar OpenVibe reads: first year, renewal and the real 3- and 5-year totals.`, body: `<div class="dm-wrap">${body}</div>`, active: '/tld' });++}++++function domain({ name, history, prices = [], status = null, check = null } = {}) {++ const full = name ? (name.display || name.ascii) : '';++ const h = history || {};++ const snaps = Array.isArray(h.snapshots) ? h.snapshots : [];++ const changes = Array.isArray(h.changes) ? h.changes : [];++ const last = snaps[0] && snaps[0].facts ? snaps[0].facts : null;++ const fact = (k, v) => (v ? `<div><dt>${esc(k)}</dt><dd>${esc(v)}</dd></div>` : '');++ const list = (v) => (Array.isArray(v) ? v.join(', ') : v || '');++ const record = last ? `<dl class="dm-facts dm-record">${fact('Registrar', last.registrar)}${fact('Registered', day(last.created))}${fact('Expires', day(last.expires))}${fact('Name servers', list(last.nameservers))}${fact('DNSSEC', last.dnssec == null ? '' : last.dnssec ? 'Signed' : 'Not signed')}${fact('Status', list(last.status))}</dl>`++ + `<p class="dm-fine">Public registration facts from RDAP, seen ${esc(day(snaps[0].last_seen))}${snaps.length > 1 ? `; kept since ${esc(day(h.first_seen))}` : ''}.</p>` : '';++ const LABEL = { registrar: 'Registrar', created: 'Registered', expires: 'Expiry', status: 'Status', nameservers: 'Name servers', dnssec: 'DNSSEC' };++ const shown = (field, v) => (v == null || (Array.isArray(v) && !v.length) ? 'none' : field === 'created' || field === 'expires' ? day(v) : field === 'dnssec' ? (v ? 'signed' : 'not signed') : list(v));++ const timeline = changes.length ? `<ol class="dm-timeline">${changes.slice(0, 30).map((c) => `<li><time datetime="${esc(c.at || '')}">${esc(day(c.at))}</time>`++ + `${(c.changes || []).map((x) => `<span>${esc(LABEL[x.field] || x.field)}: ${esc(shown(x.field, x.before))} → <b>${esc(shown(x.field, x.after))}</b></span>`).join('')}</li>`).join('')}</ol>` : '';++ const watch = `https://openvibe.watch/watches/new?template=json&url=${encodeURIComponent(`https://openvibe.domains/api/v1/domains/${name ? name.ascii : ''}`)}&value_path=status&op=changed&name=${encodeURIComponent(`${full} changes`)}`;++ const body = `<header class="dm-page-h"><p class="dm-kicker">Domain</p><h1>${esc(full)}</h1>++${status ? `<p class="dm-status ${(STATUS[status] || ['is-unknown'])[0]}"><span class="dm-pill">${(STATUS[status] || [null, 'The registry did not answer'])[1]}</span>${status === 'registered' && check ? ` <span>${[check.registrar ? `with ${esc(check.registrar)}` : '', check.expires ? `until ${esc(day(check.expires))}` : ''].filter(Boolean).join(' ')}</span>` : ''}</p>` : ''}++<p class="dm-act"><a class="dm-btn" href="/search?q=${encodeURIComponent(name ? name.ascii : '')}">Every ending for ${esc(name ? name.label : '')}</a> <a class="dm-btn is-quiet" href="${esc(watch)}">Watch it</a></p></header>++<section aria-labelledby="dm-rec-h"><h2 id="dm-rec-h">Public record</h2>${record || `<p class="dm-fine">OpenVibe keeps a domain's history once it has been looked up ${Number(h.min_lookups || 5)} times${h.lookups ? ` (${Number(h.lookups)} so far)` : ''}. <a href="https://whois.openvibe.tools/?q=${encodeURIComponent(name ? name.ascii : '')}">Look it up now on OpenVibe.Tools</a>.</p>`}++${timeline ? `<h3>What changed</h3>${timeline}` : ''}</section>++${prices.length ? `<section aria-labelledby="dm-p-h"><h2 id="dm-p-h">What ${esc(dot(name.tld))} costs</h2>${priceTable(prices, { by: 'ending', label: `${dot(name.tld)} prices` })}</section>` : ''}`;++ return layout({ title: `${full}: public record and history`, description: `${full}: its registrar, dates and how they changed, from public records only.`, robots: snaps.length ? 'index, follow' : 'noindex, follow', body: `<div class="dm-wrap">${body}</div>` });++}++++/** The API, for people and agents: every endpoint with a call that copies. */++function developers() {++ const rows = [++ ['GET /api/v1/search?q=sushitruck', 'A name: whether it is free (the registry\'s answer) and every ending\'s prices with 1, 3 and 5-year totals, cheapest over three years first.'],++ ['GET /api/v1/tlds?sort=renew', 'Every ending OpenVibe prices (sort popular, tld, register or renew; q, kind and page narrow it).'],++ ['GET /api/v1/tlds/dev', 'One ending: every registrar\'s prices with totals, and the price changes recorded.'],++ ['GET /api/v1/domains/example.com', 'One domain: status, registrar, expiry, its public history and its ending\'s prices.'],++ ];++ const body = `<header class="dm-page-h"><p class="dm-kicker">For developers</p><h1>The Domains API</h1><p class="dm-lede">Open JSON, no key, readable from any site (CORS). Prices come from registrars' public price lists with the date each was read; nothing is sponsored.</p></header>++<section aria-labelledby="dm-ep-h"><h2 id="dm-ep-h">Endpoints</h2><dl class="dm-eps">${rows.map(([ep, what]) => `<div><dt><code>${esc(ep)}</code></dt><dd>${esc(what)}</dd></div>`).join('')}</dl></section>++${sc.code({ title: 'Try it', samples: [{ label: 'Price a name', lang: 'bash', code: 'curl "https://openvibe.domains/api/v1/search?q=sushitruck"' }, { label: 'JavaScript', lang: 'js', code: "const r = await fetch('https://openvibe.domains/api/v1/tlds/dev').then((x) => x.json());\nconsole.log(r.tld.prices[0]);" }] })}++<p class="dm-fine">Limits: 120 requests a minute from one address. Errors are problem+json (RFC 9457). <a href="/llms.txt">llms.txt</a> describes the site for agents.</p>`;++ return layout({ title: 'The Domains API', description: 'Open JSON for domain prices, availability and history: every ending and registrar, with 1, 3 and 5-year totals.', body: `<div class="dm-wrap">${body}</div>`, active: '/developers' });++}++++function notFound() {++ const body = `<header class="dm-page-h"><h1>Nothing here</h1><p class="dm-lede">That page does not exist. Price a name instead:</p>${searchBox()}</header>`;++ return layout({ title: 'Not found', robots: 'noindex, follow', body: `<div class="dm-wrap">${body}</div>` });++}++++module.exports = { home, endings, search, tld, domain, developers, notFound, layout, setRelease, money };nnew file mode 100644@@@ -0,0 +1,156 @@++'use strict';++++/** The two data clients: URL shapes, cache hit/expiry, the cap, a timeout, and a failure as null + one log line. */++const assert = require('assert');++const { createHost } = require('../server/data/host');++const { createTools } = require('../server/data/tools');++const { check, done } = require('./helpers');++++const jsonResponse = (body) => ({ ok: true, status: 200, text: async () => JSON.stringify(body) });++const quiet = { warn: () => {} };++++(async () => {++ await check('host.tld: one call inside the TTL, two after it', async () => {++ let now = 1_000;++ let calls = 0;++ const urls = [];++ const host = createHost({++ baseUrl: 'http://host.test',++ fetchImpl: async (url) => { calls++; urls.push(String(url)); return jsonResponse({ tld: { tld: 'dev' } }); },++ now: () => now,++ cacheMs: { tld: 1_000 },++ log: quiet,++ });++ assert.strictEqual((await host.tld('dev')).tld, 'dev');++ assert.strictEqual((await host.tld('dev')).tld, 'dev');++ assert.strictEqual(calls, 1);++ assert.strictEqual(urls[0], 'http://host.test/api/v1/catalog/domains/dev');++ now += 1_001;++ await host.tld('dev');++ assert.strictEqual(calls, 2);++ });++++ await check('host.check: a 2-minute TTL by default', async () => {++ let now = 5_000;++ let calls = 0;++ const host = createHost({++ baseUrl: 'http://host.test',++ fetchImpl: async () => { calls++; return jsonResponse({ check: { status: 'available' } }); },++ now: () => now,++ log: quiet,++ });++ await host.check('sushitruck');++ await host.check('sushitruck');++ assert.strictEqual(calls, 1);++ now += 2 * 60_000 + 1;++ await host.check('sushitruck');++ assert.strictEqual(calls, 2);++ });++++ await check('host list and check build the documented URLs', async () => {++ const urls = [];++ const host = createHost({++ baseUrl: 'http://host.test/',++ fetchImpl: async (url) => { urls.push(String(url)); return jsonResponse({ tlds: [], next_cursor: null }); },++ log: quiet,++ });++ await host.tlds({ sort: 'popular' });++ await host.tlds({ q: 'dev', kind: 'generic', sort: 'register', page: 2 });++ await host.check('münchen.de');++ assert.strictEqual(urls[0], 'http://host.test/api/v1/catalog/domains?sort=popular');++ assert.strictEqual(urls[1], 'http://host.test/api/v1/catalog/domains?q=dev&kind=generic&sort=register&cursor=100');++ assert.match(urls[2], /\/api\/v1\/catalog\/domains\/check\?name=m%C3%BCnchen\.de$/);++ });++++ await check('host: a failure is null, logged once, and not cached', async () => {++ const logs = [];++ let calls = 0;++ const host = createHost({++ baseUrl: 'http://host.test',++ fetchImpl: async () => { calls++; throw new Error('connection refused'); },++ log: { warn: (line) => logs.push(line) },++ });++ assert.strictEqual(await host.check('example.com'), null);++ assert.strictEqual(await host.check('example.com'), null);++ assert.strictEqual(calls, 2);++ assert.strictEqual(logs.length, 2);++ assert.match(logs[0], /^\[domains\] Host check failed: connection refused/);++ });++++ await check('host: a timeout answers null quickly', async () => {++ const host = createHost({++ baseUrl: 'http://host.test',++ fetchImpl: () => new Promise(() => {}),++ timeoutMs: 25,++ log: quiet,++ });++ const started = Date.now();++ assert.strictEqual(await host.check('example.com'), null);++ assert.ok(Date.now() - started < 1_000, 'the timeout did not end the wait');++ });++++ await check('the cache keeps its cap, oldest insertion out', async () => {++ let calls = 0;++ const host = createHost({++ baseUrl: 'http://host.test',++ fetchImpl: async () => { calls++; return jsonResponse({ check: { status: 'unknown' } }); },++ now: () => 1,++ cacheMs: { check: 60_000 },++ maxCacheEntries: 2,++ log: quiet,++ });++ await host.check('a');++ await host.check('b');++ await host.check('c');++ assert.strictEqual(calls, 3);++ await host.check('a');++ assert.strictEqual(calls, 4, 'the oldest entry should have been evicted');++ });++++ await check('tools.history: normalized domain, cached ten minutes, URL encoded', async () => {++ let now = 10_000;++ let calls = 0;++ const urls = [];++ const tools = createTools({++ baseUrl: 'http://tools.test',++ fetchImpl: async (url) => { calls++; urls.push(String(url)); return jsonResponse({ domain: 'example.com', snapshots: [] }); },++ now: () => now,++ log: quiet,++ });++ assert.strictEqual((await tools.history('Example.COM.')).domain, 'example.com');++ await tools.history('example.com');++ assert.strictEqual(calls, 1);++ assert.strictEqual(urls[0], 'http://tools.test/api/v1/domains/example.com');++ now += 10 * 60_000 + 1;++ await tools.history('example.com');++ assert.strictEqual(calls, 2);++ });++++ await check('tools.lists: limit is passed and cached', async () => {++ let calls = 0;++ const urls = [];++ const tools = createTools({++ baseUrl: 'http://tools.test',++ fetchImpl: async (url) => { calls++; urls.push(String(url)); return jsonResponse({ most_looked_up: [], expiring_soon: [] }); },++ log: quiet,++ });++ await tools.lists({ limit: 5 });++ await tools.lists({ limit: 5 });++ assert.strictEqual(calls, 1);++ assert.strictEqual(urls[0], 'http://tools.test/api/v1/domains/?limit=5');++ });++++ await check('tools: a failure is null and logged', async () => {++ const logs = [];++ const tools = createTools({++ baseUrl: 'http://tools.test',++ fetchImpl: async () => { throw new Error('bad gateway'); },++ log: { warn: (line) => logs.push(line) },++ });++ assert.strictEqual(await tools.history('example.com'), null);++ assert.strictEqual(logs.length, 1);++ assert.match(logs[0], /^\[domains\] Tools history failed: bad gateway/);++ });++++ done();++})().catch((err) => { console.error(err); process.exit(1); });nnew file mode 100644@@@ -0,0 +1,53 @@++'use strict';++++/**++ * Small test harness (the same check/done shape as OpenVibe.Help's tests): each test file is its own++ * process, catches failures per check and exits nonzero if any failed.++ */++const http = require('http');++const configLib = require('../server/config');++const { createApp } = require('../server/app');++++let failures = 0;++++async function check(name, fn) {++ try {++ await fn();++ process.stdout.write(` ✓ ${name}\n`);++ } catch (err) {++ failures++;++ process.stdout.write(` ✗ ${name}\n ${(err.stack || String(err)).split('\n').slice(0, 8).join('\n ')}\n`);++ }++}++++function done() {++ process.stdout.write(failures ? `\n${failures} failed\n` : '\nall passed\n');++ process.exit(failures ? 1 : 0);++}++++/** Boot the real app on an ephemeral port with injected host/tools clients. */++async function boot({ config, host, tools, release } = {}) {++ const cfg = config || configLib.load({++ NODE_ENV: 'test', PORT: '0', BASE_URL: 'https://openvibe.domains', TRUST_PROXY: '1',++ });++ const quiet = { log() {}, info() {}, warn() {}, error() {} };++ const built = createApp({ config: cfg, host, tools, release, log: quiet });++ const server = await new Promise((resolve) => {++ const s = http.createServer(built.app);++ s.listen(0, '127.0.0.1', () => resolve(s));++ });++ const base = `http://127.0.0.1:${server.address().port}`;++++ async function get(path, opts = {}) {++ const res = await fetch(base + path, { method: opts.method || 'GET', headers: opts.headers, redirect: 'manual' });++ const text = await res.text();++ return { status: res.status, headers: res.headers, text, json() { return JSON.parse(text); } };++ }++++ return {++ base, ctx: built.ctx, get,++ async close() { await new Promise((resolve) => server.close(resolve)); },++ };++}++++module.exports = { boot, check, done };nnew file mode 100644@@@ -0,0 +1,62 @@++'use strict';++++/** The name reader: the inputs from the brief, IDNs, URLs, and the ones that must be refused. */++const assert = require('assert');++const { parseName, parseTld } = require('../server/names');++const { check, done } = require('./helpers');++++(async () => {++ await check('a bare label: spaces go, no ending', () => {++ assert.deepStrictEqual(parseName('sushi truck'), { label: 'sushitruck', tld: null, ascii: 'sushitruck', display: 'sushitruck' });++ assert.deepStrictEqual(parseName('x y z'), { label: 'xyz', tld: null, ascii: 'xyz', display: 'xyz' });++ assert.deepStrictEqual(parseName('Sushi_Truck'), { label: 'sushitruck', tld: null, ascii: 'sushitruck', display: 'sushitruck' });++ });++++ await check('a name with .com is lower-cased and keeps its ending', () => {++ assert.deepStrictEqual(parseName('SushiTruck.com'), {++ label: 'sushitruck', tld: 'com', ascii: 'sushitruck.com', display: 'sushitruck.com',++ });++ });++++ await check('a URL: scheme, www, path and port are dropped, co.uk stays co.uk', () => {++ assert.deepStrictEqual(parseName('https://www.sushitruck.co.uk/x'), {++ label: 'sushitruck', tld: 'co.uk', ascii: 'sushitruck.co.uk', display: 'sushitruck.co.uk',++ });++ assert.deepStrictEqual(parseName('http://example.com:8080/a?b=1#c'), {++ label: 'example', tld: 'com', ascii: 'example.com', display: 'example.com',++ });++ });++++ await check('an IDN is punycode in ascii and Unicode in display', () => {++ assert.deepStrictEqual(parseName('münchen.de'), {++ label: 'xn--mnchen-3ya', tld: 'de', ascii: 'xn--mnchen-3ya.de', display: 'münchen.de',++ });++ });++++ await check('bad names are null', () => {++ for (const bad of ['-x.com', 'a..b', `${'a'.repeat(64)}.com`, '', 'http://', 'http:///x', 'x-.com', 'a'.repeat(254)]) {++ assert.strictEqual(parseName(bad), null, `expected null for ${JSON.stringify(bad.slice(0, 30))}`);++ }++ });++++ await check('a name may start with a digit and contain an internal hyphen', () => {++ assert.deepStrictEqual(parseName('1-2.dev'), {++ label: '1-2', tld: 'dev', ascii: '1-2.dev', display: '1-2.dev',++ });++ });++++ await check('parseTld normalizes a leading dot and keeps a multi-part ending', () => {++ assert.strictEqual(parseTld('.Dev'), 'dev');++ assert.strictEqual(parseTld('co.uk'), 'co.uk');++ assert.strictEqual(parseTld(' .co.uk '), 'co.uk');++ assert.strictEqual(parseTld('https://example.dev/path'), 'example.dev');++ });++++ await check('parseTld refuses empty and malformed endings', () => {++ for (const bad of ['', '.', '..', '-x', 'x-', 'a..b', 'a'.repeat(64)]) {++ assert.strictEqual(parseTld(bad), null, `expected null for ${JSON.stringify(bad)}`);++ }++ });++++ done();++})().catch((err) => { console.error(err); process.exit(1); });nnew file mode 100644@@@ -0,0 +1,77 @@++'use strict';++++/** Price rows: y1/y3/y5, the five-year fallback, the renewal trap, rounding, USD order. */++const assert = require('assert');++const { priceRows } = require('../server/pricing');++const { check, done } = require('./helpers');++++(async () => {++ await check('totals and the five-year fallback', () => {++ const [row] = priceRows([{ register: 10, renew: 20, transfer: 10, five_year: 90, currency: 'USD', tld: 'com', registrar: 'A' }]);++ assert.strictEqual(row.y1, 10);++ assert.strictEqual(row.y3, 50);++ assert.strictEqual(row.y5, 90);++ assert.strictEqual(row.trap, true);++ const [fallback] = priceRows([{ register: 5, renew: 6, currency: 'USD', tld: 'dev' }]);++ assert.strictEqual(fallback.y3, 17);++ assert.strictEqual(fallback.y5, 29);++ assert.strictEqual(fallback.trap, false);++ });++++ await check('a missing price makes the total null, never NaN', () => {++ const [row] = priceRows([{ register: 5, currency: 'USD' }]);++ assert.strictEqual(row.y3, null);++ assert.strictEqual(row.y5, null);++ assert.strictEqual(row.trap, false);++ });++++ await check('money is rounded to cents', () => {++ const [row] = priceRows([{ register: 1.005, renew: 2.005, five_year: 9.999, currency: 'USD' }]);++ assert.strictEqual(row.y1, 1.01);++ assert.strictEqual(row.y3, 5.02);++ assert.strictEqual(row.y5, 10);++ });++++ await check('the renewal trap needs both halves of the rule', () => {++ const rows = priceRows([++ { register: 10, renew: 19, currency: 'USD', id: 'below double' },++ { register: 10, renew: 14.99, currency: 'USD', id: 'not 5 more' },++ { register: 8, renew: 16, currency: 'USD', id: 'exactly both' },++ ]);++ const by = Object.fromEntries(rows.map((r) => [r.id, r.trap]));++ assert.strictEqual(by['below double'], false);++ assert.strictEqual(by['not 5 more'], false);++ assert.strictEqual(by['exactly both'], true);++ });++++ await check('sorted by y3 ascending, rows without y3 last', () => {++ const rows = priceRows([++ { register: 10, renew: 20, currency: 'USD', id: '50' },++ { register: 5, renew: 6, currency: 'USD', id: '17' },++ { register: 8, renew: 9, currency: 'USD', id: '26' },++ { register: 8, currency: 'USD', id: 'missing' },++ ]);++ assert.deepStrictEqual(rows.map((r) => r.id), ['17', '26', '50', 'missing']);++ });++++ await check('non-USD rows are flagged, stay after every USD row and keep their own order', () => {++ const rows = priceRows([++ { register: 1, renew: 1, currency: 'EUR', id: 'eur-30' },++ { register: 9, renew: 9, currency: 'USD', id: 'usd-27' },++ { register: 20, renew: 20, currency: 'GBP', id: 'gbp-60' },++ ]);++ assert.deepStrictEqual(rows.map((r) => r.id), ['usd-27', 'eur-30', 'gbp-60']);++ assert.strictEqual(rows[0].currency_other, undefined);++ assert.strictEqual(rows[1].currency_other, true);++ assert.strictEqual(rows[2].currency_other, true);++ });++++ await check('the input rows are not mutated', () => {++ const input = [{ register: 10, renew: 20, currency: 'USD' }];++ const [row] = priceRows(input);++ assert.strictEqual(input[0].y1, undefined);++ assert.strictEqual(row.register, 10);++ });++++ done();++})().catch((err) => { console.error(err); process.exit(1); });nnew file mode 100644@@@ -0,0 +1,268 @@++'use strict';++++/** The pages, the API, the crawl artifacts and readiness, against stub Host and Tools clients. */++const assert = require('assert');++const { boot, check, done } = require('./helpers');++++const LIST = [++ { tld: 'com', display: '.com', kind: 'generic', currency: 'USD', register: 9.2, renew: 11.08, transfer: 9.2, five_year: 55.4, registrars: 2, checked_at: '2026-10-22T15:16:02.303Z' },++ { tld: 'dev', display: '.dev', kind: 'generic', currency: 'USD', register: 8.75, renew: 12.87, transfer: 12.87, five_year: 60.23, registrars: 2, checked_at: '2026-10-22T15:16:02.303Z' },++];++++const PRICES = [++ { registrar: 'Porkbun', registrar_slug: 'porkbun', tld: 'dev', display: '.dev', kind: 'generic', currency: 'USD', register: 8.75, renew: 12.87, transfer: 12.87, five_year: 60.23, checked_at: '2026-10-22T15:16:02.303Z' },++ { registrar: 'OVHcloud', registrar_slug: 'ovhcloud', tld: 'dev', display: '.dev', kind: 'generic', currency: 'USD', register: 13.19, renew: 17.19, transfer: 17.19, five_year: 81.95, checked_at: '2026-10-22T15:16:02.303Z' },++ { registrar: 'Com Registrar', registrar_slug: 'com-registrar', tld: 'com', display: '.com', kind: 'generic', currency: 'USD', register: 9.2, renew: 11.08, transfer: 9.2, five_year: 55.4, checked_at: '2026-10-22T15:16:02.303Z' },++ { registrar: 'Euro Registrar', registrar_slug: 'euro', tld: 'dev', display: '.dev', kind: 'generic', currency: 'EUR', register: 5, renew: 6, transfer: 5, five_year: null, checked_at: '2026-10-22T15:16:02.303Z' },++];++++const HISTORY = {++ ok: true,++ domain: 'example.com',++ snapshots: [{++ facts: { registrar: 'Example Registrar', created: '1995-08-14T04:00:00.000Z', expires: '2026-08-13T04:00:00.000Z', status: ['client transfer prohibited'] },++ first_seen: '2026-10-01T00:00:00.000Z', last_seen: '2026-10-28T00:00:00.000Z', seen: 2,++ }],++ changes: [],++ lookups: 42,++ first_seen: '2026-10-01T00:00:00.000Z',++};++const LISTS = {++ ok: true,++ most_looked_up: [{ domain: 'example.com', lookups: 42, registrar: 'Example Registrar', expires: '2026-08-13T04:00:00.000Z' }],++ expiring_soon: [],++ min_lookups: 5,++};++++function fakeRelease() {++ const full = { release: 'abc1234', released_at: '2026-10-28T12:00:00.000Z' };++ return {++ release: full.release,++ full: () => full,++ mount(app) {++ app.get('/release.json', (_req, res) => res.json(full));++ app.post('/release-metrics', (_req, res) => res.status(204).end());++ },++ };++}++++function stubs() {++ let failHost = false;++ let lastList = null;++ let checkCalls = 0;++ const host = {++ async tlds(query = {}) {++ lastList = query;++ if (failHost) return null;++ return { tlds: LIST, next_cursor: null };++ },++ async tld(t) {++ if (t !== 'dev' && t !== 'com') return null;++ return {++ tld: t, display: `.${t}`, kind: 'generic', currency: 'USD',++ prices: PRICES.filter((p) => p.tld === t),++ cheapest: { register: 8.75, renew: 12.87, transfer: 12.87, five_year: 60.23 },++ history: [],++ };++ },++ async check(name) {++ checkCalls++;++ return {++ label: String(name).split('.')[0], labelDisplay: String(name).split('.')[0], tld: 'dev', name: String(name), display: String(name),++ status: 'available', registrar: null, created: null, expires: null, server: null, reason: null, cached: false,++ prices: PRICES,++ };++ },++ };++ const tools = {++ async history(domain) { return { ...HISTORY, domain }; },++ async lists() { return LISTS; },++ };++ return {++ host, tools,++ failHost: (value) => { failHost = value; },++ lastList: () => lastList,++ checkCalls: () => checkCalls,++ };++}++++(async () => {++ const s = stubs();++ const t = await boot({ host: s.host, tools: s.tools, release: fakeRelease() });++ try {++ await check('GET /: 200, the Frame mount and the endings', async () => {++ const r = await t.get('/');++ assert.strictEqual(r.status, 200);++ assert.match(r.headers.get('cache-control') || '', /public, max-age=300/);++ for (const marker of ['id="navbar-mount"', 'OpenVibeNavbar.init', '"service":"domains"', 'id="ov-footer"', '.dev']) {++ assert.ok(r.text.includes(marker), `missing ${marker}`);++ }++ assert.strictEqual(s.lastList().sort, 'popular');++ });++++ await check('GET /search?q=sushi truck: 200, noindex, prices', async () => {++ const r = await t.get('/search?q=sushi%20truck');++ assert.strictEqual(r.status, 200);++ assert.match(r.headers.get('cache-control') || '', /public, max-age=120/);++ assert.match(r.text, /<meta name="robots" content="noindex[^"]*">/, 'no noindex meta');++ assert.ok(r.text.includes('sushitruck'), 'name missing');++ assert.ok(/Available to register/.test(r.text), 'status missing');++ assert.ok(r.text.includes('href="/search?q=sushitruck.com"') && r.text.includes('$31.36'), 'price row missing (an ending that checks this name, with its 3-year total)');++ });++++ await check('GET /search without a name: 302 to /', async () => {++ const r = await t.get('/search');++ assert.strictEqual(r.status, 302);++ assert.strictEqual(r.headers.get('location'), '/');++ const bad = await t.get('/search?q=-x.com');++ assert.strictEqual(bad.status, 302);++ assert.strictEqual(bad.headers.get('location'), '/');++ });++++ await check('GET /tld/dev: 200 with priced rows; /.dev: 301; unknown: 404', async () => {++ const r = await t.get('/tld/dev');++ assert.strictEqual(r.status, 200);++ assert.match(r.headers.get('cache-control') || '', /public, max-age=300/);++ assert.ok(r.text.includes('.dev') && r.text.includes('Porkbun') && r.text.includes('$34.49'), 'priced ending missing');++ const redirect = await t.get('/.dev');++ assert.strictEqual(redirect.status, 301);++ assert.strictEqual(redirect.headers.get('location'), '/tld/dev');++ const missing = await t.get('/tld/notreal');++ assert.strictEqual(missing.status, 404);++ assert.ok(missing.text.includes('Not found'));++ });++++ await check('GET /d/example.com: 200 with history and its ending\'s prices; bad domain: 404', async () => {++ const r = await t.get('/d/example.com');++ assert.strictEqual(r.status, 200);++ assert.match(r.headers.get('cache-control') || '', /public, max-age=120/);++ assert.ok(r.text.includes('example.com'));++ assert.ok(r.text.includes('Example Registrar'), 'history missing');++ // A check's price rows are per ending (Host aggregates registrars): the page shows the domain's own ending only.++ assert.ok(r.text.includes('href="/tld/com"') && !r.text.includes('href="/tld/dev"'), 'prices should be the com rows only');++ assert.ok(r.text.includes('$9.20') && r.text.includes('$31.36'), 'the .com totals (first year, 3 years)');++ const bad = await t.get('/d/not-a-domain');++ assert.strictEqual(bad.status, 404);++ });++++ await check('any other page: 404', async () => {++ const r = await t.get('/nope');++ assert.strictEqual(r.status, 404);++ assert.ok(r.text.includes('Not found'));++ });++++ await check('API search: shape, rows, CORS and the 400 problem', async () => {++ const r = await t.get('/api/v1/search?q=sushitruck');++ assert.strictEqual(r.status, 200);++ assert.strictEqual(r.headers.get('access-control-allow-origin'), '*');++ assert.match(r.headers.get('cache-control') || '', /public, max-age=300/);++ const json = r.json();++ assert.strictEqual(json.name.label, 'sushitruck');++ assert.strictEqual(json.status, 'available');++ assert.strictEqual(json.rows.length, 4);++ assert.strictEqual(json.rows[0].tld, 'com');++ assert.strictEqual(json.rows[0].y1, 9.2);++ assert.strictEqual(json.rows[0].y3, 31.36);++ assert.strictEqual(json.rows[3].currency_other, true);++ const bad = await t.get('/api/v1/search?q=');++ assert.strictEqual(bad.status, 400);++ assert.match(bad.headers.get('content-type') || '', /application\/problem\+json/);++ assert.strictEqual(bad.json().code, 'domains.name.invalid');++ assert.strictEqual(bad.headers.get('access-control-allow-origin'), '*');++ });++++ await check('API tlds: the host list as is, one ending priced, unknown 404', async () => {++ const list = await t.get('/api/v1/tlds?sort=popular');++ assert.strictEqual(list.status, 200);++ assert.strictEqual(list.headers.get('access-control-allow-origin'), '*');++ assert.strictEqual(list.json().tlds.length, 2);++ assert.strictEqual(s.lastList().sort, 'popular');++ const one = await t.get('/api/v1/tlds/dev');++ assert.strictEqual(one.status, 200);++ assert.strictEqual(one.json().tld.tld, 'dev');++ assert.strictEqual(one.json().tld.prices[0].y3, 34.49);++ const missing = await t.get('/api/v1/tlds/notreal');++ assert.strictEqual(missing.status, 404);++ assert.match(missing.headers.get('content-type') || '', /application\/problem\+json/);++ });++++ await check('API domains: name, history, its ending\'s prices; bad name 400', async () => {++ const r = await t.get('/api/v1/domains/example.com');++ assert.strictEqual(r.status, 200);++ const json = r.json();++ assert.strictEqual(json.name.ascii, 'example.com');++ assert.strictEqual(json.history.domain, 'example.com');++ assert.strictEqual(json.prices.length, 1);++ assert.strictEqual(json.prices[0].tld, 'com');++ assert.strictEqual(json.prices[0].y5, 55.4);++ const bad = await t.get('/api/v1/domains/not-a-name');++ assert.strictEqual(bad.status, 400);++ assert.strictEqual(bad.json().code, 'domains.name.invalid');++ const nope = await t.get('/api/v1/nope');++ assert.strictEqual(nope.status, 404);++ assert.strictEqual(nope.json().code, 'route.not_found');++ });++++ await check('robots.txt allows all and names the sitemap', async () => {++ const r = await t.get('/robots.txt');++ assert.strictEqual(r.status, 200);++ assert.match(r.headers.get('content-type') || '', /^text\/plain/);++ assert.ok(r.text.includes('Allow: /'));++ assert.ok(r.text.includes('Sitemap: https://openvibe.domains/sitemap.xml'));++ assert.ok(!r.text.includes('Disallow: /'), 'nothing should be disallowed');++ });++++ await check('sitemap.xml lists the home page and every ending, lastmod from the release', async () => {++ const r = await t.get('/sitemap.xml');++ assert.strictEqual(r.status, 200);++ assert.match(r.headers.get('content-type') || '', /^application\/xml/);++ assert.ok(r.text.includes('<loc>https://openvibe.domains/</loc>'));++ assert.ok(r.text.includes('<loc>https://openvibe.domains/tld/dev</loc>'));++ assert.ok(r.text.includes('<loc>https://openvibe.domains/tld/com</loc>'));++ assert.ok(r.text.includes('<lastmod>2026-10-28</lastmod>'));++ });++++ await check('llms.txt describes the site and its API', async () => {++ const r = await t.get('/llms.txt');++ assert.strictEqual(r.status, 200);++ assert.match(r.headers.get('content-type') || '', /^text\/plain/);++ assert.ok(r.text.startsWith('# OpenVibe.Domains'));++ assert.ok(r.text.includes('https://openvibe.domains/api/v1/search?q=example.com'));++ assert.ok(r.text.includes('https://openvibe.host/catalog/domains'));++ });++++ await check('health is ok; readiness is ready while both upstreams answer', async () => {++ const health = await t.get('/api/health');++ assert.strictEqual(health.status, 200);++ assert.deepStrictEqual(health.json(), { status: 'ok', service: 'openvibe-domains', version: '0.1.0' });++ const ready = await t.get('/api/ready');++ assert.strictEqual(ready.status, 200);++ const json = ready.json();++ assert.strictEqual(json.ready, true);++ assert.strictEqual(json.status, 'ready');++ assert.strictEqual(json.checks.host.status, 'ok');++ assert.strictEqual(json.checks.tools.status, 'ok');++ });++++ await check('readiness is degraded, not 503, when Host does not answer', async () => {++ s.failHost(true);++ const r = await t.get('/api/ready');++ s.failHost(false);++ assert.strictEqual(r.status, 200);++ const json = r.json();++ assert.strictEqual(json.ready, true);++ assert.strictEqual(json.status, 'degraded');++ assert.ok(json.degraded.includes('host'));++ assert.strictEqual(json.failed.length, 0);++ });++++ await check('release.json is served', async () => {++ const r = await t.get('/release.json');++ assert.strictEqual(r.status, 200);++ assert.strictEqual(r.json().release, 'abc1234');++ });++ } finally {++ await t.close();++ }++ done();++})().catch((err) => { console.error(err); process.exit(1); });nnew file mode 100644@@@ -0,0 +1,23 @@++#!/usr/bin/env node++'use strict';++++/**++ * Runs every test/*.test.js in its own process and fails if any fails. The tests use stub Host and++ * Tools clients; none needs the network or a running site.++ *++ * npm test # everything++ * npm test -- routes # only files whose name contains the word++ * npm test -- --strict # a skipped test fails the run too++ */++const { run } = require('openvibe-shared/test-runner');++++run({ dir: __dirname, timeoutMs: 60_000, pad: 34, parallel: 1 }).then((r) => {++ if (process.env.VERBOSE) {++ for (const t of r.results) console.log(`\n── ${t.file} ──\n${t.output.trimEnd()}`);++ console.log(`\n${r.summary}`);++ }++ process.exit(r.exitCode);++}, (err) => {++ console.error(err);++ process.exit(1);++});
new file mode 100644
new file mode 100644
@@ -0,0 +1,16 @@
@@ -0,0 +1,16 @@
+# OpenVibe.Domains — environment (production: /etc/openvibe/domains.env). Names only; never commit values.
+
+NODE_ENV=production
+PORT=5070
+HOST=127.0.0.1
+BASE_URL=https://openvibe.domains
+TRUST_PROXY=2
+
+# The two public services this front reads. Both fall back to the internal origin in the pinned
+# openvibe-contracts manifest; Tools has https://openvibe.tools if its manifest ever loses one.
+# OV_HOST_INTERNAL_URL=http://127.0.0.1:4910
+# OV_TOOLS_INTERNAL_URL=http://127.0.0.1:4001
+
+# The shared per-IP budget for /api/v1 and /search, and the data clients' timeout.
+# DOMAINS_RATE_LIMIT_PER_MIN=120
+# DOMAINS_UPSTREAM_TIMEOUT_MS=8000
new file mode 100644
new file mode 100644
@@ -0,0 +1,17 @@
@@ -0,0 +1,17 @@
+name: ci
+on:
+ push:
+ branches: [main]
+ pull_request:
+jobs:
+ # install, node --check and npm test: the shared test job (Track Q).
+ test:
+ uses: OpenVibers/OpenVibe.Shared/.github/workflows/test.yml@423fe519b5fe9594cc81b670e5ba5cb9f21f6176
+ with:
+ syntax-dirs: server test
+ # OpenVibe.Domains has no database, no Valkey and no event stream: npm test is the whole suite.
+ # No contracts-service yet: openvibe-contracts v0.225.0 has no manifests/services/domains.json.
+ test: npm test
+ # Secret scan (gitleaks) and dependency audit, shared by every OpenVibers repo (Track Q).
+ security:
+ uses: OpenVibers/OpenVibe.Shared/.github/workflows/security.yml@423fe519b5fe9594cc81b670e5ba5cb9f21f6176
new file mode 100644
new file mode 100644
@@ -0,0 +1,12 @@
@@ -0,0 +1,12 @@
+node_modules/
+data/
+dist/
+.env
+.env.*
+!.env.example
+*.log
+*.pem
+*.key
+.npm-cache/
+.npm-logs/
+!server/data/
new file mode 100644
new file mode 100644
@@ -0,0 +1,28 @@
@@ -0,0 +1,28 @@
+# Changelog
+
+What changed in OpenVibe.Domains, newest first.
+
+## 0.1.0 — 2026-10-28
+
+The service skeleton: a stateless read-only front over OpenVibe.Host's price catalog and OpenVibe.Tools' public
+domain history.
+
+- **Name parsing** (`server/names.js`): a label and an optional ending from what a person types — a bare label with
+ spaces or underscores, a full name, a URL with a scheme, path or port, an IDN (`münchen.de`) — normalized to ASCII
+ for the Host call and kept in Unicode for display. 1–63 character labels, no edge hyphens, 253 characters total.
+- **Pricing** (`server/pricing.js`): every registrar row gains `y1`, `y3`, `y5` and the renewal trap
+ (`renew ≥ 2 × register` and `renew − register ≥ 5`), rounded to cents. USD rows are compared and sorted by `y3`;
+ other currencies are kept after them and flagged `currency_other`.
+- **Data clients** (`server/data/host.js`, `server/data/tools.js`): injectable `fetchImpl`, 8-second timeouts, a
+ 2,000-entry in-process cache (catalog 10 minutes, ending 10, name check 2, domain history 10), a failure is null
+ and one short log line.
+- **Pages** (`server/http/pages.js`): `/` (the popular first catalog page and the Tools lists), `/search?q=`
+ (registry status and prices, `noindex`), `/tld/:tld`, `/.dev` 301, `/d/:domain` (public history plus its ending's
+ prices), and a 404. The views are plain placeholders on the shared Frame for the main session to replace.
+- **API** (`server/http/api.js`): `GET /api/v1/search?q=`, `/tlds`, `/tlds/:tld`, `/domains/:domain`; CORS-open,
+ public for five minutes, 400 problem+json for a bad name, 404 for an unknown ending, and a 120/min per-IP limit
+ shared with `/search`.
+- **Plumbing:** helmet with Help's CSP, health, truthful readiness (Host and Tools are optional checks, so a failure
+ is `degraded`, not 503), release.json and the release collector, `/shared`, robots.txt, sitemap.xml (every ending
+ in the catalog pages), llms.txt, loopback-only metrics and graceful stop.
+- **Repo:** deploy files (systemd, nginx), CI, README, STATUS, SECURITY, LICENSE, .env.example and four test files.
new file mode 100644
new file mode 100644
@@ -0,0 +1,661 @@
@@ -0,0 +1,661 @@
+ GNU AFFERO GENERAL PUBLIC LICENSE
+ Version 3, 19 November 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU Affero General Public License is a free, copyleft license for
+software and other kinds of works, specifically designed to ensure
+cooperation with the community in the case of network server software.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+our General Public Licenses are intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ Developers that use our General Public Licenses protect your rights
+with two steps: (1) assert copyright on the software, and (2) offer
+you this License which gives you legal permission to copy, distribute
+and/or modify the software.
+
+ A secondary benefit of defending all users' freedom is that
+improvements made in alternate versions of the program, if they
+receive widespread use, become available for other developers to
+incorporate. Many developers of free software are heartened and
+encouraged by the resulting cooperation. However, in the case of
+software used on network servers, this result may fail to come about.
+The GNU General Public License permits making a modified version and
+letting the public access it on a server without ever releasing its
+source code to the public.
+
+ The GNU Affero General Public License is designed specifically to
+ensure that, in such cases, the modified source code becomes available
+to the community. It requires the operator of a network server to
+provide the source code of the modified version running there to the
+users of that server. Therefore, public use of a modified version, on
+a publicly accessible server, gives the public access to the source
+code of the modified version.
+
+ An older license, called the Affero General Public License and
+published by Affero, was designed to accomplish similar goals. This is
+a different license, not a version of the Affero GPL, but Affero has
+released a new version of the Affero GPL which permits relicensing under
+this license.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU Affero General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Remote Network Interaction; Use with the GNU General Public License.
+
+ Notwithstanding any other provision of this License, if you modify the
+Program, your modified version must prominently offer all users
+interacting with it remotely through a computer network (if your version
+supports such interaction) an opportunity to receive the Corresponding
+Source of your version by providing access to the Corresponding Source
+from a network server at no charge, through some standard or customary
+means of facilitating copying of software. This Corresponding Source
+shall include the Corresponding Source for any work covered by version 3
+of the GNU General Public License that is incorporated pursuant to the
+following paragraph.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the work with which it is combined will remain governed by version
+3 of the GNU General Public License.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU Affero General Public License from time to time. Such new versions
+will be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU Affero General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU Affero General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU Affero General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If your software can interact with users remotely through a computer
+network, you should also make sure that it provides a way for users to
+get its source. For example, if your program is a web application, its
+interface could display a "Source" link that leads users to an archive
+of the code. There are many ways you could offer source, and different
+solutions will be better for different programs; see section 13 for the
+specific requirements.
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU AGPL, see
+<https://www.gnu.org/licenses/>.
new file mode 100644
new file mode 100644
@@ -0,0 +1,125 @@
@@ -0,0 +1,125 @@
+# OpenVibe.Domains
+
+> Name it, price it, run it.
+
+**Status:** v1 is the service skeleton (see [STATUS.json](STATUS.json)); the pages are plain placeholders.
+**Domain:** `openvibe.domains` · **Port:** 5070 · **Service id:** `domains` · **Env prefix:** `DOMAINS`
+**License:** AGPL-3.0-only (same as every OpenVibe service).
+
+OpenVibe.Domains is a stateless read-only front over two OpenVibe services. For a name it shows the registry's
+availability and every registrar's prices for that ending, with one-, three- and five-year totals; every ending has
+its own page; every domain has a page with its public registration history.
+
+There is no database, no sign-in, no session and no event stream. Nothing is stored and nothing is written.
+
+## Pages (v1)
+
+| Route | What it shows |
+|---|---|
+| `/` | the first page of OpenVibe.Host's price catalog (popular endings), plus OpenVibe.Tools' public "most looked up" and "expiring soon" lists when it answers |
+| `/search?q=` | registry status for the name, and every registrar's first-year, three-year and five-year totals, sorted by the three-year total; `noindex` because every query is a page |
+| `/tld/:tld` | one ending (`.dev`, `co.uk`) with every registrar's prices, the five-year total and the renewal-trap mark |
+| `/.<ending>` | 301 to `/tld/<ending>` (for example `/.dev` → `/tld/dev`) |
+| `/d/:domain` | a full domain: its public history from OpenVibe.Tools and its ending's prices from OpenVibe.Host |
+| anything else | the 404 page |
+
+All of it is server-rendered and readable without JavaScript. The shell is the OpenVibe Frame (`openvibe-shared/shell`):
+theme loader, navbar mounted into `#navbar-mount`, the shared server-rendered footer, service id `domains`.
+
+## API
+
+Everything under `/api/v1`, read-only, CORS-open (`Access-Control-Allow-Origin: *`), cached publicly for five
+minutes. A bad name is RFC 9457 `application/problem+json`; an ending the catalog does not know is 404.
+
+| Route | Answer |
+|---|---|
+| `GET /api/v1/search?q=` | `{ name, status, rows }` — `name` is `{ label, tld, ascii, display }`, `status` is the registry's answer, `rows` are the priced registrar rows |
+| `GET /api/v1/tlds?q=&kind=&sort=&page=` | OpenVibe.Host's list as it answers it: `{ tlds, next_cursor }`. Sorts: `popular`, `tld`, `register`, `renew`, `five_year` |
+| `GET /api/v1/tlds/:tld` | `{ tld }` with its prices priced like the page |
+| `GET /api/v1/domains/:domain` | `{ name, history, prices }` — history from OpenVibe.Tools, prices for that domain's ending only |
+
+`/api/v1` and `/search` share a per-IP limit of 120 requests a minute (`express-rate-limit`).
+
+## What "priced" means
+
+OpenVibe.Host's check rows carry `register`, `renew`, `five_year`, `registrars`, `currency`, `checked_at`, `tld`,
+`display` and `kind`. Each row gains:
+
+- `y1` — first year: `register`;
+- `y3` — three years: `register + 2 × renew`;
+- `y5` — five years: the catalog's `five_year` when it has one, else `register + 4 × renew`;
+- `trap` — `renew ≥ 2 × register` **and** `renew − register ≥ 5`: the cheap-first-year renewal trap.
+
+A total that needs a missing price is `null`, never `NaN`. Money is rounded to cents. Only USD rows are compared and
+sorted (by `y3`, rows without a `y3` last); other currencies are kept after them and flagged `currency_other: true`.
+
+## The data it reads
+
+| Source | Endpoint | Used for | Cache |
+|---|---|---|---|
+| OpenVibe.Host | `GET /api/v1/catalog/domains?sort=…&cursor=…` | the catalog's ending list and the sitemap | 10 minutes |
+| OpenVibe.Host | `GET /api/v1/catalog/domains/:tld` | one ending's registrar prices and history | 10 minutes |
+| OpenVibe.Host | `GET /api/v1/catalog/domains/check?name=` | a name's registry status and priced endings | 2 minutes |
+| OpenVibe.Tools | `GET /api/v1/domains/` | the public most-looked-up and expiring-soon lists | 10 minutes |
+| OpenVibe.Tools | `GET /api/v1/domains/:domain` | a domain's public snapshots and changes | 10 minutes |
+
+Both clients take an injectable `fetchImpl`, time out after 8 seconds, and keep a small in-process `Map` cache with a
+2,000-entry cap (oldest insertion out). A failure is `null` and one short log line — never an exception in a page.
+The upstream URLs come from `OV_HOST_INTERNAL_URL` / `OV_TOOLS_INTERNAL_URL`, or the internal origins in the pinned
+OpenVibe.Contracts manifests, with `https://openvibe.tools` as the Tools fallback.
+
+OpenVibe.Tools keeps RDAP's public registration facts only (registrar, dates, status codes, name servers, DNSSEC) and
+publishes a domain on its lists only after at least five lookups. This service adds no data of its own.
+
+## Configuration
+
+Copy [.env.example](.env.example) to the environment file (`/etc/openvibe/domains.env` in production):
+
+| Variable | Default | What |
+|---|---|---|
+| `NODE_ENV` | `development` | `production` selects the production base URL |
+| `PORT` | `5070` | listen port |
+| `HOST` | `127.0.0.1` | listen address |
+| `BASE_URL` | `https://openvibe.domains` in production | public origin used for canonical URLs, the sitemap and llms.txt |
+| `TRUST_PROXY` | `2` | how many proxies to trust (nginx and the CDN) |
+| `OV_HOST_INTERNAL_URL` | the Host manifest's `internalOrigin` | OpenVibe.Host's internal API |
+| `OV_TOOLS_INTERNAL_URL` | the Tools manifest's `internalOrigin` | OpenVibe.Tools' internal API |
+| `DOMAINS_RATE_LIMIT_PER_MIN` | `120` | the shared `/api/v1` and `/search` per-IP budget |
+| `DOMAINS_UPSTREAM_TIMEOUT_MS` | `8000` | the two data clients' timeout |
+
+## Run it
+
+```bash
+npm install
+npm test # every test/*.test.js, each in its own process, with stub upstreams
+npm run dev # http://localhost:5070
+npm start # production
+```
+
+The tests need no database, no network and no running OpenVibe site. `node --check` every `.js` file is the other
+gate.
+
+## Machine endpoints
+
+| Route | What |
+|---|---|
+| `/api/health` | `{ status: "ok", service: "openvibe-domains", version }` |
+| `/api/ready` | truthful readiness (`openvibe-shared/ready`): `ready` while the process serves; a Host or Tools failure makes `status: "degraded"` and names it, never 503 |
+| `/release.json`, `/release-metrics` | the release manifest and the tab collector (`openvibe-shared/release`) |
+| `/metrics` | Prometheus text format, loopback only (`openvibe-shared/metrics`) |
+| `/shared/*` | this service's own pinned OpenVibe Frame files |
+| `/robots.txt` | allow everything, name the sitemap |
+| `/sitemap.xml` | `/` and one `/tld/<ending>` per ending in every page of the Host catalog; `lastmod` from the release |
+| `/llms.txt` | what the site is, its pages and its API |
+
+## Deploy
+
+- `deploy/systemd/openvibe-domains.service` — user `ubuntu`, `WorkingDirectory=/opt/openvibe.domains`,
+ `EnvironmentFile=/etc/openvibe/domains.env`, port 5070.
+- `deploy/nginx/openvibe.domains.conf` — TLS, `www` → apex 301, proxy to `127.0.0.1:5070`, security headers, GET-only
+ `/api/v1`, loopback-only metrics.
+- CI: `.github/workflows/ci.yml` runs the shared syntax/contracts/security jobs; there is no database service.
+
+## License
+
+AGPL-3.0-only. See [LICENSE](LICENSE).
new file mode 100644
new file mode 100644
@@ -0,0 +1,20 @@
@@ -0,0 +1,20 @@
+# Security policy
+
+OpenVibe is run in the open, and we want to hear about security problems before anyone else does.
+
+## Reporting a vulnerability
+
+Email **[email protected]** with "security" in the subject. Please include what you found, where (URL,
+repository, file), how to reproduce it, and what an attacker could do with it. Do not open a public GitHub issue for
+a vulnerability, and do not test against other people's accounts, data or streams.
+
+We reply within 7 days, keep you updated while we fix it, and credit you when the fix ships if you would like.
+
+## Scope
+
+Every OpenVibe service and site (openvibe.domains and the other openvibe.* domains) and every repository under
+github.com/OpenVibers.
+
+## Supported versions
+
+Only the current `main` branch, which is what runs in production, receives fixes.
new file mode 100644
new file mode 100644
@@ -0,0 +1,56 @@
@@ -0,0 +1,56 @@
+{
+ "repository": "OpenVibers/OpenVibe.Domains",
+ "version": "0.1.0",
+ "stage": "product",
+ "code": true,
+ "wave": "v1",
+ "plan": "OpenVibe.Domains v1: a stateless read-only front over OpenVibe.Host's domain price catalog and OpenVibe.Tools' public domain history — name checks, one page per ending, one page per domain, a JSON API, and the service skeleton (deploy, discovery, readiness, tests)",
+ "runtime": "node 22, express 4",
+ "port": "5070",
+ "domain": "openvibe.domains",
+ "contracts": "openvibe-contracts v0.225.0",
+ "sdk": "openvibe-sdk v0.70.0",
+ "shared": "openvibe-shared v4.29.0",
+ "packages": [
+ "openvibe-contracts v0.225.0",
+ "openvibe-sdk v0.70.0",
+ "openvibe-shared v4.29.0"
+ ],
+ "summary": "OpenVibe.Domains is a stateless front: no database, no sign-in, no events. It reads OpenVibe.Host's internal catalog (GET /api/v1/catalog/domains, /domains/check?name=, /domains/:tld) and OpenVibe.Tools' public history (GET /api/v1/domains, /domains/:domain) through small in-process caches, prices every registrar row into one-, three- and five-year totals with the cheap-first-year renewal trap, and serves server-rendered pages (home, name search, one ending, one domain) plus a read-only JSON API. It has the service plumbing the other OpenVibe sites have: helmet/CSP, health and truthful readiness (degraded, never 503, when either upstream is down), release.json and /release-metrics, /shared, robots/sitemap/llms, a per-IP limit on /api/v1 and /search, graceful stop, deploy files and tests.",
+ "works": [
+ "Name parsing (server/names.js): URLs, ports, a leading www., spaces and underscores in the label, IDNs via url.domainToASCII, co.uk endings, 1-63 character labels and the 253-character limit; display keeps Unicode",
+ "Pricing (server/pricing.js): y1 = register, y3 = register + 2 renew, y5 = five_year or register + 4 renew, the renewal trap, cents rounding, USD rows compared and sorted by y3 with non-USD rows flagged and kept after them",
+ "Two cached data clients (server/data/): injectable fetchImpl, 8 s timeouts, a 2,000-entry expiry Map, 10/10/2/10-minute TTLs, a failure is null and one short log line",
+ "Pages (server/http/pages.js, server/views/index.js): / with the popular catalog and Tools lists, /search?q= (noindex), /tld/:tld, /.dev 301, /d/:domain and a 404; plain placeholder views on the shared Frame with the service id domains",
+ "Read-only JSON API at /api/v1: search, tlds, one tld, one domain; CORS-open; 400 problem+json for a bad name and 404 for an unknown ending; 120/min per IP shared with /search",
+ "Service plumbing: helmet with Help's CSP, /api/health, /api/ready (Host and Tools optional, so a failure is degraded not 503), release.json and /release-metrics, /shared, /robots.txt, /sitemap.xml (every catalog ending, lastmod from the release), /llms.txt, /metrics on loopback, graceful stop",
+ "Deploy files: systemd unit on /opt/openvibe.domains, nginx vhost with www -> apex, TLS, security headers, GET-only /api/v1 and loopback-only /metrics",
+ "Tests: names, pricing, the data clients' cache/expiry/failure/timeout, and the booted app's pages, redirects, API shapes, CORS, discovery and degraded readiness"
+ ],
+ "notYet": [
+ "The pages are plain placeholders (server/views/index.js) written for v1's plumbing; the main session replaces server/views/ with the real design",
+ "No service manifest in openvibe-contracts yet: no domains.* capability is registered and no other service calls this one",
+ "No database, no sign-in, no sessions, no event subscriptions and no stored data (v1 is deliberately stateless)",
+ "No registrar links or affiliate handling: prices are shown with the registrar's name, not linked out yet",
+ "Only /api/v1 and /search are rate limited; the HTML pages are served to everyone"
+ ],
+ "capabilitiesRegistered": false,
+ "serviceManifestRegistered": false,
+ "deployed": false,
+ "placeholderInSites": true,
+ "features": [
+ "name parsing",
+ "registry availability check",
+ "three- and five-year price totals",
+ "renewal trap",
+ "one page per ending",
+ "one page per domain with public history",
+ "read-only JSON API",
+ "cached upstream clients",
+ "truthful readiness",
+ "discovery",
+ "deploy files"
+ ],
+ "deployment": "Not deployed yet. Reference unit deploy/systemd/openvibe-domains.service (127.0.0.1:5070, /opt/openvibe.domains, /etc/openvibe/domains.env, user ubuntu) and vhost deploy/nginx/openvibe.domains.conf (openvibe.domains and www, certs under /etc/letsencrypt/live/openvibe.domains/).",
+ "updated": "2026-10-28"
+}
new file mode 100644
new file mode 100644
@@ -0,0 +1,109 @@
@@ -0,0 +1,109 @@
+## ═══════════════════════════════════════════════════════════════
+## openvibe.domains — Nginx configuration (REFERENCE)
+##
+## Deployed to /etc/nginx/sites-available/openvibe.domains.conf (ov-vhost-install) — keep them in sync and reload
+## nginx after changing it. The Node app (port 5070, systemd unit openvibe-domains) renders every page and serves
+## the read-only API; nginx terminates TLS, redirects www → apex, rate-limits the API, and compresses text.
+##
+## No proxy_cache: the app sets its own public Cache-Control per response. Never log request bodies here.
+## ═══════════════════════════════════════════════════════════════
+
+limit_req_zone $binary_remote_addr zone=domains_api:10m rate=5r/s;
+limit_req_zone $binary_remote_addr zone=domains_search:10m rate=2r/s;
+
+server {
+ listen 80;
+ listen [::]:80;
+ server_name openvibe.domains www.openvibe.domains;
+
+ location /.well-known/acme-challenge/ { root /var/www/certbot; }
+ location / { return 301 https://openvibe.domains$request_uri; }
+}
+
+server {
+ listen 443 ssl;
+ listen [::]:443 ssl;
+ http2 on;
+ server_name www.openvibe.domains;
+
+ ssl_certificate /etc/letsencrypt/live/openvibe.domains/fullchain.pem;
+ ssl_certificate_key /etc/letsencrypt/live/openvibe.domains/privkey.pem;
+ ssl_protocols TLSv1.2 TLSv1.3;
+
+ return 301 https://openvibe.domains$request_uri;
+}
+
+server {
+ listen 443 ssl;
+ listen [::]:443 ssl;
+ http2 on;
+ server_name openvibe.domains;
+
+ ssl_certificate /etc/letsencrypt/live/openvibe.domains/fullchain.pem;
+ ssl_certificate_key /etc/letsencrypt/live/openvibe.domains/privkey.pem;
+ ssl_protocols TLSv1.2 TLSv1.3;
+
+ access_log /var/log/nginx/openvibe.domains.access.log;
+ error_log /var/log/nginx/openvibe.domains.error.log;
+
+ # Everything here is a GET; leave room for headers, not for a body.
+ client_max_body_size 32k;
+
+ add_header X-Content-Type-Options nosniff always;
+ add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
+
+ gzip on;
+ gzip_proxied any;
+ gzip_vary on;
+ gzip_comp_level 5;
+ gzip_min_length 1024;
+ gzip_types text/css application/javascript text/javascript application/json application/problem+json image/svg+xml text/plain application/xml;
+
+ proxy_http_version 1.1;
+ proxy_set_header Host $host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $remote_addr;
+ proxy_set_header CF-Connecting-IP $remote_addr;
+ proxy_set_header X-Forwarded-Proto $scheme;
+
+ # ── The read-only API: GET (and HEAD) only ─────────────
+ # A POST, PUT, PATCH or DELETE to /api/v1 never reaches the app. The app itself has no write route.
+ location /api/v1 {
+ limit_except GET { deny all; }
+ limit_req zone=domains_api burst=20 nodelay;
+ limit_req_status 429;
+ proxy_pass http://127.0.0.1:5070;
+ }
+
+ # ── The API's liveness, readiness and release ──────────
+ location /api/ {
+ limit_req zone=domains_api burst=20 nodelay;
+ limit_req_status 429;
+ proxy_pass http://127.0.0.1:5070;
+ }
+
+ # ── A name query shares the app's 120/min budget ───────
+ location = /search {
+ limit_req zone=domains_search burst=10 nodelay;
+ limit_req_status 429;
+ proxy_pass http://127.0.0.1:5070;
+ }
+
+ # ── Prometheus metrics: host-local scrapers only (http://127.0.0.1:5070/metrics) ──
+ location ~* ^/metrics(/|$) { return 404; }
+
+ # ── Pages, discovery, static assets, release.json ──────
+ location / {
+ proxy_pass http://127.0.0.1:5070;
+ }
+
+ # A short ending URL (/.dev, /.co.uk) is a page with a 301 to /tld/<ending>, not a dotfile.
+ # This regex location comes before the dotfile deny below; the first regex match wins.
+ location ~* ^/\.[a-z0-9-]+(\.[a-z0-9-]+)*$ {
+ proxy_pass http://127.0.0.1:5070;
+ }
+
+ location ~ /\.(?!well-known) {
+ deny all;
+ }
+}
new file mode 100644
new file mode 100644
@@ -0,0 +1,30 @@
@@ -0,0 +1,30 @@
+[Unit]
+Description=OpenVibe.Domains — Name it, price it, run it.
+# Host and Tools should be up first, but this front degrades honestly without them: the pages serve,
+# say when an upstream did not answer, and /api/ready reports degraded (see server/observability.js).
+After=network.target
+Wants=openvibe-host.service openvibe-tools.service
+
+[Service]
+Type=simple
+User=ubuntu
+Group=ubuntu
+WorkingDirectory=/opt/openvibe.domains
+EnvironmentFile=/etc/openvibe/domains.env
+Environment=NODE_ENV=production
+Environment=PORT=5070
+Environment=PATH=/usr/local/bin:/usr/bin:/bin
+ExecStart=/usr/bin/env node /opt/openvibe.domains/server/index.js
+Restart=always
+RestartSec=5
+KillSignal=SIGTERM
+# In-flight requests get the 10 s drain.
+TimeoutStopSec=15
+NoNewPrivileges=true
+PrivateTmp=true
+ProtectSystem=strict
+ProtectHome=true
+# Stateless: no database, no data directory, nothing to write.
+
+[Install]
+WantedBy=multi-user.target
new file mode 100644
new file mode 100644
@@ -0,0 +1,1129 @@
@@ -0,0 +1,1129 @@
+{
+ "name": "openvibe-domains",
+ "version": "0.1.0",
+ "lockfileVersion": 3,
+ "requires": true,
+ "packages": {
+ "": {
+ "name": "openvibe-domains",
+ "version": "0.1.0",
+ "license": "AGPL-3.0-only",
+ "dependencies": {
+ "dotenv": "^16.4.7",
+ "express": "^4.21.2",
+ "express-rate-limit": "^7.5.0",
+ "helmet": "^8.1.0",
+ "openvibe-contracts": "https://codeload.github.com/OpenVibers/OpenVibe.Contracts/tar.gz/refs/tags/v0.225.0",
+ "openvibe-sdk": "https://codeload.github.com/OpenVibers/OpenVibe.SDK/tar.gz/refs/tags/v0.70.0",
+ "openvibe-shared": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.29.1"
+ },
+ "engines": {
+ "node": ">=22.0.0"
+ }
+ },
+ "node_modules/accepts": {
+ "version": "1.3.8",
+ "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
+ "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==",
+ "license": "MIT",
+ "dependencies": {
+ "mime-types": "~2.1.34",
+ "negotiator": "0.6.3"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/ajv": {
+ "version": "8.20.0",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.20.0.tgz",
+ "integrity": "sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==",
+ "license": "MIT",
+ "dependencies": {
+ "fast-deep-equal": "^3.1.3",
+ "fast-uri": "^3.0.1",
+ "json-schema-traverse": "^1.0.0",
+ "require-from-string": "^2.0.2"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/epoberezkin"
+ }
+ },
+ "node_modules/ajv-formats": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-3.0.1.tgz",
+ "integrity": "sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==",
+ "license": "MIT",
+ "dependencies": {
+ "ajv": "^8.0.0"
+ },
+ "peerDependencies": {
+ "ajv": "^8.0.0"
+ },
+ "peerDependenciesMeta": {
+ "ajv": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/array-flatten": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
+ "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==",
+ "license": "MIT"
+ },
+ "node_modules/body-parser": {
+ "version": "1.20.9",
+ "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.9.tgz",
+ "integrity": "sha512-FISIQxV5u91Y9gvuFq3q/tA/qTqLJn3AhRcEvyozyhJTh5OBFFtv827AdHU7Rbyct4r+Ba1/99oFa1Y3yuFsdw==",
+ "license": "MIT",
+ "dependencies": {
+ "bytes": "~3.1.2",
+ "content-type": "~1.0.5",
+ "debug": "2.6.9",
+ "depd": "2.0.0",
+ "destroy": "~1.2.0",
+ "http-errors": "~2.0.1",
+ "iconv-lite": "~0.4.24",
+ "on-finished": "~2.4.1",
+ "qs": "~6.16.0",
+ "raw-body": "~2.5.3",
+ "type-is": "~1.6.18",
+ "unpipe": "~1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.8",
+ "npm": "1.2.8000 || >= 1.4.16"
+ }
+ },
+ "node_modules/buffer-equal-constant-time": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz",
+ "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==",
+ "license": "BSD-3-Clause"
+ },
+ "node_modules/bytes": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
+ "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/call-bind-apply-helpers": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz",
+ "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==",
+ "license": "MIT",
+ "dependencies": {
+ "es-errors": "^1.3.0",
+ "function-bind": "^1.1.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/call-bound": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz",
+ "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==",
+ "license": "MIT",
+ "dependencies": {
+ "call-bind-apply-helpers": "^1.0.2",
+ "get-intrinsic": "^1.3.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/content-disposition": {
+ "version": "0.5.4",
+ "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz",
+ "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==",
+ "license": "MIT",
+ "dependencies": {
+ "safe-buffer": "5.2.1"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/content-type": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz",
+ "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/cookie": {
+ "version": "0.7.2",
+ "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz",
+ "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/cookie-signature": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.7.tgz",
+ "integrity": "sha512-NXdYc3dLr47pBkpUCHtKSwIOQXLVn8dZEuywboCOJY/osA0wFSLlSawr3KN8qXJEyX66FcONTH8EIlVuK0yyFA==",
+ "license": "MIT"
+ },
+ "node_modules/debug": {
+ "version": "2.6.9",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "2.0.0"
+ }
+ },
+ "node_modules/depd": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
+ "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/destroy": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz",
+ "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8",
+ "npm": "1.2.8000 || >= 1.4.16"
+ }
+ },
+ "node_modules/dotenv": {
+ "version": "16.6.1",
+ "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.6.1.tgz",
+ "integrity": "sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow==",
+ "license": "BSD-2-Clause",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://dotenvx.com"
+ }
+ },
+ "node_modules/dunder-proto": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",
+ "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==",
+ "license": "MIT",
+ "dependencies": {
+ "call-bind-apply-helpers": "^1.0.1",
+ "es-errors": "^1.3.0",
+ "gopd": "^1.2.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/ecdsa-sig-formatter": {
+ "version": "1.0.11",
+ "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz",
+ "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "safe-buffer": "^5.0.1"
+ }
+ },
+ "node_modules/ee-first": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
+ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==",
+ "license": "MIT"
+ },
+ "node_modules/encodeurl": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz",
+ "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/es-define-property": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz",
+ "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/es-errors": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",
+ "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/es-object-atoms": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.2.tgz",
+ "integrity": "sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==",
+ "license": "MIT",
+ "dependencies": {
+ "es-errors": "^1.3.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/escape-html": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
+ "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==",
+ "license": "MIT"
+ },
+ "node_modules/etag": {
+ "version": "1.8.1",
+ "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
+ "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/express": {
+ "version": "4.22.3",
+ "resolved": "https://registry.npmjs.org/express/-/express-4.22.3.tgz",
+ "integrity": "sha512-Bdcs4+3qlpVlx2NRn6fgX2Ue2/gGRaPeawebgclM0ERSCqDpA+owF1fdPwjJUTAJWMTuAaxjDf+hzb0/4eKvvw==",
+ "license": "MIT",
+ "dependencies": {
+ "accepts": "~1.3.8",
+ "array-flatten": "1.1.1",
+ "body-parser": "~1.20.5",
+ "content-disposition": "~0.5.4",
+ "content-type": "~1.0.4",
+ "cookie": "~0.7.1",
+ "cookie-signature": "~1.0.6",
+ "debug": "2.6.9",
+ "depd": "2.0.0",
+ "encodeurl": "~2.0.0",
+ "escape-html": "~1.0.3",
+ "etag": "~1.8.1",
+ "finalhandler": "~1.3.1",
+ "fresh": "~0.5.2",
+ "http-errors": "~2.0.0",
+ "merge-descriptors": "1.0.3",
+ "methods": "~1.1.2",
+ "on-finished": "~2.4.1",
+ "parseurl": "~1.3.3",
+ "path-to-regexp": "~0.1.13",
+ "proxy-addr": "~2.0.7",
+ "qs": "~6.16.0",
+ "range-parser": "~1.2.1",
+ "safe-buffer": "5.2.1",
+ "send": "~0.19.0",
+ "serve-static": "~1.16.2",
+ "setprototypeof": "1.2.0",
+ "statuses": "~2.0.1",
+ "type-is": "~1.6.18",
+ "utils-merge": "1.0.1",
+ "vary": "~1.1.2"
+ },
+ "engines": {
+ "node": ">= 0.10.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/express-rate-limit": {
+ "version": "7.5.1",
+ "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-7.5.1.tgz",
+ "integrity": "sha512-7iN8iPMDzOMHPUYllBEsQdWVB6fPDMPqwjBaFrgr4Jgr/+okjvzAy+UHlYYL/Vs0OsOrMkwS6PJDkFlJwoxUnw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 16"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/express-rate-limit"
+ },
+ "peerDependencies": {
+ "express": ">= 4.11"
+ }
+ },
+ "node_modules/fast-deep-equal": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
+ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
+ "license": "MIT"
+ },
+ "node_modules/fast-uri": {
+ "version": "3.1.9",
+ "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.9.tgz",
+ "integrity": "sha512-hS/0Wt3Ya043oKXs0sIxrMpKQITXhMLIrVAKKXi4gozGC9v7YRWVnXIZzjNPTO02M9BdxLCWqK1yRXgNziVyJQ==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/fastify"
+ },
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/fastify"
+ }
+ ],
+ "license": "BSD-3-Clause"
+ },
+ "node_modules/finalhandler": {
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.2.tgz",
+ "integrity": "sha512-aA4RyPcd3badbdABGDuTXCMTtOneUCAYH/gxoYRTZlIJdF0YPWuGqiAsIrhNnnqdXGswYk6dGujem4w80UJFhg==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "2.6.9",
+ "encodeurl": "~2.0.0",
+ "escape-html": "~1.0.3",
+ "on-finished": "~2.4.1",
+ "parseurl": "~1.3.3",
+ "statuses": "~2.0.2",
+ "unpipe": "~1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/forwarded": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
+ "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/fresh": {
+ "version": "0.5.2",
+ "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
+ "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/function-bind": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
+ "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/get-intrinsic": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz",
+ "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==",
+ "license": "MIT",
+ "dependencies": {
+ "call-bind-apply-helpers": "^1.0.2",
+ "es-define-property": "^1.0.1",
+ "es-errors": "^1.3.0",
+ "es-object-atoms": "^1.1.1",
+ "function-bind": "^1.1.2",
+ "get-proto": "^1.0.1",
+ "gopd": "^1.2.0",
+ "has-symbols": "^1.1.0",
+ "hasown": "^2.0.2",
+ "math-intrinsics": "^1.1.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/get-proto": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz",
+ "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==",
+ "license": "MIT",
+ "dependencies": {
+ "dunder-proto": "^1.0.1",
+ "es-object-atoms": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/gopd": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz",
+ "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/has-symbols": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz",
+ "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/hasown": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz",
+ "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==",
+ "license": "MIT",
+ "dependencies": {
+ "function-bind": "^1.1.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/helmet": {
+ "version": "8.3.0",
+ "resolved": "https://registry.npmjs.org/helmet/-/helmet-8.3.0.tgz",
+ "integrity": "sha512-Qgpiaws3Sm30Av8Eah6sjMCZZwjlBu+E68rhpCWBshY1lb09HtLwj5GviX0OyQIn+ulUS0iX0AxN5n3tLZzz1w==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/EvanHahn"
+ }
+ },
+ "node_modules/http-errors": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz",
+ "integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==",
+ "license": "MIT",
+ "dependencies": {
+ "depd": "~2.0.0",
+ "inherits": "~2.0.4",
+ "setprototypeof": "~1.2.0",
+ "statuses": "~2.0.2",
+ "toidentifier": "~1.0.1"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/iconv-lite": {
+ "version": "0.4.24",
+ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
+ "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
+ "license": "MIT",
+ "dependencies": {
+ "safer-buffer": ">= 2.1.2 < 3"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/inherits": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
+ "license": "ISC"
+ },
+ "node_modules/ipaddr.js": {
+ "version": "1.9.1",
+ "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
+ "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.10"
+ }
+ },
+ "node_modules/json-schema-traverse": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
+ "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",
+ "license": "MIT"
+ },
+ "node_modules/jsonwebtoken": {
+ "version": "9.0.3",
+ "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.3.tgz",
+ "integrity": "sha512-MT/xP0CrubFRNLNKvxJ2BYfy53Zkm++5bX9dtuPbqAeQpTVe0MQTFhao8+Cp//EmJp244xt6Drw/GVEGCUj40g==",
+ "license": "MIT",
+ "dependencies": {
+ "jws": "^4.0.1",
+ "lodash.includes": "^4.3.0",
+ "lodash.isboolean": "^3.0.3",
+ "lodash.isinteger": "^4.0.4",
+ "lodash.isnumber": "^3.0.3",
+ "lodash.isplainobject": "^4.0.6",
+ "lodash.isstring": "^4.0.1",
+ "lodash.once": "^4.0.0",
+ "ms": "^2.1.1",
+ "semver": "^7.5.4"
+ },
+ "engines": {
+ "node": ">=12",
+ "npm": ">=6"
+ }
+ },
+ "node_modules/jsonwebtoken/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/jwa": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/jwa/-/jwa-2.0.1.tgz",
+ "integrity": "sha512-hRF04fqJIP8Abbkq5NKGN0Bbr3JxlQ+qhZufXVr0DvujKy93ZCbXZMHDL4EOtodSbCWxOqR8MS1tXA5hwqCXDg==",
+ "license": "MIT",
+ "dependencies": {
+ "buffer-equal-constant-time": "^1.0.1",
+ "ecdsa-sig-formatter": "1.0.11",
+ "safe-buffer": "^5.0.1"
+ }
+ },
+ "node_modules/jws": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/jws/-/jws-4.0.1.tgz",
+ "integrity": "sha512-EKI/M/yqPncGUUh44xz0PxSidXFr/+r0pA70+gIYhjv+et7yxM+s29Y+VGDkovRofQem0fs7Uvf4+YmAdyRduA==",
+ "license": "MIT",
+ "dependencies": {
+ "jwa": "^2.0.1",
+ "safe-buffer": "^5.0.1"
+ }
+ },
+ "node_modules/lodash.includes": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz",
+ "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==",
+ "license": "MIT"
+ },
+ "node_modules/lodash.isboolean": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz",
+ "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==",
+ "license": "MIT"
+ },
+ "node_modules/lodash.isinteger": {
+ "version": "4.0.4",
+ "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz",
+ "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==",
+ "license": "MIT"
+ },
+ "node_modules/lodash.isnumber": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz",
+ "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==",
+ "license": "MIT"
+ },
+ "node_modules/lodash.isplainobject": {
+ "version": "4.0.6",
+ "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz",
+ "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==",
+ "license": "MIT"
+ },
+ "node_modules/lodash.isstring": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz",
+ "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==",
+ "license": "MIT"
+ },
+ "node_modules/lodash.once": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz",
+ "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==",
+ "license": "MIT"
+ },
+ "node_modules/math-intrinsics": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
+ "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/media-typer": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
+ "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/merge-descriptors": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz",
+ "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==",
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/methods": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
+ "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/mime": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
+ "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
+ "license": "MIT",
+ "bin": {
+ "mime": "cli.js"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/mime-db": {
+ "version": "1.52.0",
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
+ "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/mime-types": {
+ "version": "2.1.35",
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
+ "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
+ "license": "MIT",
+ "dependencies": {
+ "mime-db": "1.52.0"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/ms": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
+ "license": "MIT"
+ },
+ "node_modules/negotiator": {
+ "version": "0.6.3",
+ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",
+ "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/object-inspect": {
+ "version": "1.13.4",
+ "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz",
+ "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/on-finished": {
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.2.tgz",
+ "integrity": "sha512-ATWUv387i+nLD49EiDoOft5scf32Vsdz3ktrQJG9bi7jRFmaXTssvyvj1EmeKVVgvesbqUtvQQvaS2TpTukAZQ==",
+ "license": "MIT",
+ "dependencies": {
+ "ee-first": "1.1.1"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/openvibe-contracts": {
+ "version": "0.225.0",
+ "resolved": "https://codeload.github.com/OpenVibers/OpenVibe.Contracts/tar.gz/refs/tags/v0.225.0",
+ "integrity": "sha512-msLaRYa2Byyabnf/+L3aRPwkx8MI3zWbofFhwupq+RyBCdgbA4gLlkPsJu9nK/1UTCWdNdSTfWXW5pZY1/1zbQ==",
+ "license": "AGPL-3.0-only",
+ "dependencies": {
+ "ajv": "^8.17.1",
+ "ajv-formats": "^3.0.1"
+ },
+ "bin": {
+ "openvibe-contracts-check": "bin/check-service.js"
+ },
+ "engines": {
+ "node": ">=20"
+ }
+ },
+ "node_modules/openvibe-sdk": {
+ "version": "0.70.0",
+ "resolved": "https://codeload.github.com/OpenVibers/OpenVibe.SDK/tar.gz/refs/tags/v0.70.0",
+ "integrity": "sha512-iMNxlnRm0fmyj60nHiC/lKAaG3JAqiJgu42lShnkby4yF4dQJRG3G0trrqOoULZKBalrYHb/gjauRwNQYN/tog==",
+ "license": "MIT",
+ "bin": {
+ "openvibe-download": "bin/openvibe-download.js"
+ },
+ "engines": {
+ "node": ">=20"
+ },
+ "peerDependencies": {
+ "@electric-sql/pglite": "^0.5.8",
+ "iovalkey": "^0.4.0",
+ "pg": "^8.23.0"
+ },
+ "peerDependenciesMeta": {
+ "@electric-sql/pglite": {
+ "optional": true
+ },
+ "iovalkey": {
+ "optional": true
+ },
+ "pg": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/openvibe-shared": {
+ "version": "4.29.1",
+ "resolved": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.29.1",
+ "integrity": "sha512-wQVzLibhXmPJTJ3El5q8G6cAuykeP9P07sPPZnXsyiOc4OdA8/l4tKaQT/f97Dzjsc9WFUNzRAhnbl0W6nLixg==",
+ "license": "MIT",
+ "dependencies": {
+ "jsonwebtoken": "^9.0.0"
+ },
+ "bin": {
+ "openvibe-build-assets": "scripts/build-assets.js"
+ }
+ },
+ "node_modules/parseurl": {
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
+ "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/path-to-regexp": {
+ "version": "0.1.13",
+ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.13.tgz",
+ "integrity": "sha512-A/AGNMFN3c8bOlvV9RreMdrv7jsmF9XIfDeCd87+I8RNg6s78BhJxMu69NEMHBSJFxKidViTEdruRwEk/WIKqA==",
+ "license": "MIT"
+ },
+ "node_modules/proxy-addr": {
+ "version": "2.0.8",
+ "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.8.tgz",
+ "integrity": "sha512-5nnx0yGyVUcY6t9RnWcARWtwT9F1D8O9rt08htPvnd49W1IgZtmLkhu9WfMzQj1cFxjHIO6connUNVW5k7AVyQ==",
+ "license": "MIT",
+ "dependencies": {
+ "forwarded": "0.2.0",
+ "ipaddr.js": "1.9.1"
+ },
+ "engines": {
+ "node": ">= 0.10"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/qs": {
+ "version": "6.16.2",
+ "resolved": "https://registry.npmjs.org/qs/-/qs-6.16.2.tgz",
+ "integrity": "sha512-VYdnB5S7/0IeXzBacUtwNAaM6d7Y/PgYnNC7bJCI6meqA/OgnsQbZMtVW8Dt2D1PHgbHGtYmhSoEIgvt7xZ2ZA==",
+ "license": "BSD-3-Clause",
+ "dependencies": {
+ "es-define-property": "^1.0.1",
+ "side-channel": "^1.1.1"
+ },
+ "engines": {
+ "node": ">=0.6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/range-parser": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
+ "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/raw-body": {
+ "version": "2.5.3",
+ "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.3.tgz",
+ "integrity": "sha512-s4VSOf6yN0rvbRZGxs8Om5CWj6seneMwK3oDb4lWDH0UPhWcxwOWw5+qk24bxq87szX1ydrwylIOp2uG1ojUpA==",
+ "license": "MIT",
+ "dependencies": {
+ "bytes": "~3.1.2",
+ "http-errors": "~2.0.1",
+ "iconv-lite": "~0.4.24",
+ "unpipe": "~1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/require-from-string": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz",
+ "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/safe-buffer": {
+ "version": "5.2.1",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
+ "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "license": "MIT"
+ },
+ "node_modules/safer-buffer": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
+ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
+ "license": "MIT"
+ },
+ "node_modules/semver": {
+ "version": "7.8.5",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz",
+ "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==",
+ "license": "ISC",
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/send": {
+ "version": "0.19.2",
+ "resolved": "https://registry.npmjs.org/send/-/send-0.19.2.tgz",
+ "integrity": "sha512-VMbMxbDeehAxpOtWJXlcUS5E8iXh6QmN+BkRX1GARS3wRaXEEgzCcB10gTQazO42tpNIya8xIyNx8fll1OFPrg==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "2.6.9",
+ "depd": "2.0.0",
+ "destroy": "1.2.0",
+ "encodeurl": "~2.0.0",
+ "escape-html": "~1.0.3",
+ "etag": "~1.8.1",
+ "fresh": "~0.5.2",
+ "http-errors": "~2.0.1",
+ "mime": "1.6.0",
+ "ms": "2.1.3",
+ "on-finished": "~2.4.1",
+ "range-parser": "~1.2.1",
+ "statuses": "~2.0.2"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/send/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/serve-static": {
+ "version": "1.16.3",
+ "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.3.tgz",
+ "integrity": "sha512-x0RTqQel6g5SY7Lg6ZreMmsOzncHFU7nhnRWkKgWuMTu5NN0DR5oruckMqRvacAN9d5w6ARnRBXl9xhDCgfMeA==",
+ "license": "MIT",
+ "dependencies": {
+ "encodeurl": "~2.0.0",
+ "escape-html": "~1.0.3",
+ "parseurl": "~1.3.3",
+ "send": "~0.19.1"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/setprototypeof": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
+ "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==",
+ "license": "ISC"
+ },
+ "node_modules/side-channel": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.1.tgz",
+ "integrity": "sha512-6x6dK6zJdpTzF4sQeNYxwtvBzf6Eg4GtlesS94HOvTudUeyK2WXAaIfmDgsyslYrRBeFIlsi54AYsFGUuhmvrQ==",
+ "license": "MIT",
+ "dependencies": {
+ "es-errors": "^1.3.0",
+ "object-inspect": "^1.13.4",
+ "side-channel-list": "^1.0.1",
+ "side-channel-map": "^1.0.1",
+ "side-channel-weakmap": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/side-channel-list": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.1.tgz",
+ "integrity": "sha512-mjn/0bi/oUURjc5Xl7IaWi/OJJJumuoJFQJfDDyO46+hBWsfaVM65TBHq2eoZBhzl9EchxOijpkbRC8SVBQU0w==",
+ "license": "MIT",
+ "dependencies": {
+ "es-errors": "^1.3.0",
+ "object-inspect": "^1.13.4"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/side-channel-map": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz",
+ "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==",
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.2",
+ "es-errors": "^1.3.0",
+ "get-intrinsic": "^1.2.5",
+ "object-inspect": "^1.13.3"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/side-channel-weakmap": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz",
+ "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==",
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.2",
+ "es-errors": "^1.3.0",
+ "get-intrinsic": "^1.2.5",
+ "object-inspect": "^1.13.3",
+ "side-channel-map": "^1.0.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/statuses": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz",
+ "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/toidentifier": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
+ "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.6"
+ }
+ },
+ "node_modules/type-is": {
+ "version": "1.6.18",
+ "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
+ "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
+ "license": "MIT",
+ "dependencies": {
+ "media-typer": "0.3.0",
+ "mime-types": "~2.1.24"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/unpipe": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
+ "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/utils-merge": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
+ "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4.0"
+ }
+ },
+ "node_modules/vary": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
+ "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ }
+ }
+}
new file mode 100644
new file mode 100644
@@ -0,0 +1,29 @@
@@ -0,0 +1,29 @@
+{
+ "name": "openvibe-domains",
+ "version": "0.1.0",
+ "private": true,
+ "description": "OpenVibe.Domains \u2014 name it, price it, run it.",
+ "main": "server/index.js",
+ "scripts": {
+ "start": "node server/index.js",
+ "dev": "NODE_ENV=development node server/index.js",
+ "test": "node test/run.js"
+ },
+ "keywords": [
+ "openvibe"
+ ],
+ "author": "OpenVibers",
+ "license": "AGPL-3.0-only",
+ "dependencies": {
+ "dotenv": "^16.4.7",
+ "express": "^4.21.2",
+ "express-rate-limit": "^7.5.0",
+ "helmet": "^8.1.0",
+ "openvibe-contracts": "https://codeload.github.com/OpenVibers/OpenVibe.Contracts/tar.gz/refs/tags/v0.225.0",
+ "openvibe-sdk": "https://codeload.github.com/OpenVibers/OpenVibe.SDK/tar.gz/refs/tags/v0.70.0",
+ "openvibe-shared": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.29.1"
+ },
+ "engines": {
+ "node": ">=22.0.0"
+ }
+}
new file mode 100644
new file mode 100644
@@ -0,0 +1,130 @@
@@ -0,0 +1,130 @@
+/* OpenVibe.Domains — the room's own pieces. Colours come from the theme (--bg-*, --text-*, --border) and the room's
+ accent (.ov-room in openvibe-shared kit.css: --room-accent, --room-strong, --room-fill, --room-on), so every theme,
+ light or dark, wears it. Phone first: tables become stacked rows under 700 px; nothing scrolls sideways. */
+*, *::before, *::after { box-sizing: border-box; }
+html, body { margin: 0; background: var(--bg-primary, #0a0f1c); color: var(--text-primary, #e6edf7); font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
+.skip { position: absolute; left: -9999px; }
+.skip:focus { left: 12px; top: 12px; z-index: 99; padding: 8px 12px; border-radius: 10px; background: var(--bg-card, #0f1729); color: inherit; }
+.dm { display: block; }
+.dm-wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px 64px; }
+.dm a { color: var(--room-strong); }
+.dm h2 { margin: 0; font-size: 1.2rem; font-weight: 800; letter-spacing: -.01em; }
+.dm h3 { margin: 22px 0 8px; font-size: 1rem; }
+.dm section { margin-top: clamp(28px, 4vw, 44px); }
+.dm section > h2 { margin-bottom: 12px; }
+.dm section > .dm-head-row { margin-bottom: 4px; }
+.dm-head-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
+.dm-more { display: inline-flex; align-items: center; gap: 2px; font-weight: 700; font-size: .9rem; text-decoration: none; }
+.dm-more .ovk-i { width: 1em; height: 1em; }
+.dm-fine { margin: 6px 0 14px; max-width: 780px; color: var(--text-muted, #7386a3); font-size: .88rem; line-height: 1.55; }
+.dm-lede { margin: 8px 0 0; max-width: 680px; color: var(--text-secondary, #96a7c2); line-height: 1.55; }
+.dm-kicker { margin: 0 0 4px; font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--room-strong); }
+.dm-page-h { padding-top: clamp(20px, 4vw, 40px); }
+.dm-page-h h1, .dm-hit h1 { margin: 0; font-size: clamp(1.9rem, 5vw, 3rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.06; overflow-wrap: anywhere; }
+
+/* The box that prices a name, on pages other than the home's hero. */
+.dm-box { display: flex; align-items: center; max-width: 560px; margin-top: 18px; border-radius: 999px; background: var(--bg-card, #0f1729); border: 1.5px solid color-mix(in srgb, var(--room-accent) 40%, var(--border, #1f2d47)); }
+.dm-box:focus-within { border-color: var(--room-accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--room-accent) 20%, transparent); }
+.dm-box input { flex: 1; min-width: 0; height: 50px; padding: 0 8px 0 20px; border: 0; background: transparent; color: inherit; font: inherit; font-size: 1rem; outline: none; }
+.dm-box input::-webkit-search-cancel-button { display: none; }
+.dm-box button { flex: none; display: grid; place-items: center; width: 40px; height: 40px; margin-right: 5px; border: 0; border-radius: 50%; background: var(--room-fill); color: var(--room-on); cursor: pointer; }
+.dm-box button:focus-visible { outline: 2px solid var(--room-accent); outline-offset: 3px; }
+.dm-box .ovk-i { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
+.dm .ovk-i { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
+
+/* The board: endings as tiles, three years first. */
+.dm-board { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 44%), 1fr)); gap: 10px; }
+.dm-tile { position: relative; display: grid; gap: 4px; min-height: 132px; padding: 16px; border-radius: 16px; background: linear-gradient(160deg, color-mix(in srgb, var(--room-accent) 9%, transparent), transparent 65%), var(--bg-card, #0f1729); border: 1px solid var(--border, #1f2d47); text-decoration: none; transition: border-color .18s, transform .18s; }
+.dm a.dm-tile { color: var(--text-primary, #e6edf7); }
+.dm-tile:hover, .dm-tile:focus-visible { border-color: var(--room-accent); transform: translateY(-2px); outline: none; }
+.dm-tile-tld { font-size: 1.55rem; font-weight: 800; letter-spacing: -.02em; color: var(--room-strong); }
+.dm-tile-y3 { display: flex; align-items: baseline; gap: 6px; }
+.dm-tile-y3 b { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
+.dm-tile-y3 small, .dm-tile-y1, .dm-tile-n { font-size: .8rem; color: var(--text-muted, #7386a3); }
+.dm-trap { display: inline-flex; align-items: center; width: fit-content; padding: 1px 8px; border-radius: 999px; font-style: normal; font-size: .74rem; font-weight: 800; color: var(--warning-text, #f59e0b); background: color-mix(in srgb, var(--warning, #f59e0b) 14%, transparent); }
+.dm-best { display: inline-flex; width: fit-content; padding: 1px 8px; border-radius: 999px; font-style: normal; font-size: .74rem; font-weight: 800; color: var(--room-on); background: var(--room-fill); }
+
+/* Price tables: a row per ending or registrar; stacked on phones. */
+.dm-table { display: grid; border: 1px solid var(--border, #1f2d47); border-radius: 16px; overflow: hidden; background: var(--bg-card, #0f1729); }
+.dm-tr { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(4, minmax(0, 1fr)); gap: 12px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--border, #1f2d47); font-variant-numeric: tabular-nums; }
+.dm-tr:first-child { border-top: 0; }
+.dm-th { font-size: .72rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--text-muted, #7386a3); background: color-mix(in srgb, var(--room-accent) 5%, transparent); }
+.dm-tr.is-best { background: color-mix(in srgb, var(--room-accent) 9%, transparent); }
+.dm-name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-width: 0; font-weight: 700; }
+.dm-name a { text-decoration: none; overflow-wrap: anywhere; }
+.dm-name a:hover { text-decoration: underline; }
+.dm-y3 { font-weight: 800; }
+.dm-aff { flex-basis: 100%; font-size: .72rem; font-weight: 600; color: var(--text-muted, #7386a3); }
+@media (max-width: 699px) {
+ .dm-th { display: none; }
+ .dm-tr { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; }
+ .dm-name { grid-column: 1 / -1; font-size: 1.05rem; }
+ .dm-tr > [data-l]::before { content: attr(data-l); display: block; font-size: .7rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted, #7386a3); }
+}
+
+/* A name's answer: free or taken, with the public facts. */
+.dm-q { margin-top: 12px; }
+.dm-hit { margin-top: 26px; padding: clamp(18px, 3vw, 28px); border-radius: 20px; border: 1px solid var(--border, #1f2d47); background: var(--bg-card, #0f1729); }
+.dm-hit.is-free { border-color: color-mix(in srgb, var(--success, #22c55e) 55%, var(--border, #1f2d47)); background: linear-gradient(140deg, color-mix(in srgb, var(--success, #22c55e) 12%, transparent), transparent 60%), var(--bg-card, #0f1729); }
+.dm-page-h .dm-status { margin-top: 10px; }
+.dm-page-h .dm-status.is-free .dm-pill { color: var(--success-text, #22c55e); background: color-mix(in srgb, var(--success, #22c55e) 16%, transparent); }
+.dm-page-h .dm-status.is-taken .dm-pill { background: color-mix(in srgb, var(--text-muted, #7386a3) 22%, transparent); }
+.dm-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0 0; color: var(--text-secondary, #96a7c2); }
+.dm-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; border-radius: 999px; font-weight: 800; font-size: .85rem; }
+.is-free .dm-pill { color: var(--success-text, #22c55e); background: color-mix(in srgb, var(--success, #22c55e) 16%, transparent); }
+.is-taken .dm-pill { color: var(--text-primary, #e6edf7); background: color-mix(in srgb, var(--text-muted, #7386a3) 22%, transparent); }
+.is-unknown .dm-pill { color: var(--warning-text, #f59e0b); background: color-mix(in srgb, var(--warning, #f59e0b) 14%, transparent); }
+.dm-act { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }
+.dm-btn { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; background: var(--room-fill); font-weight: 700; font-size: .92rem; text-decoration: none; }
+.dm a.dm-btn { color: var(--room-on); }
+.dm a.dm-btn.is-quiet { background: transparent; color: var(--room-strong); border: 1px solid color-mix(in srgb, var(--room-accent) 45%, var(--border, #1f2d47)); }
+.dm-btn:focus-visible { outline: 2px solid var(--room-accent); outline-offset: 2px; }
+
+/* An ending's page. */
+.dm-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin: 18px 0 0; }
+.dm-facts > div { padding: 12px 14px; border-radius: 14px; background: var(--bg-card, #0f1729); border: 1px solid var(--border, #1f2d47); min-width: 0; }
+.dm-facts dt { font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted, #7386a3); }
+.dm-facts dd { margin: 4px 0 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; overflow-wrap: anywhere; }
+.dm-facts dd b { font-size: 1.3rem; font-variant-numeric: tabular-nums; }
+.dm-facts dd small { color: var(--text-muted, #7386a3); }
+.dm-record dd { font-weight: 600; }
+.dm-warn { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0 0; max-width: 760px; padding: 12px 14px; border-radius: 14px; color: var(--text-primary, #e6edf7); background: color-mix(in srgb, var(--warning, #f59e0b) 12%, transparent); border: 1px solid color-mix(in srgb, var(--warning, #f59e0b) 35%, transparent); line-height: 1.5; }
+.dm-warn .ovk-i { width: 20px; height: 20px; flex: none; margin-top: 1px; color: var(--warning-text, #f59e0b); }
+.dm-chart { margin: 12px 0 0; padding: 14px; border-radius: 16px; background: var(--bg-card, #0f1729); border: 1px solid var(--border, #1f2d47); }
+.dm-chart svg { display: block; width: 100%; height: auto; }
+.dm-line { fill: none; stroke-width: 2.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; stroke: var(--room-accent); }
+.dm-line.s1 { stroke: var(--text-secondary, #96a7c2); } .dm-line.s2 { stroke: var(--warning, #f59e0b); } .dm-line.s3 { stroke: var(--success, #22c55e); }
+.dm-chart figcaption { margin-top: 8px; font-size: .82rem; color: var(--text-muted, #7386a3); }
+.dm-timeline { list-style: none; margin: 0; padding: 0 0 0 16px; border-left: 2px solid color-mix(in srgb, var(--room-accent) 40%, transparent); display: grid; gap: 12px; }
+.dm-timeline li { position: relative; display: grid; gap: 2px; }
+.dm-timeline li::before { content: ""; position: absolute; left: -22px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--room-accent); }
+.dm-timeline time { font-size: .78rem; color: var(--text-muted, #7386a3); }
+.dm-chips { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
+.dm-chips a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border, #1f2d47); color: var(--text-primary, #e6edf7); text-decoration: none; font-weight: 600; font-size: .9rem; }
+
+/* Scenes on the home: the renewal trap drawn, and a 3-year total added up (real catalog numbers). */
+.dm-trap-fig { margin: 0; }
+.dm-bars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-items: end; height: 190px; }
+.dm-bar { position: relative; display: grid; grid-template-rows: 1fr auto auto; height: 100%; text-align: center; }
+.dm-bar span { align-self: end; height: var(--h); border-radius: 12px 12px 4px 4px; background: color-mix(in srgb, var(--warning, #f59e0b) 70%, transparent); }
+.dm-bar.is-first span { background: var(--room-accent); }
+.dm-bar b { margin-top: 8px; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
+.dm-bar small { font-size: .76rem; color: var(--text-muted, #7386a3); }
+.dm-trap-fig figcaption { margin-top: 14px; color: var(--text-secondary, #96a7c2); line-height: 1.5; }
+.dm-fig-tld { font-weight: 800; color: var(--room-strong); }
+html.ov-motion [data-ov-reveal] .dm-bar span { transform: scaleY(.02); transform-origin: bottom; transition: transform .9s cubic-bezier(.2, .8, .2, 1) .15s; }
+html.ov-motion [data-ov-reveal].is-in .dm-bar span { transform: none; }
+.dm-sum { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 14px; padding: 8px 0; }
+.dm-sum > div { display: grid; gap: 4px; padding: 14px 16px; border-radius: 14px; background: color-mix(in srgb, var(--room-accent) 8%, var(--bg-secondary, #101828)); text-align: center; min-width: 110px; }
+.dm-sum > div.is-total { background: var(--room-fill); color: var(--room-on); }
+.dm-sum small { font-size: .74rem; opacity: .8; }
+.dm-sum b { font-size: 1.35rem; font-variant-numeric: tabular-nums; }
+.dm-sum i { font-style: normal; font-size: 1.4rem; font-weight: 800; color: var(--text-muted, #7386a3); }
+@media (prefers-reduced-motion: reduce) { .dm-tile { transition: none; } html.ov-motion [data-ov-reveal] .dm-bar span { transform: none; transition: none; } }
+html[data-ov-motion=reduced] .dm-bar span { transform: none !important; transition: none !important; }
+
+/* The API page. */
+.dm-eps { display: grid; gap: 10px; margin: 12px 0 0; }
+.dm-eps > div { padding: 12px 14px; border-radius: 14px; background: var(--bg-card, #0f1729); border: 1px solid var(--border, #1f2d47); }
+.dm-eps dt code { font: 600 .92rem/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--room-strong); overflow-wrap: anywhere; }
+.dm-eps dd { margin: 6px 0 0; color: var(--text-secondary, #96a7c2); line-height: 1.5; }
new file mode 100644
new file mode 100644
@@ -0,0 +1,134 @@
@@ -0,0 +1,134 @@
+'use strict';
+
+/**
+ * OpenVibe.Domains — Express app factory.
+ *
+ * /, /search, /tld/:tld, /d/:domain the pages (http/pages.js)
+ * /api/v1/* the read-only JSON API (http/api.js)
+ * /api/health, /api/ready liveness and truthful readiness
+ * /release.json, /release-metrics the release manifest (openvibe-shared/release)
+ * /robots.txt, /sitemap.xml, /llms.txt crawl artifacts (http/discovery.js)
+ * /shared/* this service's own pinned Frame files
+ *
+ * No database, no sign-in, no Events: every request reads two public OpenVibe services through
+ * the cached clients in server/data/. The app factory takes them as options so tests can pass
+ * stubs instead of the network.
+ */
+const path = require('path');
+const express = require('express');
+const helmet = require('helmet');
+const rateLimit = require('express-rate-limit');
+const contracts = require('openvibe-contracts');
+const serve = require('openvibe-shared/serve');
+const releaseLib = require('openvibe-shared/release');
+const metricsLib = require('openvibe-shared/metrics');
+
+const configLib = require('./config');
+const { createHost } = require('./data/host');
+const { createTools } = require('./data/tools');
+const { createApi } = require('./http/api');
+const { createPageRoutes } = require('./http/pages');
+const { createServiceReadiness } = require('./observability');
+
+const VERSION = require('../package.json').version;
+
+/**
+ * opts: config, host, tools, fetchImpl, log, release
+ * `host` and `tools` are the two data clients; a test passes objects with the same methods.
+ */
+function createApp(opts = {}) {
+ const config = opts.config || configLib.load();
+ const log = opts.log || console;
+ const fetchImpl = opts.fetchImpl || globalThis.fetch;
+ const host = opts.host || createHost({ baseUrl: config.hostUrl, fetchImpl, log, timeoutMs: config.timeoutMs });
+ const tools = opts.tools || createTools({ baseUrl: config.toolsUrl, fetchImpl, log, timeoutMs: config.timeoutMs });
+
+ const release = opts.release || releaseLib.createRelease({ service: 'domains', root: path.join(__dirname, '..') });
+ const ctx = { config, host, tools, log, release };
+
+ const app = express();
+ app.disable('x-powered-by');
+ app.set('trust proxy', config.trustProxy);
+ app.locals.ctx = ctx;
+
+ // Golden-signal metrics on loopback, and the release manifest/collector. No telemetry sink:
+ // Help's request telemetry writes to its database, and this service has none.
+ const metrics = metricsLib.instrument(app, { service: 'domains', release: release.release });
+ app.locals.metrics = metrics.registry;
+ release.mount(app, { registry: metrics.registry });
+
+ app.get('/api/health', (_req, res) => res.json({ status: 'ok', service: 'openvibe-domains', version: VERSION }));
+ const readiness = createServiceReadiness({ host, tools, release: release.release });
+ app.get('/api/ready', readiness.handler);
+
+ app.use(contracts.http.middleware());
+ app.use(helmet({
+ contentSecurityPolicy: {
+ directives: {
+ defaultSrc: ["'self'"],
+ // The OpenVibe Frame (theme-loader, navbar, footer) comes from the Network; the inline init is ours.
+ scriptSrc: ["'self'", "'unsafe-inline'", 'https://openvibe.network', 'https://static.cloudflareinsights.com'],
+ styleSrc: ["'self'", "'unsafe-inline'", 'https://openvibe.network', 'https://fonts.googleapis.com', 'https://cdnjs.cloudflare.com'],
+ fontSrc: ["'self'", 'data:', 'https://fonts.gstatic.com', 'https://cdnjs.cloudflare.com'],
+ imgSrc: ["'self'", 'data:', 'https://openvibe.network', 'https://openvibe.media'],
+ connectSrc: ["'self'", 'https://openvibe.network', 'https://cloudflareinsights.com', 'https://openvibe.events'],
+ frameSrc: ["'self'", 'https://openvibe.network'],
+ frameAncestors: ["'none'"],
+ objectSrc: ["'none'"],
+ baseUri: ["'self'"],
+ formAction: ["'self'", 'https://openvibe.network'],
+ },
+ },
+ frameguard: { action: 'deny' },
+ crossOriginEmbedderPolicy: false,
+ crossOriginResourcePolicy: { policy: 'same-site' },
+ referrerPolicy: { policy: 'strict-origin-when-cross-origin' },
+ }));
+
+ // This service's own pinned copy of the Frame, and its stylesheet (content-hashed by the views: kept a year).
+ app.use('/shared', serve.handler());
+ app.use('/css', express.static(path.join(__dirname, '..', 'public', 'css'), { maxAge: '365d', immutable: true, fallthrough: false }));
+ require('./views').setRelease(release.release);
+
+ // One per-IP budget for the API and for a name query (120/min). The pages themselves are not limited here.
+ const limiter = rateLimit({
+ windowMs: 60_000,
+ limit: config.rateLimitPerMinute || 120,
+ standardHeaders: true,
+ legacyHeaders: false,
+ handler: (req, res) => {
+ res.set('Access-Control-Allow-Origin', '*').set('Cache-Control', 'no-store');
+ return contracts.http.sendProblem(res, 429, 'rate_limited', {
+ detail: 'too many requests from this address; retry shortly',
+ ctx: req.ov,
+ });
+ },
+ });
+ app.use('/api/v1', limiter);
+ app.use('/search', limiter);
+
+ // ── API ─────────────────────────────────────────────────
+ app.use('/api/v1', createApi(ctx));
+ app.use('/api', (req, res) => {
+ res.set('Cache-Control', 'no-store');
+ contracts.http.sendProblem(res, 404, 'route.not_found', { detail: 'No such API route.', ctx: req.ov });
+ });
+
+ // ── Pages ───────────────────────────────────────────────
+ app.use(createPageRoutes(ctx));
+
+ // eslint-disable-next-line no-unused-vars
+ app.use((err, req, res, _next) => {
+ // Never log request bodies.
+ log.error('[OpenVibe.Domains]', err && err.message ? err.message.slice(0, 300) : err);
+ if (res.headersSent) return;
+ res.set('Cache-Control', 'no-store');
+ if (err && err.type === 'entity.parse.failed') return contracts.http.sendProblem(res, 400, 'request.malformed_json', { ctx: req.ov });
+ if (req.path.startsWith('/api/')) return contracts.http.sendProblem(res, 500, 'internal.error', { detail: 'Internal error', ctx: req.ov });
+ return res.status(500).type('text/plain').send('Something went wrong on our side. Try again in a moment.');
+ });
+
+ return { app, ctx };
+}
+
+module.exports = { createApp };
new file mode 100644
new file mode 100644
@@ -0,0 +1,42 @@
@@ -0,0 +1,42 @@
+'use strict';
+
+/**
+ * OpenVibe.Domains configuration. Every value comes from the environment (production:
+ * /etc/openvibe/domains.env, see .env.example). load(env) is pure so tests can build a config
+ * without touching process.env.
+ */
+require('dotenv').config();
+
+const hostManifest = require('openvibe-contracts/manifests/services/host.json');
+const toolsManifest = require('openvibe-contracts/manifests/services/tools.json');
+
+const trim = (s) => String(s || '').replace(/\/+$/, '');
+const int = (v, def) => (Number.isFinite(parseInt(v, 10)) ? parseInt(v, 10) : def);
+
+function load(env = process.env) {
+ const nodeEnv = env.NODE_ENV || 'development';
+ const isProduction = nodeEnv === 'production';
+ const port = int(env.PORT, 5070);
+ const baseUrl = trim(env.BASE_URL || (isProduction ? 'https://openvibe.domains' : `http://localhost:${port}`));
+ const hostUrl = trim(env.OV_HOST_INTERNAL_URL || hostManifest.internalOrigin || 'http://127.0.0.1:4910');
+ const toolsUrl = trim(env.OV_TOOLS_INTERNAL_URL || toolsManifest.internalOrigin || 'https://openvibe.tools');
+
+ return {
+ service: 'domains',
+ name: 'OpenVibe.Domains',
+ port,
+ host: env.HOST || '127.0.0.1',
+ nodeEnv,
+ isProduction,
+ baseUrl,
+ trustProxy: env.TRUST_PROXY != null ? Number(env.TRUST_PROXY) : 2,
+ // The two OpenVibe services this front reads. Both are read-only, public data.
+ hostUrl,
+ toolsUrl,
+ // Per-IP budget for /api/v1 and /search (express-rate-limit, one window).
+ rateLimitPerMinute: Math.max(1, int(env.DOMAINS_RATE_LIMIT_PER_MIN, 120)),
+ timeoutMs: Math.max(100, int(env.DOMAINS_UPSTREAM_TIMEOUT_MS, 8000)),
+ };
+}
+
+module.exports = { load };
new file mode 100644
new file mode 100644
@@ -0,0 +1,67 @@
@@ -0,0 +1,67 @@
+'use strict';
+
+/**
+ * The small in-memory cache both data clients use: a Map with an expiry per entry and a hard cap,
+ * oldest insertion out. A process restart loses it; nothing here is persisted.
+ */
+const MAX = 2000;
+
+function createCache({ max = MAX, now = () => Date.now() } = {}) {
+ const entries = new Map();
+ return {
+ get(key) {
+ const hit = entries.get(key);
+ if (!hit) return undefined;
+ if (hit.expires <= now()) {
+ entries.delete(key);
+ return undefined;
+ }
+ return hit.value;
+ },
+ set(key, value, ttlMs) {
+ if (entries.has(key)) entries.delete(key);
+ else if (entries.size >= max) {
+ const oldest = entries.keys().next().value;
+ if (oldest !== undefined) entries.delete(oldest);
+ }
+ entries.set(key, { value, expires: now() + Math.max(0, Number(ttlMs) || 0) });
+ },
+ get size() { return entries.size; },
+ clear() { entries.clear(); },
+ };
+}
+
+/** GET a JSON document with an 8 s ceiling; throws on a non-2xx, a timeout or malformed JSON. */
+async function fetchJson(fetchImpl, url, { timeoutMs = 8000 } = {}) {
+ if (typeof fetchImpl !== 'function') throw new Error('fetch is not available');
+ const controller = new AbortController();
+ let timer;
+ const timeout = new Promise((_, reject) => {
+ timer = setTimeout(() => {
+ try { controller.abort(); } catch { /* already gone */ }
+ reject(new Error(`timed out after ${timeoutMs} ms`));
+ }, timeoutMs);
+ });
+ try {
+ const res = await Promise.race([
+ Promise.resolve().then(() => fetchImpl(url, { signal: controller.signal, headers: { accept: 'application/json' } })),
+ timeout,
+ ]);
+ if (!res || !res.ok) throw new Error(`HTTP ${res && res.status ? res.status : 'no response'}`);
+ let body;
+ if (typeof res.text === 'function') {
+ const text = await res.text();
+ if (text === undefined && typeof res.json === 'function') body = await res.json();
+ else body = typeof text === 'string' ? (text ? JSON.parse(text) : null) : text;
+ } else if (typeof res.json === 'function') {
+ body = await res.json();
+ } else {
+ throw new Error('the response had no body');
+ }
+ return body;
+ } finally {
+ clearTimeout(timer);
+ }
+}
+
+module.exports = { createCache, fetchJson };
new file mode 100644
new file mode 100644
@@ -0,0 +1,86 @@
@@ -0,0 +1,86 @@
+'use strict';
+
+/**
+ * OpenVibe.Host's price catalog (GET /api/v1/catalog/domains, .../check?name=, .../:tld).
+ * Read-only, cached briefly in this process, and never allowed to throw into a page: a failure is
+ * null and one short log line.
+ */
+const hostManifest = require('openvibe-contracts/manifests/services/host.json');
+const { createCache, fetchJson } = require('./cache');
+
+const DEFAULT_BASE = String(hostManifest.internalOrigin || 'http://127.0.0.1:4910').replace(/\/+$/, '');
+const CACHE_MS = {
+ list: 10 * 60_000,
+ tld: 10 * 60_000,
+ check: 2 * 60_000,
+};
+
+function createHost(opts = {}) {
+ const baseUrl = String(opts.baseUrl || DEFAULT_BASE).replace(/\/+$/, '');
+ const fetchImpl = opts.fetchImpl || globalThis.fetch;
+ const timeoutMs = Number(opts.timeoutMs) > 0 ? Number(opts.timeoutMs) : 8000;
+ const log = opts.log || console;
+ const now = typeof opts.now === 'function' ? opts.now : () => Date.now();
+ const cache = createCache({ now, max: opts.maxCacheEntries });
+ const ttl = (name) => {
+ const configured = opts.cacheMs && Number(opts.cacheMs[name]);
+ return configured >= 0 ? configured : CACHE_MS[name];
+ };
+
+ const fail = (what, err) => {
+ try { log.warn(`[domains] Host ${what} failed: ${String((err && err.message) || err).slice(0, 180)}`); } catch { /* logging must not throw */ }
+ };
+
+ async function read(key, ttlMs, url, what, { fresh = false } = {}) {
+ if (!fresh) {
+ const hit = cache.get(key);
+ if (hit !== undefined) return hit;
+ }
+ try {
+ const data = await fetchJson(fetchImpl, url, { timeoutMs });
+ cache.set(key, data, ttlMs);
+ return data;
+ } catch (err) {
+ fail(what, err);
+ return null;
+ }
+ }
+
+ /** GET /api/v1/catalog/domains — the host list as it answers it: { tlds, next_cursor }. */
+ async function tlds({ q, kind, sort, page, cursor, fresh = false } = {}) {
+ const params = new URLSearchParams();
+ if (q != null && q !== '') params.set('q', String(q));
+ if (kind != null && kind !== '') params.set('kind', String(kind));
+ if (sort != null && sort !== '') params.set('sort', String(sort));
+ if (cursor != null && cursor !== '') {
+ params.set('cursor', String(cursor));
+ } else if (page != null && page !== '' && Number(page) !== 1) {
+ const n = Number(page);
+ // The host pages by 100 with an opaque cursor; a numeric page maps to its offset.
+ params.set('cursor', Number.isSafeInteger(n) && n > 1 ? String((n - 1) * 100) : String(page));
+ }
+ const query = params.toString();
+ return read(`list:${query}`, ttl('list'), `${baseUrl}/api/v1/catalog/domains${query ? `?${query}` : ''}`, 'list', { fresh });
+ }
+
+ /** GET /api/v1/catalog/domains/:tld — one ending with every registrar's prices. */
+ async function tld(value) {
+ if (value == null || value === '') return null;
+ const key = `tld:${String(value)}`;
+ const body = await read(key, ttl('tld'), `${baseUrl}/api/v1/catalog/domains/${encodeURIComponent(String(value))}`, 'TLD');
+ return body && body.tld ? body.tld : null;
+ }
+
+ /** GET /api/v1/catalog/domains/check?name= — the registry answer and the popular endings' prices. */
+ async function check(name) {
+ if (name == null || name === '') return null;
+ const params = new URLSearchParams({ name: String(name) });
+ const key = `check:${String(name)}`;
+ const body = await read(key, ttl('check'), `${baseUrl}/api/v1/catalog/domains/check?${params}`, 'check');
+ return body && body.check ? body.check : null;
+ }
+
+ return { tlds, tld, check };
+}
+
+module.exports = { createHost, CACHE_MS, DEFAULT_BASE };
new file mode 100644
new file mode 100644
@@ -0,0 +1,65 @@
@@ -0,0 +1,65 @@
+'use strict';
+
+/**
+ * OpenVibe.Tools' public domain history (GET /api/v1/domains and /api/v1/domains/:domain): the
+ * snapshots of RDAP's public registration facts, what changed and how often a name was looked up.
+ * Read-only, cached for ten minutes, and never allowed to throw into a page.
+ */
+const toolsManifest = require('openvibe-contracts/manifests/services/tools.json');
+const { createCache, fetchJson } = require('./cache');
+
+const DEFAULT_BASE = String(toolsManifest.internalOrigin || 'https://openvibe.tools').replace(/\/+$/, '');
+const CACHE_MS = { history: 10 * 60_000, lists: 10 * 60_000 };
+
+function createTools(opts = {}) {
+ const baseUrl = String(opts.baseUrl || DEFAULT_BASE).replace(/\/+$/, '');
+ const fetchImpl = opts.fetchImpl || globalThis.fetch;
+ const timeoutMs = Number(opts.timeoutMs) > 0 ? Number(opts.timeoutMs) : 8000;
+ const log = opts.log || console;
+ const now = typeof opts.now === 'function' ? opts.now : () => Date.now();
+ const cache = createCache({ now, max: opts.maxCacheEntries });
+ const ttl = (name) => {
+ const configured = opts.cacheMs && Number(opts.cacheMs[name]);
+ return configured >= 0 ? configured : CACHE_MS[name];
+ };
+
+ const fail = (what, err) => {
+ try { log.warn(`[domains] Tools ${what} failed: ${String((err && err.message) || err).slice(0, 180)}`); } catch { /* logging must not throw */ }
+ };
+
+ async function read(key, ttlMs, url, what, { fresh = false } = {}) {
+ if (!fresh) {
+ const hit = cache.get(key);
+ if (hit !== undefined) return hit;
+ }
+ try {
+ const data = await fetchJson(fetchImpl, url, { timeoutMs });
+ cache.set(key, data, ttlMs);
+ return data;
+ } catch (err) {
+ fail(what, err);
+ return null;
+ }
+ }
+
+ /** GET /api/v1/domains/:domain — snapshots, changes, lookups and first_seen. */
+ async function history(domain) {
+ if (domain == null || domain === '') return null;
+ const name = String(domain).trim().toLowerCase().replace(/\.$/, '');
+ if (!name) return null;
+ return read(`history:${name}`, ttl('history'), `${baseUrl}/api/v1/domains/${encodeURIComponent(name)}`, 'history');
+ }
+
+ /** GET /api/v1/domains/ — the most looked up domains and those expiring within 60 days. */
+ async function lists({ limit, fresh = false } = {}) {
+ const params = new URLSearchParams();
+ const n = Number(limit);
+ if (Number.isFinite(n) && n > 0) params.set('limit', String(Math.min(100, Math.floor(n))));
+ const query = params.toString();
+ return read(`lists:${query}`, ttl('lists'), `${baseUrl}/api/v1/domains/${query ? `?${query}` : ''}`, 'lists', { fresh });
+ }
+
+ return { history, lists };
+}
+
+module.exports = { createTools, CACHE_MS, DEFAULT_BASE };
new file mode 100644
new file mode 100644
@@ -0,0 +1,83 @@
@@ -0,0 +1,83 @@
+'use strict';
+
+/**
+ * /api/v1 — the read-only JSON face of OpenVibe.Domains.
+ *
+ * GET /search?q= one name: { name, status, rows }
+ * GET /tlds?q=&kind=&sort=&page= OpenVibe.Host's list, as it answers it
+ * GET /tlds/:tld one ending: { tld }, rows priced like the page
+ * GET /domains/:domain { name, status, registrar, expires, history, prices }
+ *
+ * A bad name is 400 problem+json; an ending the catalog does not know is 404. Every GET is
+ * CORS-open and cached publicly for five minutes. No route writes anything.
+ */
+const contracts = require('openvibe-contracts');
+const { asyncRouter } = require('./router');
+const { parseName, parseTld } = require('../names');
+const { priceRows } = require('../pricing');
+
+const API_CACHE = 'public, max-age=300';
+
+function createApi(ctx) {
+ const { host, tools } = ctx;
+ const r = asyncRouter();
+ // The clients never throw; a stand-in that does answers like an upstream failure.
+ const safe = (fn) => Promise.resolve().then(fn).catch(() => null);
+
+ const problem = (req, res, status, code, detail) => {
+ res.set('Cache-Control', 'no-store');
+ return contracts.http.sendProblem(res, status, code, { detail, ctx: req.ov });
+ };
+
+ r.use((req, res, next) => {
+ if (req.method === 'GET' || req.method === 'HEAD') {
+ res.set('Access-Control-Allow-Origin', '*');
+ res.set('Cache-Control', API_CACHE);
+ }
+ next();
+ });
+
+ r.get('/search', async (req, res) => {
+ const q = typeof req.query.q === 'string' ? req.query.q.trim() : '';
+ const name = q ? parseName(q) : null;
+ if (!name) return problem(req, res, 400, 'domains.name.invalid', 'Type a domain name, such as sushi truck, example.com or münchen.de.');
+ const check = await safe(() => host.check(name.ascii));
+ const rows = check && Array.isArray(check.prices) ? priceRows(check.prices) : [];
+ return res.json({ name, status: check ? check.status : 'unknown', rows });
+ });
+
+ r.get('/tlds', async (req, res) => {
+ const query = {};
+ for (const key of ['q', 'kind', 'sort', 'page']) {
+ if (typeof req.query[key] === 'string' && req.query[key] !== '') query[key] = req.query[key];
+ }
+ const list = await safe(() => host.tlds(query));
+ if (!list) return problem(req, res, 502, 'domains.upstream.failed', 'OpenVibe.Host did not answer the price catalog.');
+ return res.json(list);
+ });
+
+ r.get('/tlds/:tld', async (req, res) => {
+ const tld = parseTld(req.params.tld);
+ if (!tld) return problem(req, res, 404, 'domains.tld.not_found', 'No such domain ending.');
+ const detail = await safe(() => host.tld(tld));
+ if (!detail) return problem(req, res, 404, 'domains.tld.not_found', `No registrar price is listed for .${tld}.`);
+ return res.json({ tld: { ...detail, prices: priceRows(detail.prices) } });
+ });
+
+ r.get('/domains/:domain', async (req, res) => {
+ const name = parseName(req.params.domain);
+ if (!name || !name.tld) return problem(req, res, 400, 'domains.name.invalid', 'Use a full domain name with an ending, such as example.com.');
+ const [history, check] = await Promise.all([safe(() => tools.history(name.ascii)), safe(() => host.check(name.ascii))]);
+ const rows = check && Array.isArray(check.prices) ? check.prices.filter((row) => row && row.tld === name.tld) : [];
+ // status, registrar and expires sit at the top so a watch can follow one field (OpenVibe.Watch's value_path=status).
+ return res.json({
+ name, status: check ? check.status : 'unknown', registrar: check && check.registrar ? check.registrar : null,
+ expires: check && check.expires ? check.expires : null, history, prices: priceRows(rows),
+ });
+ });
+
+ r.use((req, res) => problem(req, res, 404, 'route.not_found', 'No such API route.'));
+ return r;
+}
+
+module.exports = { createApi, API_CACHE };
new file mode 100644
new file mode 100644
@@ -0,0 +1,115 @@
@@ -0,0 +1,115 @@
+'use strict';
+
+/**
+ * Crawl artifacts, built with openvibe-shared/seo: robots.txt (allow everything, name the sitemap),
+ * sitemap.xml (the home page and one page per ending in every page of the Host catalog) and
+ * llms.txt (what the site is, its pages and its API). The sitemap's lastmod is the release's
+ * released_at, never the clock.
+ */
+const seo = require('openvibe-shared/seo');
+const { asyncRouter } = require('./router');
+
+const SITE_NAME = 'OpenVibe.Domains';
+const TEXT_CACHE = 'public, max-age=3600';
+const MAX_PAGES = 60;
+
+function releaseDay(release) {
+ try {
+ const full = release && typeof release.full === 'function' ? release.full() : release;
+ const m = String((full && full.released_at) || '').match(/^(\d{4}-\d{2}-\d{2})/);
+ return m ? m[1] : null;
+ } catch {
+ return null;
+ }
+}
+
+/** Every ending the catalog lists, across its cursor pages; a failed page just ends the walk. */
+async function everyEnding(host) {
+ const seen = new Map();
+ let page = 1;
+ let cursor = null;
+ let lastToken = null;
+ for (let walked = 0; walked < MAX_PAGES; walked++) {
+ const query = cursor ? { sort: 'popular', cursor }
+ : (page > 1 ? { sort: 'popular', page } : { sort: 'popular' });
+ let list = null;
+ try { list = await host.tlds(query); } catch { break; }
+ if (!list || !Array.isArray(list.tlds)) break;
+ for (const t of list.tlds) {
+ if (t && typeof t.tld === 'string' && t.tld && !seen.has(t.tld)) seen.set(t.tld, t);
+ }
+ if (!list.next_cursor) break;
+ const token = String(list.next_cursor);
+ if (token === lastToken) break;
+ lastToken = token;
+ // The host pages by 100 and answers an offset cursor. A stand-in may answer a page number;
+ // both are read here, and anything else is passed straight back as a cursor.
+ const next = Number(token);
+ if (Number.isSafeInteger(next) && next > 0) {
+ if (next <= MAX_PAGES) { page = next; cursor = null; }
+ else if (next % 100 === 0) { page = next / 100 + 1; cursor = null; }
+ else { cursor = token; page += 1; }
+ } else {
+ cursor = token;
+ page += 1;
+ }
+ }
+ return [...seen.values()];
+}
+
+function createDiscoveryRoutes(ctx) {
+ const { config, host, release } = ctx;
+ const r = asyncRouter();
+ const site = String(config.baseUrl).replace(/\/+$/, '');
+ const abs = (path) => `${site}${path}`;
+
+ r.get('/robots.txt', (_req, res) => {
+ res.type('text/plain').set('Cache-Control', TEXT_CACHE).send(seo.robotsTxt({
+ sitemaps: [abs('/sitemap.xml')],
+ allow: ['/'],
+ disallow: [],
+ }));
+ });
+
+ r.get('/sitemap.xml', async (_req, res) => {
+ const lastmod = releaseDay(release);
+ const endings = await everyEnding(host);
+ const urls = [
+ { loc: abs('/'), ...(lastmod ? { lastmod } : {}), changefreq: 'daily', priority: 1.0 },
+ ...endings.map((t) => ({ loc: abs(`/tld/${encodeURIComponent(t.tld)}`), ...(lastmod ? { lastmod } : {}), changefreq: 'weekly', priority: 0.8 })),
+ ];
+ res.type('application/xml').set('Cache-Control', TEXT_CACHE).send(seo.sitemapXml(urls));
+ });
+
+ r.get('/llms.txt', (_req, res) => {
+ res.type('text/plain').set('Cache-Control', TEXT_CACHE).send(seo.llmsTxt({
+ name: SITE_NAME,
+ summary: 'OpenVibe.Domains is a stateless front over OpenVibe.Host\'s price catalog and OpenVibe.Tools\' public domain history: for a name, whether it is registered and every registrar\'s one-, three- and five-year totals; for an ending, every registrar\'s prices; for a domain, its public registration facts over time.',
+ details: 'There is no account, no database and no event stream. Every page is server-rendered and readable without JavaScript. USD is compared; other currencies are kept after it and marked. A renewal trap marks a cheap first year whose renewal is the real price.',
+ sections: [
+ { title: 'Pages', links: [
+ { title: 'Every ending', url: abs('/'), note: 'the price catalog, popular endings first' },
+ { title: 'Check a name', url: abs('/search?q=example.com'), note: 'registry status and registrar totals; noindex' },
+ { title: 'One ending', url: abs('/tld/dev'), note: 'every registrar\'s first year, three years and five years' },
+ { title: 'One domain', url: abs('/d/example.com'), note: 'public history from OpenVibe.Tools and its ending\'s prices' },
+ ] },
+ { title: 'API', links: [
+ { title: 'Search a name (JSON)', url: abs('/api/v1/search?q=example.com') },
+ { title: 'Every ending (JSON)', url: abs('/api/v1/tlds?sort=popular') },
+ { title: 'One ending (JSON)', url: abs('/api/v1/tlds/dev') },
+ { title: 'One domain (JSON)', url: abs('/api/v1/domains/example.com') },
+ { title: 'Sitemap', url: abs('/sitemap.xml') },
+ { title: 'Release metadata', url: abs('/release.json') },
+ ] },
+ { title: 'The data it reads', links: [
+ { title: 'OpenVibe.Host domain prices', url: 'https://openvibe.host/catalog/domains', note: 'the catalog and the registry name check' },
+ { title: 'OpenVibe.Tools domain history', url: 'https://openvibe.tools/network/whois', note: 'RDAP\'s public facts, kept over time' },
+ ] },
+ ],
+ }));
+ });
+
+ return r;
+}
+
+module.exports = { createDiscoveryRoutes, everyEnding, releaseDay, SITE_NAME };
new file mode 100644
new file mode 100644
@@ -0,0 +1,101 @@
@@ -0,0 +1,101 @@
+'use strict';
+
+/**
+ * Public pages:
+ * / the endings and OpenVibe.Tools' public lists
+ * /search?q= one name: registry status and every registrar's totals (noindex)
+ * /tld/:tld one ending and every registrar's prices
+ * /.:tld 301 to /tld/:tld
+ * /d/:domain one domain's public history and its ending's prices
+ *
+ * Every page is server-rendered, complete without JavaScript and cached for a short public window
+ * (five minutes, two for a name query). The views are placeholders; this file builds the model.
+ */
+const views = require('../views');
+const { parseName, parseTld } = require('../names');
+const { priceRows } = require('../pricing');
+const { asyncRouter } = require('./router');
+const { createDiscoveryRoutes } = require('./discovery');
+
+const PAGE_CACHE = 'public, max-age=300';
+const QUERY_CACHE = 'public, max-age=120';
+
+function createPageRoutes(ctx) {
+ const { config, host, tools } = ctx;
+ const r = asyncRouter();
+ const site = () => String(config.baseUrl).replace(/\/+$/, '');
+ const abs = (path) => `${site()}${path}`;
+ // The clients never throw; this keeps a misbehaving stand-in from turning a page into a 500.
+ const safe = (fn) => Promise.resolve().then(fn).catch(() => null);
+
+ const send = (res, status, body, cache = PAGE_CACHE) => {
+ res.status(status).set('Cache-Control', cache).type('html').send(body);
+ };
+ const notFound = (res) => send(res, 404, views.notFound());
+
+ r.get('/', async (_req, res) => {
+ const [endings, lists] = await Promise.all([
+ safe(() => host.tlds({ sort: 'popular' })),
+ safe(() => tools.lists({ limit: 10 })),
+ ]);
+ send(res, 200, views.home({ endings, lists, canonical: abs('/') }));
+ });
+
+ r.get('/search', async (req, res) => {
+ const q = typeof req.query.q === 'string' ? req.query.q.trim() : '';
+ const name = q ? parseName(q) : null;
+ if (!name) return res.redirect(302, '/');
+ const check = await safe(() => host.check(name.ascii));
+ const rows = check && Array.isArray(check.prices) ? priceRows(check.prices) : [];
+ return send(res, 200, views.search({
+ name, check, rows,
+ available: check ? check.status : 'unknown',
+ canonical: abs('/search'),
+ }), QUERY_CACHE);
+ });
+
+ r.get('/tld/:tld', async (req, res) => {
+ const tld = parseTld(req.params.tld);
+ if (!tld) return notFound(res);
+ const detail = await safe(() => host.tld(tld));
+ if (!detail) return notFound(res);
+ const priced = { ...detail, prices: priceRows(detail.prices) };
+ return send(res, 200, views.tld({ tld: priced, canonical: abs(`/tld/${encodeURIComponent(tld)}`) }));
+ });
+
+ r.get('/tld', async (_req, res) => {
+ const endings = await host.tlds({ sort: 'renew' });
+ send(res, 200, views.endings({ endings, canonical: abs('/tld') }));
+ });
+
+ r.get('/developers', (_req, res) => send(res, 200, views.developers({ canonical: abs('/developers') })));
+
+ // A person who types "/.dev" gets the ending page. The ending is normalized in one 301.
+ r.get(/^\/\.([^/]+)$/, (req, res) => {
+ const tld = parseTld(req.params[0]);
+ if (!tld) return notFound(res);
+ res.set('Cache-Control', PAGE_CACHE);
+ return res.redirect(301, `/tld/${encodeURIComponent(tld)}`);
+ });
+
+ r.get('/d/:domain', async (req, res) => {
+ const name = parseName(req.params.domain);
+ if (!name || !name.tld) return notFound(res);
+ const [history, check] = await Promise.all([
+ safe(() => tools.history(name.ascii)),
+ safe(() => host.check(name.ascii)),
+ ]);
+ const rows = check && Array.isArray(check.prices) ? check.prices.filter((row) => row && row.tld === name.tld) : [];
+ return send(res, 200, views.domain({
+ name, history, prices: priceRows(rows), status: check ? check.status : null, check,
+ canonical: abs(`/d/${encodeURIComponent(name.ascii)}`),
+ }), QUERY_CACHE);
+ });
+
+ r.use(createDiscoveryRoutes(ctx));
+
+ r.use((_req, res) => notFound(res));
+ return r;
+}
+
+module.exports = { createPageRoutes, PAGE_CACHE, QUERY_CACHE };
new file mode 100644
new file mode 100644
@@ -0,0 +1,23 @@
@@ -0,0 +1,23 @@
+'use strict';
+
+/**
+ * express.Router() whose get/post handlers may be async: a rejected promise goes to next(err)
+ * instead of becoming an unhandled rejection. (The same helper OpenVibe.Help carries.)
+ */
+const express = require('express');
+
+function asyncRouter() {
+ const r = express.Router();
+ for (const method of ['get', 'post']) {
+ const orig = r[method].bind(r);
+ r[method] = (path, ...handlers) => orig(path, ...handlers.map((h) => (h.length === 4 ? h : (req, res, next) => {
+ try {
+ const out = h(req, res, next);
+ if (out && typeof out.catch === 'function') out.catch(next);
+ } catch (err) { next(err); }
+ })));
+ }
+ return r;
+}
+
+module.exports = { asyncRouter };
new file mode 100644
new file mode 100644
@@ -0,0 +1,44 @@
@@ -0,0 +1,44 @@
+'use strict';
+
+/**
+ * OpenVibe.Domains — process entry. `node server/index.js` listens on PORT (5070) behind nginx
+ * (deploy/). Stateless: nothing to close but the HTTP server.
+ */
+const { createApp } = require('./app');
+const { gracefulStop } = require('openvibe-sdk/service');
+
+/**
+ * The process stop (openvibe-sdk/service): stop taking connections, drain the requests in
+ * flight, exit. Exported so a test can inject `exit` and `signals: false`.
+ */
+function createLifecycle({ server, ctx, exit, signals } = {}) {
+ return gracefulStop({
+ name: 'OpenVibe.Domains',
+ server,
+ deadlineExitCode: 0,
+ exit,
+ signals,
+ deadlineMs: 10_000,
+ close: [],
+ });
+}
+
+async function start() {
+ const { app, ctx } = await createApp();
+ const { config } = ctx;
+ const server = app.listen(config.port, config.host, () => {
+ console.log(`[OpenVibe.Domains] ${config.nodeEnv} on http://${config.host}:${config.port} → ${config.baseUrl} (host ${config.hostUrl}, tools ${config.toolsUrl})`);
+ });
+ server.keepAliveTimeout = 65_000;
+ createLifecycle({ server, ctx });
+ return { server, ctx };
+}
+
+if (require.main === module) {
+ start().catch((err) => {
+ console.error('[OpenVibe.Domains] failed to start:', err);
+ process.exit(1);
+ });
+}
+
+module.exports = { start, createLifecycle };
new file mode 100644
new file mode 100644
@@ -0,0 +1,78 @@
@@ -0,0 +1,78 @@
+'use strict';
+
+/**
+ * Read a name the way a person types it. A name is a label and an optional ending: "sushi truck",
+ * "SushiTruck.com", "https://www.sushitruck.co.uk/x" and "münchen.de" all have one.
+ *
+ * parseName(input) -> { label, tld, ascii, display } | null
+ * label the first label, ASCII (punycode for IDNs), 1-63 characters of [a-z0-9-]
+ * tld everything after the first dot ("co.uk" stays "co.uk"), or null
+ * ascii the full name in ASCII (punycode when needed), or just the label when there is no tld
+ * display the Unicode form for people
+ *
+ * parseTld(input) -> the ending without a leading dot (".Dev" -> "dev", "co.uk"), or null.
+ */
+const url = require('url');
+
+/** Components are 1-63 characters, lower-case ASCII letters, digits and hyphens, no edge hyphen. */
+const LABEL_RE = /^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/;
+
+function validAscii(name) {
+ if (!name || name.length > 253) return false;
+ const parts = name.split('.');
+ if (parts.length < 1 || parts.length > 127) return false;
+ return parts.every((p) => p.length >= 1 && p.length <= 63 && LABEL_RE.test(p));
+}
+
+/** Drop a scheme, credentials, path, query, fragment, port, a leading www. and a trailing root dot. */
+function hostPart(input) {
+ if (typeof input !== 'string') return '';
+ let s = input.trim().toLowerCase();
+ if (!s) return '';
+ s = s.replace(/^[a-z][a-z0-9+.-]*:\/\//i, '');
+ // A user:password@ is not part of a name; leave it to fail validation rather than guessing.
+ s = s.split(/[/?#]/, 1)[0];
+ s = s.replace(/:\d+$/, '');
+ s = s.replace(/^www\./, '');
+ s = s.replace(/\.+$/, '');
+ return s;
+}
+
+function toAscii(name) {
+ try {
+ return url.domainToASCII(name);
+ } catch {
+ return '';
+ }
+}
+
+function parseName(input) {
+ const raw = hostPart(input);
+ if (!raw) return null;
+
+ const dot = raw.indexOf('.');
+ const labelRaw = (dot === -1 ? raw : raw.slice(0, dot)).replace(/[\s_]/g, '');
+ const tldRaw = dot === -1 ? '' : raw.slice(dot + 1);
+
+ // Spaces and underscores are removed from the label only; an ending is validated as typed.
+ if (!labelRaw) return null;
+ const nameRaw = tldRaw ? `${labelRaw}.${tldRaw}` : labelRaw;
+ const ascii = toAscii(nameRaw);
+ if (!ascii || !validAscii(ascii)) return null;
+
+ const parts = ascii.split('.');
+ const tld = parts.length > 1 ? parts.slice(1).join('.') : null;
+ const display = url.domainToUnicode(ascii) || ascii;
+ return { label: parts[0], tld, ascii, display };
+}
+
+function parseTld(input) {
+ if (typeof input !== 'string') return null;
+ const s = hostPart(input).replace(/^\.+/, '');
+ if (!s) return null;
+ const ascii = toAscii(s);
+ if (!ascii || !validAscii(ascii)) return null;
+ return ascii;
+}
+
+module.exports = { parseName, parseTld };
new file mode 100644
new file mode 100644
@@ -0,0 +1,38 @@
@@ -0,0 +1,38 @@
+'use strict';
+
+/**
+ * Truthful readiness for GET /api/ready (openvibe-shared/ready). There is no database and no
+ * session store: the only dependencies are the two public services this front reads.
+ *
+ * Both checks are optional. If OpenVibe.Host or OpenVibe.Tools does not answer, the process is
+ * still serving (there is a page, even if it says the upstream failed), so the answer is 200 with
+ * status "degraded" — never 503. A failed check is named in `degraded`.
+ */
+const { createReadiness } = require('openvibe-shared/ready');
+
+function createServiceReadiness({ host, tools, release = null }) {
+ return createReadiness({
+ service: 'domains',
+ release,
+ checks: [
+ {
+ name: 'host',
+ required: false,
+ check: async () => {
+ const list = await host.tlds({ sort: 'popular', fresh: true });
+ return list ? true : 'OpenVibe.Host did not answer';
+ },
+ },
+ {
+ name: 'tools',
+ required: false,
+ check: async () => {
+ const lists = await tools.lists({ limit: 1, fresh: true });
+ return lists ? true : 'OpenVibe.Tools did not answer';
+ },
+ },
+ ],
+ });
+}
+
+module.exports = { createServiceReadiness };
new file mode 100644
new file mode 100644
@@ -0,0 +1,58 @@
@@ -0,0 +1,58 @@
+'use strict';
+
+/**
+ * Price rows from OpenVibe.Host's catalog (register, renew, transfer, five_year, registrars,
+ * currency, checked_at, tld, display, kind) into what a visitor compares:
+ *
+ * y1 first year = register
+ * y3 three years = register + 2 * renew
+ * y5 five years = the catalog's five_year when it has one,
+ * else register + 4 * renew
+ * trap renew >= 2 * register and renew - register >= 5: the cheap first year whose
+ * renewal is the real price
+ *
+ * Only USD rows are compared; other currencies are kept after them and flagged
+ * `currency_other: true`. Sorted by y3 ascending, rows without a y3 last, stable otherwise.
+ * Every money value is rounded to cents.
+ */
+
+const num = (v) => {
+ if (v == null || v === '') return null;
+ const n = Number(v);
+ return Number.isFinite(n) ? n : null;
+};
+// A tiny half-cent nudge absorbs binary floating point (1.005 + 2 * 2.005 is 5.014999… in IEEE
+// 754, but a registrar's decimal total is 5.015, and money rounds half up).
+const cents = (n) => Math.round((n + 1e-9) * 100) / 100;
+
+function priceRows(rows) {
+ const list = (Array.isArray(rows) ? rows : []).map((row, index) => {
+ const r = row && typeof row === 'object' ? row : {};
+ const register = num(r.register);
+ const renew = num(r.renew);
+ const fiveYear = num(r.five_year);
+ const y1 = register == null ? null : cents(register);
+ const y3 = register == null || renew == null ? null : cents(register + 2 * renew);
+ const y5 = fiveYear != null ? cents(fiveYear)
+ : (register == null || renew == null ? null : cents(register + 4 * renew));
+ const trap = register != null && renew != null && renew >= 2 * register && renew - register >= 5;
+ const out = { ...r, y1, y3, y5, trap, _index: index };
+ // Only the rows that are not compared carry the flag; a USD row is the normal case.
+ if (r.currency !== 'USD') out.currency_other = true;
+ return out;
+ });
+
+ list.sort((a, b) => {
+ // USD first. Only USD rows are compared on y3; other currencies keep the host's order after them.
+ if (a.currency_other !== b.currency_other) return a.currency_other ? 1 : -1;
+ if (a.currency_other) return a._index - b._index;
+ const ay = a.y3 == null ? Infinity : a.y3;
+ const by = b.y3 == null ? Infinity : b.y3;
+ if (ay !== by) return ay < by ? -1 : 1;
+ return a._index - b._index;
+ });
+
+ return list.map(({ _index, ...row }) => row);
+}
+
+module.exports = { priceRows };
new file mode 100644
new file mode 100644
@@ -0,0 +1,310 @@
@@ -0,0 +1,310 @@
+'use strict';
+/**
+ * The Domains room's pages (plan 2026-10-28 §5.1). Server-rendered and whole without JavaScript; the Frame (navbar,
+ * theme, footer) comes from openvibe-shared/shell, the room's front door from sc.room() and its accent from rooms.js.
+ * server/http/pages.js builds each model from OpenVibe.Host's price catalog and OpenVibe.Tools' history; nothing here
+ * invents a number: a price, a total or a date is shown only when the catalog has it, with where and when it came from.
+ *
+ * home({ endings, lists, canonical }) endings: the catalog's list ({ tlds: [...] }) or null
+ * endings({ endings, canonical }) every ending, cheapest to keep first
+ * search({ name, check, rows, available, canonical })
+ * tld({ tld, canonical }) tld: the catalog's ending with priced registrar rows
+ * domain({ name, history, prices, status, canonical })
+ * notFound()
+ */
+const crypto = require('crypto');
+const fs = require('fs');
+const path = require('path');
+const shell = require('openvibe-shared/shell');
+const ovServe = require('openvibe-shared/serve');
+const appIcon = require('openvibe-shared/app-icon');
+const kit = require('openvibe-shared/kit');
+const sc = require('openvibe-shared/showcase');
+const rooms = require('openvibe-shared/rooms');
+const { priceRows } = require('../pricing');
+
+const NAME = 'OpenVibe.Domains';
+const NETWORK = 'https://openvibe.network';
+const ROOM = rooms.get('domains');
+const esc = kit.esc;
+const PUBLIC = path.join(__dirname, '..', '..', 'public');
+
+const hashes = new Map();
+function asset(rel) {
+ if (!hashes.has(rel)) {
+ let v = 'dev';
+ try { v = crypto.createHash('sha256').update(fs.readFileSync(path.join(PUBLIC, rel))).digest('hex').slice(0, 10); } catch { /* missing in a test */ }
+ hashes.set(rel, v);
+ }
+ return `/${rel}?v=${hashes.get(rel)}`;
+}
+
+let RELEASE = 'dev';
+function setRelease(id) { if (id) RELEASE = String(id); }
+
+// Money as people read it: $9.20, $1,240; a null is a dash (never 0).
+const money = (n, cur = 'USD') => (n == null || !Number.isFinite(Number(n)) ? '—' : cur === 'USD'
+ ? `$${Number(n).toLocaleString('en-US', { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`
+ : `${Number(n).toLocaleString('en-US', { minimumFractionDigits: 2, maximumFractionDigits: 2 })} ${esc(cur)}`);
+const day = (iso) => { const t = Date.parse(iso || ''); return Number.isFinite(t) ? new Date(t).toLocaleDateString('en-US', { month: 'short', day: 'numeric', year: 'numeric', timeZone: 'UTC' }) : ''; };
+const dot = (tld) => `.${String(tld || '').replace(/^\./, '')}`;
+const tldHref = (tld) => `/tld/${encodeURIComponent(String(tld).replace(/^\./, ''))}`;
+const latest = (rows) => rows.map((r) => r.checked_at).filter(Boolean).sort().pop() || null;
+
+const NAV = [
+ { label: 'Price a name', href: '/', icon: 'fa-magnifying-glass-dollar' },
+ { label: 'Every ending', href: '/tld', icon: 'fa-list' },
+ { label: 'API', href: '/developers', icon: 'fa-code', more: true },
+];
+
+/** The page around a body: the shared shell with the room's stylesheets and behaviour. */
+function layout({ title, description, canonical, robots = 'index, follow', body, active = '/', jsonLd = [] }) {
+ const navbar = {
+ service: 'domains',
+ apiBase: NETWORK,
+ links: NAV.map((l) => ({ ...l, active: l.href === active })),
+ appBar: [{ label: 'Price', href: '/', icon: 'fa-magnifying-glass-dollar' }, { label: 'Endings', href: '/tld', icon: 'fa-list' }],
+ search: { page: '/search', label: NAME },
+ history: { type: 'page', title: title || NAME },
+ };
+ const footer = { service: 'domains', variant: 'full', mount: '#ov-footer', brandName: NAME };
+ return shell.page({
+ name: NAME,
+ lang: 'en',
+ title: title || `${NAME}: ${ROOM.line}`,
+ titleSuffix: title ? ` · ${NAME}` : '',
+ siteName: NAME,
+ description: description || `${ROOM.line}. Every ending and registrar for a name, with what you will really pay over 1, 3 and 5 years.`,
+ canonical,
+ robots,
+ jsonLd,
+ home: '/',
+ navLinks: NAV,
+ navbar,
+ footer,
+ head: `${appIcon.headTags({ site: 'domains' })}
+<link rel="stylesheet" href="${esc(ovServe.url('kit.css'))}">
+<link rel="stylesheet" href="${esc(ovServe.url('room.css'))}">
+<link rel="stylesheet" href="${esc(ovServe.url('showcase.css'))}">
+<link rel="stylesheet" href="${asset('css/domains.css')}">
+<script src="${esc(ovServe.url('kit-web.js'))}" defer></script>
+<script src="${esc(ovServe.url('motion.js'))}" defer></script>
+<meta name="ov-boost" content="domains@${esc(RELEASE)}">`,
+ body: `<a class="skip" href="#main">Skip to content</a>
+<div id="navbar-mount"></div>
+<main id="main" class="dm ov-room" style="${rooms.style('domains')}">${body}</main>
+<script>window.__OV_PAGE = ${JSON.stringify({ navbar, footer }).replace(/</g, '\\u003c')};
+document.addEventListener('DOMContentLoaded', function () { try { if (window.OpenVibeFooter) OpenVibeFooter.init(window.__OV_PAGE.footer); } catch (e) { /* optional */ } });</script>`,
+ });
+}
+
+/** The box that prices a name (the home's is the room hero's; every other page has this one). */
+const searchBox = (value = '') => `<form class="dm-box" role="search" method="get" action="/search"><label class="sc-sr" for="dm-q">A name to price</label>`
+ + `<input id="dm-q" type="search" name="q" value="${esc(value)}" placeholder="Price a name, like sushitruck" autocomplete="off" spellcheck="false" enterkeyhint="search" maxlength="253">`
+ + `<button type="submit" aria-label="Price it">${kit.icon('forward')}</button></form>`;
+
+/** One ending as a tile on the board: the ending, the first year, what three years really cost, a trap warning. */
+function tile(r) {
+ return `<li><a class="dm-tile${r.trap ? ' is-trap' : ''}" href="${tldHref(r.tld)}"><span class="dm-tile-tld">${esc(r.display || dot(r.tld))}</span>`
+ + `<span class="dm-tile-y3"><b>${money(r.y3, r.currency)}</b><small>3 years</small></span>`
+ + `<span class="dm-tile-y1">${money(r.y1, r.currency)} first year</span>`
+ + `${r.trap ? `<span class="dm-trap">Renews at ${money(Number(r.renew), r.currency)}</span>` : r.registrars > 1 ? `<span class="dm-tile-n">${Number(r.registrars)} registrars</span>` : ''}</a></li>`;
+}
+
+/** A renewal trap drawn: the first year beside each renewal, with the 3-year total (real numbers from the catalog). */
+function trapPicture(r) {
+ const max = Math.max(Number(r.register), Number(r.renew));
+ const bar = (v, label, cls) => `<div class="dm-bar ${cls}"><span style="--h:${Math.max(6, Math.round((Number(v) / max) * 100))}%"></span><b>${money(v, r.currency)}</b><small>${label}</small></div>`;
+ return `<figure class="dm-trap-fig" aria-label="${esc(`${r.display || dot(r.tld)}: ${money(r.y1)} the first year, then ${money(Number(r.renew))} a year`)}">`
+ + `<div class="dm-bars">${bar(r.register, 'Year 1', 'is-first')}${bar(r.renew, 'Year 2', '')}${bar(r.renew, 'Year 3', '')}</div>`
+ + `<figcaption><span class="dm-fig-tld">${esc(r.display || dot(r.tld))}</span> looks like ${money(r.y1, r.currency)}. Three years cost <b>${money(r.y3, r.currency)}</b>.</figcaption></figure>`;
+}
+
+/** How a 3-year total is made, with one ending's real prices. */
+function totalPicture(r) {
+ return `<div class="dm-sum" aria-label="${esc(`How three years of ${r.display || dot(r.tld)} add up`)}">`
+ + `<div><small>First year</small><b>${money(r.y1, r.currency)}</b></div><i aria-hidden="true">+</i>`
+ + `<div><small>2 renewals</small><b>${money(2 * Number(r.renew), r.currency)}</b></div><i aria-hidden="true">=</i>`
+ + `<div class="is-total"><small>${esc(r.display || dot(r.tld))} for 3 years</small><b>${money(r.y3, r.currency)}</b></div></div>`;
+}
+
+function home({ endings, lists } = {}) {
+ // The home's board shows the endings people mean (generic and country codes), not second-level ones like
+ // augustow.pl or punycode endings, which are on /tld.
+ const rows = priceRows((endings && endings.tlds) || []).filter((r) => !r.currency_other && r.y3 != null && !String(r.tld).includes('.') && !/^xn--/.test(String(r.tld)));
+ const all = priceRows((endings && endings.tlds) || []);
+ const registrars = rows.reduce((m, r) => Math.max(m, Number(r.registrars) || 0), 0);
+ const checked = latest(rows);
+ const popular = ['com', 'dev', 'ai', 'io', 'app', 'net', 'org', 'co'].map((t) => rows.find((r) => r.tld === t)).filter(Boolean).slice(0, 5);
+ const trap = rows.filter((r) => r.trap).sort((a, b) => (Number(b.renew) / Number(b.register)) - (Number(a.renew) / Number(a.register)))[0];
+ const com = rows.find((r) => r.tld === 'com') || rows[0];
+ const board = rows.length ? `<section class="dm-board-sec" aria-labelledby="dm-board-h"><div class="dm-head-row"><h2 id="dm-board-h">Cheapest to keep</h2><a class="dm-more" href="/tld">Every ending${kit.icon('chevron')}</a></div>`
+ + `<p class="dm-fine">Sorted by what three years really cost, not the first-year price.${checked ? ` Prices checked ${esc(day(checked))}.` : ''}</p>`
+ + `<ul class="dm-board">${rows.slice(0, 12).map(tile).join('')}</ul></section>` : '';
+ const looked = lists && Array.isArray(lists.most_looked_up) ? lists.most_looked_up.slice(0, 8) : [];
+ const lookedHTML = looked.length ? `<section class="dm-looked" aria-labelledby="dm-looked-h"><h2 id="dm-looked-h">Looked up most</h2><ul class="dm-chips">${looked.map((d) => `<li><a href="/d/${encodeURIComponent(d.domain || d.name || '')}">${esc(d.domain || d.name || '')}</a></li>`).join('')}</ul></section>` : '';
+ const body = sc.room({
+ room: 'domains',
+ hero: {
+ title: ROOM.line,
+ lede: 'Type a name. See every ending and every registrar, with what you will really pay over one, three and five years, and the renewal traps flagged.',
+ search: { action: '/search', name: 'q', placeholder: 'Price a name, like sushitruck', label: 'A name to price', button: 'Price it', hints: ['sushitruck', 'mybrand.dev', 'cozy cafe', 'pixel.studio'] },
+ chips: popular.map((r) => ({ label: r.display || dot(r.tld), href: tldHref(r.tld) })),
+ },
+ proof: [
+ { value: all.length, label: all.length === 1 ? 'ending priced' : 'endings priced', asOf: checked ? day(checked) : null },
+ { value: registrars, label: registrars === 1 ? 'registrar compared' : 'registrars compared' },
+ ].filter((p) => p.value),
+ html: board + lookedHTML,
+ scenes: [
+ trap ? { title: 'The renewal trap, in plain sight', text: `A cheap first year is how many endings are sold. ${trap.display || dot(trap.tld)} starts at ${money(trap.y1)} and renews at ${money(Number(trap.renew))}: every page here sorts by what you keep paying.`, html: trapPicture(trap), action: { href: tldHref(trap.tld), label: `See ${trap.display || dot(trap.tld)}` } } : null,
+ com ? { title: 'One honest number: three years', text: 'The first year plus two renewals, from each registrar\'s own public price list, with the date it was read. Five years is on every page too.', html: totalPicture(com), action: { href: tldHref(com.tld), label: `Every registrar for ${com.display || dot(com.tld)}` } } : null,
+ ].filter(Boolean),
+ explore: { title: 'More on Domains', items: [
+ { title: 'Every ending', text: 'All the endings OpenVibe prices, cheapest to keep first', href: '/tld', icon: 'ov:dns' },
+ { title: 'Look up a domain', text: 'Its public record: registrar, dates and how they changed', href: '/d/openvibe.live', icon: 'ov:history' },
+ { title: 'Hosting prices', text: 'Servers and plans compared on OpenVibe.Host', href: 'https://openvibe.host/catalog', icon: 'ov:host' },
+ ] },
+ dev: { title: 'For developers', lede: 'Every price and check is open JSON, readable from any site.', samples: [
+ { label: 'Price a name', lang: 'bash', code: 'curl "https://openvibe.domains/api/v1/search?q=sushitruck"' },
+ { label: 'One ending, every registrar', lang: 'bash', code: 'curl https://openvibe.domains/api/v1/tlds/dev' },
+ ], links: [{ label: 'The API', href: '/developers' }, { label: 'llms.txt', href: '/llms.txt' }] },
+ faq: { items: [
+ ['Where do the prices come from?', 'From each registrar\'s own public price list, read by OpenVibe and dated on every page. Nothing is sponsored, and no registrar pays to be listed or to be first.'],
+ ['Can I register a domain here?', 'Not yet: each price links to the registrar that offers it. Connecting your own registrar accounts to manage your domains in one place comes next.'],
+ ['Why three years?', 'Many endings are cheap for one year and much dearer to keep. Three years (the first year and two renewals) is the number that tells you what a name will really cost.'],
+ ['Is a name I search for kept?', 'Searches are not tied to you. A domain\'s public history is kept only after it has been looked up five times, and holds public registration facts only.'],
+ ] },
+ });
+ return layout({ title: null, canonical: undefined, body: `<div class="dm-wrap">${body}</div>`, active: '/', jsonLd: [{ '@context': 'https://schema.org', '@type': 'WebSite', name: NAME, url: 'https://openvibe.domains/', potentialAction: { '@type': 'SearchAction', target: 'https://openvibe.domains/search?q={name}', 'query-input': 'required name=name' } }] });
+}
+
+/** A table of priced rows: ending or registrar first, then the year totals, sorted by 3 years. */
+function priceTable(rows, { by = 'ending', label = '', check = null } = {}) {
+ if (!rows.length) return '';
+ const best = rows.length > 1 ? rows.find((r) => !r.currency_other && r.y3 != null) : null;
+ const head = by === 'ending' ? 'Ending' : 'Registrar';
+ const cell = (r) => {
+ if (by === 'ending') return check ? `<a href="/search?q=${encodeURIComponent(`${check}.${r.tld}`)}" title="${esc(`Check ${check}.${r.tld}`)}">${esc(r.display || dot(r.tld))}</a>` : `<a href="${tldHref(r.tld)}">${esc(r.display || dot(r.tld))}</a>`;
+ const href = r.affiliate_url || r.homepage_url;
+ return href ? `<a href="${esc(href)}" rel="noopener${r.affiliate_url ? ' sponsored' : ''}">${esc(r.registrar)}</a>${r.affiliate_url ? '<small class="dm-aff">Affiliate link</small>' : ''}` : esc(r.registrar || '');
+ };
+ return `<div class="dm-table" role="table" aria-label="${esc(label || 'Prices')}"><div class="dm-tr dm-th" role="row"><span role="columnheader">${head}</span><span role="columnheader">First year</span><span role="columnheader">Renews at</span><span role="columnheader">3 years</span><span role="columnheader">5 years</span></div>`
+ + rows.map((r) => `<div class="dm-tr${r === best ? ' is-best' : ''}${r.trap ? ' is-trap' : ''}" role="row"><span role="cell" class="dm-name">${cell(r)}${r === best ? '<em class="dm-best">Cheapest over 3 years</em>' : ''}${r.trap ? '<em class="dm-trap">Renewal trap</em>' : ''}</span>`
+ + `<span role="cell" data-l="First year">${money(r.y1, r.currency)}</span><span role="cell" data-l="Renews at">${money(r.renew == null ? null : Number(r.renew), r.currency)}</span>`
+ + `<span role="cell" data-l="3 years" class="dm-y3">${money(r.y3, r.currency)}</span><span role="cell" data-l="5 years">${money(r.y5, r.currency)}</span></div>`).join('')
+ + '</div>';
+}
+
+const STATUS = {
+ available: ['is-free', 'Available to register'],
+ registered: ['is-taken', 'Registered'],
+ reserved: ['is-taken', 'Reserved by the registry'],
+};
+
+function search({ name, check, rows = [], available } = {}) {
+ const full = check && check.display ? check.display : name ? (name.display || name.ascii) : '';
+ const [cls, said] = STATUS[available] || ['is-unknown', 'The registry did not answer'];
+ const facts = check && available === 'registered' ? [check.registrar ? `with ${esc(check.registrar)}` : '', check.expires ? `until ${esc(day(check.expires))}` : ''].filter(Boolean).join(' ') : '';
+ const label = name ? name.label : '';
+ const body = `<section class="dm-q">${searchBox(name ? (name.display || name.ascii) : '')}</section>
+<header class="dm-hit ${cls}"><h1>${esc(full)}</h1><p class="dm-status"><span class="dm-pill">${said}</span>${facts ? ` <span>${facts}</span>` : ''}</p>
+${available === 'registered' && check ? `<p class="dm-act"><a class="dm-btn" href="/d/${encodeURIComponent(check.name || name.ascii)}">Its public history</a> <a class="dm-btn is-quiet" href="https://openvibe.watch/watches/new?template=json&url=${encodeURIComponent(`https://openvibe.domains/api/v1/domains/${check.name || name.ascii}`)}&value_path=status&op=changed&name=${encodeURIComponent(`${check.name || name.ascii} comes free`)}">Tell me if it comes free</a></p>` : ''}</header>
+${rows.length ? `<section aria-labelledby="dm-all-h"><div class="dm-head-row"><h2 id="dm-all-h">${esc(label)} in every ending</h2></div>
+<p class="dm-fine">What each ending costs to register and keep, cheapest over three years first. Availability is checked for <b>${esc(full)}</b>; tap another ending to check it.${latest(rows) ? ` Prices checked ${esc(day(latest(rows)))}.` : ''}</p>
+${priceTable(rows, { by: 'ending', label: `${label} in every ending`, check: name ? name.label : null })}</section>` : '<p class="dm-fine">No prices for this name\'s endings yet.</p>'}`;
+ return layout({ title: `${full}: price and availability`, description: `${full}: whether it is free, and what every ending costs over 1, 3 and 5 years.`, robots: 'noindex, follow', body: `<div class="dm-wrap">${body}</div>`, active: '/' });
+}
+
+function endings({ endings: list } = {}) {
+ const rows = priceRows((list && list.tlds) || []);
+ const body = `<header class="dm-page-h"><h1>Every ending</h1><p class="dm-lede">All the endings OpenVibe prices, cheapest to keep over three years first.${latest(rows) ? ` Prices checked ${esc(day(latest(rows)))}.` : ''}</p>${searchBox()}</header>
+${rows.length ? priceTable(rows, { by: 'ending', label: 'Every ending' }) : kit.empty({ title: 'No prices yet', text: 'The price lists are being read. Try again in a few minutes.' })}`;
+ return layout({ title: 'Every ending, cheapest to keep', description: 'Every domain ending OpenVibe prices, sorted by what three years really cost.', body: `<div class="dm-wrap">${body}</div>`, active: '/tld' });
+}
+
+/** A small history chart: each registrar's first-year price over time, as steps (real changes only). */
+function historyChart(history, currency) {
+ const pts = (history || []).filter((h) => Number.isFinite(Date.parse(h.changed_at || h.at || '')) && h.register != null);
+ if (pts.length < 2) return '';
+ const xs = pts.map((h) => Date.parse(h.changed_at || h.at)); const ys = pts.map((h) => Number(h.register));
+ const x0 = Math.min(...xs), x1 = Math.max(...xs, Date.now()), y0 = 0, y1v = Math.max(...ys) * 1.15;
+ const X = (t) => 8 + ((t - x0) / Math.max(1, x1 - x0)) * 584, Y = (v) => 152 - ((v - y0) / Math.max(1, y1v - y0)) * 136;
+ const by = new Map(); pts.forEach((h) => { const k = h.provider_name || h.registrar || 'Registrar'; if (!by.has(k)) by.set(k, []); by.get(k).push(h); });
+ const lines = [...by.entries()].slice(0, 6).map(([k, hs], i) => {
+ const s = hs.sort((a, b) => Date.parse(a.changed_at || a.at) - Date.parse(b.changed_at || b.at));
+ let d = ''; s.forEach((h, j) => { const x = X(Date.parse(h.changed_at || h.at)), y = Y(Number(h.register)); d += j ? ` H${x.toFixed(1)} V${y.toFixed(1)}` : `M${x.toFixed(1)} ${y.toFixed(1)}`; });
+ d += ` H${X(Date.now()).toFixed(1)}`;
+ return `<path d="${d}" class="dm-line s${i}"><title>${esc(k)}</title></path>`;
+ }).join('');
+ return `<figure class="dm-chart"><svg viewBox="0 0 600 160" role="img" aria-label="First-year price over time">${lines}</svg><figcaption>First-year price over time${currency && currency !== 'USD' ? ` (${esc(currency)})` : ''}, each registrar a line.</figcaption></figure>`;
+}
+
+function tld({ tld: t } = {}) {
+ const rows = (t && t.prices) || [];
+ const name = t ? (t.display || dot(t.tld)) : '';
+ const best = rows.find((r) => !r.currency_other && r.y3 != null);
+ const first = rows.filter((r) => r.y1 != null).sort((a, b) => a.y1 - b.y1)[0];
+ const facts = [
+ first ? ['Cheapest first year', money(first.y1, first.currency), first.registrar] : null,
+ best ? ['Cheapest to keep 3 years', money(best.y3, best.currency), best.registrar] : null,
+ best && best.y5 != null ? ['Five years from', money(best.y5, best.currency), best.registrar] : null,
+ ].filter(Boolean);
+ const traps = rows.filter((r) => r.trap);
+ const chart = historyChart(t && t.history, t && t.currency);
+ const body = `<header class="dm-page-h dm-tld-h"><p class="dm-kicker">${esc(t && t.kind ? `${t.kind} ending` : 'Ending')}</p><h1>${esc(name)}</h1>
+${facts.length ? `<dl class="dm-facts">${facts.map(([l, v, who]) => `<div><dt>${esc(l)}</dt><dd><b>${v}</b>${who ? `<small>${esc(who)}</small>` : ''}</dd></div>`).join('')}</dl>` : ''}
+${traps.length ? `<p class="dm-warn">${kit.icon('alert')}<span>${traps.length === 1 ? `${esc(traps[0].registrar)} sells the first year cheap and renews at ${money(Number(traps[0].renew), traps[0].currency)}.` : `${traps.length} registrars sell the first year cheap and renew much higher.`} The 3-year column is the one to read.</span></p>` : ''}
+${searchBox()}</header>
+<section aria-labelledby="dm-reg-h"><div class="dm-head-row"><h2 id="dm-reg-h">Every registrar</h2></div>
+<p class="dm-fine">From each registrar's own public price list.${latest(rows) ? ` Checked ${esc(day(latest(rows)))}.` : ''} Affiliate links, where there are any, are marked and never change the order.</p>
+${rows.length ? priceTable(rows, { by: 'registrar', label: `Registrars for ${name}` }) : '<p class="dm-fine">No registrar prices this ending yet.</p>'}</section>
+<section aria-labelledby="dm-hist-h"><h2 id="dm-hist-h">Price history</h2>${chart || `<p class="dm-fine">No price changes recorded${rows.length && rows[0].first_seen_at ? ` since ${esc(day(rows.map((r) => r.first_seen_at).filter(Boolean).sort()[0]))}` : ''}. Every change from now on is kept here.</p>`}</section>`;
+ return layout({ title: `${name} domain prices: every registrar, 1, 3 and 5 years`, description: `What ${name} costs at every registrar OpenVibe reads: first year, renewal and the real 3- and 5-year totals.`, body: `<div class="dm-wrap">${body}</div>`, active: '/tld' });
+}
+
+function domain({ name, history, prices = [], status = null, check = null } = {}) {
+ const full = name ? (name.display || name.ascii) : '';
+ const h = history || {};
+ const snaps = Array.isArray(h.snapshots) ? h.snapshots : [];
+ const changes = Array.isArray(h.changes) ? h.changes : [];
+ const last = snaps[0] && snaps[0].facts ? snaps[0].facts : null;
+ const fact = (k, v) => (v ? `<div><dt>${esc(k)}</dt><dd>${esc(v)}</dd></div>` : '');
+ const list = (v) => (Array.isArray(v) ? v.join(', ') : v || '');
+ const record = last ? `<dl class="dm-facts dm-record">${fact('Registrar', last.registrar)}${fact('Registered', day(last.created))}${fact('Expires', day(last.expires))}${fact('Name servers', list(last.nameservers))}${fact('DNSSEC', last.dnssec == null ? '' : last.dnssec ? 'Signed' : 'Not signed')}${fact('Status', list(last.status))}</dl>`
+ + `<p class="dm-fine">Public registration facts from RDAP, seen ${esc(day(snaps[0].last_seen))}${snaps.length > 1 ? `; kept since ${esc(day(h.first_seen))}` : ''}.</p>` : '';
+ const LABEL = { registrar: 'Registrar', created: 'Registered', expires: 'Expiry', status: 'Status', nameservers: 'Name servers', dnssec: 'DNSSEC' };
+ const shown = (field, v) => (v == null || (Array.isArray(v) && !v.length) ? 'none' : field === 'created' || field === 'expires' ? day(v) : field === 'dnssec' ? (v ? 'signed' : 'not signed') : list(v));
+ const timeline = changes.length ? `<ol class="dm-timeline">${changes.slice(0, 30).map((c) => `<li><time datetime="${esc(c.at || '')}">${esc(day(c.at))}</time>`
+ + `${(c.changes || []).map((x) => `<span>${esc(LABEL[x.field] || x.field)}: ${esc(shown(x.field, x.before))} → <b>${esc(shown(x.field, x.after))}</b></span>`).join('')}</li>`).join('')}</ol>` : '';
+ const watch = `https://openvibe.watch/watches/new?template=json&url=${encodeURIComponent(`https://openvibe.domains/api/v1/domains/${name ? name.ascii : ''}`)}&value_path=status&op=changed&name=${encodeURIComponent(`${full} changes`)}`;
+ const body = `<header class="dm-page-h"><p class="dm-kicker">Domain</p><h1>${esc(full)}</h1>
+${status ? `<p class="dm-status ${(STATUS[status] || ['is-unknown'])[0]}"><span class="dm-pill">${(STATUS[status] || [null, 'The registry did not answer'])[1]}</span>${status === 'registered' && check ? ` <span>${[check.registrar ? `with ${esc(check.registrar)}` : '', check.expires ? `until ${esc(day(check.expires))}` : ''].filter(Boolean).join(' ')}</span>` : ''}</p>` : ''}
+<p class="dm-act"><a class="dm-btn" href="/search?q=${encodeURIComponent(name ? name.ascii : '')}">Every ending for ${esc(name ? name.label : '')}</a> <a class="dm-btn is-quiet" href="${esc(watch)}">Watch it</a></p></header>
+<section aria-labelledby="dm-rec-h"><h2 id="dm-rec-h">Public record</h2>${record || `<p class="dm-fine">OpenVibe keeps a domain's history once it has been looked up ${Number(h.min_lookups || 5)} times${h.lookups ? ` (${Number(h.lookups)} so far)` : ''}. <a href="https://whois.openvibe.tools/?q=${encodeURIComponent(name ? name.ascii : '')}">Look it up now on OpenVibe.Tools</a>.</p>`}
+${timeline ? `<h3>What changed</h3>${timeline}` : ''}</section>
+${prices.length ? `<section aria-labelledby="dm-p-h"><h2 id="dm-p-h">What ${esc(dot(name.tld))} costs</h2>${priceTable(prices, { by: 'ending', label: `${dot(name.tld)} prices` })}</section>` : ''}`;
+ return layout({ title: `${full}: public record and history`, description: `${full}: its registrar, dates and how they changed, from public records only.`, robots: snaps.length ? 'index, follow' : 'noindex, follow', body: `<div class="dm-wrap">${body}</div>` });
+}
+
+/** The API, for people and agents: every endpoint with a call that copies. */
+function developers() {
+ const rows = [
+ ['GET /api/v1/search?q=sushitruck', 'A name: whether it is free (the registry\'s answer) and every ending\'s prices with 1, 3 and 5-year totals, cheapest over three years first.'],
+ ['GET /api/v1/tlds?sort=renew', 'Every ending OpenVibe prices (sort popular, tld, register or renew; q, kind and page narrow it).'],
+ ['GET /api/v1/tlds/dev', 'One ending: every registrar\'s prices with totals, and the price changes recorded.'],
+ ['GET /api/v1/domains/example.com', 'One domain: status, registrar, expiry, its public history and its ending\'s prices.'],
+ ];
+ const body = `<header class="dm-page-h"><p class="dm-kicker">For developers</p><h1>The Domains API</h1><p class="dm-lede">Open JSON, no key, readable from any site (CORS). Prices come from registrars' public price lists with the date each was read; nothing is sponsored.</p></header>
+<section aria-labelledby="dm-ep-h"><h2 id="dm-ep-h">Endpoints</h2><dl class="dm-eps">${rows.map(([ep, what]) => `<div><dt><code>${esc(ep)}</code></dt><dd>${esc(what)}</dd></div>`).join('')}</dl></section>
+${sc.code({ title: 'Try it', samples: [{ label: 'Price a name', lang: 'bash', code: 'curl "https://openvibe.domains/api/v1/search?q=sushitruck"' }, { label: 'JavaScript', lang: 'js', code: "const r = await fetch('https://openvibe.domains/api/v1/tlds/dev').then((x) => x.json());\nconsole.log(r.tld.prices[0]);" }] })}
+<p class="dm-fine">Limits: 120 requests a minute from one address. Errors are problem+json (RFC 9457). <a href="/llms.txt">llms.txt</a> describes the site for agents.</p>`;
+ return layout({ title: 'The Domains API', description: 'Open JSON for domain prices, availability and history: every ending and registrar, with 1, 3 and 5-year totals.', body: `<div class="dm-wrap">${body}</div>`, active: '/developers' });
+}
+
+function notFound() {
+ const body = `<header class="dm-page-h"><h1>Nothing here</h1><p class="dm-lede">That page does not exist. Price a name instead:</p>${searchBox()}</header>`;
+ return layout({ title: 'Not found', robots: 'noindex, follow', body: `<div class="dm-wrap">${body}</div>` });
+}
+
+module.exports = { home, endings, search, tld, domain, developers, notFound, layout, setRelease, money };
new file mode 100644
new file mode 100644
@@ -0,0 +1,156 @@
@@ -0,0 +1,156 @@
+'use strict';
+
+/** The two data clients: URL shapes, cache hit/expiry, the cap, a timeout, and a failure as null + one log line. */
+const assert = require('assert');
+const { createHost } = require('../server/data/host');
+const { createTools } = require('../server/data/tools');
+const { check, done } = require('./helpers');
+
+const jsonResponse = (body) => ({ ok: true, status: 200, text: async () => JSON.stringify(body) });
+const quiet = { warn: () => {} };
+
+(async () => {
+ await check('host.tld: one call inside the TTL, two after it', async () => {
+ let now = 1_000;
+ let calls = 0;
+ const urls = [];
+ const host = createHost({
+ baseUrl: 'http://host.test',
+ fetchImpl: async (url) => { calls++; urls.push(String(url)); return jsonResponse({ tld: { tld: 'dev' } }); },
+ now: () => now,
+ cacheMs: { tld: 1_000 },
+ log: quiet,
+ });
+ assert.strictEqual((await host.tld('dev')).tld, 'dev');
+ assert.strictEqual((await host.tld('dev')).tld, 'dev');
+ assert.strictEqual(calls, 1);
+ assert.strictEqual(urls[0], 'http://host.test/api/v1/catalog/domains/dev');
+ now += 1_001;
+ await host.tld('dev');
+ assert.strictEqual(calls, 2);
+ });
+
+ await check('host.check: a 2-minute TTL by default', async () => {
+ let now = 5_000;
+ let calls = 0;
+ const host = createHost({
+ baseUrl: 'http://host.test',
+ fetchImpl: async () => { calls++; return jsonResponse({ check: { status: 'available' } }); },
+ now: () => now,
+ log: quiet,
+ });
+ await host.check('sushitruck');
+ await host.check('sushitruck');
+ assert.strictEqual(calls, 1);
+ now += 2 * 60_000 + 1;
+ await host.check('sushitruck');
+ assert.strictEqual(calls, 2);
+ });
+
+ await check('host list and check build the documented URLs', async () => {
+ const urls = [];
+ const host = createHost({
+ baseUrl: 'http://host.test/',
+ fetchImpl: async (url) => { urls.push(String(url)); return jsonResponse({ tlds: [], next_cursor: null }); },
+ log: quiet,
+ });
+ await host.tlds({ sort: 'popular' });
+ await host.tlds({ q: 'dev', kind: 'generic', sort: 'register', page: 2 });
+ await host.check('münchen.de');
+ assert.strictEqual(urls[0], 'http://host.test/api/v1/catalog/domains?sort=popular');
+ assert.strictEqual(urls[1], 'http://host.test/api/v1/catalog/domains?q=dev&kind=generic&sort=register&cursor=100');
+ assert.match(urls[2], /\/api\/v1\/catalog\/domains\/check\?name=m%C3%BCnchen\.de$/);
+ });
+
+ await check('host: a failure is null, logged once, and not cached', async () => {
+ const logs = [];
+ let calls = 0;
+ const host = createHost({
+ baseUrl: 'http://host.test',
+ fetchImpl: async () => { calls++; throw new Error('connection refused'); },
+ log: { warn: (line) => logs.push(line) },
+ });
+ assert.strictEqual(await host.check('example.com'), null);
+ assert.strictEqual(await host.check('example.com'), null);
+ assert.strictEqual(calls, 2);
+ assert.strictEqual(logs.length, 2);
+ assert.match(logs[0], /^\[domains\] Host check failed: connection refused/);
+ });
+
+ await check('host: a timeout answers null quickly', async () => {
+ const host = createHost({
+ baseUrl: 'http://host.test',
+ fetchImpl: () => new Promise(() => {}),
+ timeoutMs: 25,
+ log: quiet,
+ });
+ const started = Date.now();
+ assert.strictEqual(await host.check('example.com'), null);
+ assert.ok(Date.now() - started < 1_000, 'the timeout did not end the wait');
+ });
+
+ await check('the cache keeps its cap, oldest insertion out', async () => {
+ let calls = 0;
+ const host = createHost({
+ baseUrl: 'http://host.test',
+ fetchImpl: async () => { calls++; return jsonResponse({ check: { status: 'unknown' } }); },
+ now: () => 1,
+ cacheMs: { check: 60_000 },
+ maxCacheEntries: 2,
+ log: quiet,
+ });
+ await host.check('a');
+ await host.check('b');
+ await host.check('c');
+ assert.strictEqual(calls, 3);
+ await host.check('a');
+ assert.strictEqual(calls, 4, 'the oldest entry should have been evicted');
+ });
+
+ await check('tools.history: normalized domain, cached ten minutes, URL encoded', async () => {
+ let now = 10_000;
+ let calls = 0;
+ const urls = [];
+ const tools = createTools({
+ baseUrl: 'http://tools.test',
+ fetchImpl: async (url) => { calls++; urls.push(String(url)); return jsonResponse({ domain: 'example.com', snapshots: [] }); },
+ now: () => now,
+ log: quiet,
+ });
+ assert.strictEqual((await tools.history('Example.COM.')).domain, 'example.com');
+ await tools.history('example.com');
+ assert.strictEqual(calls, 1);
+ assert.strictEqual(urls[0], 'http://tools.test/api/v1/domains/example.com');
+ now += 10 * 60_000 + 1;
+ await tools.history('example.com');
+ assert.strictEqual(calls, 2);
+ });
+
+ await check('tools.lists: limit is passed and cached', async () => {
+ let calls = 0;
+ const urls = [];
+ const tools = createTools({
+ baseUrl: 'http://tools.test',
+ fetchImpl: async (url) => { calls++; urls.push(String(url)); return jsonResponse({ most_looked_up: [], expiring_soon: [] }); },
+ log: quiet,
+ });
+ await tools.lists({ limit: 5 });
+ await tools.lists({ limit: 5 });
+ assert.strictEqual(calls, 1);
+ assert.strictEqual(urls[0], 'http://tools.test/api/v1/domains/?limit=5');
+ });
+
+ await check('tools: a failure is null and logged', async () => {
+ const logs = [];
+ const tools = createTools({
+ baseUrl: 'http://tools.test',
+ fetchImpl: async () => { throw new Error('bad gateway'); },
+ log: { warn: (line) => logs.push(line) },
+ });
+ assert.strictEqual(await tools.history('example.com'), null);
+ assert.strictEqual(logs.length, 1);
+ assert.match(logs[0], /^\[domains\] Tools history failed: bad gateway/);
+ });
+
+ done();
+})().catch((err) => { console.error(err); process.exit(1); });
new file mode 100644
new file mode 100644
@@ -0,0 +1,53 @@
@@ -0,0 +1,53 @@
+'use strict';
+
+/**
+ * Small test harness (the same check/done shape as OpenVibe.Help's tests): each test file is its own
+ * process, catches failures per check and exits nonzero if any failed.
+ */
+const http = require('http');
+const configLib = require('../server/config');
+const { createApp } = require('../server/app');
+
+let failures = 0;
+
+async function check(name, fn) {
+ try {
+ await fn();
+ process.stdout.write(` ✓ ${name}\n`);
+ } catch (err) {
+ failures++;
+ process.stdout.write(` ✗ ${name}\n ${(err.stack || String(err)).split('\n').slice(0, 8).join('\n ')}\n`);
+ }
+}
+
+function done() {
+ process.stdout.write(failures ? `\n${failures} failed\n` : '\nall passed\n');
+ process.exit(failures ? 1 : 0);
+}
+
+/** Boot the real app on an ephemeral port with injected host/tools clients. */
+async function boot({ config, host, tools, release } = {}) {
+ const cfg = config || configLib.load({
+ NODE_ENV: 'test', PORT: '0', BASE_URL: 'https://openvibe.domains', TRUST_PROXY: '1',
+ });
+ const quiet = { log() {}, info() {}, warn() {}, error() {} };
+ const built = createApp({ config: cfg, host, tools, release, log: quiet });
+ const server = await new Promise((resolve) => {
+ const s = http.createServer(built.app);
+ s.listen(0, '127.0.0.1', () => resolve(s));
+ });
+ const base = `http://127.0.0.1:${server.address().port}`;
+
+ async function get(path, opts = {}) {
+ const res = await fetch(base + path, { method: opts.method || 'GET', headers: opts.headers, redirect: 'manual' });
+ const text = await res.text();
+ return { status: res.status, headers: res.headers, text, json() { return JSON.parse(text); } };
+ }
+
+ return {
+ base, ctx: built.ctx, get,
+ async close() { await new Promise((resolve) => server.close(resolve)); },
+ };
+}
+
+module.exports = { boot, check, done };
new file mode 100644
new file mode 100644
@@ -0,0 +1,62 @@
@@ -0,0 +1,62 @@
+'use strict';
+
+/** The name reader: the inputs from the brief, IDNs, URLs, and the ones that must be refused. */
+const assert = require('assert');
+const { parseName, parseTld } = require('../server/names');
+const { check, done } = require('./helpers');
+
+(async () => {
+ await check('a bare label: spaces go, no ending', () => {
+ assert.deepStrictEqual(parseName('sushi truck'), { label: 'sushitruck', tld: null, ascii: 'sushitruck', display: 'sushitruck' });
+ assert.deepStrictEqual(parseName('x y z'), { label: 'xyz', tld: null, ascii: 'xyz', display: 'xyz' });
+ assert.deepStrictEqual(parseName('Sushi_Truck'), { label: 'sushitruck', tld: null, ascii: 'sushitruck', display: 'sushitruck' });
+ });
+
+ await check('a name with .com is lower-cased and keeps its ending', () => {
+ assert.deepStrictEqual(parseName('SushiTruck.com'), {
+ label: 'sushitruck', tld: 'com', ascii: 'sushitruck.com', display: 'sushitruck.com',
+ });
+ });
+
+ await check('a URL: scheme, www, path and port are dropped, co.uk stays co.uk', () => {
+ assert.deepStrictEqual(parseName('https://www.sushitruck.co.uk/x'), {
+ label: 'sushitruck', tld: 'co.uk', ascii: 'sushitruck.co.uk', display: 'sushitruck.co.uk',
+ });
+ assert.deepStrictEqual(parseName('http://example.com:8080/a?b=1#c'), {
+ label: 'example', tld: 'com', ascii: 'example.com', display: 'example.com',
+ });
+ });
+
+ await check('an IDN is punycode in ascii and Unicode in display', () => {
+ assert.deepStrictEqual(parseName('münchen.de'), {
+ label: 'xn--mnchen-3ya', tld: 'de', ascii: 'xn--mnchen-3ya.de', display: 'münchen.de',
+ });
+ });
+
+ await check('bad names are null', () => {
+ for (const bad of ['-x.com', 'a..b', `${'a'.repeat(64)}.com`, '', 'http://', 'http:///x', 'x-.com', 'a'.repeat(254)]) {
+ assert.strictEqual(parseName(bad), null, `expected null for ${JSON.stringify(bad.slice(0, 30))}`);
+ }
+ });
+
+ await check('a name may start with a digit and contain an internal hyphen', () => {
+ assert.deepStrictEqual(parseName('1-2.dev'), {
+ label: '1-2', tld: 'dev', ascii: '1-2.dev', display: '1-2.dev',
+ });
+ });
+
+ await check('parseTld normalizes a leading dot and keeps a multi-part ending', () => {
+ assert.strictEqual(parseTld('.Dev'), 'dev');
+ assert.strictEqual(parseTld('co.uk'), 'co.uk');
+ assert.strictEqual(parseTld(' .co.uk '), 'co.uk');
+ assert.strictEqual(parseTld('https://example.dev/path'), 'example.dev');
+ });
+
+ await check('parseTld refuses empty and malformed endings', () => {
+ for (const bad of ['', '.', '..', '-x', 'x-', 'a..b', 'a'.repeat(64)]) {
+ assert.strictEqual(parseTld(bad), null, `expected null for ${JSON.stringify(bad)}`);
+ }
+ });
+
+ done();
+})().catch((err) => { console.error(err); process.exit(1); });
new file mode 100644
new file mode 100644
@@ -0,0 +1,77 @@
@@ -0,0 +1,77 @@
+'use strict';
+
+/** Price rows: y1/y3/y5, the five-year fallback, the renewal trap, rounding, USD order. */
+const assert = require('assert');
+const { priceRows } = require('../server/pricing');
+const { check, done } = require('./helpers');
+
+(async () => {
+ await check('totals and the five-year fallback', () => {
+ const [row] = priceRows([{ register: 10, renew: 20, transfer: 10, five_year: 90, currency: 'USD', tld: 'com', registrar: 'A' }]);
+ assert.strictEqual(row.y1, 10);
+ assert.strictEqual(row.y3, 50);
+ assert.strictEqual(row.y5, 90);
+ assert.strictEqual(row.trap, true);
+ const [fallback] = priceRows([{ register: 5, renew: 6, currency: 'USD', tld: 'dev' }]);
+ assert.strictEqual(fallback.y3, 17);
+ assert.strictEqual(fallback.y5, 29);
+ assert.strictEqual(fallback.trap, false);
+ });
+
+ await check('a missing price makes the total null, never NaN', () => {
+ const [row] = priceRows([{ register: 5, currency: 'USD' }]);
+ assert.strictEqual(row.y3, null);
+ assert.strictEqual(row.y5, null);
+ assert.strictEqual(row.trap, false);
+ });
+
+ await check('money is rounded to cents', () => {
+ const [row] = priceRows([{ register: 1.005, renew: 2.005, five_year: 9.999, currency: 'USD' }]);
+ assert.strictEqual(row.y1, 1.01);
+ assert.strictEqual(row.y3, 5.02);
+ assert.strictEqual(row.y5, 10);
+ });
+
+ await check('the renewal trap needs both halves of the rule', () => {
+ const rows = priceRows([
+ { register: 10, renew: 19, currency: 'USD', id: 'below double' },
+ { register: 10, renew: 14.99, currency: 'USD', id: 'not 5 more' },
+ { register: 8, renew: 16, currency: 'USD', id: 'exactly both' },
+ ]);
+ const by = Object.fromEntries(rows.map((r) => [r.id, r.trap]));
+ assert.strictEqual(by['below double'], false);
+ assert.strictEqual(by['not 5 more'], false);
+ assert.strictEqual(by['exactly both'], true);
+ });
+
+ await check('sorted by y3 ascending, rows without y3 last', () => {
+ const rows = priceRows([
+ { register: 10, renew: 20, currency: 'USD', id: '50' },
+ { register: 5, renew: 6, currency: 'USD', id: '17' },
+ { register: 8, renew: 9, currency: 'USD', id: '26' },
+ { register: 8, currency: 'USD', id: 'missing' },
+ ]);
+ assert.deepStrictEqual(rows.map((r) => r.id), ['17', '26', '50', 'missing']);
+ });
+
+ await check('non-USD rows are flagged, stay after every USD row and keep their own order', () => {
+ const rows = priceRows([
+ { register: 1, renew: 1, currency: 'EUR', id: 'eur-30' },
+ { register: 9, renew: 9, currency: 'USD', id: 'usd-27' },
+ { register: 20, renew: 20, currency: 'GBP', id: 'gbp-60' },
+ ]);
+ assert.deepStrictEqual(rows.map((r) => r.id), ['usd-27', 'eur-30', 'gbp-60']);
+ assert.strictEqual(rows[0].currency_other, undefined);
+ assert.strictEqual(rows[1].currency_other, true);
+ assert.strictEqual(rows[2].currency_other, true);
+ });
+
+ await check('the input rows are not mutated', () => {
+ const input = [{ register: 10, renew: 20, currency: 'USD' }];
+ const [row] = priceRows(input);
+ assert.strictEqual(input[0].y1, undefined);
+ assert.strictEqual(row.register, 10);
+ });
+
+ done();
+})().catch((err) => { console.error(err); process.exit(1); });
new file mode 100644
new file mode 100644
@@ -0,0 +1,268 @@
@@ -0,0 +1,268 @@
+'use strict';
+
+/** The pages, the API, the crawl artifacts and readiness, against stub Host and Tools clients. */
+const assert = require('assert');
+const { boot, check, done } = require('./helpers');
+
+const LIST = [
+ { tld: 'com', display: '.com', kind: 'generic', currency: 'USD', register: 9.2, renew: 11.08, transfer: 9.2, five_year: 55.4, registrars: 2, checked_at: '2026-10-22T15:16:02.303Z' },
+ { tld: 'dev', display: '.dev', kind: 'generic', currency: 'USD', register: 8.75, renew: 12.87, transfer: 12.87, five_year: 60.23, registrars: 2, checked_at: '2026-10-22T15:16:02.303Z' },
+];
+
+const PRICES = [
+ { registrar: 'Porkbun', registrar_slug: 'porkbun', tld: 'dev', display: '.dev', kind: 'generic', currency: 'USD', register: 8.75, renew: 12.87, transfer: 12.87, five_year: 60.23, checked_at: '2026-10-22T15:16:02.303Z' },
+ { registrar: 'OVHcloud', registrar_slug: 'ovhcloud', tld: 'dev', display: '.dev', kind: 'generic', currency: 'USD', register: 13.19, renew: 17.19, transfer: 17.19, five_year: 81.95, checked_at: '2026-10-22T15:16:02.303Z' },
+ { registrar: 'Com Registrar', registrar_slug: 'com-registrar', tld: 'com', display: '.com', kind: 'generic', currency: 'USD', register: 9.2, renew: 11.08, transfer: 9.2, five_year: 55.4, checked_at: '2026-10-22T15:16:02.303Z' },
+ { registrar: 'Euro Registrar', registrar_slug: 'euro', tld: 'dev', display: '.dev', kind: 'generic', currency: 'EUR', register: 5, renew: 6, transfer: 5, five_year: null, checked_at: '2026-10-22T15:16:02.303Z' },
+];
+
+const HISTORY = {
+ ok: true,
+ domain: 'example.com',
+ snapshots: [{
+ facts: { registrar: 'Example Registrar', created: '1995-08-14T04:00:00.000Z', expires: '2026-08-13T04:00:00.000Z', status: ['client transfer prohibited'] },
+ first_seen: '2026-10-01T00:00:00.000Z', last_seen: '2026-10-28T00:00:00.000Z', seen: 2,
+ }],
+ changes: [],
+ lookups: 42,
+ first_seen: '2026-10-01T00:00:00.000Z',
+};
+const LISTS = {
+ ok: true,
+ most_looked_up: [{ domain: 'example.com', lookups: 42, registrar: 'Example Registrar', expires: '2026-08-13T04:00:00.000Z' }],
+ expiring_soon: [],
+ min_lookups: 5,
+};
+
+function fakeRelease() {
+ const full = { release: 'abc1234', released_at: '2026-10-28T12:00:00.000Z' };
+ return {
+ release: full.release,
+ full: () => full,
+ mount(app) {
+ app.get('/release.json', (_req, res) => res.json(full));
+ app.post('/release-metrics', (_req, res) => res.status(204).end());
+ },
+ };
+}
+
+function stubs() {
+ let failHost = false;
+ let lastList = null;
+ let checkCalls = 0;
+ const host = {
+ async tlds(query = {}) {
+ lastList = query;
+ if (failHost) return null;
+ return { tlds: LIST, next_cursor: null };
+ },
+ async tld(t) {
+ if (t !== 'dev' && t !== 'com') return null;
+ return {
+ tld: t, display: `.${t}`, kind: 'generic', currency: 'USD',
+ prices: PRICES.filter((p) => p.tld === t),
+ cheapest: { register: 8.75, renew: 12.87, transfer: 12.87, five_year: 60.23 },
+ history: [],
+ };
+ },
+ async check(name) {
+ checkCalls++;
+ return {
+ label: String(name).split('.')[0], labelDisplay: String(name).split('.')[0], tld: 'dev', name: String(name), display: String(name),
+ status: 'available', registrar: null, created: null, expires: null, server: null, reason: null, cached: false,
+ prices: PRICES,
+ };
+ },
+ };
+ const tools = {
+ async history(domain) { return { ...HISTORY, domain }; },
+ async lists() { return LISTS; },
+ };
+ return {
+ host, tools,
+ failHost: (value) => { failHost = value; },
+ lastList: () => lastList,
+ checkCalls: () => checkCalls,
+ };
+}
+
+(async () => {
+ const s = stubs();
+ const t = await boot({ host: s.host, tools: s.tools, release: fakeRelease() });
+ try {
+ await check('GET /: 200, the Frame mount and the endings', async () => {
+ const r = await t.get('/');
+ assert.strictEqual(r.status, 200);
+ assert.match(r.headers.get('cache-control') || '', /public, max-age=300/);
+ for (const marker of ['id="navbar-mount"', 'OpenVibeNavbar.init', '"service":"domains"', 'id="ov-footer"', '.dev']) {
+ assert.ok(r.text.includes(marker), `missing ${marker}`);
+ }
+ assert.strictEqual(s.lastList().sort, 'popular');
+ });
+
+ await check('GET /search?q=sushi truck: 200, noindex, prices', async () => {
+ const r = await t.get('/search?q=sushi%20truck');
+ assert.strictEqual(r.status, 200);
+ assert.match(r.headers.get('cache-control') || '', /public, max-age=120/);
+ assert.match(r.text, /<meta name="robots" content="noindex[^"]*">/, 'no noindex meta');
+ assert.ok(r.text.includes('sushitruck'), 'name missing');
+ assert.ok(/Available to register/.test(r.text), 'status missing');
+ assert.ok(r.text.includes('href="/search?q=sushitruck.com"') && r.text.includes('$31.36'), 'price row missing (an ending that checks this name, with its 3-year total)');
+ });
+
+ await check('GET /search without a name: 302 to /', async () => {
+ const r = await t.get('/search');
+ assert.strictEqual(r.status, 302);
+ assert.strictEqual(r.headers.get('location'), '/');
+ const bad = await t.get('/search?q=-x.com');
+ assert.strictEqual(bad.status, 302);
+ assert.strictEqual(bad.headers.get('location'), '/');
+ });
+
+ await check('GET /tld/dev: 200 with priced rows; /.dev: 301; unknown: 404', async () => {
+ const r = await t.get('/tld/dev');
+ assert.strictEqual(r.status, 200);
+ assert.match(r.headers.get('cache-control') || '', /public, max-age=300/);
+ assert.ok(r.text.includes('.dev') && r.text.includes('Porkbun') && r.text.includes('$34.49'), 'priced ending missing');
+ const redirect = await t.get('/.dev');
+ assert.strictEqual(redirect.status, 301);
+ assert.strictEqual(redirect.headers.get('location'), '/tld/dev');
+ const missing = await t.get('/tld/notreal');
+ assert.strictEqual(missing.status, 404);
+ assert.ok(missing.text.includes('Not found'));
+ });
+
+ await check('GET /d/example.com: 200 with history and its ending\'s prices; bad domain: 404', async () => {
+ const r = await t.get('/d/example.com');
+ assert.strictEqual(r.status, 200);
+ assert.match(r.headers.get('cache-control') || '', /public, max-age=120/);
+ assert.ok(r.text.includes('example.com'));
+ assert.ok(r.text.includes('Example Registrar'), 'history missing');
+ // A check's price rows are per ending (Host aggregates registrars): the page shows the domain's own ending only.
+ assert.ok(r.text.includes('href="/tld/com"') && !r.text.includes('href="/tld/dev"'), 'prices should be the com rows only');
+ assert.ok(r.text.includes('$9.20') && r.text.includes('$31.36'), 'the .com totals (first year, 3 years)');
+ const bad = await t.get('/d/not-a-domain');
+ assert.strictEqual(bad.status, 404);
+ });
+
+ await check('any other page: 404', async () => {
+ const r = await t.get('/nope');
+ assert.strictEqual(r.status, 404);
+ assert.ok(r.text.includes('Not found'));
+ });
+
+ await check('API search: shape, rows, CORS and the 400 problem', async () => {
+ const r = await t.get('/api/v1/search?q=sushitruck');
+ assert.strictEqual(r.status, 200);
+ assert.strictEqual(r.headers.get('access-control-allow-origin'), '*');
+ assert.match(r.headers.get('cache-control') || '', /public, max-age=300/);
+ const json = r.json();
+ assert.strictEqual(json.name.label, 'sushitruck');
+ assert.strictEqual(json.status, 'available');
+ assert.strictEqual(json.rows.length, 4);
+ assert.strictEqual(json.rows[0].tld, 'com');
+ assert.strictEqual(json.rows[0].y1, 9.2);
+ assert.strictEqual(json.rows[0].y3, 31.36);
+ assert.strictEqual(json.rows[3].currency_other, true);
+ const bad = await t.get('/api/v1/search?q=');
+ assert.strictEqual(bad.status, 400);
+ assert.match(bad.headers.get('content-type') || '', /application\/problem\+json/);
+ assert.strictEqual(bad.json().code, 'domains.name.invalid');
+ assert.strictEqual(bad.headers.get('access-control-allow-origin'), '*');
+ });
+
+ await check('API tlds: the host list as is, one ending priced, unknown 404', async () => {
+ const list = await t.get('/api/v1/tlds?sort=popular');
+ assert.strictEqual(list.status, 200);
+ assert.strictEqual(list.headers.get('access-control-allow-origin'), '*');
+ assert.strictEqual(list.json().tlds.length, 2);
+ assert.strictEqual(s.lastList().sort, 'popular');
+ const one = await t.get('/api/v1/tlds/dev');
+ assert.strictEqual(one.status, 200);
+ assert.strictEqual(one.json().tld.tld, 'dev');
+ assert.strictEqual(one.json().tld.prices[0].y3, 34.49);
+ const missing = await t.get('/api/v1/tlds/notreal');
+ assert.strictEqual(missing.status, 404);
+ assert.match(missing.headers.get('content-type') || '', /application\/problem\+json/);
+ });
+
+ await check('API domains: name, history, its ending\'s prices; bad name 400', async () => {
+ const r = await t.get('/api/v1/domains/example.com');
+ assert.strictEqual(r.status, 200);
+ const json = r.json();
+ assert.strictEqual(json.name.ascii, 'example.com');
+ assert.strictEqual(json.history.domain, 'example.com');
+ assert.strictEqual(json.prices.length, 1);
+ assert.strictEqual(json.prices[0].tld, 'com');
+ assert.strictEqual(json.prices[0].y5, 55.4);
+ const bad = await t.get('/api/v1/domains/not-a-name');
+ assert.strictEqual(bad.status, 400);
+ assert.strictEqual(bad.json().code, 'domains.name.invalid');
+ const nope = await t.get('/api/v1/nope');
+ assert.strictEqual(nope.status, 404);
+ assert.strictEqual(nope.json().code, 'route.not_found');
+ });
+
+ await check('robots.txt allows all and names the sitemap', async () => {
+ const r = await t.get('/robots.txt');
+ assert.strictEqual(r.status, 200);
+ assert.match(r.headers.get('content-type') || '', /^text\/plain/);
+ assert.ok(r.text.includes('Allow: /'));
+ assert.ok(r.text.includes('Sitemap: https://openvibe.domains/sitemap.xml'));
+ assert.ok(!r.text.includes('Disallow: /'), 'nothing should be disallowed');
+ });
+
+ await check('sitemap.xml lists the home page and every ending, lastmod from the release', async () => {
+ const r = await t.get('/sitemap.xml');
+ assert.strictEqual(r.status, 200);
+ assert.match(r.headers.get('content-type') || '', /^application\/xml/);
+ assert.ok(r.text.includes('<loc>https://openvibe.domains/</loc>'));
+ assert.ok(r.text.includes('<loc>https://openvibe.domains/tld/dev</loc>'));
+ assert.ok(r.text.includes('<loc>https://openvibe.domains/tld/com</loc>'));
+ assert.ok(r.text.includes('<lastmod>2026-10-28</lastmod>'));
+ });
+
+ await check('llms.txt describes the site and its API', async () => {
+ const r = await t.get('/llms.txt');
+ assert.strictEqual(r.status, 200);
+ assert.match(r.headers.get('content-type') || '', /^text\/plain/);
+ assert.ok(r.text.startsWith('# OpenVibe.Domains'));
+ assert.ok(r.text.includes('https://openvibe.domains/api/v1/search?q=example.com'));
+ assert.ok(r.text.includes('https://openvibe.host/catalog/domains'));
+ });
+
+ await check('health is ok; readiness is ready while both upstreams answer', async () => {
+ const health = await t.get('/api/health');
+ assert.strictEqual(health.status, 200);
+ assert.deepStrictEqual(health.json(), { status: 'ok', service: 'openvibe-domains', version: '0.1.0' });
+ const ready = await t.get('/api/ready');
+ assert.strictEqual(ready.status, 200);
+ const json = ready.json();
+ assert.strictEqual(json.ready, true);
+ assert.strictEqual(json.status, 'ready');
+ assert.strictEqual(json.checks.host.status, 'ok');
+ assert.strictEqual(json.checks.tools.status, 'ok');
+ });
+
+ await check('readiness is degraded, not 503, when Host does not answer', async () => {
+ s.failHost(true);
+ const r = await t.get('/api/ready');
+ s.failHost(false);
+ assert.strictEqual(r.status, 200);
+ const json = r.json();
+ assert.strictEqual(json.ready, true);
+ assert.strictEqual(json.status, 'degraded');
+ assert.ok(json.degraded.includes('host'));
+ assert.strictEqual(json.failed.length, 0);
+ });
+
+ await check('release.json is served', async () => {
+ const r = await t.get('/release.json');
+ assert.strictEqual(r.status, 200);
+ assert.strictEqual(r.json().release, 'abc1234');
+ });
+ } finally {
+ await t.close();
+ }
+ done();
+})().catch((err) => { console.error(err); process.exit(1); });
new file mode 100644
new file mode 100644
@@ -0,0 +1,23 @@
@@ -0,0 +1,23 @@
+#!/usr/bin/env node
+'use strict';
+
+/**
+ * Runs every test/*.test.js in its own process and fails if any fails. The tests use stub Host and
+ * Tools clients; none needs the network or a running site.
+ *
+ * npm test # everything
+ * npm test -- routes # only files whose name contains the word
+ * npm test -- --strict # a skipped test fails the run too
+ */
+const { run } = require('openvibe-shared/test-runner');
+
+run({ dir: __dirname, timeoutMs: 60_000, pad: 34, parallel: 1 }).then((r) => {
+ if (process.env.VERBOSE) {
+ for (const t of r.results) console.log(`\n── ${t.file} ──\n${t.output.trimEnd()}`);
+ console.log(`\n${r.summary}`);
+ }
+ process.exit(r.exitCode);
+}, (err) => {
+ console.error(err);
+ process.exit(1);
+});