Merge branch 'develop' into feat/openprovider-provider
8
.env
@ -42,18 +42,22 @@ CORS_ALLOW_ORIGIN='^https?://(localhost|127\.0\.0\.1)(:[0-9]+)?$'
|
|||||||
###> symfony/lock ###
|
###> symfony/lock ###
|
||||||
# Choose one of the stores below
|
# Choose one of the stores below
|
||||||
# postgresql+advisory://db_user:db_password@localhost/db_name
|
# postgresql+advisory://db_user:db_password@localhost/db_name
|
||||||
LOCK_DSN=flock
|
LOCK_DSN=redis://localhost:6379
|
||||||
###< symfony/lock ###
|
###< symfony/lock ###
|
||||||
|
|
||||||
###> symfony/mailer ###
|
###> symfony/mailer ###
|
||||||
MAILER_DSN=null://null
|
MAILER_DSN=null://null
|
||||||
###< symfony/mailer ###
|
###< symfony/mailer ###
|
||||||
|
|
||||||
|
MESSENGER_CONSUMER_NAME=worker
|
||||||
|
|
||||||
###> symfony/messenger ###
|
###> symfony/messenger ###
|
||||||
# Choose one of the transports below
|
# Choose one of the transports below
|
||||||
# MESSENGER_TRANSPORT_DSN=amqp://guest:guest@localhost:5672/%2f/messages
|
# MESSENGER_TRANSPORT_DSN=amqp://guest:guest@localhost:5672/%2f/messages
|
||||||
# MESSENGER_TRANSPORT_DSN=redis://localhost:6379/messages
|
# MESSENGER_TRANSPORT_DSN=redis://localhost:6379/messages
|
||||||
MESSENGER_TRANSPORT_DSN=doctrine://default?auto_setup=0
|
MESSENGER_ASYNC_TRANSPORT_DSN=redis://localhost:6379/messages?lazy=1
|
||||||
|
MESSENGER_RDAP_LOW_TRANSPORT_DSN=redis://localhost:6379/messages-rdap-low?lazy=1
|
||||||
|
MESSENGER_RDAP_HIGH_TRANSPORT_DSN=redis://localhost:6379/messages-rdap-high?lazy=1
|
||||||
###< symfony/messenger ###
|
###< symfony/messenger ###
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
15
.github/workflows/lint-and-tests.yml
vendored
@ -2,9 +2,11 @@ name: Lint and Tests
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ "master", "develop" ]
|
branches: [ "develop" ]
|
||||||
|
paths-ignore: [ "docs/**" ]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ "master", "develop" ]
|
branches: [ "develop" ]
|
||||||
|
paths-ignore: [ "docs/**" ]
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
@ -121,6 +123,15 @@ jobs:
|
|||||||
--health-retries 5
|
--health-retries 5
|
||||||
ports:
|
ports:
|
||||||
- 5432:5432
|
- 5432:5432
|
||||||
|
valkey:
|
||||||
|
image: valkey/valkey:latest
|
||||||
|
options: >-
|
||||||
|
--health-cmd "valkey-cli ping"
|
||||||
|
--health-interval 10s
|
||||||
|
--health-timeout 5s
|
||||||
|
--health-retries 5
|
||||||
|
ports:
|
||||||
|
- 6379:6379
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|||||||
44
.github/workflows/publish-docs.yml
vendored
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
name: Publish Documentation
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
paths: [ 'docs/**' ]
|
||||||
|
branches: [ develop ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
environment:
|
||||||
|
name: Domain Watchdog Documentation
|
||||||
|
url: https://domainwatchdog.eu
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout source
|
||||||
|
uses: actions/checkout@v5
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Setup Node
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 24
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm install --global yarn && yarn install
|
||||||
|
working-directory: docs
|
||||||
|
|
||||||
|
- name: Build Astro site
|
||||||
|
run: yarn run build
|
||||||
|
working-directory: docs
|
||||||
|
|
||||||
|
- name: Upload build via SCP
|
||||||
|
uses: appleboy/scp-action@master
|
||||||
|
with:
|
||||||
|
host: dw1.srv.domainwatchdog.eu
|
||||||
|
port: 2004
|
||||||
|
username: deploy
|
||||||
|
key: ${{ secrets.DEPLOYER_PRIVATE_KEY }}
|
||||||
|
source: "docs/dist/*"
|
||||||
|
target: /var/www/domainwatchdog.eu/
|
||||||
|
overwrite: true
|
||||||
|
debug: true
|
||||||
@ -1,118 +1,87 @@
|
|||||||
# Code of conduct
|
# Contributor Covenant 3.0 Code of Conduct
|
||||||
|
|
||||||
## Our Pledge
|
## Our Pledge
|
||||||
|
|
||||||
We as members, contributors, and leaders pledge to make participation in our
|
We pledge to make our community welcoming, safe, and equitable for all.
|
||||||
community a harassment-free experience for everyone, regardless of age, body
|
|
||||||
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
|
||||||
identity and expression, level of experience, education, socio-economic status,
|
|
||||||
nationality, personal appearance, race, caste, color, religion, or sexual
|
|
||||||
identity and orientation.
|
|
||||||
|
|
||||||
We pledge to act and interact in ways that contribute to an open, welcoming,
|
We are committed to fostering an environment that respects and promotes the dignity, rights, and contributions of all individuals, regardless of characteristics including race, ethnicity, caste, color, age, physical characteristics, neurodiversity, disability, sex or gender, gender identity or expression, sexual orientation, language, philosophy or religion, national or social origin, socio-economic position, level of education, or other status. The same privileges of participation are extended to everyone who participates in good faith and in accordance with this Covenant.
|
||||||
diverse, inclusive, and healthy community.
|
|
||||||
|
|
||||||
## Our Standards
|
|
||||||
|
|
||||||
Examples of behavior that contributes to a positive environment for our
|
## Encouraged Behaviors
|
||||||
community include:
|
|
||||||
|
|
||||||
* Demonstrating empathy and kindness toward other people
|
While acknowledging differences in social norms, we all strive to meet our community's expectations for positive behavior. We also understand that our words and actions may be interpreted differently than we intend based on culture, background, or native language.
|
||||||
* Being respectful of differing opinions, viewpoints, and experiences
|
|
||||||
* Giving and gracefully accepting constructive feedback
|
|
||||||
* Accepting responsibility and apologizing to those affected by our mistakes,
|
|
||||||
and learning from the experience
|
|
||||||
* Focusing on what is best not just for us as individuals, but for the overall
|
|
||||||
community
|
|
||||||
|
|
||||||
Examples of unacceptable behavior include:
|
With these considerations in mind, we agree to behave mindfully toward each other and act in ways that center our shared values, including:
|
||||||
|
|
||||||
* The use of sexualized language or imagery, and sexual attention or advances of
|
1. Respecting the **purpose of our community**, our activities, and our ways of gathering.
|
||||||
any kind
|
2. Engaging **kindly and honestly** with others.
|
||||||
* Trolling, insulting or derogatory comments, and personal or political attacks
|
3. Respecting **different viewpoints** and experiences.
|
||||||
* Public or private harassment
|
4. **Taking responsibility** for our actions and contributions.
|
||||||
* Publishing others' private information, such as a physical or email address,
|
5. Gracefully giving and accepting **constructive feedback**.
|
||||||
without their explicit permission
|
6. Committing to **repairing harm** when it occurs.
|
||||||
* Other conduct which could reasonably be considered inappropriate in a
|
7. Behaving in other ways that promote and sustain the **well-being of our community**.
|
||||||
professional setting
|
|
||||||
|
|
||||||
## Enforcement Responsibilities
|
|
||||||
|
|
||||||
Community leaders are responsible for clarifying and enforcing our standards of
|
## Restricted Behaviors
|
||||||
acceptable behavior and will take appropriate and fair corrective action in
|
|
||||||
response to any behavior that they deem inappropriate, threatening, offensive,
|
We agree to restrict the following behaviors in our community. Instances, threats, and promotion of these behaviors are violations of this Code of Conduct.
|
||||||
or harmful.
|
|
||||||
|
1. **Harassment.** Violating explicitly expressed boundaries or engaging in unnecessary personal attention after any clear request to stop.
|
||||||
|
2. **Character attacks.** Making insulting, demeaning, or pejorative comments directed at a community member or group of people.
|
||||||
|
3. **Stereotyping or discrimination.** Characterizing anyone’s personality or behavior on the basis of immutable identities or traits.
|
||||||
|
4. **Sexualization.** Behaving in a way that would generally be considered inappropriately intimate in the context or purpose of the community.
|
||||||
|
5. **Violating confidentiality**. Sharing or acting on someone's personal or private information without their permission.
|
||||||
|
6. **Endangerment.** Causing, encouraging, or threatening violence or other harm toward any person or group.
|
||||||
|
7. Behaving in other ways that **threaten the well-being** of our community.
|
||||||
|
|
||||||
|
### Other Restrictions
|
||||||
|
|
||||||
|
1. **Misleading identity.** Impersonating someone else for any reason, or pretending to be someone else to evade enforcement actions.
|
||||||
|
2. **Failing to credit sources.** Not properly crediting the sources of content you contribute.
|
||||||
|
3. **Promotional materials**. Sharing marketing or other commercial content in a way that is outside the norms of the community.
|
||||||
|
4. **Irresponsible communication.** Failing to responsibly present content which includes, links or describes any other restricted behaviors.
|
||||||
|
|
||||||
|
|
||||||
|
## Reporting an Issue
|
||||||
|
|
||||||
|
Tensions can occur between community members even when they are trying their best to collaborate. Not every conflict represents a code of conduct violation, and this Code of Conduct reinforces encouraged behaviors and norms that can help avoid conflicts and minimize harm.
|
||||||
|
|
||||||
|
When an incident does occur, it is important to report it promptly. To report a possible violation, please contact the maintainer.
|
||||||
|
|
||||||
|
Community Moderators take reports of violations seriously and will make every effort to respond in a timely manner. They will investigate all reports of code of conduct violations, reviewing messages, logs, and recordings, or interviewing witnesses and other participants. Community Moderators will keep investigation and enforcement actions as transparent as possible while prioritizing safety and confidentiality. In order to honor these values, enforcement actions are carried out in private with the involved parties, but communicating to the whole community may be part of a mutually agreed upon resolution.
|
||||||
|
|
||||||
|
|
||||||
|
## Addressing and Repairing Harm
|
||||||
|
|
||||||
|
If an investigation by the Community Moderators finds that this Code of Conduct has been violated, the following enforcement ladder may be used to determine how best to repair harm, based on the incident's impact on the individuals involved and the community as a whole. Depending on the severity of a violation, lower rungs on the ladder may be skipped.
|
||||||
|
|
||||||
|
1) Warning
|
||||||
|
1) Event: A violation involving a single incident or series of incidents.
|
||||||
|
2) Consequence: A private, written warning from the Community Moderators.
|
||||||
|
3) Repair: Examples of repair include a private written apology, acknowledgement of responsibility, and seeking clarification on expectations.
|
||||||
|
2) Temporarily Limited Activities
|
||||||
|
1) Event: A repeated incidence of a violation that previously resulted in a warning, or the first incidence of a more serious violation.
|
||||||
|
2) Consequence: A private, written warning with a time-limited cooldown period designed to underscore the seriousness of the situation and give the community members involved time to process the incident. The cooldown period may be limited to particular communication channels or interactions with particular community members.
|
||||||
|
3) Repair: Examples of repair may include making an apology, using the cooldown period to reflect on actions and impact, and being thoughtful about re-entering community spaces after the period is over.
|
||||||
|
3) Temporary Suspension
|
||||||
|
1) Event: A pattern of repeated violation which the Community Moderators have tried to address with warnings, or a single serious violation.
|
||||||
|
2) Consequence: A private written warning with conditions for return from suspension. In general, temporary suspensions give the person being suspended time to reflect upon their behavior and possible corrective actions.
|
||||||
|
3) Repair: Examples of repair include respecting the spirit of the suspension, meeting the specified conditions for return, and being thoughtful about how to reintegrate with the community when the suspension is lifted.
|
||||||
|
4) Permanent Ban
|
||||||
|
1) Event: A pattern of repeated code of conduct violations that other steps on the ladder have failed to resolve, or a violation so serious that the Community Moderators determine there is no way to keep the community safe with this person as a member.
|
||||||
|
2) Consequence: Access to all community spaces, tools, and communication channels is removed. In general, permanent bans should be rarely used, should have strong reasoning behind them, and should only be resorted to if working through other remedies has failed to change the behavior.
|
||||||
|
3) Repair: There is no possible repair in cases of this severity.
|
||||||
|
|
||||||
|
This enforcement ladder is intended as a guideline. It does not limit the ability of Community Managers to use their discretion and judgment, in keeping with the best interests of our community.
|
||||||
|
|
||||||
Community leaders have the right and responsibility to remove, edit, or reject
|
|
||||||
comments, commits, code, wiki edits, issues, and other contributions that are
|
|
||||||
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
|
||||||
decisions when appropriate.
|
|
||||||
|
|
||||||
## Scope
|
## Scope
|
||||||
|
|
||||||
This Code of Conduct applies within all community spaces, and also applies when
|
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public or other spaces. Examples of representing our community include using an official email address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
|
||||||
an individual is officially representing the community in public spaces.
|
|
||||||
Examples of representing our community include using an official email address,
|
|
||||||
posting via an official social media account, or acting as an appointed
|
|
||||||
representative at an online or offline event.
|
|
||||||
|
|
||||||
## Enforcement
|
|
||||||
|
|
||||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
||||||
reported to the community leaders responsible for enforcement at contact@maelgangloff.fr.
|
|
||||||
All complaints will be reviewed and investigated promptly and fairly.
|
|
||||||
|
|
||||||
All community leaders are obligated to respect the privacy and security of the
|
|
||||||
reporter of any incident.
|
|
||||||
|
|
||||||
## Enforcement Guidelines
|
|
||||||
|
|
||||||
Community leaders will follow these Community Impact Guidelines in determining
|
|
||||||
the consequences for any action they deem in violation of this Code of Conduct:
|
|
||||||
|
|
||||||
### 1. Correction
|
|
||||||
|
|
||||||
**Community Impact**: Use of inappropriate language or other behavior deemed
|
|
||||||
unprofessional or unwelcome in the community.
|
|
||||||
|
|
||||||
**Consequence**: A private, written warning from community leaders, providing
|
|
||||||
clarity around the nature of the violation and an explanation of why the
|
|
||||||
behavior was inappropriate. A public apology may be requested.
|
|
||||||
|
|
||||||
### 2. Warning
|
|
||||||
|
|
||||||
**Community Impact**: A violation through a single incident or series of
|
|
||||||
actions.
|
|
||||||
|
|
||||||
**Consequence**: A warning with consequences for continued behavior. No
|
|
||||||
interaction with the people involved, including unsolicited interaction with
|
|
||||||
those enforcing the Code of Conduct, for a specified period of time. This
|
|
||||||
includes avoiding interactions in community spaces as well as external channels
|
|
||||||
like social media. Violating these terms may lead to a temporary or permanent
|
|
||||||
ban.
|
|
||||||
|
|
||||||
### 3. Temporary Ban
|
|
||||||
|
|
||||||
**Community Impact**: A serious violation of community standards, including
|
|
||||||
sustained inappropriate behavior.
|
|
||||||
|
|
||||||
**Consequence**: A temporary ban from any sort of interaction or public
|
|
||||||
communication with the community for a specified period of time. No public or
|
|
||||||
private interaction with the people involved, including unsolicited interaction
|
|
||||||
with those enforcing the Code of Conduct, is allowed during this period.
|
|
||||||
Violating these terms may lead to a permanent ban.
|
|
||||||
|
|
||||||
### 4. Permanent Ban
|
|
||||||
|
|
||||||
**Community Impact**: Demonstrating a pattern of violation of community
|
|
||||||
standards, including sustained inappropriate behavior, harassment of an
|
|
||||||
individual, or aggression toward or disparagement of classes of individuals.
|
|
||||||
|
|
||||||
**Consequence**: A permanent ban from any sort of public interaction within the
|
|
||||||
community.
|
|
||||||
|
|
||||||
## Attribution
|
## Attribution
|
||||||
|
|
||||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
This Code of Conduct is adapted from the Contributor Covenant, version 3.0, permanently available at [https://www.contributor-covenant.org/version/3/0/](https://www.contributor-covenant.org/version/3/0/).
|
||||||
version 2.1, available at
|
|
||||||
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
|
Contributor Covenant is stewarded by the Organization for Ethical Source and licensed under CC BY-SA 4.0. To view a copy of this license, visit [https://creativecommons.org/licenses/by-sa/4.0/](https://creativecommons.org/licenses/by-sa/4.0/)
|
||||||
|
|||||||
121
INSTALL.md
@ -1,121 +0,0 @@
|
|||||||
# Installation and Update
|
|
||||||
|
|
||||||
## Installation
|
|
||||||
|
|
||||||
To deploy a Domain Watchdog instance, please refer to the Symfony documentation
|
|
||||||
on [How to deploy a Symfony application](https://symfony.com/doc/current/deployment.html).
|
|
||||||
|
|
||||||
### Prerequisites
|
|
||||||
|
|
||||||
- PHP 8.2 or higher
|
|
||||||
- PostgreSQL 16 or higher
|
|
||||||
|
|
||||||
In order to retrieve information about domain names, Domain Watchdog will query the RDAP server responsible for the TLD.
|
|
||||||
It is crucial that the Domain Watchdog instance is placed in a clean environment from which these servers can be
|
|
||||||
queried.
|
|
||||||
In particular, the DNS servers and root certificates of the system must be trusted.
|
|
||||||
|
|
||||||
### Steps
|
|
||||||
|
|
||||||
Clone the repository:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
git clone https://github.com/maelgangloff/domain-watchdog.git
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Backend
|
|
||||||
|
|
||||||
1. Install dependencies:
|
|
||||||
```shell
|
|
||||||
composer install
|
|
||||||
```
|
|
||||||
2. Set up your environment variables:
|
|
||||||
```shell
|
|
||||||
cp .env .env.local
|
|
||||||
```
|
|
||||||
3. Generate the cryptographic key pair for the JWT signature
|
|
||||||
```shell
|
|
||||||
php bin/console lexik:jwt:generate-keypair
|
|
||||||
```
|
|
||||||
4. Run database migrations:
|
|
||||||
```shell
|
|
||||||
php bin/console doctrine:migrations:migrate
|
|
||||||
```
|
|
||||||
5. Start the Symfony server:
|
|
||||||
```shell
|
|
||||||
symfony server:start
|
|
||||||
```
|
|
||||||
6. Build assets:
|
|
||||||
```shell
|
|
||||||
php bin/console assets:install
|
|
||||||
```
|
|
||||||
7. Don't forget to set up workers to process the [message queue](https://symfony.com/doc/current/messenger.html)
|
|
||||||
|
|
||||||
#### Frontend
|
|
||||||
|
|
||||||
1. Install dependencies:
|
|
||||||
```shell
|
|
||||||
yarn install
|
|
||||||
```
|
|
||||||
2. Generate language files:
|
|
||||||
```shell
|
|
||||||
yarn run ttag:po2json
|
|
||||||
```
|
|
||||||
3. Make the final build:
|
|
||||||
```shell
|
|
||||||
yarn build
|
|
||||||
```
|
|
||||||
4. Add and modify the following files as you wish:
|
|
||||||
~~~
|
|
||||||
public/content/home.md
|
|
||||||
public/content/privacy.md
|
|
||||||
public/content/tos.md
|
|
||||||
public/content/faq.md
|
|
||||||
public/images/icons-512.png
|
|
||||||
public/images/banner.png
|
|
||||||
public/favicon.ico
|
|
||||||
~~~
|
|
||||||
|
|
||||||
## Update
|
|
||||||
|
|
||||||
**Any updates are your responsibility. Make a backup of the data if necessary.**
|
|
||||||
|
|
||||||
Fetch updates from the remote repository:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
git pull origin master
|
|
||||||
```
|
|
||||||
|
|
||||||
### Backend
|
|
||||||
|
|
||||||
1. Install dependencies:
|
|
||||||
```shell
|
|
||||||
composer install
|
|
||||||
```
|
|
||||||
2. Run database migrations:
|
|
||||||
```shell
|
|
||||||
php bin/console doctrine:migrations:migrate
|
|
||||||
```
|
|
||||||
3. Clearing the Symfony cache:
|
|
||||||
```shell
|
|
||||||
php bin/console cache:clear
|
|
||||||
```
|
|
||||||
4. Build assets:
|
|
||||||
```shell
|
|
||||||
php bin/console assets:install
|
|
||||||
```
|
|
||||||
|
|
||||||
### Frontend
|
|
||||||
|
|
||||||
1. Install dependencies:
|
|
||||||
```shell
|
|
||||||
yarn install
|
|
||||||
```
|
|
||||||
2. Generate language files:
|
|
||||||
```shell
|
|
||||||
yarn run ttag:po2json
|
|
||||||
```
|
|
||||||
3. Make the final build:
|
|
||||||
```shell
|
|
||||||
yarn build
|
|
||||||
```
|
|
||||||
105
README.md
@ -3,8 +3,9 @@
|
|||||||
<p align="center">Your companion in the quest for domain names 🔍 <br/><a href="https://domainwatchdog.eu">domainwatchdog.eu »</a></p>
|
<p align="center">Your companion in the quest for domain names 🔍 <br/><a href="https://domainwatchdog.eu">domainwatchdog.eu »</a></p>
|
||||||
<br/>
|
<br/>
|
||||||
|
|
||||||
Domain Watchdog is an app that uses RDAP to collect publicly available info about domains, track their history, and purchase them.
|
Domain Watchdog is an app that uses RDAP to collect publicly available info about domains, track their history, and
|
||||||
For more information please check [the wiki](https://github.com/maelgangloff/domain-watchdog/wiki) !
|
purchase them.
|
||||||
|
For more information please check out [the documentation](https://domainwatchdog.eu) !
|
||||||
|
|
||||||
## Why use it?
|
## Why use it?
|
||||||
|
|
||||||
@ -20,73 +21,42 @@ detailed history of events (ownership changes, renewals, etc.) is not feasible w
|
|||||||
## Install
|
## Install
|
||||||
|
|
||||||
> [!TIP]
|
> [!TIP]
|
||||||
> For more details on the installation procedure, please refer to [INSTALL.md](/INSTALL.md).
|
> For more details on the installation procedure, please refer to [the documentation](https://domainwatchdog.eu/en/self-hosting/docker-install/).
|
||||||
|
|
||||||
### Docker Deployment
|
### Docker Deployment
|
||||||
|
|
||||||
1. Clone the repository
|
1. Download the [docker-compose.yml](https://github.com/maelgangloff/domain-watchdog/blob/develop/docker-compose.yml)
|
||||||
2. Modify environment variables (.env) and add static files to customize your instance (see [INSTALL.md](/INSTALL.md))
|
and modify it as needed
|
||||||
3. Pull the latest version of the Domain Watchdog image from Docker Hub.
|
2. Download the [.env](https://github.com/maelgangloff/domain-watchdog/blob/develop/.env) and modify it as needed
|
||||||
```shell
|
3. Add static files to customize your instance (under `public/content`)
|
||||||
docker compose pull
|
4. Pull the latest version of the Domain Watchdog image from Docker Hub
|
||||||
```
|
|
||||||
4. Start the project in production environment. If you want, you can also build the Docker image to use yourself.
|
```shell
|
||||||
```shell
|
docker compose pull
|
||||||
docker compose up
|
```
|
||||||
```
|
|
||||||
|
5. Start the project in production environment
|
||||||
|
|
||||||
|
```shell
|
||||||
|
docker compose up
|
||||||
|
```
|
||||||
|
|
||||||
By default, the container listens on http://localhost:8080, but you can configure this in environment variables.
|
By default, the container listens on http://localhost:8080, but you can configure this in environment variables.
|
||||||
See the [Docker Compose file](./docker-compose.yml).
|
|
||||||
|
|
||||||
## Features
|
## Development and contributions
|
||||||
|
|
||||||
### Auto-purchase domain
|
See [the documentation](https://domainwatchdog.eu) for information on setting up a development environment and making
|
||||||
|
your contributions.
|
||||||
|
To add a new provider, a [dedicated page](https://domainwatchdog.eu/en/developing/implementing-new-provider/) is available.
|
||||||
|
|
||||||
A connector is a way to order a domain name. It is important to mention that this project does not act as a payment
|
## Security
|
||||||
intermediary.
|
|
||||||
Indeed, the user's credentials are directly used to enable the purchase via the provider's API. To this end, the user
|
|
||||||
gives his consent to define the legal framework in which the use of his account with the provider's API will be made.
|
|
||||||
|
|
||||||
The table below lists the supported API connector providers:
|
Please see [SECURITY.md](./SECURITY.md).
|
||||||
|
|
||||||
| Provider | Supported |
|
## License
|
||||||
|:--------------------------------------------------------------------------:|:----------------:|
|
|
||||||
| [OVH](https://api.ovh.com) | **Yes** |
|
|
||||||
| [GANDI](https://api.gandi.net/docs/domains/) | **Yes** |
|
|
||||||
| [NAMECHEAP](https://www.namecheap.com/support/api/methods/domains/create/) | **Yes** |
|
|
||||||
| [AUTODNS](https://cloud.autodns.com/) | **Yes** |
|
|
||||||
| [NAME.COM](https://www.name.com/en-en/api-docs/) | **Yes** |
|
|
||||||
| Custom EPP Server | **EXPERIMENTAL** |
|
|
||||||
|
|
||||||
If a domain has expired and a connector is linked to the Watchlist, then Domain Watchdog will try to order it via the
|
This source code of this project is licensed under *GNU Affero General Public License v3.0 or later*.
|
||||||
connector provider's API.
|
Contributions are welcome as long as they do not contravene the Code of Conduct.
|
||||||
|
|
||||||
Note: If the same domain name is present on several Watchlists, it is not possible to predict in advance which user will
|
|
||||||
win the domain name. The choice is left to chance.
|
|
||||||
|
|
||||||
### Monitoring
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
|
|
||||||
A watchlist is a list of domain names, triggers and possibly an API connector.
|
|
||||||
|
|
||||||
They allow you to follow the life of the listed domain names and send you a notification when a change has been
|
|
||||||
detected.
|
|
||||||
|
|
||||||
A notification to the user is sent when a new event occurs on one of the domain names in the Watchlist. This can be an
|
|
||||||
email or a chat via Webhook (Slack, Mattermost, Discord, ...). An iCalendar export of domain events is possible.
|
|
||||||
|
|
||||||
### RDAP search
|
|
||||||
|
|
||||||
The latest version of the WHOIS protocol was standardized in 2004 by RFC 3912.[^1] This protocol allows anyone to
|
|
||||||
retrieve key information concerning a domain name, an IP address, or an entity registered with a registry.
|
|
||||||
|
|
||||||
ICANN launched a global vote in 2023 to propose replacing the WHOIS protocol with RDAP. As a result, registries and
|
|
||||||
registrars will no longer be required to support WHOIS from 2025 (*WHOIS Sunset Date*).[^2]
|
|
||||||
|
|
||||||
Domain Watchdog uses the RDAP protocol, which will soon be the new standard for retrieving information concerning domain
|
|
||||||
names.
|
|
||||||
|
|
||||||
## Disclaimer
|
## Disclaimer
|
||||||
|
|
||||||
@ -96,20 +66,5 @@ names.
|
|||||||
caching system, etc.
|
caching system, etc.
|
||||||
> * Please note that this project is NOT affiliated IN ANY WAY with the API Providers used to order domain names.
|
> * Please note that this project is NOT affiliated IN ANY WAY with the API Providers used to order domain names.
|
||||||
> * The project installers are responsible for the use of their own instance.
|
> * The project installers are responsible for the use of their own instance.
|
||||||
> * Under no circumstances will the owner of this project be held responsible for other cases over which he has no control.
|
> * Under no circumstances will the owner of this project be held responsible for other cases over which he has no
|
||||||
|
control.
|
||||||
## Useful documentation
|
|
||||||
|
|
||||||
> [!NOTE]
|
|
||||||
> - [RFC 7482 : Registration Data Access Protocol (RDAP) Query Format](https://datatracker.ietf.org/doc/html/rfc7482)
|
|
||||||
> - [RFC 7483 : JSON Responses for the Registration Data Access Protocol (RDAP)](https://datatracker.ietf.org/doc/html/rfc7483)
|
|
||||||
> - [RFC 7484 : Finding the Authoritative Registration Data (RDAP) Service](https://datatracker.ietf.org/doc/html/rfc7484)
|
|
||||||
|
|
||||||
## Licensing
|
|
||||||
|
|
||||||
This source code of this project is licensed under *GNU Affero General Public License v3.0 or later*.
|
|
||||||
Contributions are welcome as long as they do not contravene the Code of Conduct.
|
|
||||||
|
|
||||||
[^1]: RFC 3912 : WHOIS Protocol Specification. (2004). IETF Datatracker. https://datatracker.ietf.org/doc/html/rfc3912
|
|
||||||
[^2]: 2023 Global Amendments to the Base gTLD Registry Agreement (RA), Specification 13, and 2013 Registrar
|
|
||||||
Accreditation Agreement (RAA) - ICANN. (2023). https://www.icann.org/resources/pages/global-amendment-2023-en
|
|
||||||
|
|||||||
104
assets/App.tsx
@ -1,4 +1,4 @@
|
|||||||
import {Button, ConfigProvider, FloatButton, Layout, Space, theme, Tooltip, Typography} from 'antd'
|
import {Button, ConfigProvider, Drawer, Flex, Layout, theme, Typography} from 'antd'
|
||||||
import {Link, Navigate, Route, Routes, useLocation, useNavigate} from 'react-router-dom'
|
import {Link, Navigate, Route, Routes, useLocation, useNavigate} from 'react-router-dom'
|
||||||
import TextPage from './pages/TextPage'
|
import TextPage from './pages/TextPage'
|
||||||
import DomainSearchPage from './pages/search/DomainSearchPage'
|
import DomainSearchPage from './pages/search/DomainSearchPage'
|
||||||
@ -7,7 +7,8 @@ import TldPage from './pages/infrastructure/TldPage'
|
|||||||
import StatisticsPage from './pages/StatisticsPage'
|
import StatisticsPage from './pages/StatisticsPage'
|
||||||
import WatchlistPage from './pages/tracking/WatchlistPage'
|
import WatchlistPage from './pages/tracking/WatchlistPage'
|
||||||
import UserPage from './pages/UserPage'
|
import UserPage from './pages/UserPage'
|
||||||
import React, {useCallback, useEffect, useMemo, useState} from 'react'
|
import type {PropsWithChildren} from 'react'
|
||||||
|
import React, { useCallback, useEffect, useMemo, useState} from 'react'
|
||||||
import {getUser} from './utils/api'
|
import {getUser} from './utils/api'
|
||||||
import LoginPage, {AuthenticatedContext} from './pages/LoginPage'
|
import LoginPage, {AuthenticatedContext} from './pages/LoginPage'
|
||||||
import ConnectorPage from './pages/tracking/ConnectorPage'
|
import ConnectorPage from './pages/tracking/ConnectorPage'
|
||||||
@ -15,21 +16,56 @@ import NotFoundPage from './pages/NotFoundPage'
|
|||||||
import useBreakpoint from './hooks/useBreakpoint'
|
import useBreakpoint from './hooks/useBreakpoint'
|
||||||
import {Sider} from './components/Sider'
|
import {Sider} from './components/Sider'
|
||||||
import {jt, t} from 'ttag'
|
import {jt, t} from 'ttag'
|
||||||
import {BugOutlined, InfoCircleOutlined, MergeOutlined} from '@ant-design/icons'
|
import {MenuOutlined} from '@ant-design/icons'
|
||||||
import TrackedDomainPage from './pages/tracking/TrackedDomainPage'
|
import TrackedDomainPage from './pages/tracking/TrackedDomainPage'
|
||||||
import IcannRegistrarPage from "./pages/infrastructure/IcannRegistrarPage"
|
import IcannRegistrarPage from "./pages/infrastructure/IcannRegistrarPage"
|
||||||
|
|
||||||
const PROJECT_LINK = 'https://github.com/maelgangloff/domain-watchdog'
|
const PROJECT_LINK = 'https://github.com/maelgangloff/domain-watchdog'
|
||||||
const LICENSE_LINK = 'https://www.gnu.org/licenses/agpl-3.0.txt'
|
const LICENSE_LINK = 'https://www.gnu.org/licenses/agpl-3.0.txt'
|
||||||
|
|
||||||
const ProjectLink = <Typography.Link target='_blank' href={PROJECT_LINK}>Domain Watchdog</Typography.Link>
|
const ProjectLink = <Typography.Link key="projectLink" target='_blank' href={PROJECT_LINK}>Domain Watchdog</Typography.Link>
|
||||||
const LicenseLink = <Typography.Link target='_blank' href={LICENSE_LINK}>AGPL-3.0-or-later</Typography.Link>
|
const LicenseLink = <Typography.Link key="licenceLink" target='_blank' href={LICENSE_LINK}>AGPL-3.0-or-later</Typography.Link>
|
||||||
|
|
||||||
|
function SiderWrapper(props: PropsWithChildren<{sidebarCollapsed: boolean, setSidebarCollapsed: (collapsed: boolean) => void}>): React.ReactElement {
|
||||||
|
const {sidebarCollapsed, setSidebarCollapsed, children} = props
|
||||||
|
const sm = useBreakpoint('sm')
|
||||||
|
const location = useLocation()
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (sm) {
|
||||||
|
setSidebarCollapsed(false)
|
||||||
|
}
|
||||||
|
}, [location])
|
||||||
|
|
||||||
|
if (sm) {
|
||||||
|
return <Drawer
|
||||||
|
placement="left"
|
||||||
|
open={sidebarCollapsed}
|
||||||
|
onClose={() => setSidebarCollapsed(false)}
|
||||||
|
closeIcon={null}
|
||||||
|
styles={{body: {padding: 0, height: '100%', background: '#001529'}}}
|
||||||
|
width='200px'>
|
||||||
|
{children}
|
||||||
|
</Drawer>
|
||||||
|
} else {
|
||||||
|
return <Layout.Sider
|
||||||
|
collapsible
|
||||||
|
breakpoint='sm'
|
||||||
|
width={220}
|
||||||
|
trigger={null}
|
||||||
|
collapsed={sidebarCollapsed && sm}
|
||||||
|
{...(sm ? {collapsedWidth: 0} : {})}>
|
||||||
|
{children}
|
||||||
|
</Layout.Sider>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export default function App(): React.ReactElement {
|
export default function App(): React.ReactElement {
|
||||||
const navigate = useNavigate()
|
const navigate = useNavigate()
|
||||||
const location = useLocation()
|
const location = useLocation()
|
||||||
const sm = useBreakpoint('sm')
|
const sm = useBreakpoint('sm')
|
||||||
|
|
||||||
|
const [sidebarCollapsed, setSidebarCollapsed] = useState(false)
|
||||||
const [isAuthenticated, setIsAuthenticated] = useState(false)
|
const [isAuthenticated, setIsAuthenticated] = useState(false)
|
||||||
|
|
||||||
const authenticated = useCallback((authenticated: boolean) => {
|
const authenticated = useCallback((authenticated: boolean) => {
|
||||||
@ -75,15 +111,20 @@ export default function App(): React.ReactElement {
|
|||||||
>
|
>
|
||||||
<AuthenticatedContext.Provider value={contextValue}>
|
<AuthenticatedContext.Provider value={contextValue}>
|
||||||
<Layout hasSider style={{minHeight: '100vh'}}>
|
<Layout hasSider style={{minHeight: '100vh'}}>
|
||||||
{/* Ant will use a break-off tab to toggle the collapse of the sider when collapseWidth = 0 */}
|
<SiderWrapper sidebarCollapsed={sidebarCollapsed} setSidebarCollapsed={setSidebarCollapsed}>
|
||||||
<Layout.Sider collapsible breakpoint='sm' width={220} {...(sm ? {collapsedWidth: 0} : {})}>
|
|
||||||
<Sider isAuthenticated={isAuthenticated}/>
|
<Sider isAuthenticated={isAuthenticated}/>
|
||||||
</Layout.Sider>
|
</SiderWrapper>
|
||||||
<Layout>
|
<Layout>
|
||||||
<Layout.Header style={{padding: 0}}/>
|
<Layout.Header style={{padding: 0}}>
|
||||||
|
{sm &&
|
||||||
|
<Button type="text" style={{marginLeft: 8}} onClick={() => setSidebarCollapsed(!sidebarCollapsed)}>
|
||||||
|
<MenuOutlined />
|
||||||
|
</Button>
|
||||||
|
}
|
||||||
|
</Layout.Header>
|
||||||
<Layout.Content style={sm ? {margin: '24px 0'} : {margin: '24px 16px 0'}}>
|
<Layout.Content style={sm ? {margin: '24px 0'} : {margin: '24px 16px 0'}}>
|
||||||
<div style={{
|
<div style={{
|
||||||
padding: 24,
|
padding: sm ? 8 : 24,
|
||||||
minHeight: 360
|
minHeight: 360
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@ -116,41 +157,40 @@ export default function App(): React.ReactElement {
|
|||||||
</div>
|
</div>
|
||||||
</Layout.Content>
|
</Layout.Content>
|
||||||
<Layout.Footer style={{textAlign: 'center'}}>
|
<Layout.Footer style={{textAlign: 'center'}}>
|
||||||
<Space size='middle' wrap align='center'>
|
<Flex gap='middle' wrap justify='center'>
|
||||||
<Link to='/tos'><Button type='text'>{t`TOS`}</Button></Link>
|
<Link to='/tos'><Button type='text'>{t`TOS`}</Button></Link>
|
||||||
<Link to='/privacy'><Button type='text'>{t`Privacy Policy`}</Button></Link>
|
<Link to='/privacy'><Button type='text'>{t`Privacy Policy`}</Button></Link>
|
||||||
<Link to='/faq'><Button type='text'>{t`FAQ`}</Button></Link>
|
<Link to='/faq'><Button type='text'>{t`FAQ`}</Button></Link>
|
||||||
<Typography.Link
|
<Typography.Link
|
||||||
target='_blank'
|
target='_blank'
|
||||||
href='https://github.com/maelgangloff/domain-watchdog/wiki'
|
href='https://domainwatchdog.eu'
|
||||||
>
|
>
|
||||||
<Button
|
<Button type='text'>
|
||||||
type='text'
|
{t`Documentation`}
|
||||||
>{t`Documentation`}
|
|
||||||
</Button>
|
</Button>
|
||||||
</Typography.Link>
|
</Typography.Link>
|
||||||
</Space>
|
<Typography.Link
|
||||||
|
target='_blank'
|
||||||
|
href={PROJECT_LINK}
|
||||||
|
>
|
||||||
|
<Button type='text'>
|
||||||
|
{t`Source code`}
|
||||||
|
</Button>
|
||||||
|
</Typography.Link>
|
||||||
|
<Typography.Link
|
||||||
|
target='_blank'
|
||||||
|
href={PROJECT_LINK + '/issues'}
|
||||||
|
>
|
||||||
|
<Button type='text'>
|
||||||
|
{t`Submit an issue`}
|
||||||
|
</Button>
|
||||||
|
</Typography.Link>
|
||||||
|
</Flex>
|
||||||
<Typography.Paragraph style={{marginTop: '1em'}}>
|
<Typography.Paragraph style={{marginTop: '1em'}}>
|
||||||
{jt`${ProjectLink} is an open source project distributed under the ${LicenseLink} license.`}
|
{jt`${ProjectLink} is an open source project distributed under the ${LicenseLink} license.`}
|
||||||
</Typography.Paragraph>
|
</Typography.Paragraph>
|
||||||
</Layout.Footer>
|
</Layout.Footer>
|
||||||
</Layout>
|
</Layout>
|
||||||
<FloatButton.Group
|
|
||||||
trigger='hover'
|
|
||||||
style={{
|
|
||||||
position: 'fixed',
|
|
||||||
insetInlineEnd: (100 - 40) / 2,
|
|
||||||
bottom: 100 - 40 / 2
|
|
||||||
}}
|
|
||||||
icon={<InfoCircleOutlined/>}
|
|
||||||
>
|
|
||||||
<Tooltip title={t`Official git repository`} placement='left'>
|
|
||||||
<FloatButton icon={<MergeOutlined/>} target='_blank' href={PROJECT_LINK}/>
|
|
||||||
</Tooltip>
|
|
||||||
<Tooltip title={t`Submit an issue`} placement='left'>
|
|
||||||
<FloatButton icon={<BugOutlined/>} target='_blank' href={PROJECT_LINK + '/issues'}/>
|
|
||||||
</Tooltip>
|
|
||||||
</FloatButton.Group>
|
|
||||||
</Layout>
|
</Layout>
|
||||||
</AuthenticatedContext.Provider>
|
</AuthenticatedContext.Provider>
|
||||||
</ConfigProvider>
|
</ConfigProvider>
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import {Button, Form, Input, message, Space} from 'antd'
|
import {Button, Flex, Form, Input, message} from 'antd'
|
||||||
import {t} from 'ttag'
|
import {t} from 'ttag'
|
||||||
import React, {useContext, useEffect} from 'react'
|
import React, {useContext, useEffect, useState} from 'react'
|
||||||
import {getUser, login} from '../utils/api'
|
import {getUser, login} from '../utils/api'
|
||||||
import {AuthenticatedContext} from '../pages/LoginPage'
|
import {AuthenticatedContext} from '../pages/LoginPage'
|
||||||
import {useNavigate} from 'react-router-dom'
|
import {useNavigate} from 'react-router-dom'
|
||||||
@ -16,6 +16,7 @@ export function LoginForm({ssoLogin}: { ssoLogin?: boolean }) {
|
|||||||
const navigate = useNavigate()
|
const navigate = useNavigate()
|
||||||
const [messageApi, contextHolder] = message.useMessage()
|
const [messageApi, contextHolder] = message.useMessage()
|
||||||
const {setIsAuthenticated} = useContext(AuthenticatedContext)
|
const {setIsAuthenticated} = useContext(AuthenticatedContext)
|
||||||
|
const [loading, setLoading] = useState(false)
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
getUser().then(() => {
|
getUser().then(() => {
|
||||||
@ -25,12 +26,15 @@ export function LoginForm({ssoLogin}: { ssoLogin?: boolean }) {
|
|||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
const onFinish = (data: FieldType) => {
|
const onFinish = (data: FieldType) => {
|
||||||
|
setLoading(true)
|
||||||
|
|
||||||
login(data.username, data.password).then(() => {
|
login(data.username, data.password).then(() => {
|
||||||
setIsAuthenticated(true)
|
setIsAuthenticated(true)
|
||||||
navigate('/home')
|
navigate('/home')
|
||||||
}).catch((e) => {
|
}).catch((e) => {
|
||||||
setIsAuthenticated(false)
|
setIsAuthenticated(false)
|
||||||
showErrorAPI(e, messageApi)
|
showErrorAPI(e, messageApi)
|
||||||
|
setLoading(false)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
@ -43,6 +47,7 @@ export function LoginForm({ssoLogin}: { ssoLogin?: boolean }) {
|
|||||||
style={{maxWidth: 600}}
|
style={{maxWidth: 600}}
|
||||||
onFinish={onFinish}
|
onFinish={onFinish}
|
||||||
autoComplete='off'
|
autoComplete='off'
|
||||||
|
disabled={loading}
|
||||||
>
|
>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t`Email address`}
|
label={t`Email address`}
|
||||||
@ -60,18 +65,15 @@ export function LoginForm({ssoLogin}: { ssoLogin?: boolean }) {
|
|||||||
<Input.Password/>
|
<Input.Password/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|
||||||
<Space>
|
<Flex wrap justify="center" gap="middle">
|
||||||
<Form.Item wrapperCol={{offset: 8, span: 16}}>
|
|
||||||
<Button type='primary' htmlType='submit'>
|
<Button type='primary' htmlType='submit'>
|
||||||
{t`Submit`}
|
{t`Submit`}
|
||||||
</Button>
|
</Button>
|
||||||
</Form.Item>
|
{ssoLogin &&
|
||||||
{ssoLogin && <Form.Item wrapperCol={{offset: 8, span: 16}}>
|
|
||||||
<Button type='dashed' htmlType='button' href='/login/oauth'>
|
<Button type='dashed' htmlType='button' href='/login/oauth'>
|
||||||
{t`Log in with SSO`}
|
{t`Log in with SSO`}
|
||||||
</Button>
|
</Button>}
|
||||||
</Form.Item>}
|
</Flex>
|
||||||
</Space>
|
|
||||||
</Form>
|
</Form>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
|
|||||||
@ -22,16 +22,16 @@ export function ConnectorsList({connectors, onDelete}: { connectors: ConnectorEl
|
|||||||
<>
|
<>
|
||||||
<Divider/>
|
<Divider/>
|
||||||
{connectors.map(connector => {
|
{connectors.map(connector => {
|
||||||
const createdAt = <Typography.Text strong>
|
const createdAt = <Typography.Text strong key={"createdAt"}>
|
||||||
{new Date(connector.createdAt).toLocaleString()}
|
{new Date(connector.createdAt).toLocaleString()}
|
||||||
</Typography.Text>
|
</Typography.Text>
|
||||||
const {watchlistCount} = connector
|
const {watchlistCount} = connector
|
||||||
const connectorName = Object.keys(ConnectorProvider).find(p => ConnectorProvider[p as keyof typeof ConnectorProvider] === connector.provider)
|
const connectorName = Object.keys(ConnectorProvider).find(p => ConnectorProvider[p as keyof typeof ConnectorProvider] === connector.provider)
|
||||||
|
|
||||||
return <>
|
return <Card
|
||||||
{contextHolder}
|
hoverable
|
||||||
<Card
|
key={connector.id}
|
||||||
hoverable title={<Space>
|
title={<Space>
|
||||||
{t`Connector ${connectorName}`}<Typography.Text code>{connector.id}</Typography.Text>
|
{t`Connector ${connectorName}`}<Typography.Text code>{connector.id}</Typography.Text>
|
||||||
</Space>}
|
</Space>}
|
||||||
size='small'
|
size='small'
|
||||||
@ -45,6 +45,7 @@ export function ConnectorsList({connectors, onDelete}: { connectors: ConnectorEl
|
|||||||
><DeleteFilled style={{color: token.colorError}}/>
|
><DeleteFilled style={{color: token.colorError}}/>
|
||||||
</Popconfirm>}
|
</Popconfirm>}
|
||||||
>
|
>
|
||||||
|
{contextHolder}
|
||||||
<Typography.Paragraph>{jt`Creation date: ${createdAt}`}</Typography.Paragraph>
|
<Typography.Paragraph>{jt`Creation date: ${createdAt}`}</Typography.Paragraph>
|
||||||
<Typography.Paragraph>{t`Used in: ${watchlistCount} Watchlist`}</Typography.Paragraph>
|
<Typography.Paragraph>{t`Used in: ${watchlistCount} Watchlist`}</Typography.Paragraph>
|
||||||
<Card.Meta description={
|
<Card.Meta description={
|
||||||
@ -58,7 +59,6 @@ The creation date corresponds to the date on which you consented to the creation
|
|||||||
</>
|
</>
|
||||||
}/>
|
}/>
|
||||||
</Card>
|
</Card>
|
||||||
</>
|
|
||||||
}
|
}
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
|
|||||||
@ -42,7 +42,6 @@ export function CreateWatchlistButton({onUpdateWatchlist, connectors}: {
|
|||||||
paddingBottom: 80
|
paddingBottom: 80
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
extra={<Button onClick={onClose}>{t`Cancel`}</Button>}
|
|
||||||
>
|
>
|
||||||
<WatchlistForm
|
<WatchlistForm
|
||||||
form={form}
|
form={form}
|
||||||
|
|||||||
@ -22,11 +22,13 @@ import {
|
|||||||
} from '@ant-design/icons'
|
} from '@ant-design/icons'
|
||||||
import {DomainToTag} from '../../../utils/functions/DomainToTag'
|
import {DomainToTag} from '../../../utils/functions/DomainToTag'
|
||||||
import {isDomainLocked} from "../../../utils/functions/isDomainLocked"
|
import {isDomainLocked} from "../../../utils/functions/isDomainLocked"
|
||||||
|
import useBreakpoint from "../../../hooks/useBreakpoint"
|
||||||
|
|
||||||
export function TrackedDomainTable() {
|
export function TrackedDomainTable() {
|
||||||
const REDEMPTION_NOTICE = (
|
const REDEMPTION_NOTICE = (
|
||||||
<Tooltip
|
<Tooltip
|
||||||
title={t`At least one domain name is in redemption period and will potentially be deleted soon`}
|
title={t`At least one domain name is in redemption period and will potentially be deleted soon`}
|
||||||
|
key="redeptionNotice"
|
||||||
>
|
>
|
||||||
<Tag color={eppStatusCodeToColor('redemption period')}>redemption period</Tag>
|
<Tag color={eppStatusCodeToColor('redemption period')}>redemption period</Tag>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
@ -35,6 +37,7 @@ export function TrackedDomainTable() {
|
|||||||
const PENDING_DELETE_NOTICE = (
|
const PENDING_DELETE_NOTICE = (
|
||||||
<Tooltip
|
<Tooltip
|
||||||
title={t`At least one domain name is pending deletion and will soon become available for registration again`}
|
title={t`At least one domain name is pending deletion and will soon become available for registration again`}
|
||||||
|
key="pendingDeleteNotice"
|
||||||
>
|
>
|
||||||
<Tag color={eppStatusCodeToColor('pending delete')}>pending delete</Tag>
|
<Tag color={eppStatusCodeToColor('pending delete')}>pending delete</Tag>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
@ -53,6 +56,7 @@ export function TrackedDomainTable() {
|
|||||||
const [dataTable, setDataTable] = useState<TableRow[]>([])
|
const [dataTable, setDataTable] = useState<TableRow[]>([])
|
||||||
const [total, setTotal] = useState<number>()
|
const [total, setTotal] = useState<number>()
|
||||||
const [specialNotice, setSpecialNotice] = useState<ReactElement[]>([])
|
const [specialNotice, setSpecialNotice] = useState<ReactElement[]>([])
|
||||||
|
const sm = useBreakpoint('sm')
|
||||||
|
|
||||||
const rdapStatusCodeDetailTranslated = rdapStatusCodeDetailTranslation()
|
const rdapStatusCodeDetailTranslated = rdapStatusCodeDetailTranslation()
|
||||||
|
|
||||||
@ -220,6 +224,7 @@ export function TrackedDomainTable() {
|
|||||||
text: <Tooltip
|
text: <Tooltip
|
||||||
placement='bottomLeft'
|
placement='bottomLeft'
|
||||||
title={rdapStatusCodeDetailTranslated[s as keyof typeof rdapStatusCodeDetailTranslated] || undefined}
|
title={rdapStatusCodeDetailTranslated[s as keyof typeof rdapStatusCodeDetailTranslated] || undefined}
|
||||||
|
key={s}
|
||||||
>
|
>
|
||||||
<Tag color={eppStatusCodeToColor(s)}>{s}</Tag>
|
<Tag color={eppStatusCodeToColor(s)}>{s}</Tag>
|
||||||
</Tooltip>,
|
</Tooltip>,
|
||||||
@ -268,7 +273,8 @@ export function TrackedDomainTable() {
|
|||||||
fetchData({page, itemsPerPage})
|
fetchData({page, itemsPerPage})
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
scroll={{y: '50vh'}}
|
scroll={sm ? {} : {y: '50vh'}}
|
||||||
|
size={sm ? 'small' : 'large'}
|
||||||
/>
|
/>
|
||||||
</Skeleton>
|
</Skeleton>
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import {Button, Drawer, Form, Typography} from 'antd'
|
import {Drawer, Form, Typography} from 'antd'
|
||||||
import {t} from 'ttag'
|
import {t} from 'ttag'
|
||||||
import {WatchlistForm} from './WatchlistForm'
|
import {WatchlistForm} from './WatchlistForm'
|
||||||
import React, {useState} from 'react'
|
import React, {useState} from 'react'
|
||||||
@ -53,7 +53,6 @@ export function UpdateWatchlistButton({watchlist, onUpdateWatchlist, connectors}
|
|||||||
paddingBottom: 80
|
paddingBottom: 80
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
extra={<Button onClick={onClose}>{t`Cancel`}</Button>}
|
|
||||||
>
|
>
|
||||||
<WatchlistForm
|
<WatchlistForm
|
||||||
form={form}
|
form={form}
|
||||||
|
|||||||
101
assets/components/tracking/watchlist/WatchlistSelectionModal.tsx
Normal file
@ -0,0 +1,101 @@
|
|||||||
|
import React, {useEffect, useState} from "react"
|
||||||
|
import type {ModalProps} from "antd"
|
||||||
|
import {Tag, Tooltip} from "antd"
|
||||||
|
import {Flex, Modal, Select, Typography} from "antd"
|
||||||
|
import type {Domain, Watchlist} from "../../../utils/api"
|
||||||
|
import {getWatchlists} from "../../../utils/api"
|
||||||
|
import {t} from 'ttag'
|
||||||
|
import {DomainToTag} from "../../../utils/functions/DomainToTag"
|
||||||
|
import {EllipsisOutlined} from '@ant-design/icons'
|
||||||
|
|
||||||
|
const MAX_DOMAIN_TAGS = 25
|
||||||
|
|
||||||
|
function WatchlistOption({watchlist}: {watchlist: Watchlist}) {
|
||||||
|
let domains = watchlist.domains
|
||||||
|
let rest: Domain[]|undefined = undefined
|
||||||
|
|
||||||
|
if (domains.length > MAX_DOMAIN_TAGS) {
|
||||||
|
rest = domains.slice(MAX_DOMAIN_TAGS)
|
||||||
|
domains = domains.slice(0, MAX_DOMAIN_TAGS)
|
||||||
|
}
|
||||||
|
|
||||||
|
return <Flex vertical>
|
||||||
|
<Typography.Text strong>{watchlist.name}</Typography.Text>
|
||||||
|
<Flex wrap gap='4px'>
|
||||||
|
{domains.map(d => <DomainToTag link={false} domain={d} key={d.ldhName} />)}
|
||||||
|
{rest
|
||||||
|
&& <Tooltip title={rest.map(d => <DomainToTag link={false} domain={d} key={d.ldhName} />)}>
|
||||||
|
<Tag icon={<EllipsisOutlined/>} color='processing'>
|
||||||
|
{t`${rest.length} more`}
|
||||||
|
</Tag>
|
||||||
|
</Tooltip>
|
||||||
|
}
|
||||||
|
</Flex>
|
||||||
|
</Flex>
|
||||||
|
}
|
||||||
|
|
||||||
|
interface WatchlistSelectionModalProps {
|
||||||
|
onFinish: (watchlist: Watchlist) => Promise<void>|void
|
||||||
|
description?: string
|
||||||
|
open?: boolean
|
||||||
|
modalProps?: Partial<ModalProps>
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function WatchlistSelectionModal(props: WatchlistSelectionModalProps) {
|
||||||
|
const [watchlists, setWatchlists] = useState<Watchlist[] | undefined>()
|
||||||
|
const [selectedWatchlist, setSelectedWatchlist] = useState<Watchlist | undefined>()
|
||||||
|
const [validationLoading, setValidationLoading] = useState(false)
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (props.open && !watchlists) {
|
||||||
|
getWatchlists().then(list => setWatchlists(list["hydra:member"]))
|
||||||
|
}
|
||||||
|
}, [props.open])
|
||||||
|
|
||||||
|
const onFinish = () => {
|
||||||
|
const promise = props.onFinish(selectedWatchlist as Watchlist)
|
||||||
|
|
||||||
|
if (promise) {
|
||||||
|
setValidationLoading(true)
|
||||||
|
promise.finally(() => {
|
||||||
|
setSelectedWatchlist(undefined)
|
||||||
|
setValidationLoading(false)
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
setSelectedWatchlist(undefined)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return <Modal
|
||||||
|
open={props.open}
|
||||||
|
onOk={onFinish}
|
||||||
|
okButtonProps={{
|
||||||
|
disabled: !selectedWatchlist,
|
||||||
|
loading: validationLoading,
|
||||||
|
}}
|
||||||
|
{...props.modalProps ?? {}}
|
||||||
|
>
|
||||||
|
<Flex vertical>
|
||||||
|
<Typography.Paragraph>
|
||||||
|
{
|
||||||
|
props.description
|
||||||
|
|| t`Select one of your available Watchlists`
|
||||||
|
}
|
||||||
|
</Typography.Paragraph>
|
||||||
|
<Select
|
||||||
|
placeholder={t`Watchlist`}
|
||||||
|
style={{width: '100%'}}
|
||||||
|
onChange={(_, option) => setSelectedWatchlist(option as Watchlist)}
|
||||||
|
options={watchlists}
|
||||||
|
value={selectedWatchlist?.token}
|
||||||
|
fieldNames={{
|
||||||
|
label: 'name',
|
||||||
|
value: 'token',
|
||||||
|
}}
|
||||||
|
loading={!watchlists}
|
||||||
|
status={selectedWatchlist ? '' : 'error'}
|
||||||
|
optionRender={(watchlist) => <WatchlistOption watchlist={watchlist.data}/>}
|
||||||
|
/>
|
||||||
|
</Flex>
|
||||||
|
</Modal>
|
||||||
|
}
|
||||||
@ -10,4 +10,8 @@
|
|||||||
body {
|
body {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-family: "Noto Color Emoji", sans-serif;
|
font-family: "Noto Color Emoji", sans-serif;
|
||||||
|
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
background: #000000;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import {LoginForm} from '../components/LoginForm'
|
|||||||
import type { InstanceConfig} from '../utils/api'
|
import type { InstanceConfig} from '../utils/api'
|
||||||
import {getConfiguration} from '../utils/api'
|
import {getConfiguration} from '../utils/api'
|
||||||
import {RegisterForm} from '../components/RegisterForm'
|
import {RegisterForm} from '../components/RegisterForm'
|
||||||
|
import useBreakpoint from "../hooks/useBreakpoint"
|
||||||
|
|
||||||
export const AuthenticatedContext = createContext<
|
export const AuthenticatedContext = createContext<
|
||||||
{
|
{
|
||||||
@ -22,6 +23,7 @@ export const AuthenticatedContext = createContext<
|
|||||||
export default function LoginPage() {
|
export default function LoginPage() {
|
||||||
const [wantRegister, setWantRegister] = useState<boolean>(false)
|
const [wantRegister, setWantRegister] = useState<boolean>(false)
|
||||||
const [configuration, setConfiguration] = useState<InstanceConfig>()
|
const [configuration, setConfiguration] = useState<InstanceConfig>()
|
||||||
|
const md = useBreakpoint('md')
|
||||||
|
|
||||||
const toggleWantRegister = () => {
|
const toggleWantRegister = () => {
|
||||||
setWantRegister(!wantRegister)
|
setWantRegister(!wantRegister)
|
||||||
@ -31,9 +33,8 @@ export default function LoginPage() {
|
|||||||
getConfiguration().then(setConfiguration)
|
getConfiguration().then(setConfiguration)
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
return (
|
const grid = [
|
||||||
<Card title={wantRegister ? t`Register` : t`Log in`} style={{width: '100%'}}>
|
<Card.Grid key="form" style={{width: md ? '100%' : '50%', textAlign: 'center'}} hoverable={false}>
|
||||||
<Card.Grid style={{width: '50%', textAlign: 'center'}} hoverable={false}>
|
|
||||||
{wantRegister ? <RegisterForm/> : <LoginForm ssoLogin={configuration?.ssoLogin}/>}
|
{wantRegister ? <RegisterForm/> : <LoginForm ssoLogin={configuration?.ssoLogin}/>}
|
||||||
{
|
{
|
||||||
configuration?.registerEnabled &&
|
configuration?.registerEnabled &&
|
||||||
@ -45,10 +46,19 @@ export default function LoginPage() {
|
|||||||
>{wantRegister ? t`Log in` : t`Create an account`}
|
>{wantRegister ? t`Log in` : t`Create an account`}
|
||||||
</Button>
|
</Button>
|
||||||
}
|
}
|
||||||
</Card.Grid>
|
</Card.Grid>,
|
||||||
<Card.Grid style={{width: '50%'}} hoverable={false}>
|
<Card.Grid key="ads" style={{width: md ? '100%' : '50%'}} hoverable={false}>
|
||||||
<TextPage resource='ads.md'/>
|
<TextPage resource='ads.md'/>
|
||||||
</Card.Grid>
|
</Card.Grid>
|
||||||
|
]
|
||||||
|
|
||||||
|
if (md) {
|
||||||
|
grid.reverse()
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Card title={wantRegister ? t`Register` : t`Log in`} style={{width: '100%'}}>
|
||||||
|
{grid}
|
||||||
</Card>
|
</Card>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import React, {useEffect, useState} from 'react'
|
import React, {useEffect, useState} from 'react'
|
||||||
import type { Statistics} from '../utils/api'
|
import type { Statistics} from '../utils/api'
|
||||||
import {getStatistics} from '../utils/api'
|
import {getStatistics} from '../utils/api'
|
||||||
import {Card, Col, Divider, Row, Statistic, Tooltip} from 'antd'
|
import {Card, Col, Divider, Flex, Row, Statistic, Tooltip} from 'antd'
|
||||||
import {t} from 'ttag'
|
import {t} from 'ttag'
|
||||||
import {
|
import {
|
||||||
AimOutlined,
|
AimOutlined,
|
||||||
@ -18,10 +18,8 @@ export default function StatisticsPage() {
|
|||||||
getStatistics().then(setStats)
|
getStatistics().then(setStats)
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
const totalDomainPurchase = (stats?.domainPurchased ?? 0) + (stats?.domainPurchaseFailed ?? 0)
|
|
||||||
|
|
||||||
const successRate = stats !== undefined
|
const successRate = stats !== undefined
|
||||||
? (totalDomainPurchase === 0 ? undefined : stats.domainPurchased / totalDomainPurchase)
|
? (stats?.domainPurchased === 0 ? undefined : ((stats?.domainPurchased ?? 0) - (stats?.domainPurchaseFailed ?? 0)) / stats?.domainPurchased)
|
||||||
: undefined
|
: undefined
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -82,7 +80,7 @@ export default function StatisticsPage() {
|
|||||||
loading={stats === undefined}
|
loading={stats === undefined}
|
||||||
title={t`Purchased domain names`}
|
title={t`Purchased domain names`}
|
||||||
prefix={<FieldTimeOutlined/>}
|
prefix={<FieldTimeOutlined/>}
|
||||||
value={stats?.domainPurchased}
|
value={(stats?.domainPurchased??0) - (stats?.domainPurchaseFailed??0)}
|
||||||
valueStyle={{color: 'green'}}
|
valueStyle={{color: 'green'}}
|
||||||
/>
|
/>
|
||||||
</Card>
|
</Card>
|
||||||
@ -95,7 +93,7 @@ export default function StatisticsPage() {
|
|||||||
<Statistic
|
<Statistic
|
||||||
loading={stats === undefined}
|
loading={stats === undefined}
|
||||||
title={t`Success rate`}
|
title={t`Success rate`}
|
||||||
value={successRate === undefined ? '-' : successRate * 100}
|
value={successRate === undefined ? '-' : (successRate * 100).toFixed(2)}
|
||||||
suffix='%'
|
suffix='%'
|
||||||
valueStyle={{color: successRate === undefined ? 'grey' : successRate >= 0.5 ? 'darkgreen' : 'orange'}}
|
valueStyle={{color: successRate === undefined ? 'grey' : successRate >= 0.5 ? 'darkgreen' : 'orange'}}
|
||||||
/>
|
/>
|
||||||
@ -104,20 +102,19 @@ export default function StatisticsPage() {
|
|||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
<Divider/>
|
<Divider/>
|
||||||
<Row gutter={16} justify='center' align='middle'>
|
<Flex gap={16} wrap justify='center' align='middle'>
|
||||||
{stats?.domainCount
|
{stats?.domainCount
|
||||||
.sort((a, b) => b.domain - a.domain)
|
.sort((a, b) => b.domain - a.domain)
|
||||||
.map(({domain, tld}) => <Col key={tld} span={4}>
|
.map(({domain, tld}) =>
|
||||||
<Card bordered={false}>
|
<Card key={tld} bordered={false}>
|
||||||
<Statistic
|
<Statistic
|
||||||
loading={stats === undefined}
|
loading={stats === undefined}
|
||||||
title={tld ? tld : t`TLD`}
|
title={tld ? tld : t`TLD`}
|
||||||
value={domain}
|
value={domain}
|
||||||
valueStyle={{color: 'darkorange'}}
|
valueStyle={{color: 'darkorange'}}
|
||||||
/>
|
/>
|
||||||
</Card>
|
</Card>)}
|
||||||
</Col>)}
|
</Flex>
|
||||||
</Row>
|
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,6 +5,7 @@ import {t} from 'ttag'
|
|||||||
import type {ColumnType} from 'antd/es/table'
|
import type {ColumnType} from 'antd/es/table'
|
||||||
import {CheckCircleOutlined, SettingOutlined, CloseCircleOutlined} from "@ant-design/icons"
|
import {CheckCircleOutlined, SettingOutlined, CloseCircleOutlined} from "@ant-design/icons"
|
||||||
import {getIcannAccreditations} from "../../utils/api/icann-accreditations"
|
import {getIcannAccreditations} from "../../utils/api/icann-accreditations"
|
||||||
|
import useBreakpoint from "../../hooks/useBreakpoint"
|
||||||
|
|
||||||
const {Text, Paragraph} = Typography
|
const {Text, Paragraph} = Typography
|
||||||
|
|
||||||
@ -19,6 +20,7 @@ function RegistrarListTable(filters: FiltersType) {
|
|||||||
name: string
|
name: string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const sm = useBreakpoint('sm')
|
||||||
const [dataTable, setDataTable] = useState<TableRow[]>([])
|
const [dataTable, setDataTable] = useState<TableRow[]>([])
|
||||||
const [total, setTotal] = useState(0)
|
const [total, setTotal] = useState(0)
|
||||||
|
|
||||||
@ -63,14 +65,15 @@ function RegistrarListTable(filters: FiltersType) {
|
|||||||
fetchData({...filters, page, itemsPerPage})
|
fetchData({...filters, page, itemsPerPage})
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
scroll={sm ? {} : {y: '50vh'}}
|
||||||
scroll={{y: '50vh'}}
|
size={sm ? 'small' : 'large'}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function IcannRegistrarPage() {
|
export default function IcannRegistrarPage() {
|
||||||
const [activeTabKey, setActiveTabKey] = useState<string>('Accredited')
|
const [activeTabKey, setActiveTabKey] = useState<string>('Accredited')
|
||||||
|
const sm = useBreakpoint('sm')
|
||||||
|
|
||||||
const contentList: Record<string, React.ReactNode> = {
|
const contentList: Record<string, React.ReactNode> = {
|
||||||
Accredited: <>
|
Accredited: <>
|
||||||
@ -125,6 +128,7 @@ export default function IcannRegistrarPage() {
|
|||||||
activeTabKey={activeTabKey}
|
activeTabKey={activeTabKey}
|
||||||
key={activeTabKey}
|
key={activeTabKey}
|
||||||
onTabChange={(k: string) => setActiveTabKey(k)}
|
onTabChange={(k: string) => setActiveTabKey(k)}
|
||||||
|
size={sm ? 'small' : 'default'}
|
||||||
>
|
>
|
||||||
{contentList[activeTabKey]}
|
{contentList[activeTabKey]}
|
||||||
|
|
||||||
|
|||||||
@ -11,6 +11,7 @@ import {getCountryCode} from '../../utils/functions/getCountryCode'
|
|||||||
import {tldToEmoji} from '../../utils/functions/tldToEmoji'
|
import {tldToEmoji} from '../../utils/functions/tldToEmoji'
|
||||||
import {BankOutlined, FlagOutlined, GlobalOutlined, TrademarkOutlined} from "@ant-design/icons"
|
import {BankOutlined, FlagOutlined, GlobalOutlined, TrademarkOutlined} from "@ant-design/icons"
|
||||||
import {Link} from "react-router-dom"
|
import {Link} from "react-router-dom"
|
||||||
|
import useBreakpoint from "../../hooks/useBreakpoint"
|
||||||
|
|
||||||
const {Text, Paragraph} = Typography
|
const {Text, Paragraph} = Typography
|
||||||
|
|
||||||
@ -30,6 +31,7 @@ function TldTable(filters: FiltersType) {
|
|||||||
Country?: string
|
Country?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const sm = useBreakpoint('sm')
|
||||||
const [dataTable, setDataTable] = useState<TableRow[]>([])
|
const [dataTable, setDataTable] = useState<TableRow[]>([])
|
||||||
const [total, setTotal] = useState(0)
|
const [total, setTotal] = useState(0)
|
||||||
|
|
||||||
@ -110,14 +112,15 @@ function TldTable(filters: FiltersType) {
|
|||||||
fetchData({...filters, page, itemsPerPage})
|
fetchData({...filters, page, itemsPerPage})
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
scroll={sm ? {} : {y: '50vh'}}
|
||||||
scroll={{y: '50vh'}}
|
size={sm ? 'small' : 'large'}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function TldPage() {
|
export default function TldPage() {
|
||||||
const [activeTabKey, setActiveTabKey] = useState<string>('gTLD')
|
const [activeTabKey, setActiveTabKey] = useState<string>('gTLD')
|
||||||
|
const sm = useBreakpoint("sm")
|
||||||
|
|
||||||
const contentList: Record<string, React.ReactNode> = {
|
const contentList: Record<string, React.ReactNode> = {
|
||||||
sTLD: <>
|
sTLD: <>
|
||||||
@ -185,6 +188,7 @@ export default function TldPage() {
|
|||||||
activeTabKey={activeTabKey}
|
activeTabKey={activeTabKey}
|
||||||
key={activeTabKey}
|
key={activeTabKey}
|
||||||
onTabChange={(k: string) => setActiveTabKey(k)}
|
onTabChange={(k: string) => setActiveTabKey(k)}
|
||||||
|
size={sm ? 'small' : 'default'}
|
||||||
>
|
>
|
||||||
{contentList[activeTabKey]}
|
{contentList[activeTabKey]}
|
||||||
|
|
||||||
|
|||||||
@ -1,8 +1,10 @@
|
|||||||
import React, {useEffect, useState} from 'react'
|
import React, {useEffect, useState} from 'react'
|
||||||
import type { FormProps} from 'antd'
|
import type { FormProps} from 'antd'
|
||||||
|
import {FloatButton} from 'antd'
|
||||||
import {Empty, Flex, message, Skeleton} from 'antd'
|
import {Empty, Flex, message, Skeleton} from 'antd'
|
||||||
import type {Domain} from '../../utils/api'
|
import type {Domain, Watchlist} from '../../utils/api'
|
||||||
import { getDomain} from '../../utils/api'
|
import {addDomainToWatchlist} from '../../utils/api'
|
||||||
|
import {getDomain} from '../../utils/api'
|
||||||
import type {AxiosError} from 'axios'
|
import type {AxiosError} from 'axios'
|
||||||
import {t} from 'ttag'
|
import {t} from 'ttag'
|
||||||
import type { FieldType} from '../../components/search/DomainSearchBar'
|
import type { FieldType} from '../../components/search/DomainSearchBar'
|
||||||
@ -10,17 +12,19 @@ import {DomainSearchBar} from '../../components/search/DomainSearchBar'
|
|||||||
import {DomainResult} from '../../components/search/DomainResult'
|
import {DomainResult} from '../../components/search/DomainResult'
|
||||||
import {showErrorAPI} from '../../utils/functions/showErrorAPI'
|
import {showErrorAPI} from '../../utils/functions/showErrorAPI'
|
||||||
import {useNavigate, useParams} from 'react-router-dom'
|
import {useNavigate, useParams} from 'react-router-dom'
|
||||||
|
import {PlusOutlined} from '@ant-design/icons'
|
||||||
|
import WatchlistSelectionModal from '../../components/tracking/watchlist/WatchlistSelectionModal'
|
||||||
|
|
||||||
export default function DomainSearchPage() {
|
export default function DomainSearchPage() {
|
||||||
const {query} = useParams()
|
const {query} = useParams()
|
||||||
const [domain, setDomain] = useState<Domain | null>()
|
const [domain, setDomain] = useState<Domain | null>()
|
||||||
const [loading, setLoading] = useState<boolean>(false)
|
const domainLdhName = domain?.ldhName
|
||||||
|
const [loading, setLoading] = useState(false)
|
||||||
|
const [addToWatchlistModal, setAddToWatchlistModal] = useState(false)
|
||||||
|
|
||||||
const [messageApi, contextHolder] = message.useMessage()
|
const [messageApi, contextHolder] = message.useMessage()
|
||||||
const navigate = useNavigate()
|
const navigate = useNavigate()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const onFinish: FormProps<FieldType>['onFinish'] = (values) => {
|
const onFinish: FormProps<FieldType>['onFinish'] = (values) => {
|
||||||
navigate('/search/domain/' + values.ldhName)
|
navigate('/search/domain/' + values.ldhName)
|
||||||
|
|
||||||
@ -41,7 +45,18 @@ export default function DomainSearchPage() {
|
|||||||
onFinish({ldhName: query, isRefreshForced: false})
|
onFinish({ldhName: query, isRefreshForced: false})
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
return (
|
const addToWatchlist = async (watchlist: Watchlist) => {
|
||||||
|
await addDomainToWatchlist(watchlist, domain!.ldhName).then(() => {
|
||||||
|
setAddToWatchlistModal(false)
|
||||||
|
|
||||||
|
const ldhName = domain?.ldhName
|
||||||
|
messageApi.success(t`${ldhName} added to ${watchlist.name}`)
|
||||||
|
}).catch((e: AxiosError) => {
|
||||||
|
showErrorAPI(e, messageApi)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
return <>
|
||||||
<Flex gap='middle' align='center' justify='center' vertical>
|
<Flex gap='middle' align='center' justify='center' vertical>
|
||||||
{contextHolder}
|
{contextHolder}
|
||||||
<DomainSearchBar initialValue={query} onFinish={onFinish}/>
|
<DomainSearchBar initialValue={query} onFinish={onFinish}/>
|
||||||
@ -57,5 +72,29 @@ export default function DomainSearchPage() {
|
|||||||
}
|
}
|
||||||
</Skeleton>
|
</Skeleton>
|
||||||
</Flex>
|
</Flex>
|
||||||
)
|
{domain
|
||||||
|
&& <FloatButton
|
||||||
|
style={{
|
||||||
|
position: 'fixed',
|
||||||
|
insetInlineEnd: (100 - 40) / 2,
|
||||||
|
bottom: 100 - 40 / 2
|
||||||
|
}}
|
||||||
|
tooltip={t`Add to Watchlist`}
|
||||||
|
type="primary"
|
||||||
|
icon={<PlusOutlined/>}
|
||||||
|
onClick={() => setAddToWatchlistModal(true)}
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
<WatchlistSelectionModal
|
||||||
|
open={addToWatchlistModal}
|
||||||
|
onFinish={addToWatchlist}
|
||||||
|
modalProps={{
|
||||||
|
title: t`Add ${domainLdhName} to a Watchlist`,
|
||||||
|
onCancel: () => setAddToWatchlistModal(false),
|
||||||
|
onClose: () => setAddToWatchlistModal(false),
|
||||||
|
cancelText: t`Cancel`,
|
||||||
|
okText: t`Add`
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
}
|
}
|
||||||
|
|||||||
@ -74,8 +74,7 @@ export default function WatchlistPage() {
|
|||||||
return (
|
return (
|
||||||
<Flex gap='middle' align='center' justify='center' vertical>
|
<Flex gap='middle' align='center' justify='center' vertical>
|
||||||
{contextHolder}
|
{contextHolder}
|
||||||
|
{(connectors !== undefined) && (watchlists !== undefined) &&
|
||||||
{(connectors != null) && (watchlists != null) && watchlists.length > 0 &&
|
|
||||||
<>
|
<>
|
||||||
<CreateWatchlistButton onUpdateWatchlist={onCreateWatchlist} connectors={connectors} />
|
<CreateWatchlistButton onUpdateWatchlist={onCreateWatchlist} connectors={connectors} />
|
||||||
<Divider/>
|
<Divider/>
|
||||||
|
|||||||
@ -44,6 +44,13 @@ export async function patchWatchlist(token: string, watchlist: Partial<Watchlist
|
|||||||
return response.data
|
return response.data
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export async function addDomainToWatchlist(watchlist: Watchlist, ldhName: string) {
|
||||||
|
const domains = watchlist.domains.map(d => '/api/domains/' + d.ldhName)
|
||||||
|
domains.push('/api/domains/' + ldhName)
|
||||||
|
|
||||||
|
return patchWatchlist(watchlist.token, {domains})
|
||||||
|
}
|
||||||
|
|
||||||
export async function deleteWatchlist(token: string): Promise<void> {
|
export async function deleteWatchlist(token: string): Promise<void> {
|
||||||
await request({
|
await request({
|
||||||
method: 'DELETE',
|
method: 'DELETE',
|
||||||
|
|||||||
@ -6,10 +6,8 @@ import React from 'react'
|
|||||||
import type {Event} from "../api"
|
import type {Event} from "../api"
|
||||||
import {t} from "ttag"
|
import {t} from "ttag"
|
||||||
|
|
||||||
export function DomainToTag({domain}: { domain: { ldhName: string, deleted: boolean, status: string[], events?: Event[] } }) {
|
export function DomainToTag({domain, link}: { domain: { ldhName: string, deleted: boolean, status: string[], events?: Event[] }, link?: boolean }) {
|
||||||
return (
|
const tag = <Badge dot={domain.events?.find(e =>
|
||||||
<Link to={'/search/domain/' + domain.ldhName}>
|
|
||||||
<Badge dot={domain.events?.find(e =>
|
|
||||||
e.action === 'last changed' &&
|
e.action === 'last changed' &&
|
||||||
!e.deleted &&
|
!e.deleted &&
|
||||||
((new Date().getTime() - new Date(e.date).getTime()) < 7*24*60*60*1e3)
|
((new Date().getTime() - new Date(e.date).getTime()) < 7*24*60*60*1e3)
|
||||||
@ -32,6 +30,14 @@ export function DomainToTag({domain}: { domain: { ldhName: string, deleted: bool
|
|||||||
>{punycode.toUnicode(domain.ldhName)}
|
>{punycode.toUnicode(domain.ldhName)}
|
||||||
</Tag>
|
</Tag>
|
||||||
</Badge>
|
</Badge>
|
||||||
|
|
||||||
|
if (link ?? true) {
|
||||||
|
return (
|
||||||
|
<Link to={'/search/domain/' + domain.ldhName}>
|
||||||
|
{tag}
|
||||||
</Link>
|
</Link>
|
||||||
)
|
)
|
||||||
|
} else {
|
||||||
|
return tag
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,6 +10,7 @@ export function statusToTag(s: string) {
|
|||||||
<Tooltip
|
<Tooltip
|
||||||
placement='bottomLeft'
|
placement='bottomLeft'
|
||||||
title={rdapStatusCodeDetailTranslated[s as keyof typeof rdapStatusCodeDetailTranslated] || undefined}
|
title={rdapStatusCodeDetailTranslated[s as keyof typeof rdapStatusCodeDetailTranslated] || undefined}
|
||||||
|
key={s}
|
||||||
>
|
>
|
||||||
<Tag color={eppStatusCodeToColor(s)}>{s}</Tag>
|
<Tag color={eppStatusCodeToColor(s)}>{s}</Tag>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
|||||||
@ -23,6 +23,7 @@
|
|||||||
"php": ">=8.4",
|
"php": ">=8.4",
|
||||||
"ext-ctype": "*",
|
"ext-ctype": "*",
|
||||||
"ext-iconv": "*",
|
"ext-iconv": "*",
|
||||||
|
"ext-redis": "*",
|
||||||
"ext-simplexml": "*",
|
"ext-simplexml": "*",
|
||||||
"api-platform/core": "^3.3",
|
"api-platform/core": "^3.3",
|
||||||
"doctrine/dbal": "^3",
|
"doctrine/dbal": "^3",
|
||||||
@ -42,6 +43,7 @@
|
|||||||
"protonlabs/vobject": "^4.31",
|
"protonlabs/vobject": "^4.31",
|
||||||
"psr/http-client": "^1.0",
|
"psr/http-client": "^1.0",
|
||||||
"runtime/frankenphp-symfony": "^0.2.0",
|
"runtime/frankenphp-symfony": "^0.2.0",
|
||||||
|
"scienta/doctrine-json-functions": "^6.3",
|
||||||
"symfony/asset": "7.3.*",
|
"symfony/asset": "7.3.*",
|
||||||
"symfony/asset-mapper": "7.3.*",
|
"symfony/asset-mapper": "7.3.*",
|
||||||
"symfony/cache": "7.3.*",
|
"symfony/cache": "7.3.*",
|
||||||
|
|||||||
77
composer.lock
generated
@ -4,7 +4,7 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "49fd7fad6776160ff572f3fb9201a8a2",
|
"content-hash": "97d6a4c9c86bc5a77dfdbc3e41e1deb5",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "api-platform/core",
|
"name": "api-platform/core",
|
||||||
@ -4189,6 +4189,78 @@
|
|||||||
},
|
},
|
||||||
"time": "2024-09-06T08:00:55+00:00"
|
"time": "2024-09-06T08:00:55+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "scienta/doctrine-json-functions",
|
||||||
|
"version": "6.3.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/ScientaNL/DoctrineJsonFunctions.git",
|
||||||
|
"reference": "554b2fd281e976a791501fc4753ffd4c5891ec62"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/ScientaNL/DoctrineJsonFunctions/zipball/554b2fd281e976a791501fc4753ffd4c5891ec62",
|
||||||
|
"reference": "554b2fd281e976a791501fc4753ffd4c5891ec62",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"doctrine/dbal": "^3.2 || ^4",
|
||||||
|
"doctrine/lexer": "^2.0 || ^3.0",
|
||||||
|
"doctrine/orm": "^2.19 || ^3",
|
||||||
|
"ext-pdo": "*",
|
||||||
|
"php": "^8.1"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"doctrine/coding-standard": "^9.0 || ^10.0 || ^11.0 || ^12.0",
|
||||||
|
"phpstan/extension-installer": "^1.4",
|
||||||
|
"phpstan/phpstan": "^1.12",
|
||||||
|
"phpstan/phpstan-doctrine": "^1.4",
|
||||||
|
"phpstan/phpstan-phpunit": "^1.4",
|
||||||
|
"phpunit/phpunit": "^10.1",
|
||||||
|
"psalm/plugin-phpunit": "^0.18",
|
||||||
|
"slevomat/coding-standard": "~8",
|
||||||
|
"symfony/cache": "^5.4 || ^6.4 || ^7",
|
||||||
|
"vimeo/psalm": "^5.2",
|
||||||
|
"webmozart/assert": "^1.11"
|
||||||
|
},
|
||||||
|
"suggest": {
|
||||||
|
"dunglas/doctrine-json-odm": "To serialize / deserialize objects as JSON documents."
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Scienta\\DoctrineJsonFunctions\\": "src/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Doctrine Json Functions Contributors",
|
||||||
|
"homepage": "https://github.com/ScientaNL/DoctrineJsonFunctions/contributors"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "A set of extensions to Doctrine that add support for json query functions.",
|
||||||
|
"keywords": [
|
||||||
|
"database",
|
||||||
|
"doctrine",
|
||||||
|
"dql",
|
||||||
|
"json",
|
||||||
|
"mariadb",
|
||||||
|
"mysql",
|
||||||
|
"orm",
|
||||||
|
"postgres",
|
||||||
|
"postgresql",
|
||||||
|
"sqlite"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/ScientaNL/DoctrineJsonFunctions/issues",
|
||||||
|
"source": "https://github.com/ScientaNL/DoctrineJsonFunctions/tree/6.3.0"
|
||||||
|
},
|
||||||
|
"time": "2024-11-08T12:33:19+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/asset",
|
"name": "symfony/asset",
|
||||||
"version": "v7.3.0",
|
"version": "v7.3.0",
|
||||||
@ -15319,9 +15391,10 @@
|
|||||||
"prefer-stable": true,
|
"prefer-stable": true,
|
||||||
"prefer-lowest": false,
|
"prefer-lowest": false,
|
||||||
"platform": {
|
"platform": {
|
||||||
"php": ">=8.2",
|
"php": ">=8.4",
|
||||||
"ext-ctype": "*",
|
"ext-ctype": "*",
|
||||||
"ext-iconv": "*",
|
"ext-iconv": "*",
|
||||||
|
"ext-redis": "*",
|
||||||
"ext-simplexml": "*"
|
"ext-simplexml": "*"
|
||||||
},
|
},
|
||||||
"platform-dev": [],
|
"platform-dev": [],
|
||||||
|
|||||||
@ -42,6 +42,7 @@ api_platform:
|
|||||||
App\Exception\TldNotSupportedException: 400
|
App\Exception\TldNotSupportedException: 400
|
||||||
App\Exception\UnknownRdapServerException: 400
|
App\Exception\UnknownRdapServerException: 400
|
||||||
App\Exception\UnsupportedDsnScheme: 400
|
App\Exception\UnsupportedDsnScheme: 400
|
||||||
|
App\Exception\RdapServerException: 400
|
||||||
|
|
||||||
# Provider exception
|
# Provider exception
|
||||||
App\Exception\Provider\UserNoExplicitConsentException: 451
|
App\Exception\Provider\UserNoExplicitConsentException: 451
|
||||||
|
|||||||
@ -24,6 +24,9 @@ doctrine:
|
|||||||
alias: App
|
alias: App
|
||||||
controller_resolver:
|
controller_resolver:
|
||||||
auto_mapping: false
|
auto_mapping: false
|
||||||
|
dql:
|
||||||
|
string_functions:
|
||||||
|
JSONB_CONTAINS: Scienta\DoctrineJsonFunctions\Query\AST\Functions\Postgresql\JsonbContains
|
||||||
|
|
||||||
when@test:
|
when@test:
|
||||||
doctrine:
|
doctrine:
|
||||||
|
|||||||
@ -5,10 +5,28 @@ framework:
|
|||||||
transports:
|
transports:
|
||||||
# https://symfony.com/doc/current/messenger.html#transport-configuration
|
# https://symfony.com/doc/current/messenger.html#transport-configuration
|
||||||
async:
|
async:
|
||||||
dsn: '%env(MESSENGER_TRANSPORT_DSN)%'
|
dsn: '%env(MESSENGER_ASYNC_TRANSPORT_DSN)%'
|
||||||
retry_strategy:
|
retry_strategy:
|
||||||
max_retries: 3
|
max_retries: 3
|
||||||
multiplier: 2
|
multiplier: 2
|
||||||
|
rdap_high:
|
||||||
|
dsn: '%env(MESSENGER_RDAP_HIGH_TRANSPORT_DSN)%'
|
||||||
|
options:
|
||||||
|
consumer: '%env(MESSENGER_CONSUMER_NAME)%'
|
||||||
|
retry_strategy:
|
||||||
|
delay: 1000
|
||||||
|
multiplier: 2
|
||||||
|
max_delay: 86400000
|
||||||
|
|
||||||
|
rdap_low:
|
||||||
|
dsn: '%env(MESSENGER_RDAP_LOW_TRANSPORT_DSN)%'
|
||||||
|
options:
|
||||||
|
consumer: '%env(MESSENGER_CONSUMER_NAME)%'
|
||||||
|
retry_strategy:
|
||||||
|
delay: 2000
|
||||||
|
multiplier: 2
|
||||||
|
max_delay: 86400000
|
||||||
|
|
||||||
failed: 'doctrine://default?queue_name=failed'
|
failed: 'doctrine://default?queue_name=failed'
|
||||||
# sync: 'sync://'
|
# sync: 'sync://'
|
||||||
|
|
||||||
@ -23,11 +41,9 @@ framework:
|
|||||||
Symfony\Component\Notifier\Message\SmsMessage: async
|
Symfony\Component\Notifier\Message\SmsMessage: async
|
||||||
|
|
||||||
App\Message\OrderDomain: async
|
App\Message\OrderDomain: async
|
||||||
App\Message\ProcessWatchlistTrigger: async
|
App\Message\DetectDomainChange: async
|
||||||
App\Message\SendDomainEventNotif: async
|
App\Message\ProcessAllWatchlist: async
|
||||||
App\Message\UpdateDomainsFromWatchlist: async
|
App\Message\ProcessWatchlist: async
|
||||||
App\Message\UpdateRdapServers: async
|
App\Message\UpdateRdapServers: async
|
||||||
App\Message\ValidateConnectorCredentials: async
|
App\Message\ValidateConnectorCredentials: async
|
||||||
|
App\Message\UpdateDomain: rdap_high
|
||||||
# Route your messages to the transports
|
|
||||||
# 'App\Message\YourMessage': async
|
|
||||||
|
|||||||
@ -20,7 +20,7 @@ framework:
|
|||||||
limit: 5
|
limit: 5
|
||||||
rate: { interval: '5 minutes' }
|
rate: { interval: '5 minutes' }
|
||||||
|
|
||||||
rdap_requests:
|
user_rdap_requests:
|
||||||
policy: sliding_window
|
policy: sliding_window
|
||||||
limit: 10
|
limit: 10
|
||||||
interval: '1 hour'
|
interval: '1 hour'
|
||||||
@ -11,7 +11,9 @@ services:
|
|||||||
APP_ENV: prod
|
APP_ENV: prod
|
||||||
SERVER_NAME: ${SERVER_NAME:-:80}
|
SERVER_NAME: ${SERVER_NAME:-:80}
|
||||||
DATABASE_URL: postgresql://${POSTGRES_USER:-app}:${POSTGRES_PASSWORD:-!ChangeMe!}@database:${POSTGRES_PORT:-5432}/${POSTGRES_DB:-app}?serverVersion=${POSTGRES_VERSION:-15}&charset=${POSTGRES_CHARSET:-utf8}
|
DATABASE_URL: postgresql://${POSTGRES_USER:-app}:${POSTGRES_PASSWORD:-!ChangeMe!}@database:${POSTGRES_PORT:-5432}/${POSTGRES_DB:-app}?serverVersion=${POSTGRES_VERSION:-15}&charset=${POSTGRES_CHARSET:-utf8}
|
||||||
MESSENGER_TRANSPORT_DSN: redis://valkey:6379/messages
|
MESSENGER_ASYNC_TRANSPORT_DSN: redis://valkey:6379/messages
|
||||||
|
MESSENGER_RDAP_LOW_TRANSPORT_DSN: redis://valkey:6379/messages-rdap-low
|
||||||
|
MESSENGER_RDAP_HIGH_TRANSPORT_DSN: redis://valkey:6379/messages-rdap-high
|
||||||
volumes:
|
volumes:
|
||||||
- caddy_data:/data
|
- caddy_data:/data
|
||||||
- caddy_config:/config
|
- caddy_config:/config
|
||||||
@ -31,7 +33,10 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
APP_ENV: prod
|
APP_ENV: prod
|
||||||
DATABASE_URL: postgresql://${POSTGRES_USER:-app}:${POSTGRES_PASSWORD:-!ChangeMe!}@database:${POSTGRES_PORT:-5432}/${POSTGRES_DB:-app}?serverVersion=${POSTGRES_VERSION:-15}&charset=${POSTGRES_CHARSET:-utf8}
|
DATABASE_URL: postgresql://${POSTGRES_USER:-app}:${POSTGRES_PASSWORD:-!ChangeMe!}@database:${POSTGRES_PORT:-5432}/${POSTGRES_DB:-app}?serverVersion=${POSTGRES_VERSION:-15}&charset=${POSTGRES_CHARSET:-utf8}
|
||||||
MESSENGER_TRANSPORT_DSN: redis://valkey:6379/messages
|
MESSENGER_ASYNC_TRANSPORT_DSN: redis://valkey:6379/messages
|
||||||
|
MESSENGER_RDAP_LOW_TRANSPORT_DSN: redis://valkey:6379/messages-rdap-low
|
||||||
|
MESSENGER_RDAP_HIGH_TRANSPORT_DSN: redis://valkey:6379/messages-rdap-high
|
||||||
|
MESSENGER_CONSUMER_NAME: worker
|
||||||
depends_on:
|
depends_on:
|
||||||
- database
|
- database
|
||||||
healthcheck:
|
healthcheck:
|
||||||
|
|||||||
21
docs/.gitignore
vendored
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# build output
|
||||||
|
dist/
|
||||||
|
# generated types
|
||||||
|
.astro/
|
||||||
|
|
||||||
|
# dependencies
|
||||||
|
node_modules/
|
||||||
|
|
||||||
|
# logs
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
pnpm-debug.log*
|
||||||
|
|
||||||
|
|
||||||
|
# environment variables
|
||||||
|
.env
|
||||||
|
.env.production
|
||||||
|
|
||||||
|
# macOS-specific files
|
||||||
|
.DS_Store
|
||||||
661
docs/LICENSE
Normal file
@ -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/>.
|
||||||
135
docs/astro.config.mjs
Normal file
@ -0,0 +1,135 @@
|
|||||||
|
// @ts-check
|
||||||
|
import {defineConfig} from 'astro/config'
|
||||||
|
import starlight from '@astrojs/starlight'
|
||||||
|
import starlightLinksValidator from 'starlight-links-validator'
|
||||||
|
import mermaid from "astro-mermaid"
|
||||||
|
import starlightCoolerCredit from "starlight-cooler-credit"
|
||||||
|
|
||||||
|
const BASE_URL = 'https://domainwatchdog.eu'
|
||||||
|
|
||||||
|
// https://astro.build/config
|
||||||
|
export default defineConfig({
|
||||||
|
site: BASE_URL,
|
||||||
|
integrations: [
|
||||||
|
starlight({
|
||||||
|
title: 'Domain Watchdog',
|
||||||
|
defaultLocale: 'en',
|
||||||
|
logo: {
|
||||||
|
src: './src/assets/logo.png'
|
||||||
|
},
|
||||||
|
favicon: 'logo.png',
|
||||||
|
description: 'An app that uses RDAP to collect publicly available info about domains, track their history, and purchase then when they expire',
|
||||||
|
editLink: {
|
||||||
|
baseUrl: 'https://github.com/maelgangloff/domain-watchdog/edit/develop/docs/'
|
||||||
|
},
|
||||||
|
tagline: 'Your companion in the quest for domain names 🔍',
|
||||||
|
lastUpdated: true,
|
||||||
|
social: [{icon: 'github', label: 'GitHub', href: 'https://github.com/maelgangloff/domain-watchdog'}],
|
||||||
|
sidebar: [
|
||||||
|
{label: 'Getting started', slug: 'features'},
|
||||||
|
{
|
||||||
|
label: 'Installation & Configuration',
|
||||||
|
items: [
|
||||||
|
{label: 'Installation', autogenerate: {directory: 'install-config/install'}},
|
||||||
|
{slug: 'install-config/configuration'},
|
||||||
|
{slug: 'install-config/upgrade'},
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Features',
|
||||||
|
items: [
|
||||||
|
{label: 'Domain back-order', autogenerate: {directory: 'features/backorder'}},
|
||||||
|
{label: 'Domain search', autogenerate: {directory: 'features/search'}},
|
||||||
|
{label: 'Domain tracking', autogenerate: {directory: 'features/tracking'}},
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Developing',
|
||||||
|
items: [
|
||||||
|
{slug: 'developing/technical-stack'},
|
||||||
|
{slug: 'developing/implementing-new-provider'},
|
||||||
|
{slug: 'developing/translation'},
|
||||||
|
{label: 'Contributing', autogenerate: {directory: 'developing/contributing'}}
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{label: 'Legal', autogenerate: {directory: 'legal'}, collapsed: true},
|
||||||
|
{slug: 'acknowledgment'}
|
||||||
|
],
|
||||||
|
locales: {
|
||||||
|
en: {
|
||||||
|
label: 'English',
|
||||||
|
lang: 'en'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
head: [
|
||||||
|
{
|
||||||
|
tag: 'meta',
|
||||||
|
attrs: {
|
||||||
|
name: 'keywords',
|
||||||
|
content: 'Domain Watchdog, RDAP, WHOIS, domain monitoring, domain history, domain expiration, domain tracker'
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
tag: 'meta',
|
||||||
|
attrs: {
|
||||||
|
name: 'author',
|
||||||
|
content: 'Maël Gangloff'
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
tag: 'meta',
|
||||||
|
attrs: {name: 'twitter:card', content: 'summary'},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
tag: 'meta',
|
||||||
|
attrs: {name: 'twitter:url', content: BASE_URL},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
tag: 'meta',
|
||||||
|
attrs: {property: 'og:image', content: BASE_URL + '/logo.png'},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
tag: 'meta',
|
||||||
|
attrs: {property: 'og:image:alt', content: 'Domain Watchdog logo'},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
tag: 'script',
|
||||||
|
attrs: {type: 'text/javascript'},
|
||||||
|
content: `var _paq = window._paq = window._paq || [];
|
||||||
|
_paq.push(['trackPageView']);
|
||||||
|
_paq.push(['enableLinkTracking']);
|
||||||
|
_paq.push(['trackAllContentImpressions']);
|
||||||
|
_paq.push(['trackVisibleContentImpressions']);
|
||||||
|
_paq.push(['enableHeartBeatTimer']);
|
||||||
|
|
||||||
|
(function () {
|
||||||
|
var u = "//sonar.domainwatchdog.eu/";
|
||||||
|
_paq.push(['setTrackerUrl', u + 'sonar']);
|
||||||
|
_paq.push(['setSiteId', '4']);
|
||||||
|
var d = document, g = d.createElement('script'), s = d.getElementsByTagName('script')[0];
|
||||||
|
g.async = true;
|
||||||
|
g.src = u + 'sonar.js';
|
||||||
|
s.parentNode.insertBefore(g, s);
|
||||||
|
})();`
|
||||||
|
}
|
||||||
|
],
|
||||||
|
plugins: [
|
||||||
|
starlightLinksValidator({
|
||||||
|
errorOnLocalLinks: false
|
||||||
|
}),
|
||||||
|
starlightCoolerCredit({
|
||||||
|
credit: {
|
||||||
|
title: '',
|
||||||
|
href: 'https://maelgangloff.fr',
|
||||||
|
description: 'Maintained with ♡ by Maël Gangloff & contributors'
|
||||||
|
},
|
||||||
|
showImage: false
|
||||||
|
})
|
||||||
|
],
|
||||||
|
customCss: [
|
||||||
|
'./src/styles/index.css'
|
||||||
|
]
|
||||||
|
}),
|
||||||
|
mermaid()
|
||||||
|
]
|
||||||
|
})
|
||||||
28
docs/package.json
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
"name": "domainwatchdog.eu",
|
||||||
|
"private": true,
|
||||||
|
"author": {
|
||||||
|
"name": "Maël Gangloff",
|
||||||
|
"email": "contact@maelgangloff.fr"
|
||||||
|
},
|
||||||
|
"type": "module",
|
||||||
|
"license": "AGPL-3.0-or-later",
|
||||||
|
"version": "0.0.1",
|
||||||
|
"scripts": {
|
||||||
|
"dev": "astro dev",
|
||||||
|
"start": "astro dev",
|
||||||
|
"build": "astro build",
|
||||||
|
"preview": "astro preview",
|
||||||
|
"astro": "astro"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@astrojs/starlight": "^0.36.2",
|
||||||
|
"astro": "^5.6.1",
|
||||||
|
"astro-mermaid": "^1.1.0",
|
||||||
|
"mermaid": "^11.12.1",
|
||||||
|
"sharp": "^0.34.2",
|
||||||
|
"starlight-contributor-list": "^0.3.1",
|
||||||
|
"starlight-cooler-credit": "^0.4.1",
|
||||||
|
"starlight-links-validator": "^0.19.1"
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
docs/public/logo.png
Normal file
|
After Width: | Height: | Size: 71 KiB |
BIN
docs/src/assets/images/create-connector.png
Normal file
|
After Width: | Height: | Size: 50 KiB |
BIN
docs/src/assets/images/create-watchlist.png
Normal file
|
After Width: | Height: | Size: 53 KiB |
BIN
docs/src/assets/images/dw-stack-diagram.png
Normal file
|
After Width: | Height: | Size: 114 KiB |
BIN
docs/src/assets/images/search-domain.png
Normal file
|
After Width: | Height: | Size: 92 KiB |
BIN
docs/src/assets/images/tracking-table.png
Normal file
|
After Width: | Height: | Size: 49 KiB |
BIN
docs/src/assets/images/user-register.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
1
docs/src/assets/logo.png
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../public/logo.png
|
||||||
7
docs/src/content.config.ts
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
import {defineCollection} from 'astro:content';
|
||||||
|
import {docsLoader} from '@astrojs/starlight/loaders';
|
||||||
|
import {docsSchema} from '@astrojs/starlight/schema';
|
||||||
|
|
||||||
|
export const collections = {
|
||||||
|
docs: defineCollection({loader: docsLoader(), schema: docsSchema()}),
|
||||||
|
};
|
||||||
11
docs/src/content/docs/en/acknowledgment.mdx
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
---
|
||||||
|
title: Acknowledgment
|
||||||
|
---
|
||||||
|
import { ContributorList } from "starlight-contributor-list"
|
||||||
|
|
||||||
|
## Contributors
|
||||||
|
|
||||||
|
A huge thank-you to everyone who has contributed to this project!
|
||||||
|
Your ideas, bug reports, code improvements, and translations all help make this project better for everyone.
|
||||||
|
|
||||||
|
<ContributorList githubRepo="maelgangloff/domain-watchdog" ignore={['weblate']} />
|
||||||
@ -0,0 +1,90 @@
|
|||||||
|
---
|
||||||
|
title: Code of Conduct
|
||||||
|
description: Code of conduct outlining community standards and guidelines for respectful collaboration within the project.
|
||||||
|
---
|
||||||
|
|
||||||
|
## Our Pledge
|
||||||
|
|
||||||
|
We pledge to make our community welcoming, safe, and equitable for all.
|
||||||
|
|
||||||
|
We are committed to fostering an environment that respects and promotes the dignity, rights, and contributions of all individuals, regardless of characteristics including race, ethnicity, caste, color, age, physical characteristics, neurodiversity, disability, sex or gender, gender identity or expression, sexual orientation, language, philosophy or religion, national or social origin, socio-economic position, level of education, or other status. The same privileges of participation are extended to everyone who participates in good faith and in accordance with this Covenant.
|
||||||
|
|
||||||
|
|
||||||
|
## Encouraged Behaviors
|
||||||
|
|
||||||
|
While acknowledging differences in social norms, we all strive to meet our community's expectations for positive behavior. We also understand that our words and actions may be interpreted differently than we intend based on culture, background, or native language.
|
||||||
|
|
||||||
|
With these considerations in mind, we agree to behave mindfully toward each other and act in ways that center our shared values, including:
|
||||||
|
|
||||||
|
1. Respecting the **purpose of our community**, our activities, and our ways of gathering.
|
||||||
|
2. Engaging **kindly and honestly** with others.
|
||||||
|
3. Respecting **different viewpoints** and experiences.
|
||||||
|
4. **Taking responsibility** for our actions and contributions.
|
||||||
|
5. Gracefully giving and accepting **constructive feedback**.
|
||||||
|
6. Committing to **repairing harm** when it occurs.
|
||||||
|
7. Behaving in other ways that promote and sustain the **well-being of our community**.
|
||||||
|
|
||||||
|
|
||||||
|
## Restricted Behaviors
|
||||||
|
|
||||||
|
We agree to restrict the following behaviors in our community. Instances, threats, and promotion of these behaviors are violations of this Code of Conduct.
|
||||||
|
|
||||||
|
1. **Harassment.** Violating explicitly expressed boundaries or engaging in unnecessary personal attention after any clear request to stop.
|
||||||
|
2. **Character attacks.** Making insulting, demeaning, or pejorative comments directed at a community member or group of people.
|
||||||
|
3. **Stereotyping or discrimination.** Characterizing anyone’s personality or behavior on the basis of immutable identities or traits.
|
||||||
|
4. **Sexualization.** Behaving in a way that would generally be considered inappropriately intimate in the context or purpose of the community.
|
||||||
|
5. **Violating confidentiality**. Sharing or acting on someone's personal or private information without their permission.
|
||||||
|
6. **Endangerment.** Causing, encouraging, or threatening violence or other harm toward any person or group.
|
||||||
|
7. Behaving in other ways that **threaten the well-being** of our community.
|
||||||
|
|
||||||
|
### Other Restrictions
|
||||||
|
|
||||||
|
1. **Misleading identity.** Impersonating someone else for any reason, or pretending to be someone else to evade enforcement actions.
|
||||||
|
2. **Failing to credit sources.** Not properly crediting the sources of content you contribute.
|
||||||
|
3. **Promotional materials**. Sharing marketing or other commercial content in a way that is outside the norms of the community.
|
||||||
|
4. **Irresponsible communication.** Failing to responsibly present content which includes, links or describes any other restricted behaviors.
|
||||||
|
|
||||||
|
|
||||||
|
## Reporting an Issue
|
||||||
|
|
||||||
|
Tensions can occur between community members even when they are trying their best to collaborate. Not every conflict represents a code of conduct violation, and this Code of Conduct reinforces encouraged behaviors and norms that can help avoid conflicts and minimize harm.
|
||||||
|
|
||||||
|
When an incident does occur, it is important to report it promptly. To report a possible violation, please contact the maintainer.
|
||||||
|
|
||||||
|
Community Moderators take reports of violations seriously and will make every effort to respond in a timely manner. They will investigate all reports of code of conduct violations, reviewing messages, logs, and recordings, or interviewing witnesses and other participants. Community Moderators will keep investigation and enforcement actions as transparent as possible while prioritizing safety and confidentiality. In order to honor these values, enforcement actions are carried out in private with the involved parties, but communicating to the whole community may be part of a mutually agreed upon resolution.
|
||||||
|
|
||||||
|
|
||||||
|
## Addressing and Repairing Harm
|
||||||
|
|
||||||
|
If an investigation by the Community Moderators finds that this Code of Conduct has been violated, the following enforcement ladder may be used to determine how best to repair harm, based on the incident's impact on the individuals involved and the community as a whole. Depending on the severity of a violation, lower rungs on the ladder may be skipped.
|
||||||
|
|
||||||
|
1) Warning
|
||||||
|
1) Event: A violation involving a single incident or series of incidents.
|
||||||
|
2) Consequence: A private, written warning from the Community Moderators.
|
||||||
|
3) Repair: Examples of repair include a private written apology, acknowledgement of responsibility, and seeking clarification on expectations.
|
||||||
|
2) Temporarily Limited Activities
|
||||||
|
1) Event: A repeated incidence of a violation that previously resulted in a warning, or the first incidence of a more serious violation.
|
||||||
|
2) Consequence: A private, written warning with a time-limited cooldown period designed to underscore the seriousness of the situation and give the community members involved time to process the incident. The cooldown period may be limited to particular communication channels or interactions with particular community members.
|
||||||
|
3) Repair: Examples of repair may include making an apology, using the cooldown period to reflect on actions and impact, and being thoughtful about re-entering community spaces after the period is over.
|
||||||
|
3) Temporary Suspension
|
||||||
|
1) Event: A pattern of repeated violation which the Community Moderators have tried to address with warnings, or a single serious violation.
|
||||||
|
2) Consequence: A private written warning with conditions for return from suspension. In general, temporary suspensions give the person being suspended time to reflect upon their behavior and possible corrective actions.
|
||||||
|
3) Repair: Examples of repair include respecting the spirit of the suspension, meeting the specified conditions for return, and being thoughtful about how to reintegrate with the community when the suspension is lifted.
|
||||||
|
4) Permanent Ban
|
||||||
|
1) Event: A pattern of repeated code of conduct violations that other steps on the ladder have failed to resolve, or a violation so serious that the Community Moderators determine there is no way to keep the community safe with this person as a member.
|
||||||
|
2) Consequence: Access to all community spaces, tools, and communication channels is removed. In general, permanent bans should be rarely used, should have strong reasoning behind them, and should only be resorted to if working through other remedies has failed to change the behavior.
|
||||||
|
3) Repair: There is no possible repair in cases of this severity.
|
||||||
|
|
||||||
|
This enforcement ladder is intended as a guideline. It does not limit the ability of Community Managers to use their discretion and judgment, in keeping with the best interests of our community.
|
||||||
|
|
||||||
|
|
||||||
|
## Scope
|
||||||
|
|
||||||
|
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public or other spaces. Examples of representing our community include using an official email address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
|
||||||
|
|
||||||
|
|
||||||
|
## Attribution
|
||||||
|
|
||||||
|
This Code of Conduct is adapted from the Contributor Covenant, version 3.0, permanently available at [https://www.contributor-covenant.org/version/3/0/](https://www.contributor-covenant.org/version/3/0/).
|
||||||
|
|
||||||
|
Contributor Covenant is stewarded by the Organization for Ethical Source and licensed under CC BY-SA 4.0. To view a copy of this license, visit [https://creativecommons.org/licenses/by-sa/4.0/](https://creativecommons.org/licenses/by-sa/4.0/)
|
||||||
@ -0,0 +1,49 @@
|
|||||||
|
---
|
||||||
|
title: Pull Requests
|
||||||
|
description: Instructions for submitting pull requests.
|
||||||
|
---
|
||||||
|
|
||||||
|
When you want to propose a change to the source code, you will need to create a Pull Request on this project's GitHub
|
||||||
|
repository.
|
||||||
|
|
||||||
|
Note that if you are modifying several different parts, you should split it into multiple Pull Requests. This will make
|
||||||
|
it easier to review and merge your proposals.
|
||||||
|
|
||||||
|
You will then be asked to fill in a few fields:
|
||||||
|
|
||||||
|
## Title
|
||||||
|
|
||||||
|
The Pull Request title should briefly describe the proposed changes. Please be concise and precise. For example, to add
|
||||||
|
support for a new, fictitious provider called "FakeRegistrar," you could write something like "Add support for
|
||||||
|
FakeRegistrar provider".
|
||||||
|
|
||||||
|
## Description
|
||||||
|
|
||||||
|
For complex changes, please provide as much detail as possible. If your changes modify an existing API, you must mention
|
||||||
|
this in the description, as it may have repercussions on projects related to Domain Watchdog.
|
||||||
|
|
||||||
|
If the proposal modifies the frontend, it would be best to include screenshots (desktop and mobile versions) to better
|
||||||
|
visualize the proposal.
|
||||||
|
|
||||||
|
## Change Type
|
||||||
|
|
||||||
|
A checklist allows you to choose the type of change proposed:
|
||||||
|
|
||||||
|
- [ ] Bug fix (non-breaking change which fixes an issue)
|
||||||
|
- [ ] New feature (non-breaking change which adds functionality)
|
||||||
|
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
|
||||||
|
- [ ] This change requires a documentation update
|
||||||
|
|
||||||
|
This checklist helps to better identify the project's impact on the PR.
|
||||||
|
|
||||||
|
## Compliance Checklist
|
||||||
|
|
||||||
|
The checklist below allows you to self-assess the conformity of your proposal before submitting it for review:
|
||||||
|
|
||||||
|
- [x] Commit names follow the Conventional Commits convention
|
||||||
|
- [x] I have checked the entire code before submitting it
|
||||||
|
- [x] I have updated the documentation related to my commits
|
||||||
|
- [x] My code does not generate errors
|
||||||
|
|
||||||
|
In any case, if you experience any difficulties creating a PR, feel free to open one; we will help you ensure it
|
||||||
|
complies with these requirements.
|
||||||
@ -0,0 +1,221 @@
|
|||||||
|
---
|
||||||
|
title: Implementing a new provider
|
||||||
|
description: Step-by-step guide to adding a new Provider, with backend, frontend, and testing instructions to integrate a registrar into the project.
|
||||||
|
---
|
||||||
|
import {FileTree, Steps, Code, LinkCard} from "@astrojs/starlight/components";
|
||||||
|
|
||||||
|
This project aims to be compatible with as many registrars as possible, giving users a choice when creating a Connector.
|
||||||
|
|
||||||
|
::::caution
|
||||||
|
Only registrars with a public and documented API can be offered. Using a registrar's private API is strictly prohibited.
|
||||||
|
::::
|
||||||
|
|
||||||
|
Adding a new Provider is straightforward. Simply follow the steps below.
|
||||||
|
|
||||||
|
This guide explains how to add support for a new domain registrar.
|
||||||
|
You’ll implement both the Backend (Provider logic) and the Frontend (configuration form).
|
||||||
|
|
||||||
|
## Prerequisites
|
||||||
|
|
||||||
|
<Steps>
|
||||||
|
1. Read the API documentation of the new Provider and identify the sections related to user authentication and domain name registration.
|
||||||
|
1. Set up your development environment.
|
||||||
|
<LinkCard title="Manual Installation" href="/en/install-config/install/manual-install" description='Install the project from source to begin development' />
|
||||||
|
</Steps>
|
||||||
|
|
||||||
|
## Backend
|
||||||
|
|
||||||
|
In this section, you’ll implement the logic required to interact with the new Provider’s API.
|
||||||
|
|
||||||
|
<Steps>
|
||||||
|
1. Create a new DTO class to validate user authentication data.
|
||||||
|
<FileTree>
|
||||||
|
- src
|
||||||
|
- Dto.Connector
|
||||||
|
- DefaultProviderDto.php default DTO, which will also be used
|
||||||
|
- **MySuperRegistrarProviderDto.php** your new DTO class
|
||||||
|
</FileTree>
|
||||||
|
|
||||||
|
1. Add the necessary class properties and assertions.
|
||||||
|
The DTO class must extend `DefaultProviderDto`.
|
||||||
|
|
||||||
|
Only include properties required for user authentication, domain name registration, and any legally required consents.
|
||||||
|
<Code code={`namespace App\\Dto\\Connector;
|
||||||
|
|
||||||
|
class MySuperRegistrarProviderDto extends DefaultProviderDto
|
||||||
|
`} lang="php" title='MySuperRegistrarProviderDto.php' mark={['extends DefaultProviderDto']} />
|
||||||
|
|
||||||
|
1. Create a new Provider class.
|
||||||
|
<FileTree>
|
||||||
|
- src
|
||||||
|
- Service
|
||||||
|
- Provider
|
||||||
|
- AbstractProvider.php defines the signature of methods
|
||||||
|
- **MySuperRegistrarProvider.php** your new Provider
|
||||||
|
</FileTree>
|
||||||
|
|
||||||
|
1. The class must extend `AbstractProvider`.
|
||||||
|
Refer to the existing Providers for implementation examples.
|
||||||
|
<Code code={`namespace App\\Service\\Provider;
|
||||||
|
|
||||||
|
#[Autoconfigure(public: true)]
|
||||||
|
class MySuperRegistrarProvider extends AbstractProvider
|
||||||
|
{
|
||||||
|
protected string $dtoClass = MySuperRegistrarProviderDto::class;
|
||||||
|
|
||||||
|
/** @var MySuperRegistrarProviderDto */
|
||||||
|
protected DefaultProviderDto $authData;
|
||||||
|
`} lang="php" title='MySuperRegistrarProvider.php' mark={['extends AbstractProvider']} />
|
||||||
|
::::note
|
||||||
|
You now need to implement the methods defined in `AbstractProvider`.
|
||||||
|
|
||||||
|
Refer to the official Provider API documentation as needed.
|
||||||
|
::::
|
||||||
|
|
||||||
|
1. Implement the `assertAuthentication` method.
|
||||||
|
|
||||||
|
This method validates user authentication data.
|
||||||
|
Make a request to the Provider’s API to verify that the user’s credentials are valid.
|
||||||
|
|
||||||
|
The method must return `void` when authentication succeeds.
|
||||||
|
::::tip
|
||||||
|
If an issue occurs, throw an appropriate exception from the `App\Exception\Provider` namespace.
|
||||||
|
::::
|
||||||
|
<Code code={`
|
||||||
|
protected function assertAuthentication(): void
|
||||||
|
{
|
||||||
|
// TODO: Implement assertAuthentication() method.
|
||||||
|
}`} lang="php" title='MySuperRegistrarProvider.php' mark={['protected function assertAuthentication()']} />
|
||||||
|
|
||||||
|
1. Implement the `getCachedTldList` method.
|
||||||
|
<Code code={`
|
||||||
|
protected function getCachedTldList(): CacheItemInterface
|
||||||
|
{
|
||||||
|
return $this->cacheItemPool->getItem('app.provider.my-super-registrar.supported-tld');
|
||||||
|
}`} lang="php" title='MySuperRegistrarProvider.php' mark={['my-super-registrar']} />
|
||||||
|
|
||||||
|
This method returns the cache entry holding the list of TLDs supported by this Provider.
|
||||||
|
Even if the API does not currently provide this information, implement the method for future compatibility.
|
||||||
|
|
||||||
|
1. Implement the `getSupportedTldList` method.
|
||||||
|
|
||||||
|
If the Provider API does not offer a way to retrieve supported TLDs, return an empty array `[]`.
|
||||||
|
Otherwise, call the API and return the list of supported TLDs.
|
||||||
|
<Code code={`
|
||||||
|
protected function getSupportedTldList(): array
|
||||||
|
{
|
||||||
|
// TODO: Implement getSupportedTldList() method.
|
||||||
|
}`} lang="php" title='MySuperRegistrarProvider.php' />
|
||||||
|
|
||||||
|
1. Implement the `isSupported` method (if necessary).
|
||||||
|
Override `isSupported` **only if** the Provider API cannot list supported TLDs. In that case, return `true` to indicate that all TLDs are potentially valid.
|
||||||
|
|
||||||
|
1. Implement the `orderDomain` method.
|
||||||
|
|
||||||
|
Follow the Provider's API documentation to implement domain ordering using the required properties.
|
||||||
|
::::tip
|
||||||
|
As with authentication, you may throw generic Provider exceptions in case of an error.
|
||||||
|
::::
|
||||||
|
<Code code={`
|
||||||
|
public function orderDomain(Domain $domain, bool $dryRun): void
|
||||||
|
{
|
||||||
|
// TODO: Implement orderDomain() method.
|
||||||
|
}`} lang="php" title='MySuperRegistrarProvider.php' />
|
||||||
|
|
||||||
|
1. Add your Provider to the `ConnectorProvider` enumeration.
|
||||||
|
<Code code={`
|
||||||
|
namespace App\Config;
|
||||||
|
|
||||||
|
enum ConnectorProvider: string
|
||||||
|
{
|
||||||
|
// ...
|
||||||
|
case MY_SUPER_REGISTRAR = 'my-super-registrar';
|
||||||
|
|
||||||
|
public function getConnectorProvider(): string
|
||||||
|
{
|
||||||
|
return match ($this) {
|
||||||
|
// ...
|
||||||
|
ConnectorProvider::MY_SUPER_REGISTRAR => MySuperRegistrarProvider::class,
|
||||||
|
};
|
||||||
|
}`} lang="php" title='src/Config/ConnectorProvider.php' />
|
||||||
|
</Steps>
|
||||||
|
|
||||||
|
**Well done!** 🎉
|
||||||
|
You have now completed the Backend implementation.
|
||||||
|
Let’s continue with the Frontend! 🚀
|
||||||
|
|
||||||
|
## Frontend
|
||||||
|
|
||||||
|
<Steps>
|
||||||
|
1. Create a form containing the necessary fields for your Provider.
|
||||||
|
<FileTree>
|
||||||
|
- assets
|
||||||
|
- utils
|
||||||
|
- providers
|
||||||
|
- forms
|
||||||
|
- DefaultConnectorFormItems.tsx fields shared by all
|
||||||
|
- **MySuperRegistrarConnectorForm.tsx**
|
||||||
|
</FileTree>
|
||||||
|
|
||||||
|
1. Add the fields corresponding to the DTO you created earlier.
|
||||||
|
Check existing forms for reference.
|
||||||
|
If the Provider API does not allow retrieving supported TLDs, display this information as in the other forms.
|
||||||
|
|
||||||
|
1. Add your Provider to the `ConnectorProvider` enumeration.
|
||||||
|
The value must exactly match the one defined in PHP.
|
||||||
|
|
||||||
|
<Code code={`
|
||||||
|
export enum ConnectorProvider {
|
||||||
|
// ...
|
||||||
|
MY_SUPER_REGISTRAR = 'my-super-registrar'
|
||||||
|
}`} lang="ts" title='assets/utils/api/connectors.ts' />
|
||||||
|
|
||||||
|
1. Add the API terms of service link and the reference to your new form in the `index.ts` configuration file.
|
||||||
|
<Code code={`
|
||||||
|
export const providersConfig: Record<ConnectorProvider, ProviderConfig> = {
|
||||||
|
// ...
|
||||||
|
[ConnectorProvider.MY_SUPER_REGISTRAR]: {
|
||||||
|
tosLink: 'https://...',
|
||||||
|
form: MySuperRegistrarConnectorForm
|
||||||
|
}
|
||||||
|
}`} lang="ts" title='assets/utils/providers/index.ts' />
|
||||||
|
|
||||||
|
1. Ensure the interface renders correctly and fix any display issues.
|
||||||
|
</Steps>
|
||||||
|
|
||||||
|
**Great job!** 🎉
|
||||||
|
Your Frontend implementation is now complete.
|
||||||
|
|
||||||
|
## Testing
|
||||||
|
|
||||||
|
<Steps>
|
||||||
|
1. Add the corresponding test function in the Provider test collection.
|
||||||
|
<Code code={`
|
||||||
|
#[DependsExternal(RDAPServiceTest::class, 'testUpdateRdapServers')]
|
||||||
|
public function testMySuperRegistrar()
|
||||||
|
{
|
||||||
|
$token = static::getContainer()->getParameter('my_super_registrar_token');
|
||||||
|
if (!$token) {
|
||||||
|
$this->markTestSkipped('Missing My Super Registrar token');
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->testGenericProvider(ConnectorProvider::MY_SUPER_REGISTRAR, [
|
||||||
|
'waiveRetractationPeriod' => true,
|
||||||
|
'acceptConditions' => true,
|
||||||
|
'ownerLegalAge' => true,
|
||||||
|
'token' => $token,
|
||||||
|
]);
|
||||||
|
}`} lang="php" title='tests/Service/Provider/AbstractProviderTest.php' />
|
||||||
|
|
||||||
|
1. Create a Symfony configuration parameter connecting the environment variable to the credentials.
|
||||||
|
|
||||||
|
1. Run the tests with PHPUnit:
|
||||||
|
```shell
|
||||||
|
php vendor/bin/phpunit
|
||||||
|
```
|
||||||
|
1. Ensure the test passes.
|
||||||
|
If it fails, fix the implementation accordingly.
|
||||||
|
Consider enabling code coverage to identify executed sections.
|
||||||
|
</Steps>
|
||||||
|
|
||||||
|
That's it! You’ve now finished implementing a new Provider. ✨
|
||||||
67
docs/src/content/docs/en/developing/technical-stack.mdx
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
---
|
||||||
|
title: Technical stack
|
||||||
|
description: Overview of the project's technical stack, including frameworks, languages, and architecture used throughout the system.
|
||||||
|
---
|
||||||
|
|
||||||
|
This page lists the main technologies used in the project, with links to their documentation. Specific version
|
||||||
|
information can be found in the project’s dependency files (`composer.lock`, `package.json`, etc.). The architecture
|
||||||
|
diagram below summarizes how these services interact.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Backend
|
||||||
|
|
||||||
|
### Framework
|
||||||
|
|
||||||
|
The programming language is **PHP**.
|
||||||
|
|
||||||
|
The backend is developed using the **Symfony** framework ([documentation](https://symfony.com/doc)).
|
||||||
|
|
||||||
|
The API is made possible by the **API Platform**
|
||||||
|
project ([documentation](https://api-platform.com/docs/symfony/)).
|
||||||
|
|
||||||
|
### SQL database
|
||||||
|
|
||||||
|
This project requires a **PostgreSQL** database ([documentation](https://www.postgresql.org/docs/current/)).
|
||||||
|
|
||||||
|
Other database types cannot be used because some migrations were specifically written to leverage the performance of
|
||||||
|
this database management system.
|
||||||
|
|
||||||
|
### Key-value database
|
||||||
|
|
||||||
|
A **Redis-compatible** key-value database is required to:
|
||||||
|
|
||||||
|
- Cache certain values
|
||||||
|
- Implement locks to limit the possibility of conditional raises
|
||||||
|
- Store messages to be distributed to workers to process asynchronous actions. For example: updating domain names in a
|
||||||
|
Watchlist on a high-priority RDAP client queue.
|
||||||
|
|
||||||
|
## Time Series database
|
||||||
|
|
||||||
|
The **InfluxDB** database is optional.
|
||||||
|
A data point is added for the following events:
|
||||||
|
|
||||||
|
- RDAP requests from your instance: response time, requested domain name, HTTP status code, IP address of the RDAP
|
||||||
|
server, etc.
|
||||||
|
- User notifications: adding events to a domain name, changing EPP statuses, etc.
|
||||||
|
|
||||||
|
### SSO authentication
|
||||||
|
|
||||||
|
An **OAuth 2.0** server is not required to authenticate users.
|
||||||
|
|
||||||
|
Using Single Sign-On (SSO) allows you to delegate user authentication to a third party. This can be useful if you only
|
||||||
|
want people within your organization to be able to use this project instance. Furthermore, you can then configure
|
||||||
|
advanced security policies such as passwordless login, passkeys, multifactor authentication, and more.
|
||||||
|
___
|
||||||
|
|
||||||
|
## Frontend
|
||||||
|
|
||||||
|
### Framework
|
||||||
|
|
||||||
|
The language for frontend development is **TypeScript**.
|
||||||
|
|
||||||
|
The framework used for the frontend is **React** ([documentation](https://react.dev/reference/react)).
|
||||||
|
|
||||||
|
### Component Library
|
||||||
|
|
||||||
|
The component library used is **Ant Design** ([documentation](https://ant.design/components/overview/)).
|
||||||
13
docs/src/content/docs/en/developing/translation.mdx
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
---
|
||||||
|
title: Translation
|
||||||
|
description: This project is available in several languages, the current translation status is available here.
|
||||||
|
---
|
||||||
|
|
||||||
|
The project is translated into several languages to allow as many people as possible to easily understand the interface.
|
||||||
|
Feel free to contribute and add a translation if you wish!
|
||||||
|
|
||||||
|
The current status of the translation is given below.
|
||||||
|
|
||||||
|
<a href="https://weblate.vinceh121.me/engage/domain-watchdog/">
|
||||||
|
<img src="https://weblate.vinceh121.me/widget/domain-watchdog/domain-watchdog-dashboard/open-graph.png" alt="Translation status" />
|
||||||
|
</a>
|
||||||
39
docs/src/content/docs/en/features/backorder/connector.mdx
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
---
|
||||||
|
title: Connector
|
||||||
|
description: Learn how the Backorder Connector works, its flow, requirements, and how it integrates with registrar APIs for domain backordering.
|
||||||
|
---
|
||||||
|
|
||||||
|
import {LinkCard, Steps} from '@astrojs/starlight/components';
|
||||||
|
|
||||||
|
A Connector allows Domain Watchdog to communicate with an external domain registrar’s API to perform actions such as
|
||||||
|
domain registration.
|
||||||
|
|
||||||
|
## Create a Connector
|
||||||
|
|
||||||
|
<Steps>
|
||||||
|
1. Choose an external API provider from the list of supported registrars.
|
||||||
|
<LinkCard title="Supported registrar" description="List of supported registrars for creating a Connector" href="/en/features/backorder/supported-registrar"/>
|
||||||
|
2. Enter the required information using the credentials obtained from your provider’s customer area
|
||||||
|
:::tip{icon="heart"}
|
||||||
|
A link allows you to directly access the Provider's page to retrieve this authentication information
|
||||||
|
:::
|
||||||
|
3. Review and consent to the required terms. As a reminder, you can delete a Connector at any time from your personal
|
||||||
|
space.
|
||||||
|
4. Click the button to create your Connector. **Congratulations 🎉**
|
||||||
|
</Steps>
|
||||||
|
|
||||||
|
## Legal considerations
|
||||||
|
|
||||||
|
These legal requirements ensure that all domain operations comply with registrar policies and applicable regulations.
|
||||||
|
|
||||||
|
Domain Watchdog acts only as a technical interface and does not serve as a payment intermediary.
|
||||||
|
Your credentials are transmitted directly to the provider’s API for domain operations.
|
||||||
|
By creating a Connector, you consent to the provider’s terms and the use of your credentials for authorized operations.
|
||||||
|
|
||||||
|
In particular, you must consent to:
|
||||||
|
|
||||||
|
- Accept the provider’s API Terms of Use
|
||||||
|
- Confirm that you are of legal age to accept these terms
|
||||||
|
|
||||||
|
Since the terms of use may change at any time, the link to these terms is always accessible on the page listing the
|
||||||
|
Connectors.
|
||||||
@ -0,0 +1,113 @@
|
|||||||
|
---
|
||||||
|
title: Supported registrar list
|
||||||
|
description: List of registrars supported for domain backorders, with details on compatibility.
|
||||||
|
---
|
||||||
|
|
||||||
|
import {LinkButton} from '@astrojs/starlight/components';
|
||||||
|
|
||||||
|
:::caution[Reminder]
|
||||||
|
|
||||||
|
* Please note that this project is NOT affiliated IN ANY WAY with the API Providers used to order domain names.
|
||||||
|
* The project installers are responsible for the use of their own instance.
|
||||||
|
* Under no circumstances will the owner of this project be held responsible for other cases over which he has no
|
||||||
|
control.
|
||||||
|
:::
|
||||||
|
|
||||||
|
## OVH
|
||||||
|
|
||||||
|
| Field | Description | Required |
|
||||||
|
|----------------|----------------------------------------------------------------------------------|:--------:|
|
||||||
|
| App key | the key that allows OVH to identify your application | Required |
|
||||||
|
| App secret key | the secret key associated with your application | Required |
|
||||||
|
| Consumer key | the secret key that links the application to your account | Required |
|
||||||
|
| Endpoint | allows you to choose which server to use (Europe, United States or Canada) | Required |
|
||||||
|
| Subsidiary | the country linked to the OVH subsidiary associated with your account | Required |
|
||||||
|
| Pricing mode | choose whether you want to pay for a Premium domain name or only standard prices | Required |
|
||||||
|
|
||||||
|
<LinkButton variant="secondary"
|
||||||
|
icon="external"
|
||||||
|
target="_blank"
|
||||||
|
href="https://api.ovh.com/createToken/?GET=/order/cart&GET=/order/cart/*&POST=/order/cart&POST=/order/cart/*&DELETE=/order/cart/*&GET=/domain/extensions">
|
||||||
|
Retrieve my token from the OVH website
|
||||||
|
</LinkButton>
|
||||||
|
|
||||||
|
## Gandi
|
||||||
|
|
||||||
|
| Field | Description | Required |
|
||||||
|
|------------|------------------------------------------------------------------|:--------:|
|
||||||
|
| Token | your account authentication token | Required |
|
||||||
|
| Sharing ID | indicates the organization that will pay for the ordered product | Optional |
|
||||||
|
|
||||||
|
<LinkButton variant="secondary"
|
||||||
|
icon="external"
|
||||||
|
target="_blank"
|
||||||
|
href="https://admin.gandi.net/organizations/account/pat">
|
||||||
|
Retrieve my token from the Gandi website
|
||||||
|
</LinkButton>
|
||||||
|
|
||||||
|
## Namecheap
|
||||||
|
|
||||||
|
:::caution
|
||||||
|
This provider requires that the IPv4 address of your instance be entered on its web interface when creating the API
|
||||||
|
connection. This information must also be entered in the configuration.
|
||||||
|
:::
|
||||||
|
|
||||||
|
| Field | Description | Required |
|
||||||
|
|----------|---------------------------------------|:--------:|
|
||||||
|
| API user | the API user as given by the Provider | Required |
|
||||||
|
| API key | the API key as given by the Provider | Required |
|
||||||
|
|
||||||
|
<LinkButton variant="secondary"
|
||||||
|
icon="external"
|
||||||
|
target="_blank"
|
||||||
|
href="https://ap.www.namecheap.com/settings/tools/apiaccess/">
|
||||||
|
Retrieve my token from the Namecheap website
|
||||||
|
</LinkButton>
|
||||||
|
|
||||||
|
## AutoDNS
|
||||||
|
|
||||||
|
:::caution
|
||||||
|
This provider does not provide a list of supported TLD. Please double-check if the domain you want to register is
|
||||||
|
supported.
|
||||||
|
:::
|
||||||
|
|
||||||
|
| Field | Description | Required |
|
||||||
|
|---------------|---------------------------------------------------------------|:--------:|
|
||||||
|
| Username | the account username | Required |
|
||||||
|
| Password | the account password | Required |
|
||||||
|
| Owner consent | purchase consent | Required |
|
||||||
|
| Context | the "context" as given by the Provider | Required |
|
||||||
|
| Contact ID | Contact ID of the domain name holder of the purchased domains | Required |
|
||||||
|
|
||||||
|
<LinkButton variant="secondary"
|
||||||
|
icon="external"
|
||||||
|
target="_blank"
|
||||||
|
href="https://en.autodns.com/domain-robot-api/">
|
||||||
|
Retrieve my token from the AutoDNS website
|
||||||
|
</LinkButton>
|
||||||
|
|
||||||
|
## Name.com
|
||||||
|
|
||||||
|
:::caution
|
||||||
|
This provider does not provide a list of supported TLD. Please double-check if the domain you want to register is
|
||||||
|
supported.
|
||||||
|
:::
|
||||||
|
|
||||||
|
| Field | Description | Required |
|
||||||
|
|----------|-----------------------------------|:--------:|
|
||||||
|
| Username | the account username | Required |
|
||||||
|
| Token | your account authentication token | Required |
|
||||||
|
|
||||||
|
<LinkButton variant="secondary"
|
||||||
|
icon="external"
|
||||||
|
target="_blank"
|
||||||
|
href="https://www.name.com/account/settings/api">
|
||||||
|
Retrieve my token from the Name.com website
|
||||||
|
</LinkButton>
|
||||||
|
|
||||||
|
## Custom EPP server
|
||||||
|
|
||||||
|
This type of connector allows you to directly link your instance to a registry via the EPP protocol.
|
||||||
|
This requires that you have signed a contract with a registry; you are then considered a registry in your own right.
|
||||||
|
|
||||||
|
Currently, the implementation of this feature has not been tested; your feedback is important!
|
||||||
111
docs/src/content/docs/en/features/index.mdx
Normal file
@ -0,0 +1,111 @@
|
|||||||
|
---
|
||||||
|
title: Getting started
|
||||||
|
description: Step-by-step guide to creating an account, searching domains, tracking changes, and enabling auto-purchase with Connectors.
|
||||||
|
---
|
||||||
|
|
||||||
|
import {LinkCard, Steps} from '@astrojs/starlight/components';
|
||||||
|
|
||||||
|
On this page, you'll find a step-by-step guide to getting started with **Domain Watchdog** and exploring its main
|
||||||
|
features. The sidebar menu on the left allows you to quickly navigate between all documentation sections.
|
||||||
|
|
||||||
|
:::note
|
||||||
|
Depending on the configuration of the instance on which you're performing these actions, some options may be limited or
|
||||||
|
hidden.
|
||||||
|
:::
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Create an account
|
||||||
|
|
||||||
|
If your instance allows user registration, you can create an account directly from the interface.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
<Steps>
|
||||||
|
1. Click the **Register** button.
|
||||||
|
2. Enter your **email address** and **password**.
|
||||||
|
3. A confirmation email will be sent to verify your address.
|
||||||
|
</Steps>
|
||||||
|
|
||||||
|
After confirming your email, you can log in and start using all available features.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Search for a domain name
|
||||||
|
|
||||||
|
Domain Watchdog uses the **RDAP protocol**, the modern replacement for WHOIS, to retrieve accurate information about
|
||||||
|
domain names.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
:::tip[Read more]
|
||||||
|
To read the documentation related to domain name search, please click on the link below.
|
||||||
|
|
||||||
|
<LinkCard title="Domain search"
|
||||||
|
description="Obtain the details of a domain name registration and the history of observed events"
|
||||||
|
href="/en/features/search/domain-search"/>
|
||||||
|
:::
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Create a Watchlist
|
||||||
|
|
||||||
|
A **Watchlist** is a collection of domain names, triggers, and optionally an API Connector.
|
||||||
|
It allows you to:
|
||||||
|
- monitor domain status changes
|
||||||
|
- receive notifications (email or webhook: Slack, Mattermost, Discord, etc.)
|
||||||
|
- optionally auto-purchase a domain when it expires
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
:::tip[Read more]
|
||||||
|
To read the documentation related to the Watchlist, please click on the link below.
|
||||||
|
|
||||||
|
<LinkCard title="Watchlist"
|
||||||
|
description="Add domain names to a Watchlist to track them, be notified of any changes, and potentially buy them when they expire"
|
||||||
|
href="/en/features/tracking/watchlist"/>
|
||||||
|
:::
|
||||||
|
|
||||||
|
### Watchlist notifications
|
||||||
|
|
||||||
|
When a domain changes state, you’ll automatically receive a notification.
|
||||||
|
You can also export domain events as **iCalendar** feeds.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Create a Connector
|
||||||
|
|
||||||
|
A **Connector** is used to automatically order (backorder) a domain name using its provider’s API.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
:::tip[Read more]
|
||||||
|
To read the documentation related to Connector, please click on the link below.
|
||||||
|
|
||||||
|
<LinkCard title="Connector"
|
||||||
|
description="Create a Connector to enable domain name purchases by linking it to your Watchlists"
|
||||||
|
href="/en/features/backorder/connector"/>
|
||||||
|
:::
|
||||||
|
|
||||||
|
### Supported registrar list
|
||||||
|
|
||||||
|
<LinkCard title="Supported registrar list"
|
||||||
|
description="List of registrars supported by this project"
|
||||||
|
href="/en/features/backorder/supported-registrar"/>
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### Tracking table
|
||||||
|
|
||||||
|
The Tracking table page displays a list of all the domain names you monitor via your Watchlists.
|
||||||
|
This list is ordered, meaning the domain names are arranged according to their estimated deletion date.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
:::tip[Read more]
|
||||||
|
To read the documentation related to the Tracking table, please click on the link below.
|
||||||
|
|
||||||
|
<LinkCard title="Tracking table"
|
||||||
|
description="List all the domains you're monitoring in your Watchlist and track the status of those domains"
|
||||||
|
href="/en/features/tracking/tracking-table"/>
|
||||||
|
:::
|
||||||
10
docs/src/content/docs/en/features/search/domain-search.mdx
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
---
|
||||||
|
title: Domain search
|
||||||
|
description: Domain search feature overview
|
||||||
|
---
|
||||||
|
|
||||||
|
:::tip[Did you know?]
|
||||||
|
In this project, everything is done to minimize the number of requests to RDAP servers. Limitations imposed on end users
|
||||||
|
help to control the flow of RDAP requests. These limitations can be configured for each instance, in the environment
|
||||||
|
variables.
|
||||||
|
:::
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
title: ICANN Registrar list
|
||||||
|
---
|
||||||
3
docs/src/content/docs/en/features/search/tld-list.mdx
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
title: TLD list
|
||||||
|
---
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
title: Tracking table
|
||||||
|
---
|
||||||
33
docs/src/content/docs/en/features/tracking/watchlist.mdx
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
---
|
||||||
|
title: Watchlist
|
||||||
|
description: Learn how the domain watchlist works, enabling users to monitor domains and receive updates on changes.
|
||||||
|
---
|
||||||
|
import {Steps} from '@astrojs/starlight/components';
|
||||||
|
|
||||||
|
A Watchlist is a list of domain names, triggers and possibly an API connector. They allow you to follow the life of the
|
||||||
|
listed domain names and send you a notification when a change has been detected.
|
||||||
|
|
||||||
|
If a domain has expired and a connector is linked to the Watchlist, then an order attempt will be made though the
|
||||||
|
Connector provider's API.
|
||||||
|
|
||||||
|
:::note
|
||||||
|
If the same domain name is present on several Watchlists, on the same principle as the race condition, it is not
|
||||||
|
possible to predict in advance which user will win the domain name. The choice is left to chance...
|
||||||
|
:::
|
||||||
|
|
||||||
|
## Create a Watchlist
|
||||||
|
|
||||||
|
<Steps>
|
||||||
|
1. Choose a name for your Watchlist and find it more easily
|
||||||
|
2. Add the domain names you want to follow
|
||||||
|
3. Select the events for which you want to receive an email notification
|
||||||
|
4. Optionally add a connector to try to automatically buy a domain name that becomes available
|
||||||
|
5. Click the button to create your Watchlist. **Congratulations 🎉**
|
||||||
|
</Steps>
|
||||||
|
|
||||||
|
Now, it's your turn to create a Watchlist!
|
||||||
|
|
||||||
|
## Limitations
|
||||||
|
|
||||||
|
Depending on the instance configuration, there are several limitations to frame user behavior.
|
||||||
|
|
||||||
18
docs/src/content/docs/en/index.mdx
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
---
|
||||||
|
title: Domain Watchdog
|
||||||
|
description: An app that uses RDAP to collect publicly available info about domains, track their history, and purchase then when they expire
|
||||||
|
template: splash
|
||||||
|
hero:
|
||||||
|
tagline: Your companion in the quest for domain names 🔍
|
||||||
|
image:
|
||||||
|
file: ../../../assets/logo.png
|
||||||
|
actions:
|
||||||
|
- text: Get started
|
||||||
|
link: /en/features
|
||||||
|
icon: right-arrow
|
||||||
|
- text: Demo
|
||||||
|
link: https://demo.domainwatchdog.eu
|
||||||
|
icon: external
|
||||||
|
variant: minimal
|
||||||
|
---
|
||||||
|
|
||||||
43
docs/src/content/docs/en/install-config/configuration.mdx
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
---
|
||||||
|
title: Configuration
|
||||||
|
description: Configuration guide explaining environment variables and settings required to run and customize the project.
|
||||||
|
---
|
||||||
|
|
||||||
|
import {LinkCard} from '@astrojs/starlight/components';
|
||||||
|
|
||||||
|
<LinkCard title="Install with Docker" href="/en/install-config/install/docker-compose"/>
|
||||||
|
|
||||||
|
## Environment variables
|
||||||
|
|
||||||
|
| Variable | Description | Default |
|
||||||
|
|--------------------------------|----------------------------------------------|:---------------------------:|
|
||||||
|
| `DATABASE_URL` | Please check Symfony config | |
|
||||||
|
| `OUTGOING_IP` | Outgoing IPv4, needed for some providers | |
|
||||||
|
| `INFLUXDB_ENABLED` | Enable the connection with InfluxDB | `false` |
|
||||||
|
| `INFLUXDB_URL` | InfluxDB URL | `http://localhost:8086` |
|
||||||
|
| `INFLUXDB_TOKEN` | InfluxDB token | |
|
||||||
|
| `INFLUXDB_BUCKET` | InfluxDB bucket name | `domainwatchdog` |
|
||||||
|
| `INFLUXDB_ORG` | InfluxDB organization | `domainwatchdog` |
|
||||||
|
| `LIMITED_FEATURES` | Limit certain features for users | `false` |
|
||||||
|
| `LIMIT_MAX_WATCHLIST` | Maximum number of Watchlists per user | `0` |
|
||||||
|
| `LIMIT_MAX_WATCHLIST_DOMAINS` | Maximum number of domains per Watchlist | `0` |
|
||||||
|
| `LIMIT_MAX_WATCHLIST_WEBHOOKS` | Maximum number of webhooks per Watchlist | `0` |
|
||||||
|
| `MAILER_SENDER_NAME` | Name of the sender of emails | `Domain Watchdog` |
|
||||||
|
| `MAILER_SENDER_EMAIL` | Sender's email address | `notifications@example.com` |
|
||||||
|
| `REGISTRATION_ENABLED` | Enable user registration | `true` |
|
||||||
|
| `REGISTRATION_VERIFY_EMAIL` | Verify email addresses during registration | `false` |
|
||||||
|
| `MAILER_DSN` | Please check Symfony config | `null://null` |
|
||||||
|
| `OAUTH_CLIENT_ID` | Client ID (OAuth 2.0) for using external SSO | |
|
||||||
|
| `OAUTH_CLIENT_SECRET` | Client secret (OAuth 2.0) | |
|
||||||
|
| `OAUTH_AUTHORIZATION_URL` | Authorization URL (OAuth 2.0) | |
|
||||||
|
| `OAUTH_TOKEN_URL` | Token URL (OAuth 2.0) | |
|
||||||
|
| `OAUTH_USERINFO_URL` | User Info URL (OAuth 2.0) | |
|
||||||
|
| `OAUTH_SCOPE` | Scope (OAuth 2.0) | |
|
||||||
|
|
||||||
|
|
||||||
|
## Authentication
|
||||||
|
|
||||||
|
Currently, there is no way to delete your account, reset your password, or enable multifactor authentication.
|
||||||
|
|
||||||
|
Registering users directly in the interface is recommended for individual instances. For multi-user environments, the
|
||||||
|
recommended method is to use external SSO via the OAuth 2.0 protocol.
|
||||||
@ -0,0 +1,26 @@
|
|||||||
|
---
|
||||||
|
title: Docker Compose installation
|
||||||
|
description: Guide to installing the project using Docker Compose, with setup steps, and deployment notes.
|
||||||
|
---
|
||||||
|
|
||||||
|
import {LinkCard} from '@astrojs/starlight/components';
|
||||||
|
|
||||||
|
1. Download the [docker-compose.yml](https://github.com/maelgangloff/domain-watchdog/blob/develop/docker-compose.yml) and modify it as needed
|
||||||
|
2. Download the [.env](https://github.com/maelgangloff/domain-watchdog/blob/develop/.env) and modify it as needed
|
||||||
|
<LinkCard title="Configuration" description="List of environment variables" href="/en/install-config/configuration/#environment-variables"/>
|
||||||
|
|
||||||
|
3. Add static files to customize your instance (under `public/content`)
|
||||||
|
4. Pull the latest version of the Domain Watchdog image from Docker Hub
|
||||||
|
|
||||||
|
```shell
|
||||||
|
docker compose pull
|
||||||
|
```
|
||||||
|
|
||||||
|
5. Start the project in production environment
|
||||||
|
|
||||||
|
```shell
|
||||||
|
docker compose up
|
||||||
|
```
|
||||||
|
|
||||||
|
By default, the container listens on http://localhost:8080, but you can configure this in environment variables.
|
||||||
|
|
||||||
@ -0,0 +1,88 @@
|
|||||||
|
---
|
||||||
|
title: Manual installation
|
||||||
|
description: Manual installation guide with system requirements, dependencies, and step-by-step instructions to install the project from source.
|
||||||
|
---
|
||||||
|
|
||||||
|
import {FileTree, LinkCard, Steps} from '@astrojs/starlight/components';
|
||||||
|
|
||||||
|
To deploy a Domain Watchdog instance, please refer to the Symfony documentation
|
||||||
|
on [How to deploy a Symfony application](https://symfony.com/doc/current/deployment.html).
|
||||||
|
|
||||||
|
## Prerequisites
|
||||||
|
|
||||||
|
- PHP 8.4 or higher
|
||||||
|
- PostgreSQL 16 or higher
|
||||||
|
|
||||||
|
In order to retrieve information about domain names, Domain Watchdog will query the RDAP server responsible for the TLD.
|
||||||
|
It is crucial that the Domain Watchdog instance is placed in a clean environment from which these servers can be
|
||||||
|
queried.
|
||||||
|
In particular, the DNS servers and root certificates of the system must be trusted.
|
||||||
|
|
||||||
|
## Steps
|
||||||
|
|
||||||
|
Clone the repository:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
git clone https://github.com/maelgangloff/domain-watchdog.git
|
||||||
|
```
|
||||||
|
|
||||||
|
### Backend
|
||||||
|
|
||||||
|
<Steps>
|
||||||
|
1. Install dependencies
|
||||||
|
```shell
|
||||||
|
composer install
|
||||||
|
```
|
||||||
|
2. Set up your environment variables
|
||||||
|
```shell
|
||||||
|
cp .env .env.local
|
||||||
|
```
|
||||||
|
<LinkCard title="Configuration" description="List of environment variables" href="/en/install-config/configuration"/>
|
||||||
|
|
||||||
|
3. Generate the cryptographic key pair for the JWT signature
|
||||||
|
```shell
|
||||||
|
php bin/console lexik:jwt:generate-keypair
|
||||||
|
```
|
||||||
|
4. Run database migrations
|
||||||
|
```shell
|
||||||
|
php bin/console doctrine:migrations:migrate
|
||||||
|
```
|
||||||
|
5. Start the Symfony server
|
||||||
|
```shell
|
||||||
|
symfony server:start
|
||||||
|
```
|
||||||
|
6. Build assets
|
||||||
|
```shell
|
||||||
|
php bin/console assets:install
|
||||||
|
```
|
||||||
|
7. Don't forget to set up workers to process the [message queue](https://symfony.com/doc/current/messenger.html)
|
||||||
|
</Steps>
|
||||||
|
|
||||||
|
### Frontend
|
||||||
|
|
||||||
|
<Steps>
|
||||||
|
1. Install dependencies
|
||||||
|
```shell
|
||||||
|
yarn install
|
||||||
|
```
|
||||||
|
2. Generate language files
|
||||||
|
```shell
|
||||||
|
yarn run ttag:po2json
|
||||||
|
```
|
||||||
|
3. Make the final build
|
||||||
|
```shell
|
||||||
|
yarn build
|
||||||
|
```
|
||||||
|
4. Add and modify the following files as you wish
|
||||||
|
<FileTree>
|
||||||
|
- public
|
||||||
|
- content
|
||||||
|
- home.md
|
||||||
|
- privacy.md
|
||||||
|
- tos.md
|
||||||
|
- faq.md
|
||||||
|
- icons-512.png
|
||||||
|
- banner.png
|
||||||
|
- favicon.ico
|
||||||
|
</FileTree>
|
||||||
|
</Steps>
|
||||||
51
docs/src/content/docs/en/install-config/upgrade.mdx
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
---
|
||||||
|
title: Manual Upgrade
|
||||||
|
description: Upgrade guide explaining how to safely update the project, including migrations, and versioning details.
|
||||||
|
---
|
||||||
|
import {Steps} from "@astrojs/starlight/components";
|
||||||
|
|
||||||
|
**Any updates are your responsibility. Make a backup of the data if necessary.**
|
||||||
|
|
||||||
|
Fetch updates from the remote repository:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
git pull origin master
|
||||||
|
```
|
||||||
|
|
||||||
|
## Backend
|
||||||
|
|
||||||
|
<Steps>
|
||||||
|
1. Install dependencies
|
||||||
|
```shell
|
||||||
|
composer install
|
||||||
|
```
|
||||||
|
2. Run database migrations
|
||||||
|
```shell
|
||||||
|
php bin/console doctrine:migrations:migrate
|
||||||
|
```
|
||||||
|
3. Clearing the Symfony cache
|
||||||
|
```shell
|
||||||
|
php bin/console cache:clear
|
||||||
|
```
|
||||||
|
4. Build assets
|
||||||
|
```shell
|
||||||
|
php bin/console assets:install
|
||||||
|
```
|
||||||
|
</Steps>
|
||||||
|
|
||||||
|
## Frontend
|
||||||
|
|
||||||
|
<Steps>
|
||||||
|
1. Install dependencies
|
||||||
|
```shell
|
||||||
|
yarn install
|
||||||
|
```
|
||||||
|
2. Generate language files
|
||||||
|
```shell
|
||||||
|
yarn run ttag:po2json
|
||||||
|
```
|
||||||
|
3. Make the final build
|
||||||
|
```shell
|
||||||
|
yarn build
|
||||||
|
```
|
||||||
|
</Steps>
|
||||||
3
docs/src/content/docs/en/legal/faq.md
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
title: FAQ
|
||||||
|
---
|
||||||
7
docs/src/content/docs/en/legal/license.md
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
title: License
|
||||||
|
description: Licensing information detailing usage rights, redistribution terms, and legal conditions for contributing and using the project.
|
||||||
|
---
|
||||||
|
|
||||||
|
This entire project is licensed under [*GNU Affero General Public License v3.0 or later*](https://www.gnu.org/licenses/agpl-3.0.txt).
|
||||||
|
Contributions are welcome as long as they do not contravene the Code of Conduct.
|
||||||
15
docs/src/content/docs/en/legal/security.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
title: Security policy
|
||||||
|
description: Security policy describing vulnerability reporting, and guidelines to keep the project secure.
|
||||||
|
---
|
||||||
|
|
||||||
|
## Reporting a Vulnerability
|
||||||
|
|
||||||
|
If you want to report a vulnerability, please contact the maintainer of this repository. Thanks!
|
||||||
|
|
||||||
|
~~~
|
||||||
|
Contact: mailto:contact@maelgangloff.fr
|
||||||
|
Encryption: openpgp4fpr:323E63F1AB879F30B38F527611FDC81C24A7F629
|
||||||
|
Encryption: https://maelgangloff.fr/pgp-key.txt
|
||||||
|
Preferred-Languages: fr, en
|
||||||
|
~~~
|
||||||
13
docs/src/pages/robots.txt.ts
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
import type {APIRoute} from 'astro'
|
||||||
|
|
||||||
|
const getRobotsTxt = (sitemapURL: URL) => `\
|
||||||
|
User-agent: *
|
||||||
|
Allow: /
|
||||||
|
|
||||||
|
Sitemap: ${sitemapURL.href}
|
||||||
|
`
|
||||||
|
|
||||||
|
export const GET: APIRoute = ({site}) => {
|
||||||
|
const sitemapURL = new URL('sitemap-index.xml', site);
|
||||||
|
return new Response(getRobotsTxt(sitemapURL));
|
||||||
|
}
|
||||||
3
docs/src/styles/index.css
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
.starlight-cooler-credit-aside h2 {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
5
docs/tsconfig.json
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"extends": "astro/tsconfigs/strict",
|
||||||
|
"include": [".astro/types.d.ts", "**/*"],
|
||||||
|
"exclude": ["dist"]
|
||||||
|
}
|
||||||
4569
docs/yarn.lock
Normal file
@ -15,7 +15,7 @@ export default [
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
ignores: ["public", "vendor", "webpack.config.js"]
|
ignores: ["public", "vendor", "webpack.config.js", "docs"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
settings: {
|
settings: {
|
||||||
|
|||||||
47
migrations/Version20251031115210.php
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace DoctrineMigrations;
|
||||||
|
|
||||||
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Doctrine\Migrations\AbstractMigration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Auto-generated Migration: Please modify to your needs!
|
||||||
|
*/
|
||||||
|
final class Version20251031115210 extends AbstractMigration
|
||||||
|
{
|
||||||
|
public function getDescription(): string
|
||||||
|
{
|
||||||
|
return 'Add domain_purchase';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function up(Schema $schema): void
|
||||||
|
{
|
||||||
|
// this up() migration is auto-generated, please modify it to your needs
|
||||||
|
$this->addSql('CREATE TABLE domain_purchase (id UUID NOT NULL, domain_id VARCHAR(255) NOT NULL, connector_id UUID DEFAULT NULL, user_id INT DEFAULT NULL, domain_updated_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, domain_ordered_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, connector_provider VARCHAR(255) NOT NULL, domain_deleted_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, PRIMARY KEY(id))');
|
||||||
|
$this->addSql('CREATE INDEX IDX_72999E74115F0EE5 ON domain_purchase (domain_id)');
|
||||||
|
$this->addSql('CREATE INDEX IDX_72999E744D085745 ON domain_purchase (connector_id)');
|
||||||
|
$this->addSql('CREATE INDEX IDX_72999E74A76ED395 ON domain_purchase (user_id)');
|
||||||
|
$this->addSql('COMMENT ON COLUMN domain_purchase.id IS \'(DC2Type:uuid)\'');
|
||||||
|
$this->addSql('COMMENT ON COLUMN domain_purchase.connector_id IS \'(DC2Type:uuid)\'');
|
||||||
|
$this->addSql('COMMENT ON COLUMN domain_purchase.domain_updated_at IS \'(DC2Type:datetime_immutable)\'');
|
||||||
|
$this->addSql('COMMENT ON COLUMN domain_purchase.domain_ordered_at IS \'(DC2Type:datetime_immutable)\'');
|
||||||
|
$this->addSql('COMMENT ON COLUMN domain_purchase.domain_deleted_at IS \'(DC2Type:datetime_immutable)\'');
|
||||||
|
$this->addSql('ALTER TABLE domain_purchase ADD CONSTRAINT FK_72999E74115F0EE5 FOREIGN KEY (domain_id) REFERENCES domain (ldh_name) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||||
|
$this->addSql('ALTER TABLE domain_purchase ADD CONSTRAINT FK_72999E744D085745 FOREIGN KEY (connector_id) REFERENCES connector (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||||
|
$this->addSql('ALTER TABLE domain_purchase ADD CONSTRAINT FK_72999E74A76ED395 FOREIGN KEY (user_id) REFERENCES "user" (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||||
|
$this->addSql('ALTER TABLE watchlist ALTER enabled DROP DEFAULT');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(Schema $schema): void
|
||||||
|
{
|
||||||
|
// this down() migration is auto-generated, please modify it to your needs
|
||||||
|
$this->addSql('ALTER TABLE domain_purchase DROP CONSTRAINT FK_72999E74115F0EE5');
|
||||||
|
$this->addSql('ALTER TABLE domain_purchase DROP CONSTRAINT FK_72999E744D085745');
|
||||||
|
$this->addSql('ALTER TABLE domain_purchase DROP CONSTRAINT FK_72999E74A76ED395');
|
||||||
|
$this->addSql('DROP TABLE domain_purchase');
|
||||||
|
$this->addSql('ALTER TABLE watchlist ALTER enabled SET DEFAULT true');
|
||||||
|
}
|
||||||
|
}
|
||||||
43
migrations/Version20251031141153.php
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace DoctrineMigrations;
|
||||||
|
|
||||||
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Doctrine\Migrations\AbstractMigration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Auto-generated Migration: Please modify to your needs!
|
||||||
|
*/
|
||||||
|
final class Version20251031141153 extends AbstractMigration
|
||||||
|
{
|
||||||
|
public function getDescription(): string
|
||||||
|
{
|
||||||
|
return 'Update domain_purchase cascade';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function up(Schema $schema): void
|
||||||
|
{
|
||||||
|
// this up() migration is auto-generated, please modify it to your needs
|
||||||
|
$this->addSql('ALTER TABLE domain_purchase DROP CONSTRAINT FK_72999E74115F0EE5');
|
||||||
|
$this->addSql('ALTER TABLE domain_purchase DROP CONSTRAINT FK_72999E744D085745');
|
||||||
|
$this->addSql('ALTER TABLE domain_purchase DROP CONSTRAINT FK_72999E74A76ED395');
|
||||||
|
$this->addSql('ALTER TABLE domain_purchase ALTER domain_id DROP NOT NULL');
|
||||||
|
$this->addSql('ALTER TABLE domain_purchase ADD CONSTRAINT FK_72999E74115F0EE5 FOREIGN KEY (domain_id) REFERENCES domain (ldh_name) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||||
|
$this->addSql('ALTER TABLE domain_purchase ADD CONSTRAINT FK_72999E744D085745 FOREIGN KEY (connector_id) REFERENCES connector (id) ON DELETE SET NULL NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||||
|
$this->addSql('ALTER TABLE domain_purchase ADD CONSTRAINT FK_72999E74A76ED395 FOREIGN KEY (user_id) REFERENCES "user" (id) ON DELETE SET NULL NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(Schema $schema): void
|
||||||
|
{
|
||||||
|
// this down() migration is auto-generated, please modify it to your needs
|
||||||
|
$this->addSql('ALTER TABLE domain_purchase DROP CONSTRAINT fk_72999e74115f0ee5');
|
||||||
|
$this->addSql('ALTER TABLE domain_purchase DROP CONSTRAINT fk_72999e744d085745');
|
||||||
|
$this->addSql('ALTER TABLE domain_purchase DROP CONSTRAINT fk_72999e74a76ed395');
|
||||||
|
$this->addSql('ALTER TABLE domain_purchase ALTER domain_id SET NOT NULL');
|
||||||
|
$this->addSql('ALTER TABLE domain_purchase ADD CONSTRAINT fk_72999e74115f0ee5 FOREIGN KEY (domain_id) REFERENCES domain (ldh_name) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||||
|
$this->addSql('ALTER TABLE domain_purchase ADD CONSTRAINT fk_72999e744d085745 FOREIGN KEY (connector_id) REFERENCES connector (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||||
|
$this->addSql('ALTER TABLE domain_purchase ADD CONSTRAINT fk_72999e74a76ed395 FOREIGN KEY (user_id) REFERENCES "user" (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||||
|
}
|
||||||
|
}
|
||||||
37
migrations/Version20251106131135.php
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace DoctrineMigrations;
|
||||||
|
|
||||||
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Doctrine\Migrations\AbstractMigration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Auto-generated Migration: Please modify to your needs!
|
||||||
|
*/
|
||||||
|
final class Version20251106131135 extends AbstractMigration
|
||||||
|
{
|
||||||
|
public function getDescription(): string
|
||||||
|
{
|
||||||
|
return 'Add indexes';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function up(Schema $schema): void
|
||||||
|
{
|
||||||
|
$this->addSql('CREATE INDEX domain_entity_roles_idx ON domain_entity USING GIN (roles)');
|
||||||
|
$this->addSql('CREATE INDEX domain_event_action_idx ON domain_event (action)');
|
||||||
|
$this->addSql('CREATE INDEX entity_event_action_idx ON entity_event (action)');
|
||||||
|
$this->addSql('CREATE INDEX icann_accreditation_status_idx ON icann_accreditation (status)');
|
||||||
|
$this->addSql('CREATE INDEX tld_type_idx ON tld (type)');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(Schema $schema): void
|
||||||
|
{
|
||||||
|
$this->addSql('DROP INDEX domain_entity_roles_idx');
|
||||||
|
$this->addSql('DROP INDEX icann_accreditation_status_idx');
|
||||||
|
$this->addSql('DROP INDEX tld_type_idx');
|
||||||
|
$this->addSql('DROP INDEX domain_event_action_idx');
|
||||||
|
$this->addSql('DROP INDEX entity_event_action_idx');
|
||||||
|
}
|
||||||
|
}
|
||||||
47
migrations/Version20251106151250.php
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace DoctrineMigrations;
|
||||||
|
|
||||||
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Doctrine\Migrations\AbstractMigration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Auto-generated Migration: Please modify to your needs!
|
||||||
|
*/
|
||||||
|
final class Version20251106151250 extends AbstractMigration
|
||||||
|
{
|
||||||
|
public function getDescription(): string
|
||||||
|
{
|
||||||
|
return 'Convert status object to array';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function up(Schema $schema): void
|
||||||
|
{
|
||||||
|
$this->addSql("UPDATE domain_status
|
||||||
|
SET add_status = (
|
||||||
|
SELECT jsonb_agg(value::text::jsonb)
|
||||||
|
FROM jsonb_array_elements(
|
||||||
|
CASE
|
||||||
|
WHEN jsonb_typeof(add_status) = 'array' THEN add_status
|
||||||
|
WHEN jsonb_typeof(add_status) = 'object' THEN to_jsonb(array(SELECT jsonb_array_elements_text(jsonb_agg(value)) FROM jsonb_each_text(add_status)))
|
||||||
|
ELSE '[]'::jsonb
|
||||||
|
END
|
||||||
|
) AS t(value)
|
||||||
|
), delete_status = (
|
||||||
|
SELECT jsonb_agg(value::text::jsonb)
|
||||||
|
FROM jsonb_array_elements(
|
||||||
|
CASE
|
||||||
|
WHEN jsonb_typeof(delete_status) = 'array' THEN delete_status
|
||||||
|
WHEN jsonb_typeof(delete_status) = 'object' THEN to_jsonb(array(SELECT jsonb_array_elements_text(jsonb_agg(value)) FROM jsonb_each_text(delete_status)))
|
||||||
|
ELSE '[]'::jsonb
|
||||||
|
END
|
||||||
|
) AS t(value)
|
||||||
|
)");
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(Schema $schema): void
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
35
migrations/Version20251108171723.php
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace DoctrineMigrations;
|
||||||
|
|
||||||
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Doctrine\Migrations\AbstractMigration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Auto-generated Migration: Please modify to your needs!
|
||||||
|
*/
|
||||||
|
final class Version20251108171723 extends AbstractMigration
|
||||||
|
{
|
||||||
|
public function getDescription(): string
|
||||||
|
{
|
||||||
|
return 'Add j_card_fn and j_card_org';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function up(Schema $schema): void
|
||||||
|
{
|
||||||
|
$this->addSql('ALTER TABLE entity ADD j_card_fn VARCHAR(255) GENERATED ALWAYS AS (UPPER(jsonb_path_query_first(j_card, \'$[1]?(@[0] == "fn")[3]\') #>> \'{}\')) STORED');
|
||||||
|
$this->addSql('ALTER TABLE entity ADD j_card_org VARCHAR(255) GENERATED ALWAYS AS (UPPER(jsonb_path_query_first(j_card, \'$[1]?(@[0] == "org")[3]\') #>> \'{}\')) STORED');
|
||||||
|
$this->addSql('CREATE INDEX entity_j_card_fn_idx ON entity (j_card_fn)');
|
||||||
|
$this->addSql('CREATE INDEX entity_j_card_org_idx ON entity (j_card_org)');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(Schema $schema): void
|
||||||
|
{
|
||||||
|
$this->addSql('DROP INDEX entity_j_card_fn_idx');
|
||||||
|
$this->addSql('DROP INDEX entity_j_card_org_idx');
|
||||||
|
$this->addSql('ALTER TABLE entity DROP j_card_fn');
|
||||||
|
$this->addSql('ALTER TABLE entity DROP j_card_org');
|
||||||
|
}
|
||||||
|
}
|
||||||
71
src/Command/BatchRegisterDomainCommand.php
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Command;
|
||||||
|
|
||||||
|
use App\Message\UpdateDomain;
|
||||||
|
use Symfony\Component\Console\Attribute\AsCommand;
|
||||||
|
use Symfony\Component\Console\Command\Command;
|
||||||
|
use Symfony\Component\Console\Input\InputArgument;
|
||||||
|
use Symfony\Component\Console\Input\InputInterface;
|
||||||
|
use Symfony\Component\Console\Input\InputOption;
|
||||||
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
|
use Symfony\Component\Console\Style\SymfonyStyle;
|
||||||
|
use Symfony\Component\Messenger\Exception\ExceptionInterface;
|
||||||
|
use Symfony\Component\Messenger\MessageBusInterface;
|
||||||
|
use Symfony\Component\Messenger\Stamp\TransportNamesStamp;
|
||||||
|
|
||||||
|
#[AsCommand(
|
||||||
|
name: 'app:batch-register-domains',
|
||||||
|
description: 'Register a domain list',
|
||||||
|
)]
|
||||||
|
class BatchRegisterDomainCommand extends Command
|
||||||
|
{
|
||||||
|
public function __construct(
|
||||||
|
private readonly MessageBusInterface $messageBus,
|
||||||
|
) {
|
||||||
|
parent::__construct();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function configure(): void
|
||||||
|
{
|
||||||
|
$this
|
||||||
|
->addArgument('file', InputArgument::REQUIRED, 'Path to a file containing a list of domain names')
|
||||||
|
->addOption('only-new', 'on', InputOption::VALUE_NEGATABLE, 'Do not update domain names if they are already in the database', false)
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @throws ExceptionInterface
|
||||||
|
*/
|
||||||
|
protected function execute(InputInterface $input, OutputInterface $output): int
|
||||||
|
{
|
||||||
|
$io = new SymfonyStyle($input, $output);
|
||||||
|
$file = $input->getArgument('file');
|
||||||
|
$onlyNew = (bool) $input->getOption('only-new');
|
||||||
|
|
||||||
|
if (!file_exists($file) || !is_readable($file)) {
|
||||||
|
$io->error(sprintf('File "%s" does not exist or is not readable.', $file));
|
||||||
|
|
||||||
|
return Command::FAILURE;
|
||||||
|
}
|
||||||
|
$domains = file($file, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
|
||||||
|
|
||||||
|
if (empty($domains)) {
|
||||||
|
$io->warning('The list is empty.');
|
||||||
|
|
||||||
|
return Command::SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
$io->title('Registering domains');
|
||||||
|
/** @var string $ldhName */
|
||||||
|
foreach ($domains as $ldhName) {
|
||||||
|
$this->messageBus->dispatch(new UpdateDomain($ldhName, null, $onlyNew), [
|
||||||
|
new TransportNamesStamp('rdap_low'),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
$io->success(sprintf('Imported %d domain names.', count($domains)));
|
||||||
|
|
||||||
|
return Command::SUCCESS;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Command;
|
namespace App\Command;
|
||||||
|
|
||||||
use App\Message\ProcessWatchlistTrigger;
|
use App\Message\ProcessAllWatchlist;
|
||||||
use Symfony\Component\Console\Attribute\AsCommand;
|
use Symfony\Component\Console\Attribute\AsCommand;
|
||||||
use Symfony\Component\Console\Command\Command;
|
use Symfony\Component\Console\Command\Command;
|
||||||
use Symfony\Component\Console\Input\InputInterface;
|
use Symfony\Component\Console\Input\InputInterface;
|
||||||
@ -33,7 +33,7 @@ class ProcessWatchlistCommand extends Command
|
|||||||
{
|
{
|
||||||
$io = new SymfonyStyle($input, $output);
|
$io = new SymfonyStyle($input, $output);
|
||||||
|
|
||||||
$this->bus->dispatch(new ProcessWatchlistTrigger());
|
$this->bus->dispatch(new ProcessAllWatchlist());
|
||||||
|
|
||||||
$io->success('Watchlist processing triggered!');
|
$io->success('Watchlist processing triggered!');
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
namespace App\Command;
|
namespace App\Command;
|
||||||
|
|
||||||
use App\Entity\Watchlist;
|
use App\Entity\Watchlist;
|
||||||
use App\Message\SendDomainEventNotif;
|
use App\Message\DetectDomainChange;
|
||||||
use App\Repository\DomainRepository;
|
use App\Repository\DomainRepository;
|
||||||
use App\Service\RDAPService;
|
use App\Service\RDAPService;
|
||||||
use Random\Randomizer;
|
use Random\Randomizer;
|
||||||
@ -64,7 +64,7 @@ class RegisterDomainCommand extends Command
|
|||||||
|
|
||||||
/** @var Watchlist $watchlist */
|
/** @var Watchlist $watchlist */
|
||||||
foreach ($watchlists as $watchlist) {
|
foreach ($watchlists as $watchlist) {
|
||||||
$this->bus->dispatch(new SendDomainEventNotif($watchlist->getToken(), $domain->getLdhName(), $updatedAt));
|
$this->bus->dispatch(new DetectDomainChange($watchlist->getToken(), $domain->getLdhName(), $updatedAt));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
|
|||||||
@ -12,14 +12,14 @@ class MeController extends AbstractController
|
|||||||
{
|
{
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private readonly SerializerInterface $serializer,
|
private readonly SerializerInterface $serializer,
|
||||||
private readonly RateLimiterFactory $rdapRequestsLimiter,
|
private readonly RateLimiterFactory $userRdapRequestsLimiter,
|
||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function __invoke(): Response
|
public function __invoke(): Response
|
||||||
{
|
{
|
||||||
$user = $this->getUser();
|
$user = $this->getUser();
|
||||||
$limiter = $this->rdapRequestsLimiter->create($user->getUserIdentifier());
|
$limiter = $this->userRdapRequestsLimiter->create($user->getUserIdentifier());
|
||||||
$limit = $limiter->consume(0);
|
$limit = $limiter->consume(0);
|
||||||
|
|
||||||
$data = $this->serializer->serialize($user, 'json', ['groups' => 'user:list']);
|
$data = $this->serializer->serialize($user, 'json', ['groups' => 'user:list']);
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
namespace App\Controller;
|
namespace App\Controller;
|
||||||
|
|
||||||
use App\Entity\Statistics;
|
use App\Entity\Statistics;
|
||||||
|
use App\Repository\DomainPurchaseRepository;
|
||||||
use App\Repository\DomainRepository;
|
use App\Repository\DomainRepository;
|
||||||
use App\Repository\WatchlistRepository;
|
use App\Repository\WatchlistRepository;
|
||||||
use Psr\Cache\CacheItemPoolInterface;
|
use Psr\Cache\CacheItemPoolInterface;
|
||||||
@ -16,6 +17,7 @@ class StatisticsController extends AbstractController
|
|||||||
private readonly CacheItemPoolInterface $pool,
|
private readonly CacheItemPoolInterface $pool,
|
||||||
private readonly DomainRepository $domainRepository,
|
private readonly DomainRepository $domainRepository,
|
||||||
private readonly WatchlistRepository $watchlistRepository,
|
private readonly WatchlistRepository $watchlistRepository,
|
||||||
|
private readonly DomainPurchaseRepository $domainPurchaseRepository,
|
||||||
private readonly KernelInterface $kernel,
|
private readonly KernelInterface $kernel,
|
||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
@ -29,8 +31,12 @@ class StatisticsController extends AbstractController
|
|||||||
|
|
||||||
$stats
|
$stats
|
||||||
->setRdapQueries($this->pool->getItem('stats.rdap_queries.count')->get() ?? 0)
|
->setRdapQueries($this->pool->getItem('stats.rdap_queries.count')->get() ?? 0)
|
||||||
->setDomainPurchased($this->pool->getItem('stats.domain.purchased')->get() ?? 0)
|
->setDomainPurchased(
|
||||||
->setDomainPurchaseFailed($this->pool->getItem('stats.domain.purchase.failed')->get() ?? 0)
|
$this->getCachedItem('stats.domain.purchase', fn () => $this->domainPurchaseRepository->count())
|
||||||
|
)
|
||||||
|
->setDomainPurchaseFailed(
|
||||||
|
$this->getCachedItem('stats.domain.purchase.failed', fn () => $this->domainPurchaseRepository->countFailDomainPurchase())
|
||||||
|
)
|
||||||
->setAlertSent($this->pool->getItem('stats.alert.sent')->get() ?? 0)
|
->setAlertSent($this->pool->getItem('stats.alert.sent')->get() ?? 0)
|
||||||
|
|
||||||
->setDomainTracked(
|
->setDomainTracked(
|
||||||
|
|||||||
@ -11,7 +11,6 @@ use App\Repository\DomainRepository;
|
|||||||
use App\Repository\WatchlistRepository;
|
use App\Repository\WatchlistRepository;
|
||||||
use App\Service\CalendarService;
|
use App\Service\CalendarService;
|
||||||
use App\Service\RDAPService;
|
use App\Service\RDAPService;
|
||||||
use Doctrine\Common\Collections\Collection;
|
|
||||||
use Eluceo\iCal\Domain\Entity\Calendar;
|
use Eluceo\iCal\Domain\Entity\Calendar;
|
||||||
use Eluceo\iCal\Presentation\Component\Property;
|
use Eluceo\iCal\Presentation\Component\Property;
|
||||||
use Eluceo\iCal\Presentation\Component\Property\Value\TextValue;
|
use Eluceo\iCal\Presentation\Component\Property\Value\TextValue;
|
||||||
@ -36,23 +35,6 @@ class WatchlistController extends AbstractController
|
|||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[Route(
|
|
||||||
path: '/api/watchlists',
|
|
||||||
name: 'watchlist_get_all_mine',
|
|
||||||
defaults: [
|
|
||||||
'_api_resource_class' => Watchlist::class,
|
|
||||||
'_api_operation_name' => 'get_all_mine',
|
|
||||||
],
|
|
||||||
methods: ['GET']
|
|
||||||
)]
|
|
||||||
public function getWatchlists(): Collection
|
|
||||||
{
|
|
||||||
/** @var User $user */
|
|
||||||
$user = $this->getUser();
|
|
||||||
|
|
||||||
return $user->getWatchlists();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @throws ParseException
|
* @throws ParseException
|
||||||
* @throws EofException
|
* @throws EofException
|
||||||
|
|||||||
@ -73,10 +73,17 @@ class Connector
|
|||||||
#[Groups(['connector:list'])]
|
#[Groups(['connector:list'])]
|
||||||
protected int $watchlistCount;
|
protected int $watchlistCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var Collection<int, DomainPurchase>
|
||||||
|
*/
|
||||||
|
#[ORM\OneToMany(targetEntity: DomainPurchase::class, mappedBy: 'connector')]
|
||||||
|
private Collection $domainPurchases;
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->id = Uuid::v4();
|
$this->id = Uuid::v4();
|
||||||
$this->watchlists = new ArrayCollection();
|
$this->watchlists = new ArrayCollection();
|
||||||
|
$this->domainPurchases = new ArrayCollection();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getId(): ?string
|
public function getId(): ?string
|
||||||
@ -166,4 +173,34 @@ class Connector
|
|||||||
{
|
{
|
||||||
return $this->watchlists->count();
|
return $this->watchlists->count();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Collection<int, DomainPurchase>
|
||||||
|
*/
|
||||||
|
public function getDomainPurchases(): Collection
|
||||||
|
{
|
||||||
|
return $this->domainPurchases;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function addDomainPurchase(DomainPurchase $domainPurchase): static
|
||||||
|
{
|
||||||
|
if (!$this->domainPurchases->contains($domainPurchase)) {
|
||||||
|
$this->domainPurchases->add($domainPurchase);
|
||||||
|
$domainPurchase->setConnector($this);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function removeDomainPurchase(DomainPurchase $domainPurchase): static
|
||||||
|
{
|
||||||
|
if ($this->domainPurchases->removeElement($domainPurchase)) {
|
||||||
|
// set the owning side to null (unless already changed)
|
||||||
|
if ($domainPurchase->getConnector() === $this) {
|
||||||
|
$domainPurchase->setConnector(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -44,7 +44,14 @@ use Symfony\Component\Serializer\Attribute\SerializedName;
|
|||||||
],
|
],
|
||||||
provider: FindDomainCollectionFromEntityProvider::class,
|
provider: FindDomainCollectionFromEntityProvider::class,
|
||||||
parameters: [
|
parameters: [
|
||||||
'registrant' => new QueryParameter(description: 'The exact name of the registrant (case insensitive)', required: true),
|
'registrant' => new QueryParameter(
|
||||||
|
description: 'The exact name of the registrant contact (case insensitive)',
|
||||||
|
required: false
|
||||||
|
),
|
||||||
|
'administrative' => new QueryParameter(
|
||||||
|
description: 'The exact name of the administrative contact (case insensitive)',
|
||||||
|
required: false
|
||||||
|
),
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
new Get(
|
new Get(
|
||||||
@ -60,6 +67,9 @@ use Symfony\Component\Serializer\Attribute\SerializedName;
|
|||||||
'ds:list',
|
'ds:list',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
parameters: [
|
||||||
|
'forced' => new QueryParameter(schema: ['type' => 'boolean'], description: 'Force an RDAP request. If an update is already in progress, this parameter is ignored and the stored domain is returned.', required: false),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
provider: AutoRegisterDomainProvider::class
|
provider: AutoRegisterDomainProvider::class
|
||||||
@ -156,6 +166,12 @@ class Domain
|
|||||||
|
|
||||||
private ?int $expiresInDays;
|
private ?int $expiresInDays;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var Collection<int, DomainPurchase>
|
||||||
|
*/
|
||||||
|
#[ORM\OneToMany(targetEntity: DomainPurchase::class, mappedBy: 'domain', orphanRemoval: true)]
|
||||||
|
private Collection $domainPurchases;
|
||||||
|
|
||||||
private const IMPORTANT_EVENTS = [EventAction::Deletion->value, EventAction::Expiration->value];
|
private const IMPORTANT_EVENTS = [EventAction::Deletion->value, EventAction::Expiration->value];
|
||||||
private const IMPORTANT_STATUS = [
|
private const IMPORTANT_STATUS = [
|
||||||
'redemption period',
|
'redemption period',
|
||||||
@ -179,6 +195,7 @@ class Domain
|
|||||||
$this->deleted = false;
|
$this->deleted = false;
|
||||||
$this->domainStatuses = new ArrayCollection();
|
$this->domainStatuses = new ArrayCollection();
|
||||||
$this->dnsKey = new ArrayCollection();
|
$this->dnsKey = new ArrayCollection();
|
||||||
|
$this->domainPurchases = new ArrayCollection();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getLdhName(): ?string
|
public function getLdhName(): ?string
|
||||||
@ -516,4 +533,40 @@ class Domain
|
|||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Collection<int, DomainPurchase>
|
||||||
|
*/
|
||||||
|
public function getDomainPurchases(): Collection
|
||||||
|
{
|
||||||
|
return $this->domainPurchases;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function addDomainPurchase(DomainPurchase $domainPurchase): static
|
||||||
|
{
|
||||||
|
if (!$this->domainPurchases->contains($domainPurchase)) {
|
||||||
|
$this->domainPurchases->add($domainPurchase);
|
||||||
|
$domainPurchase->setDomain($this);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function removeDomainPurchase(DomainPurchase $domainPurchase): static
|
||||||
|
{
|
||||||
|
if ($this->domainPurchases->removeElement($domainPurchase)) {
|
||||||
|
// set the owning side to null (unless already changed)
|
||||||
|
if ($domainPurchase->getDomain() === $this) {
|
||||||
|
$domainPurchase->setDomain(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
#[Groups(['domain:item', 'domain:list'])]
|
||||||
|
public function getPurchaseCount(): ?int
|
||||||
|
{
|
||||||
|
return $this->domainPurchases->count();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,6 +9,7 @@ use Doctrine\ORM\Mapping as ORM;
|
|||||||
use Symfony\Component\Serializer\Attribute\Groups;
|
use Symfony\Component\Serializer\Attribute\Groups;
|
||||||
|
|
||||||
#[ORM\Entity(repositoryClass: DomainEntityRepository::class)]
|
#[ORM\Entity(repositoryClass: DomainEntityRepository::class)]
|
||||||
|
#[ORM\Index(name: 'domain_entity_roles_idx', columns: ['roles'])]
|
||||||
class DomainEntity
|
class DomainEntity
|
||||||
{
|
{
|
||||||
#[ORM\Id]
|
#[ORM\Id]
|
||||||
|
|||||||
@ -9,6 +9,7 @@ use Doctrine\ORM\Mapping as ORM;
|
|||||||
#[ORM\UniqueConstraint(
|
#[ORM\UniqueConstraint(
|
||||||
columns: ['action', 'date', 'domain_id']
|
columns: ['action', 'date', 'domain_id']
|
||||||
)]
|
)]
|
||||||
|
#[ORM\Index(name: 'domain_event_action_idx', columns: ['action'])]
|
||||||
class DomainEvent extends Event
|
class DomainEvent extends Event
|
||||||
{
|
{
|
||||||
#[ORM\ManyToOne(targetEntity: Domain::class, inversedBy: 'events')]
|
#[ORM\ManyToOne(targetEntity: Domain::class, inversedBy: 'events')]
|
||||||
|
|||||||
134
src/Entity/DomainPurchase.php
Normal file
@ -0,0 +1,134 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Entity;
|
||||||
|
|
||||||
|
use App\Config\ConnectorProvider;
|
||||||
|
use App\Repository\DomainPurchaseRepository;
|
||||||
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
|
use Symfony\Component\Uid\Uuid;
|
||||||
|
|
||||||
|
#[ORM\Entity(repositoryClass: DomainPurchaseRepository::class)]
|
||||||
|
class DomainPurchase
|
||||||
|
{
|
||||||
|
#[ORM\Id]
|
||||||
|
#[ORM\Column(type: 'uuid')]
|
||||||
|
private ?string $id;
|
||||||
|
|
||||||
|
#[ORM\ManyToOne(inversedBy: 'domainPurchases')]
|
||||||
|
#[ORM\JoinColumn(referencedColumnName: 'ldh_name', onDelete: 'CASCADE')]
|
||||||
|
private ?Domain $domain = null;
|
||||||
|
|
||||||
|
#[ORM\Column]
|
||||||
|
private ?\DateTimeImmutable $domainUpdatedAt = null;
|
||||||
|
|
||||||
|
#[ORM\Column(nullable: true)]
|
||||||
|
private ?\DateTimeImmutable $domainOrderedAt = null;
|
||||||
|
|
||||||
|
#[ORM\Column(enumType: ConnectorProvider::class)]
|
||||||
|
private ?ConnectorProvider $connectorProvider = null;
|
||||||
|
|
||||||
|
#[ORM\ManyToOne(inversedBy: 'domainPurchases')]
|
||||||
|
#[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
|
||||||
|
private ?Connector $connector = null;
|
||||||
|
|
||||||
|
#[ORM\ManyToOne(inversedBy: 'domainPurchases')]
|
||||||
|
#[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
|
||||||
|
private ?User $user = null;
|
||||||
|
|
||||||
|
#[ORM\Column]
|
||||||
|
private ?\DateTimeImmutable $domainDeletedAt = null;
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->id = Uuid::v4();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getId(): ?string
|
||||||
|
{
|
||||||
|
return $this->id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getDomain(): ?Domain
|
||||||
|
{
|
||||||
|
return $this->domain;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setDomain(?Domain $domain): static
|
||||||
|
{
|
||||||
|
$this->domain = $domain;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getDomainUpdatedAt(): ?\DateTimeImmutable
|
||||||
|
{
|
||||||
|
return $this->domainUpdatedAt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setDomainUpdatedAt(\DateTimeImmutable $domainUpdatedAt): static
|
||||||
|
{
|
||||||
|
$this->domainUpdatedAt = $domainUpdatedAt;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getDomainOrderedAt(): ?\DateTimeImmutable
|
||||||
|
{
|
||||||
|
return $this->domainOrderedAt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setDomainOrderedAt(?\DateTimeImmutable $domainOrderedAt): static
|
||||||
|
{
|
||||||
|
$this->domainOrderedAt = $domainOrderedAt;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getConnectorProvider(): ?ConnectorProvider
|
||||||
|
{
|
||||||
|
return $this->connectorProvider;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setConnectorProvider(ConnectorProvider $connectorProvider): static
|
||||||
|
{
|
||||||
|
$this->connectorProvider = $connectorProvider;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getConnector(): ?Connector
|
||||||
|
{
|
||||||
|
return $this->connector;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setConnector(?Connector $connector): static
|
||||||
|
{
|
||||||
|
$this->connector = $connector;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getUser(): ?User
|
||||||
|
{
|
||||||
|
return $this->user;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setUser(?User $user): static
|
||||||
|
{
|
||||||
|
$this->user = $user;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getDomainDeletedAt(): ?\DateTimeImmutable
|
||||||
|
{
|
||||||
|
return $this->domainDeletedAt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setDomainDeletedAt(\DateTimeImmutable $domainDeletedAt): static
|
||||||
|
{
|
||||||
|
$this->domainDeletedAt = $domainDeletedAt;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -3,7 +3,6 @@
|
|||||||
namespace App\Entity;
|
namespace App\Entity;
|
||||||
|
|
||||||
use ApiPlatform\Metadata\ApiProperty;
|
use ApiPlatform\Metadata\ApiProperty;
|
||||||
use ApiPlatform\Metadata\ApiResource;
|
|
||||||
use App\Repository\EntityRepository;
|
use App\Repository\EntityRepository;
|
||||||
use Doctrine\Common\Collections\ArrayCollection;
|
use Doctrine\Common\Collections\ArrayCollection;
|
||||||
use Doctrine\Common\Collections\Collection;
|
use Doctrine\Common\Collections\Collection;
|
||||||
@ -15,30 +14,8 @@ use Symfony\Component\Serializer\Attribute\SerializedName;
|
|||||||
#[ORM\UniqueConstraint(
|
#[ORM\UniqueConstraint(
|
||||||
columns: ['tld_id', 'handle']
|
columns: ['tld_id', 'handle']
|
||||||
)]
|
)]
|
||||||
#[ApiResource(
|
#[ORM\Index(name: 'entity_j_card_fn_idx', columns: ['j_card_fn'])]
|
||||||
operations: [
|
#[ORM\Index(name: 'entity_j_card_org_idx', columns: ['j_card_org'])]
|
||||||
/*
|
|
||||||
new GetCollection(
|
|
||||||
uriTemplate: '/entities',
|
|
||||||
normalizationContext: ['groups' => ['entity:list', 'event:list']]
|
|
||||||
),
|
|
||||||
|
|
||||||
new Get(
|
|
||||||
uriTemplate: '/entities/{id}',
|
|
||||||
normalizationContext: [
|
|
||||||
'groups' => [
|
|
||||||
'event:list',
|
|
||||||
'entity:item',
|
|
||||||
'domain-entity:domain',
|
|
||||||
'domain:list',
|
|
||||||
'nameserver-entity:nameserver',
|
|
||||||
'nameserver:list',
|
|
||||||
],
|
|
||||||
]
|
|
||||||
),
|
|
||||||
*/
|
|
||||||
]
|
|
||||||
)]
|
|
||||||
class Entity
|
class Entity
|
||||||
{
|
{
|
||||||
#[ORM\Id]
|
#[ORM\Id]
|
||||||
@ -88,6 +65,24 @@ class Entity
|
|||||||
#[Groups(['entity:item', 'domain:item', 'watchlist:item'])]
|
#[Groups(['entity:item', 'domain:item', 'watchlist:item'])]
|
||||||
private array $jCard = [];
|
private array $jCard = [];
|
||||||
|
|
||||||
|
#[ORM\Column(
|
||||||
|
type: 'string',
|
||||||
|
insertable: false,
|
||||||
|
updatable: false,
|
||||||
|
columnDefinition: "VARCHAR(255) GENERATED ALWAYS AS (UPPER(jsonb_path_query_first(j_card, '$[1]?(@[0] == \"fn\")[3]') #>> '{}')) STORED",
|
||||||
|
generated: 'ALWAYS',
|
||||||
|
)]
|
||||||
|
private ?string $jCardFn;
|
||||||
|
|
||||||
|
#[ORM\Column(
|
||||||
|
type: 'string',
|
||||||
|
insertable: false,
|
||||||
|
updatable: false,
|
||||||
|
columnDefinition: "VARCHAR(255) GENERATED ALWAYS AS (UPPER(jsonb_path_query_first(j_card, '$[1]?(@[0] == \"org\")[3]') #>> '{}')) STORED",
|
||||||
|
generated: 'ALWAYS',
|
||||||
|
)]
|
||||||
|
private ?string $jCardOrg;
|
||||||
|
|
||||||
#[ORM\Column(nullable: true)]
|
#[ORM\Column(nullable: true)]
|
||||||
#[Groups(['entity:item', 'domain:item', 'watchlist:item'])]
|
#[Groups(['entity:item', 'domain:item', 'watchlist:item'])]
|
||||||
private ?array $remarks = null;
|
private ?array $remarks = null;
|
||||||
@ -264,4 +259,28 @@ class Entity
|
|||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getJCardFn(): ?string
|
||||||
|
{
|
||||||
|
return $this->jCardFn;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getJCardOrg(): ?string
|
||||||
|
{
|
||||||
|
return $this->jCardOrg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setJCardFn(?string $jCardFn): Entity
|
||||||
|
{
|
||||||
|
$this->jCardFn = $jCardFn;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setJCardOrg(?string $jCardOrg): Entity
|
||||||
|
{
|
||||||
|
$this->jCardOrg = $jCardOrg;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,6 +9,7 @@ use Doctrine\ORM\Mapping as ORM;
|
|||||||
#[ORM\UniqueConstraint(
|
#[ORM\UniqueConstraint(
|
||||||
columns: ['action', 'date', 'entity_uid']
|
columns: ['action', 'date', 'entity_uid']
|
||||||
)]
|
)]
|
||||||
|
#[ORM\Index(name: 'entity_event_action_idx', columns: ['action'])]
|
||||||
class EntityEvent extends Event
|
class EntityEvent extends Event
|
||||||
{
|
{
|
||||||
#[ORM\ManyToOne(targetEntity: Entity::class, inversedBy: 'events')]
|
#[ORM\ManyToOne(targetEntity: Entity::class, inversedBy: 'events')]
|
||||||
|
|||||||
@ -50,6 +50,7 @@ use Symfony\Component\Serializer\Attribute\Groups;
|
|||||||
]
|
]
|
||||||
)]
|
)]
|
||||||
#[ORM\Entity(repositoryClass: IcannAccreditationRepository::class)]
|
#[ORM\Entity(repositoryClass: IcannAccreditationRepository::class)]
|
||||||
|
#[ORM\Index(name: 'icann_accreditation_status_idx', columns: ['status'])]
|
||||||
class IcannAccreditation
|
class IcannAccreditation
|
||||||
{
|
{
|
||||||
#[ORM\Id]
|
#[ORM\Id]
|
||||||
|
|||||||
@ -31,6 +31,7 @@ use Symfony\Component\Serializer\Attribute\Groups;
|
|||||||
)]
|
)]
|
||||||
#[ApiFilter(SearchFilter::class)]
|
#[ApiFilter(SearchFilter::class)]
|
||||||
#[ORM\Entity(repositoryClass: TldRepository::class)]
|
#[ORM\Entity(repositoryClass: TldRepository::class)]
|
||||||
|
#[ORM\Index(name: 'tld_type_idx', columns: ['type'])]
|
||||||
class Tld
|
class Tld
|
||||||
{
|
{
|
||||||
#[ORM\Id]
|
#[ORM\Id]
|
||||||
|
|||||||
@ -89,10 +89,17 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface
|
|||||||
#[Groups(['user:register'])]
|
#[Groups(['user:register'])]
|
||||||
private ?string $plainPassword = null;
|
private ?string $plainPassword = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var Collection<int, DomainPurchase>
|
||||||
|
*/
|
||||||
|
#[ORM\OneToMany(targetEntity: DomainPurchase::class, mappedBy: 'user')]
|
||||||
|
private Collection $domainPurchases;
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->watchlists = new ArrayCollection();
|
$this->watchlists = new ArrayCollection();
|
||||||
$this->connectors = new ArrayCollection();
|
$this->connectors = new ArrayCollection();
|
||||||
|
$this->domainPurchases = new ArrayCollection();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getId(): ?int
|
public function getId(): ?int
|
||||||
@ -262,4 +269,34 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface
|
|||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Collection<int, DomainPurchase>
|
||||||
|
*/
|
||||||
|
public function getDomainPurchases(): Collection
|
||||||
|
{
|
||||||
|
return $this->domainPurchases;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function addDomainPurchase(DomainPurchase $domainPurchase): static
|
||||||
|
{
|
||||||
|
if (!$this->domainPurchases->contains($domainPurchase)) {
|
||||||
|
$this->domainPurchases->add($domainPurchase);
|
||||||
|
$domainPurchase->setUser($this);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function removeDomainPurchase(DomainPurchase $domainPurchase): static
|
||||||
|
{
|
||||||
|
if ($this->domainPurchases->removeElement($domainPurchase)) {
|
||||||
|
// set the owning side to null (unless already changed)
|
||||||
|
if ($domainPurchase->getUser() === $this) {
|
||||||
|
$domainPurchase->setUser(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,6 +10,7 @@ use ApiPlatform\Metadata\Patch;
|
|||||||
use ApiPlatform\Metadata\Post;
|
use ApiPlatform\Metadata\Post;
|
||||||
use ApiPlatform\Metadata\Put;
|
use ApiPlatform\Metadata\Put;
|
||||||
use App\Repository\WatchlistRepository;
|
use App\Repository\WatchlistRepository;
|
||||||
|
use App\State\MyWatchlistsProvider;
|
||||||
use App\State\WatchlistUpdateProcessor;
|
use App\State\WatchlistUpdateProcessor;
|
||||||
use Doctrine\Common\Collections\ArrayCollection;
|
use Doctrine\Common\Collections\ArrayCollection;
|
||||||
use Doctrine\Common\Collections\Collection;
|
use Doctrine\Common\Collections\Collection;
|
||||||
@ -25,7 +26,6 @@ use Symfony\Component\Validator\Constraints as Assert;
|
|||||||
shortName: 'Watchlist',
|
shortName: 'Watchlist',
|
||||||
operations: [
|
operations: [
|
||||||
new GetCollection(
|
new GetCollection(
|
||||||
routeName: 'watchlist_get_all_mine',
|
|
||||||
normalizationContext: [
|
normalizationContext: [
|
||||||
'groups' => [
|
'groups' => [
|
||||||
'watchlist:list',
|
'watchlist:list',
|
||||||
@ -34,6 +34,7 @@ use Symfony\Component\Validator\Constraints as Assert;
|
|||||||
],
|
],
|
||||||
],
|
],
|
||||||
name: 'get_all_mine',
|
name: 'get_all_mine',
|
||||||
|
provider: MyWatchlistsProvider::class,
|
||||||
),
|
),
|
||||||
new GetCollection(
|
new GetCollection(
|
||||||
uriTemplate: '/tracked',
|
uriTemplate: '/tracked',
|
||||||
|
|||||||
13
src/Exception/RdapServerException.php
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Exception;
|
||||||
|
|
||||||
|
use Symfony\Component\HttpClient\Exception\ServerException;
|
||||||
|
|
||||||
|
class RdapServerException extends \Exception
|
||||||
|
{
|
||||||
|
public static function fromServerException(ServerException $e): self
|
||||||
|
{
|
||||||
|
return new self($e->getMessage(), $e->getCode(), $e);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Message;
|
namespace App\Message;
|
||||||
|
|
||||||
final class SendDomainEventNotif
|
final class DetectDomainChange
|
||||||
{
|
{
|
||||||
public function __construct(
|
public function __construct(
|
||||||
public string $watchlistToken,
|
public string $watchlistToken,
|
||||||
@ -7,6 +7,7 @@ final class OrderDomain
|
|||||||
public function __construct(
|
public function __construct(
|
||||||
public string $watchlistToken,
|
public string $watchlistToken,
|
||||||
public string $ldhName,
|
public string $ldhName,
|
||||||
|
public \DateTimeImmutable $updatedAt,
|
||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Message;
|
namespace App\Message;
|
||||||
|
|
||||||
final class ProcessWatchlistTrigger
|
final class ProcessAllWatchlist
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Add whatever properties and methods you need
|
* Add whatever properties and methods you need
|
||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Message;
|
namespace App\Message;
|
||||||
|
|
||||||
final readonly class UpdateDomainsFromWatchlist
|
final readonly class ProcessWatchlist
|
||||||
{
|
{
|
||||||
public function __construct(
|
public function __construct(
|
||||||
public string $watchlistToken,
|
public string $watchlistToken,
|
||||||
13
src/Message/UpdateDomain.php
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Message;
|
||||||
|
|
||||||
|
final class UpdateDomain
|
||||||
|
{
|
||||||
|
public function __construct(
|
||||||
|
public string $ldhName,
|
||||||
|
public ?string $watchlistToken,
|
||||||
|
public bool $onlyNew,
|
||||||
|
) {
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -6,7 +6,7 @@ use App\Entity\Domain;
|
|||||||
use App\Entity\DomainEvent;
|
use App\Entity\DomainEvent;
|
||||||
use App\Entity\DomainStatus;
|
use App\Entity\DomainStatus;
|
||||||
use App\Entity\Watchlist;
|
use App\Entity\Watchlist;
|
||||||
use App\Message\SendDomainEventNotif;
|
use App\Message\DetectDomainChange;
|
||||||
use App\Notifier\DomainStatusUpdateNotification;
|
use App\Notifier\DomainStatusUpdateNotification;
|
||||||
use App\Notifier\DomainUpdateNotification;
|
use App\Notifier\DomainUpdateNotification;
|
||||||
use App\Repository\DomainEventRepository;
|
use App\Repository\DomainEventRepository;
|
||||||
@ -25,7 +25,7 @@ use Symfony\Component\Mime\Address;
|
|||||||
use Symfony\Component\Notifier\Recipient\Recipient;
|
use Symfony\Component\Notifier\Recipient\Recipient;
|
||||||
|
|
||||||
#[AsMessageHandler]
|
#[AsMessageHandler]
|
||||||
final readonly class SendDomainEventNotifHandler
|
final readonly class DetectDomainChangeHandler
|
||||||
{
|
{
|
||||||
private Address $sender;
|
private Address $sender;
|
||||||
|
|
||||||
@ -51,7 +51,7 @@ final readonly class SendDomainEventNotifHandler
|
|||||||
* @throws TransportExceptionInterface
|
* @throws TransportExceptionInterface
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public function __invoke(SendDomainEventNotif $message): void
|
public function __invoke(DetectDomainChange $message): void
|
||||||
{
|
{
|
||||||
/** @var Watchlist $watchlist */
|
/** @var Watchlist $watchlist */
|
||||||
$watchlist = $this->watchlistRepository->findOneBy(['token' => $message->watchlistToken]);
|
$watchlist = $this->watchlistRepository->findOneBy(['token' => $message->watchlistToken]);
|
||||||
@ -3,20 +3,24 @@
|
|||||||
namespace App\MessageHandler;
|
namespace App\MessageHandler;
|
||||||
|
|
||||||
use App\Entity\Domain;
|
use App\Entity\Domain;
|
||||||
|
use App\Entity\DomainPurchase;
|
||||||
use App\Entity\Watchlist;
|
use App\Entity\Watchlist;
|
||||||
use App\Message\OrderDomain;
|
use App\Message\OrderDomain;
|
||||||
use App\Notifier\DomainOrderErrorNotification;
|
use App\Notifier\DomainOrderErrorNotification;
|
||||||
use App\Notifier\DomainOrderNotification;
|
use App\Notifier\DomainOrderNotification;
|
||||||
|
use App\Repository\DomainPurchaseRepository;
|
||||||
use App\Repository\DomainRepository;
|
use App\Repository\DomainRepository;
|
||||||
use App\Repository\WatchlistRepository;
|
use App\Repository\WatchlistRepository;
|
||||||
use App\Service\ChatNotificationService;
|
use App\Service\ChatNotificationService;
|
||||||
use App\Service\InfluxdbService;
|
use App\Service\InfluxdbService;
|
||||||
use App\Service\Provider\AbstractProvider;
|
use App\Service\Provider\AbstractProvider;
|
||||||
use App\Service\StatService;
|
use Doctrine\ORM\EntityManagerInterface;
|
||||||
use Psr\Log\LoggerInterface;
|
use Psr\Log\LoggerInterface;
|
||||||
use Symfony\Component\DependencyInjection\Attribute\Autowire;
|
use Symfony\Component\DependencyInjection\Attribute\Autowire;
|
||||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||||
use Symfony\Component\HttpKernel\KernelInterface;
|
use Symfony\Component\HttpKernel\KernelInterface;
|
||||||
|
use Symfony\Component\Lock\Key;
|
||||||
|
use Symfony\Component\Lock\LockFactory;
|
||||||
use Symfony\Component\Mailer\Exception\TransportExceptionInterface;
|
use Symfony\Component\Mailer\Exception\TransportExceptionInterface;
|
||||||
use Symfony\Component\Mailer\MailerInterface;
|
use Symfony\Component\Mailer\MailerInterface;
|
||||||
use Symfony\Component\Messenger\Attribute\AsMessageHandler;
|
use Symfony\Component\Messenger\Attribute\AsMessageHandler;
|
||||||
@ -36,13 +40,14 @@ final readonly class OrderDomainHandler
|
|||||||
private KernelInterface $kernel,
|
private KernelInterface $kernel,
|
||||||
private MailerInterface $mailer,
|
private MailerInterface $mailer,
|
||||||
private LoggerInterface $logger,
|
private LoggerInterface $logger,
|
||||||
private StatService $statService,
|
|
||||||
private ChatNotificationService $chatNotificationService,
|
private ChatNotificationService $chatNotificationService,
|
||||||
private InfluxdbService $influxdbService,
|
private InfluxdbService $influxdbService,
|
||||||
#[Autowire(service: 'service_container')]
|
#[Autowire(service: 'service_container')]
|
||||||
private ContainerInterface $locator,
|
private ContainerInterface $locator,
|
||||||
#[Autowire(param: 'influxdb_enabled')]
|
#[Autowire(param: 'influxdb_enabled')]
|
||||||
private bool $influxdbEnabled,
|
private bool $influxdbEnabled, private EntityManagerInterface $em,
|
||||||
|
private DomainPurchaseRepository $domainPurchaseRepository,
|
||||||
|
private LockFactory $lockFactory,
|
||||||
) {
|
) {
|
||||||
$this->sender = new Address($mailerSenderEmail, $mailerSenderName);
|
$this->sender = new Address($mailerSenderEmail, $mailerSenderName);
|
||||||
}
|
}
|
||||||
@ -71,6 +76,23 @@ final readonly class OrderDomainHandler
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$lock = $this->lockFactory->createLockFromKey(
|
||||||
|
new Key('domain_purchase.'.$domain->getLdhName().'.'.$connector->getId()),
|
||||||
|
ttl: 600,
|
||||||
|
autoRelease: false
|
||||||
|
);
|
||||||
|
|
||||||
|
if (!$lock->acquire()) {
|
||||||
|
$this->logger->notice('Purchase attempt is already launched for this domain name with this connector', [
|
||||||
|
'watchlist' => $message->watchlistToken,
|
||||||
|
'connector' => $connector->getId(),
|
||||||
|
'ldhName' => $message->ldhName,
|
||||||
|
'provider' => $connector->getProvider()->value,
|
||||||
|
]);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$this->logger->notice('Watchlist is linked to a connector : a purchase attempt will be made for this domain name', [
|
$this->logger->notice('Watchlist is linked to a connector : a purchase attempt will be made for this domain name', [
|
||||||
'watchlist' => $message->watchlistToken,
|
'watchlist' => $message->watchlistToken,
|
||||||
'connector' => $connector->getId(),
|
'connector' => $connector->getId(),
|
||||||
@ -107,13 +129,22 @@ final readonly class OrderDomainHandler
|
|||||||
'provider' => $connector->getProvider()->value,
|
'provider' => $connector->getProvider()->value,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->statService->incrementStat('stats.domain.purchased');
|
|
||||||
if ($this->influxdbEnabled) {
|
if ($this->influxdbEnabled) {
|
||||||
$this->influxdbService->addDomainOrderPoint($connector, $domain, true);
|
$this->influxdbService->addDomainOrderPoint($connector, $domain, true);
|
||||||
}
|
}
|
||||||
$notification = (new DomainOrderNotification($this->sender, $domain, $connector));
|
$notification = (new DomainOrderNotification($this->sender, $domain, $connector));
|
||||||
$this->mailer->send($notification->asEmailMessage(new Recipient($watchlist->getUser()->getEmail()))->getMessage());
|
$this->mailer->send($notification->asEmailMessage(new Recipient($watchlist->getUser()->getEmail()))->getMessage());
|
||||||
$this->chatNotificationService->sendChatNotification($watchlist, $notification);
|
$this->chatNotificationService->sendChatNotification($watchlist, $notification);
|
||||||
|
|
||||||
|
$this->em->persist((new DomainPurchase())
|
||||||
|
->setDomain($domain)
|
||||||
|
->setConnector($connector)
|
||||||
|
->setConnectorProvider($connector->getProvider())
|
||||||
|
->setDomainOrderedAt(new \DateTimeImmutable())
|
||||||
|
->setUser($watchlist->getUser())
|
||||||
|
->setDomainDeletedAt($domain->getUpdatedAt())
|
||||||
|
->setDomainUpdatedAt($message->updatedAt));
|
||||||
|
$this->em->flush();
|
||||||
} catch (\Throwable $exception) {
|
} catch (\Throwable $exception) {
|
||||||
/*
|
/*
|
||||||
* The purchase was not successful (for several possible reasons that we have not determined).
|
* The purchase was not successful (for several possible reasons that we have not determined).
|
||||||
@ -126,7 +157,6 @@ final readonly class OrderDomainHandler
|
|||||||
'provider' => $connector->getProvider()->value,
|
'provider' => $connector->getProvider()->value,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->statService->incrementStat('stats.domain.purchase.failed');
|
|
||||||
if ($this->influxdbEnabled) {
|
if ($this->influxdbEnabled) {
|
||||||
$this->influxdbService->addDomainOrderPoint($connector, $domain, false);
|
$this->influxdbService->addDomainOrderPoint($connector, $domain, false);
|
||||||
}
|
}
|
||||||
@ -134,6 +164,27 @@ final readonly class OrderDomainHandler
|
|||||||
$this->mailer->send($notification->asEmailMessage(new Recipient($watchlist->getUser()->getEmail()))->getMessage());
|
$this->mailer->send($notification->asEmailMessage(new Recipient($watchlist->getUser()->getEmail()))->getMessage());
|
||||||
$this->chatNotificationService->sendChatNotification($watchlist, $notification);
|
$this->chatNotificationService->sendChatNotification($watchlist, $notification);
|
||||||
|
|
||||||
|
$domainPurchase = $this->domainPurchaseRepository->findOneBy([
|
||||||
|
'domain' => $domain,
|
||||||
|
'connector' => $connector,
|
||||||
|
'domainOrderedAt' => null,
|
||||||
|
'domainUpdatedAt' => $message->updatedAt,
|
||||||
|
'user' => $watchlist->getUser(),
|
||||||
|
]);
|
||||||
|
if (null === $domainPurchase) {
|
||||||
|
$this->em->persist((new DomainPurchase())
|
||||||
|
->setDomain($domain)
|
||||||
|
->setConnector($connector)
|
||||||
|
->setConnectorProvider($connector->getProvider())
|
||||||
|
->setDomainOrderedAt(null)
|
||||||
|
->setUser($watchlist->getUser())
|
||||||
|
->setDomainDeletedAt($domain->getUpdatedAt())
|
||||||
|
->setDomainUpdatedAt($message->updatedAt));
|
||||||
|
$this->em->flush();
|
||||||
|
}
|
||||||
|
|
||||||
|
$lock->release();
|
||||||
|
|
||||||
throw $exception;
|
throw $exception;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||