Git Product home page Git Product logo

rsletta / altinn-studio Goto Github PK

View Code? Open in Web Editor NEW

This project forked from altinn/altinn-studio

0.0 1.0 0.0 65.43 MB

Next generation open source Altinn platform and applications.

Home Page: https://altinn.studio

License: BSD 3-Clause "New" or "Revised" License

Dockerfile 0.18% PowerShell 0.06% C# 58.28% JavaScript 4.98% CSS 4.00% HTML 4.79% TypeScript 26.48% Java 1.07% Shell 0.01% PLpgSQL 0.16%

altinn-studio's Introduction

Altinn 3

Altinn Studio is the next generation Altinn application development solution. Together with Altinn Apps and Altinn Platform (also part of this repo), this is a complete application development and hosting platform.

Altinn Studio is available at https://altinn.studio.

Read the Altinn Studio documentation to get started.

Altinn 3 concept

Build status

Apps

KubernetesWrapper build status Front-end build status

Studio

Designer build status Repos build status

Platform

Authentication build status Authorization build status Events build status PDF build status Profile build status Receipt build status Register build status Storage build status

Developing apps?

If you just want to quickly perform tests of your app on your development machine you can follow the instructions on how to run apps locally.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Installing

Clone the Altinn Studio repo and navigate to the folder.

git clone https://github.com/Altinn/altinn-studio
cd altinn-studio

Develop Altinn Studio

To run Altinn Studio locally, follow the Altinn Studio instructions.

Develop or run Apps

First make sure to follow the prerequisites for Altinn Studio. If you only need to develop and debug App-Frontend, you can follow the description in step #5 (only) and deploy the app to any test environment. The App-Frontend will be loaded from your local webpack-dev-server.

It's possible to run an app locally in order to test and debug it. It needs a local version of the platform services to work. NOTE: Currently, it is not possible to run Apps and Altinn Studio (designer) in parallel. To run Apps, make sure that none of the containers for Altinn Studio are running, f.ex. by navigating to the root of the altinn-studio repo, and running the command

docker-compose down
Setting up local platform services for test
  1. Navigate to the development folder in the altinn-studio repo

    cd src/development
  2. Start the loadbalancer container that routes between the local platform services and the app

    docker-compose up -d --build
  3. Set path to app folder in local platform services. There are two ways to do this:

    1. Edit the appsettings.json file:
      • Open appSettings.json in the LocalTest folder in an editor, for example in Visual Studio Code
      • Change the setting "AppRepsitoryBasePath" to the full path to your app on the disk. Save the file.
    2. Define a value using user-secrets. User secrets is a set of developer specific settings that will overwrite values from the appSettings.json file when the application is started in developer "mode".
      dotnet user-secrets set "LocalPlatformSettings:AppRepositoryBasePath" "C:\Repos"
  4. Start the local platform services (make sure you are in the LocalTest folder)

    dotnet run
  5. Navigate to the app folder (specified in the step above)

    cd /<path to app on disk>
    • If you need to debug (or run locally) the app front-end:

      • Open the file views/Home/Index.cshtml in your app repo and change the lines (don't commit these changes)
      <link
        rel="stylesheet"
        type="text/css"
        href="https://altinncdn.no/toolkits/altinn-app-frontend/3/altinn-app-frontend.css"
      />
      ...
      <script src="https://altinncdn.no/toolkits/altinn-app-frontend/2/altinn-app-frontend.js"></script>

      to

      <link
        rel="stylesheet"
        type="text/css"
        href="http://localhost:8080/altinn-app-frontend.css"
      />
      ....
      <script src="http://localhost:8080/altinn-app-frontend.js"></script>
      • Build and run the runtime front-end project locally (altinn-studio/src/Altinn.Apps/AppFrontend/react):
      yarn --immutable # only needed first time, or when dependencies are updated
      cd altinn-app-frontend
      yarn start
  6. Start the app locally

dotnet run -p App.csproj

The app and local platform services are now running locally. If you have configured your hosts as described in the prerequisites, the app can be accessed on altinn3local.no.

Log in with a test user, using your app name and org name. This will redirect you to the app.

Building other react apps

If you need to rebuild other react apps, for instance Dashboard or ServiceDevelopment, this can be done by navigating to their respective folders, example src/studio/stc/designer/frontend/dashboard and then run the following build script

yarn run build

Some of the react projects also have various other predefined yarn tasks, which can be viewed in the package.json file which is located in the root folder of each react project, example src/studio/stc/designer/frontend/dashboard/package.json

Platform Receipt

The platform receipt component can run locally, both in docker and manually.

Start localtest and app

Receipt need localtest for backend services. Start this as explained under app settings. Also use an app for creating data that should be presented in receipt.

Manual
  • Open a terminal in src/Altinn.Platform/Altinn.Platform.Receipt
  • run yarn --immutable
  • run yarn run gulp-install-deps
  • run yarn run gulp (if running for the first time, otherwise this can be skipped)
  • run yarn run gulp-develop

This will build and run receipt back end, and build and copy the receipt frontend to the wwwroot folder. The application should now be available at localhost:5060/receipt/{instanceOwnerId}/{instanceId} The script wil also listen to changes in the receipt react app, rebuild and copy the new react app to the wwwroot folder.

Docker
  • Open a terminal in src/Altinn.Platform/Altinn.Platform.Receipt
  • run docker-compose up
  • The application should now be available at localhost:5060/receipt/{instanceOwnerId}/{instanceId}

Running the tests

End to end tests

Integration tests for local studio.

Frontend lint and unit tests

See readme in studio and Altinn.Apps AppFrontend projects for details on how to run these tests.

Deployment

The current build is deployed in Kubernetes on Azure.

Automated build/deploy process is being developed.

Built With

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the 3-Clause BSD License - see the LICENSE.md file for details.

altinn-studio's People

Contributors

acn-dgopa avatar acn-sbuad avatar altinnadmin avatar clarkt avatar danrj avatar dependabot[bot] avatar dskogan avatar everystone avatar github-actions[bot] avatar haakemon avatar hannekot avatar ivarne avatar jeevananthank avatar jezpoz avatar jonkjetiloye avatar kritsi avatar lorang92 avatar lovoll avatar lvbachmann avatar malmil avatar mjulstein avatar mrosvik avatar nkylstad avatar ronnyb71 avatar sandgrainone avatar tba76 avatar thetecharch avatar thomaskvern avatar tjololo avatar trymen avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.