Web application to create domain and subdomain accessibility audits, with violation statistics.
This web application automatically crawls websites and checks for accessibility violations. It can crawl within subdomains of the initial domain it starts with. It reports statistics of violations for the whole audit, domains and pages.
.env
file at the root of this folder (next to the README),
with the following parameters:
ADMIN_USERNAME='username'
ADMIN_PASSWORD='password'
(this password is needed to create and remove audits)docker-compose up -d
http://localhost/
.docker-compose stop
will stop the containers.docker-compose down
will stop and remove the containers. They are recreated automatically with docker-compose up -d
.docker ps
.docker logs <container_id>
.docker logs -f <container_id>
.docker-compose up
without the -d
option)Warning: this will remove all the data !!!
docker-compose down -v --rmi all --remove-orphans
Besides the required ADMIN_PASSWORD
variable, other variables can be used in .env
:
MODE
: running environment, development
or production
(production
by default)RESTRICTED_IP
: an IP address which will be the only one able to access the app
(127.0.0.1
by default for development, 0.0.0.0
by default for production,
set to 0.0.0.0
to allow connections from everywhere even in development)DEVELOPMENT_PORT
: the port used for development (3142 by default)DEVELOPMENT_API_PORT
: the port used for API calls in development (3143 by default)PRODUCTION_PORT
: the port used for production, except with SSL (80 by default)SAML_ENTRYPOINT
: SAML authentication: identity provider entrypointSAML_ISSUER
: SAML authentication: issuer string to supply to identity providerSAML_CERT_FILENAME
: SAML authentication: name of the IdP's public signing certificate used to validate the signatures of the incoming SAML Responses (should be placed in /certs
)SAML_PRIVATE_CERT_FILENAME
: SAML authentication: name of the certificate used to sign requests sent to the IdPNODE_USER_UID
: optional user id to use for the node user (this should be set before the image is built); default is 1000, which could conflict with host users.NODE_USER_GID
: optional group id to use for the node group (this should be set before the image is built); default is 1000, which could conflict with host groups.Permissions are always applied to groups. Two groups are automatically created:
Superusers
: for application administrators, with all permissions enabled. The administrator given in the .env
file is automatically added to this group.Guests
: for users who are not logged in. By default, they are only able to read created audits, but this permission can be removed.Another group can be created with SAML authentication:
Authenticated
: users who passed SAML authentication but do not have a matching user. They can have different permissions from guests.
More groups can be created and assigned users.There are separate permissions to read audits, create audits, remove audits, and edit users and groups. The audit permissions can also be given for specific domains (which include subdomains).
A template service example is provided in the root directory of this project (daa.service.example)
/usr/bin/docker-compose
and ensure environment variables are set (This can be done in the .env file above if you wish).cp daa.service.example daa.service
nano daa.service
sudo cp daa.service /etc/systemd/system/ ` or ` /lib/systemd/system
sudo systemd enable daa.service
sudo systemd start daa.service
server.key
and server.crt
inside the certs
directory.docker-compose up -d
^/section1
would only match paths starting with /section1
(the paths the expression is checked against start with a slash,
but do not include the protocol or domain parts of the URL).ports
section in docker-compose.yml
. Development mode needs 2 ports
(one for the static web files and one for the API), but production mode only needs 1.client/src/Header.js
and client/src/Footer.js
can be customized.
They are using the React JSX syntax.
Images can be added to client/public
.
When git is used, these files can be added to .git/info/exclude
to avoid
warnings when the application is updated.
The container will have to be restarted in production..env
file but I can't log in. What is going on ?.env
file on the host are used only when the container is created, and the container is not updated when the file is modified afterwards. If you have modified the .env
file after launching the application for the first time, you can simply delete the containers and recreate them. Since they don't contain any data (which is saved in a Docker volume), you will not lose any saved audit data.docker-compose down
docker-compose up -d
ADMIN_USERNAME
, it will have been created with the default admin
username. You can use that name to log in and modify the user name..env
file is created in the same directory as the README.md
file, and that ADMIN_USERNAME
and ADMIN_PASSWORD
are uppercase.robots.txt
into account.GPL 3.0.
This project is using the MERN stack. Docker is used for both development and production.
Tests should be run in Docker:
docker-compose run --rm accessibility_audit npm run test:server
docker-compose run --rm accessibility_audit npm run test:client
ESLint should be integrated in the editor, which might require an npm install
on the host machine.
It can also be used to check the whole project, using Docker:
docker-compose run --rm accessibility_audit npm run lint
Backup:
docker exec domainaccessibilityaudit_mongodb_1 sh -c 'exec mongodump -d accessibility_audit --archive --gzip' > db_dump.gz
Restore will remove all existing data in the database:
docker exec -i domainaccessibilityaudit_mongodb_1 sh -c 'exec mongorestore --nsInclude 'accessibility_audit.*' --drop --archive --gzip' < db_dump.gz