Skip to content

thobaier/SumSub-ID-verification-example

Repository files navigation

Sumsub middleware application

Info

  • Symfony Framework version 6.3.*
  • MySQL version 8.*
  • PHP version 8.2*

Development setup

This project comes with a docker development setup to quickly bootstrap the application in dev mode.

1) Environment variables

The project contains a .env file in the root directory. This file contains default values for environment variables. To override a default value, just create a file in the root directory named .env.local and put in just those variables you want to override.

In this example, we set the HTTP default port to 81 and insert some credentials. All other variables and their values are loaded from the default .env file.

# .env.local file
PORT_APPLICATION_HTTP=81

APP_DOCUMENT_STORAGE=uploads.storage.aws # switch to S3, default is set to 'uploads.storage.local' for development

S3_STORAGE_SECRET=INSERTE_HERE
S3_STORAGE_KEY=INSERTE_HERE
S3_STORAGE_REGION=INSERTE_HERE
S3_STORAGE_BUCKET=INSERTE_HERE

SUMSUB_APP_TOKEN=INSERTE_HERE
SUMSUB_SECRET=INSERTE_HERE
SUMSUB_WEBHOOK_SECRET=INSERTE_HERE

2) Build the docker images and bring up the project

docker-compose up --build

This will take some build time. Now all container should be running.

2) Execute the following commands in order

If you have changed the environment variable for the container name for the FPM container, please change the name in the commands also.

docker exec -it fpm composer install
docker exec -it fpm bin/console assets:install
docker exec -it fpm bin/console doctrine:schema:update -f --complete

3) Create a admin user

Change username email password as desired

docker exec -it fpm bin/console sonata:user:create username email password --super-admin

Now login the application at:
http://localhost/admin

Mailcatcher:
http://localhost:8081

PHPMyAdmin:
http://localhost:8080

Production setup

Do not use this docker stack

Do not use this provided docker stack for production!

Sumsub webhook

You need to setup a webhook in Sumsub. We are working with two types of webhooks here:
Applicant reviewed
Applicant's personal info has been changed

https://{HOST}/webhook/sumsub

Example setup:

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors