Skip to content
Snippets Groups Projects
Select Git revision
  • e18e2567b86dd1fcbaea8db069e9f9e3179afa72
  • main default protected
  • old_beta_site
  • smart_caching
  • 51-endpoint-course-slow-to-load
  • dork
  • dork2
  • v2.0.8 protected
  • v2.0.7 protected
  • v2.0.6 protected
  • v2.0.5 protected
  • v2.0.4 protected
  • v2.0.3 protected
  • v2.0.2 protected
  • v2.0.1 protected
  • v2.0.0 protected
  • v1.1.10 protected
  • v1.1.9 protected
  • v1.1.8 protected
  • v1.1.7 protected
  • v1.1.6 protected
  • v1.1.5 protected
  • v1.1.4 protected
  • v1.1.3 protected
  • v1.1.2 protected
  • v1.1.1 protected
  • v1.1 protected
27 results

frontend

  • Open with
  • Download source code
  • Your workspaces

      A workspace is a virtual sandbox environment for your code in GitLab.

      No agents available to create workspaces. Please consult Workspaces documentation for troubleshooting.

  • Dorian Koch's avatar
    Dorian Koch authored
    e18e2567
    History

    Commands

    Install nodejs with version >=18.17.0 and npm (which should come pre-packaged with nodejs)

    npm install: Installs dependencies

    Running npm run dev is the recommended way to start the development server (compiling and serving files over http, automatically refreshing components when their code is updated etc.)

    NEXT_PUBLIC_API_URL_PREFIX=http://localhost:5000 npm run dev: Starts development server

    npm run build: Compiles website into static files, output placed in out/

    npm run lint: Runs a lint on the code to check for errors and warnings

    npm run prebuild: Builds assets required for the build, such as language files

    npm audit: Checks for known vulnerable versions of dependencies

    npm outdated: Shows outdated dependencies

    It is recommended to install npm run lint as a git commit hook

    Struktur

    Stand: 10.05.2024

    • public/: Hier werden statische Assets abgelegt
    • lang/: Language files
    • src/
      • api/: Code um mit dem Backend zu kommunizieren
      • components/: Komponenten die entweder wiederverwendet werden oder zu groß sind
        • DefaultLayout.tsx: Das ist die Default "template" in die jede page reingerendert wird
      • misc/: Hilfsfunktionen
      • pages/: Spezielles verzeichnis, jede Datei hier wird vom framework als .html gerendert, die dateinamen werden übernommen
        • _app.tsx: Template in die jede page reingerendert wird
        • _document.tsx: Spezifiziert die Grundstruktur des HTML
      • styles/: CSS Dateien
      • types/: Typescript Typ-Definitionen