-
Prerequisites
- Go (1.17)
- Docker (20.10.14)
- Docker Compose (1.29.22)
-
Running the system locally
docker-compose up -d-
Initialize Users
- Start an interactive session with
psqlin DB container
docker exec -it <postgres container name> psql -U postgres
- connect to
pas_devdatabase using\c pas_dev - Initialize Users and their Wallets
INSERT INTO users (id, username, password) VALUES (1, 'ross', 'friends'), (2, 'rachel', 'friends'), (3, 'pheobe', 'friends'), (4, 'joey', 'friends'), (5, 'chandler', 'friends'); INSERT INTO wallets (id, user_id, available_amount) VALUES (1, 1, 1000), (2, 2, 1000), (3, 3, 1000), (4, 4, 1000), (5, 5, 1000);
- Import postman collection from
docs/Payment Automation System.postman_collection.json - Using the collection above we can use various APIs to view users and their wallets. Also create, view and delete agreements and view all transactions
- Navigate to
html/index.htmlto see all the websocket events related to creation/deletion/charged
- Start an interactive session with