Skip to content

Altinn platform microservice for handling receipts

Notifications You must be signed in to change notification settings

tina-ahm/altinn-receipt

 
 

Repository files navigation

Altinn Platform Receipt

Build status

Receipt build status

Getting Started

These instructions will get you a copy of the receipt component up and running on your machine for development and testing purposes.

Prerequisites

  1. .NET 8.0 SDK
  2. Node LTS
  3. Code editor of your choice
  4. Newest Git
  5. Docker CE
  6. Solution is cloned

Running Platform Receipt Locally

The platform receipt component need to be run in Docker.

Prerequisite

  1. This Receipt needs app-localtest for backend services. Before starting the app-localtest some modification woul dbe needed in the docker-compose.yml file to set a couple of environment variables.
  2. Also an app from Altinn Studio is needed for creating data that should be presented in the Receipt.

Process

  1. app-localtest: Before starting app-localtest add these below lines to the environment section of altinn_localtest in the docker-compose.yml file of the app-localtest:

    - PlatformSettings__ApiAuthorizationEndpoint=http://host.docker.internal:5101/authorization/api/v1/
    - AuthnGeneralSettings__PlatformEndpoint=http://host.docker.internal:5101/
    

    After adding these the section altinn_localtest in the docker-compose.yml file of the app-localtest will look like this:

    altinn_localtest:
        container_name: localtest
        image: localtest:latest
        restart: always
        networks:
            - altinntestlocal_network
        ports:
            - "5101:5101"
        build:
        context: .
        environment:
            - DOTNET_ENVIRONMENT=Docker
            - ASPNETCORE_URLS=http://*:5101/
            - GeneralSettings__BaseUrl=http://${TEST_DOMAIN:-local.altinn.cloud}:${ALTINN3LOCAL_PORT:-80}
            - GeneralSettings__HostName=${TEST_DOMAIN:-local.altinn.cloud}
            - PlatformSettings__ApiAuthorizationEndpoint=http://host.docker.internal:5101/authorization/api/v1/
            - AuthnGeneralSettings__PlatformEndpoint=http://host.docker.internal:5101/
        volumes:
            - ./testdata:/testdata
            - ${ALTINN3LOCALSTORAGE_PATH:-AltinnPlatformLocal}:/AltinnPlatformLocal
        extra_hosts:
            - "host.docker.internal:host-gateway"
    
  2. Start the app you have made in the Altinn Studio and run it. Check if this app is working fine with the app-localtest backend service.

  3. Then go to the altinn-receipt directory and run docker-compose up --build. If you make changes to the code, you will need to re-run docker-compose up --build to see the change in action.

  4. The application should now be available at local.altinn.cloud/receipt/{instanceOwnerId}/{instanceId}. You'll find the {instanceOwnerId} and {instanceId} in the URL after you successfully submitted the Altinn Studio app form.

About

Altinn platform microservice for handling receipts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 63.2%
  • C# 33.3%
  • JavaScript 1.8%
  • Other 1.7%