Welcome to the backend API for 'Simplifying Small Business Payments.' The application seeks to help small business easily issue invoices and manage payments they receive.
To set up and run the application locally, follow these steps:
-
Create User Secrets
- Navigate to
C:\%USERPROFILE%\AppData\Roaming\Microsoft\UserSecretsand create a folder named41019bab-28dd-41f1-a221-82ed1e906626. - Create a file named
secrets.json. - Add the following JSON to the file:
{ "DatabaseSettings": { "ConnectionString": "Server=kluster.database;Database=KlusterDB;User Id=SA;Password={Password}; MultipleActiveResultSets=true;TrustServerCertificate=true;" }, "JwtSettings": { "Audience": "{Audience}", "Issuer": "{Issuer}", "SecretKey": "{SecretKey}", "TokenLifetimeInHours": 1 }, "RabbitMqSettings": { "Host": "kluster.messaging", "Password": "{Password}", "Username": "{Password}" }, "MailSettings": { "DisplayName": "{FirstName} {LastName}", "From": "{EmailAddress}", "Host": "{Host}", "Password": "{Password}", "Port": {Port}, "UserName": "{Username}", "UseSsl": false, "UseStartTls": true }, KeyVault": { "AZURE_CLIENT_ID": "", "AZURE_CLIENT_SECRET": "", "AZURE_STORAGE_CONNECTION_STRING": "", "AZURE_TENANT_ID": "", "BLOB_CONTAINER_NAME": "", "Vault": "kluster-api" }, "PaystackSettings": { "AllowedIPs": [], "BaseUrl": "", "PublicKey": "", "SecretKey": "" }, "SeqSettings": { "BaseUrl": "", "ApiKey":"" } }
- Navigate to
-
Run the Application
- Navigate to the root directory, outside of any project folders.
- Execute
docker compose up.
-
Create User Secrets
- Navigate to
~/.microsoft/usersecretsand create a folder named41019bab-28dd-41f1-a221-82ed1e906626. - Create a file named
secrets.json. - Add the same JSON content provided earlier.
- Navigate to
-
Run the Application
- Navigate to the root directory, outside of any project folders.
- Run docker compose up.
- After running the command, four containers will start:
kluster-api,kluster-database,kluster.messagingandkluster.logs. - Access the Swagger documentation at Swagger.
- Send requests to the API at http://localhost:5000/api.
- If required folders are missing, ensure to create them.
You can access the postman collection here, with examples: PostmanDoc.