Skip to content

tramvaijs/tramvai-sandbox

Repository files navigation

example-app

example-app tramvai application

Install dependencies

Run installation with selected package manager yarn

Usage

  • npm start - run development server
  • npm build - production build

Project structure

  • src - application source code
    • index.ts - application entry point, where all tramvai modules are connected
    • vendor.ts - file with vendor dependencies, will be extracted into a separate js chunk
    • postcss.js - postcss configuration object
    • routes - application pages
    • shared - reused modules of the application

We recommend follow feature-sliced methodology guidlines to structure application code.

Important modules

  • @tramvai/module-server - processing client requests, working with papi. Documentation
  • @tramvai/module-render - server-side html rendering and client-side hydration. Documentation
  • @tramvai/module-router - router integration in the application. Documentation

Next steps