Skip to content

An API for a web-app built to help small business easily issue invoices and manage payments they receive. Built during Klusterthon 2023.

Notifications You must be signed in to change notification settings

henrychris/simplebiz-api

 
 

Repository files navigation

API

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.

Before You Begin

To set up and run the application locally, follow these steps:

Windows Setup

  1. Create User Secrets

    • Navigate to C:\%USERPROFILE%\AppData\Roaming\Microsoft\UserSecrets and create a folder named 41019bab-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":""
        }
    }
  2. Run the Application

    • Navigate to the root directory, outside of any project folders.
    • Execute docker compose up.

macOS Setup

  1. Create User Secrets

    • Navigate to ~/.microsoft/usersecrets and create a folder named 41019bab-28dd-41f1-a221-82ed1e906626.
    • Create a file named secrets.json.
    • Add the same JSON content provided earlier.
  2. Run the Application

    • Navigate to the root directory, outside of any project folders.
    • Run docker compose up.

Important Notes

  • After running the command, four containers will start: kluster-api, kluster-database, kluster.messaging and kluster.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.

About

An API for a web-app built to help small business easily issue invoices and manage payments they receive. Built during Klusterthon 2023.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 97.9%
  • HTML 1.7%
  • Dockerfile 0.4%